![]() |
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
Initial Setup Requirements: |
Components:
Temperature Sensor (LM34)
Multi IO module
Capacitor (1uF)
Wire
Tools:
Soldering Iron
Solder
The LM34 is a precision Fahrenheit temperature sensor. It is extremely simple to use: just connect 5V and ground and begin reading the sensor values. The device outputs 0V for 0 degrees F and increases its output by 0.01V for every increased degree F. This makes the theoretical upper temperature limit 500 degree F, but the device will only work up to around 250 degrees F.

Fig. 1: The LM34 Temperature Sensor
One additional component - a 1uF capacitor - helps to smooth out any unwanted signal noise. This is optional. Without it the signal received by the Multi IO may drift a bit due to signal noise if the leads are longer than an inch or so.
For an explanation of symbols, refer to circuit basics

Fig. 2: Circuit Diagram
Wiring is very simple. Solder wires to the chip taking care to note which color is attached to which wire. Some heatshink tubing if you have some available will prevent the leads from touching. Wire the correct leads into the 5V, A0 and GND connectors on the Multi IO board.
Finally, if desired, connect the capacitor, either as shown or solder the leads to the ends of the wire A0 and GND wires and insert them into the screw terminal. The positive (+) side of the capacitor should connect to the A0, the negative side (-) to the GND.
The leads probably shouldn't be too long as the longer they are the more noisy the signal will be. We suggest not much longer than a foot. As with everything, if you want to make it longer, try it out. See if the results you get are satisfactory.

Fig. 3: Temperature Sensor Wiring
Connecting the sensor to the Multi IO is very easy, since it outputs a voltage. The only trick is to know what the voltage means. The range for the Analog In on the Multi IO should be set as follows - minumum 0.0 and maximum 500 since 0V at the input has been designed to be 0 degrees F and 5V (if it could ever be reached) is designed to be 500 degrees F. Once set up this way, then the Ain will actually output numbers in degrees F.
Objective
Control Flash with analog input from the temperature sensor through an Intro Module.
How To
1. Be sure your Teleo module and the temperature sensor are properly connected.
2. Run the Teleo XML server. Check the user guide for more information.
3. Create a Flash movie.
4. Insert the code found below into the Action Window in the first frame of a new layer called "Actions". The lines following "//" symbols are comments, which are ignored when the code is run but can help the coder keep track of what certain lines of code mean.
5. Run the movie, then vary the temperature around the sensor by covering it with your hand, for example. In the Output Window, notice how the "New Analog In Value" changes in response.
Code //import the MakingThings Class Libraries import com.makingthings.*; //create a new Intro Analog In object var ain:TIntroAin = new TIntroAin( 0 ); //read the analog input value each time it is changed ain.onValue = function( value:Number) { //display the current analog in value in a separate output window trace("New Analog In Value: " + value); //now do something useful with the value }
Monitoring Electronics
Use the temperature sensor to ensure that electronics and electrical devices don't overheat.
Monitoring Environments
Use the temperature sensor to monitor refridgerated spaces to ensure adequate and uniform cooling.
Outside Temperature Check
Check outdoor temperatures before venturing out.
Garden / Hothouse Temperature Check
Plot the temperature of your hothouse or garden during the day and night.
| copyright © 2002-2004 MakingThings LLC |