Measuring Distance with a Ping Sensor
The Parallax Ping sensor sends out an ultrasonic pulse and measures how long it takes for the echo to return. It measures distance between 3 and 300cm. This graph shows the sensor's value as we move an object back and forth- from 2 to 40 cm over 10 seconds.
This measurement shows the distance measured by a Ping Sensor as an object was moved between and cm over 10 seconds.
Measuring Magnetic Direction with a Compass
The Parallax HM55B measures magnetic force using 2 Hall effect sensors. It provides 6 bit resolution- so 64 directions. This graph shows the compass' value as we rotate the sensor 90' every 4 seconds. First it points North, then East, South, and West.
Measuring Filter Response with a DAC and an ADC
ADC's and DAC's are used to output and measure analog pulses. This graph shows 3 traces. The red trace is a 100hz sine wave calculated with the sine values in the Propeller's ROM. This signal is shifted and recentered to drive 3 IO pins as a DAC. The signal is modified by an analog filter and read using an MCP 3208 ADC- this is the blue trace.
Measuring Temperature with an NPN transistor
A simple npn transistor can be used to accurately measure temperature. A BSX 20 delivers ~770mv at 0'C when measured across the collector which is connected to Vss by a 1K resistor. The transistor's resistance decreases with increasing temperature- giving us a signal of 2mv/'Celsius. The graph shows the sensor at room temperature for the first 20 seconds, then immersed in an ice bath for 10 seconds, and heated to 43' for the last 20 seconds.
Measuring Tilt by Kalman Filtering a Gyro and an Accelerometer
A gyro is good for measuring rate of turn- but integrating it's signal to get tilt results in a signal that drifts over time. An accelerometer is good for measuring absolute acceleration- like the force of gravity- but accelerations caused by jarring movements also affect it. To obtain an accurate tilt reading, one must filter the two signals with a Kalman filter. This graph shows (in order) the raw gyro signal, the raw accelerometer signal, the kalman filtered tilt signal, the integrated gyro signal, and the bias component of the kalman filter. The sensors are mounted on a tilting platform that moves 10' at 1hz.