3 Sensors

by Alex Tong, Ahmed Allam, Henry Young

 

This application note reviews how to implement three cheap sensors: temperature, compass, and vibration.

The following components were used in our sensor implementation

Dinsmore Compass Sensor 1490 $12.00 US http://www.dinsmoregroup.com

10K Thermistor $5.52 US

http://www.digikey.com

Piezo Film Vibration Sensor MSP1006-nd $0.75 US http://www.digikey.com

12 bit ADC ADS7816P-ND $7.58 US

http://www.digikey.com

 

The compass is an 8-direction compass which can interface directly to the Altera UP1 board with only pull-up resistors. The thermistor and vibration sensor require an analog-to-digital converter for interfacing.

 

Interfacing the Dinsmore Compass

Internally, the sensor is composed of four Bipolar-Junction-Transistors. When one of the transistors is aligned with its representative direction the BJT goes into saturation (sinking up to 25mA). When the BJT is facing any other direction it is in cutoff. I.e. when the BJT representing North is aligned north it outputs 0 volts, align it in any other direction and it maintains its cutoff collector voltage.

Our compass was designed using a 9V raw power Vcc. The compass power was tested using both a 9V adapter and a 12 V battery pack (8 D batteries); both methods were sufficient to drive the logic 1 & 0 thresholds on the Altera board. The two 10Mohm pull-up resistors are required as a voltage divider and for pulling up the collector voltage while in cut-off.

The output pin connection of the Dinsmore compass is shown in figure 1

Figure 1: Dinsmore Implementation

The connections for each of the output pins has been implemented and tested successfully with this configuration.

The Dinsmore compass gives

8-way directional sensing. (i.e. when both the North & East internal BJTs go into saturation, the direction is North-East.

 

 

Interfacing the ADS7816 ADC

The ADS7816 ADC is a 12 bit serial output analog-to-digital converter that requires an external clock and a falling edge select line for conversion.

Each ADS7816 ADC is clocked with a 1.25 MHz clock. From experimentation, we were only able to latch every other bit of the 12 bit ADC in effect treating it as a 6 bit ADC with a resolution of 64 levels. Further testing might allow latching of all 12 bits or you might just want to try another ADC. The hardware interfacing in the reset of this document is still valid regardless of ADC resolution.

The following file is used to test our ADC latching

adcinfo.vhd

 

Interfacing the Vibration Sensor

Vibration sensing was done by implementing piezo film vibration mass sensors. Some piezo film properties are

-wide freq. range 0.001Hz to 10^9 Hz

-high dielectric strength (to withstand strong fields)

-high mechanical strength and impact resistant

-moisture resistant

Piezo film sensors convert mechanical energy to electrical energy . Implementing and testing the sensor as shown gives (roughly) 0.2 Vpeak-max (at 0 Vdc) output when the sensor is untouched. Vibrational activity produces voltage overshoots of up to (and sometimes beyound) 5v.

 

Our group used the following file to latch vibration sensor data from the ADS7816 ADC

vibadc.vhd

 

Temperature Sensing

Once you get analog-to-digital conversion working, implementing temperature sensing is simple: all you need is a thermistor. A thermistor changes internal resistance linearly to changes in temperature. Calibration of temperature is done with the thermistor's individual manufacturer supplied characteristics.

Our group used the following file to test our temperature sensor interface with our ADS7816 ADC

tempadc.vhd

 

 

 

the following files are needed if you used vibadc.vhd or tempadc.vhd

timer.vhd A generic timer by Darren Gould, Kevin Grant, Andrew Stanley-Jones

makeclks.vhd A standard clock divider modified from EE552 course notes

debounce.vhd A key debouncer from the Tenesse Tech. University by an unknown author.

 

 

References

[1] Tennessee Technological University, "debounce.vhd"

http://digital5.ece.tntech.edu/Public/Xilinx/Ex...les/xilinx/calc

[2] EE552 Course Notes

by Dr. Duncan Elliott

[3] G. Darren, G. Kevin, Stanley-Jones A., "Generic Timer"

http://www.ee.ualberta.ca/~elliott/ee552/studentAppNotes/99w/timer/

[4] Dinsmore 1490 Spec. Sheets

[5] Measurement Specialties, "Piezo Film Sensors Technical Manual"