circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

January 2006, Issue 186

Electronic Scarecrow


SENSORS

Each sensor (except the on-board accelerometer) has its own board and is connected directly to the SARD board. The MMA6261Q XY-axis accelerometers are the most straightforward. Their outputs are RC filtered to eliminate the noise from their internal switched capacitor filters. The outputs are then fed directly to the microcontroller’s ADC. Power comes from the switched 3-V supply.

The MMA1260D Z-axis accelerometer is a bit more complicated. The accelerometer’s I/O levels have to be shifted because 5 V powers it. An on-board regulator supplies 5 V from the switched 9-V supply.

The MPXM2010GS pressure sensor shares the same input as the MMA1260D Z-axis accelerometer, so only one of them can be connected at a time. They have different output levels in Self Test mode, allowing the software to automatically distinguish between them. The sensor, which operates directly from the 9-V switched power, produces an output signal of only 25 mV. This signal is amplified with a TLC271B op-amp. It’s then shifted up from ground by approximately 500 mV to compensate for the worst-case op-amp and sensor offsets.

The MC33794 e-field sensor IC measures small changes in capacitance from up to nine electrodes. A built-in shield driver minimizes the effect of electrode cable capacitance. It’s powered from the switched 9-V supply.

The MC33993 switch expander is configured to handle pairs of IR LEDs and phototransistors. The expander wakes up every 64 ms for 125 µs to check the sensors, and it interrupts the microcontroller if the status changes. It also has to be able to wake up the radio to enable its CLKO pin, which supplies the MC9S08GT16 microcontroller’s clock. I do this by feeding the expander’s *WAKE output to the radio’s *ATTN input. The MC9S08GT16 microcontroller can disable this function by holding port pin PTC2 high. The LED outputs are set to source 16 mA of drive current on SP7:0. The sense inputs SG7:0 are set to 2 mA. Pins SG13:8 are hard-wired to an alternating high/low pattern for the purposes of self-testing.