Reading temperature with commonly found RadioShack parts?
eagletalontim
Posts: 1,399
I am looking to build a very simple temperature sensor that can read 20 to 60 degree F using basic items found at a RadioShack. The components I already have are resistors, standard switching transistors (NPN and PNP), a 741 OP amp, a few 555 timers, diodes, zener diodes, and voltage regulators. I cannot buy any parts for this project so I am limited to what I have on hand. Any information, preferably a schematic, on how to possibly build an ADC with the 741 that can possibly use a diode as the "probe". I have already searched but can't seem to find any schematics or code that will work
Comments
The only thing is calibrating it.
Current to voltage amp
Accuracy, not great.
[General Discussion]
DC amplifier (inverting, non-inverting, your choice), X5
nominal 0.6V in, 3V out
10 degree change, 20mV change
0.620 V * 5 = 3.1V out
There is a useful app note here
http://cds.linear.com/docs/en/application-note/an137f.pdf
- and this mentions using PNP transistors as the sense element. 2N3904 or 2N3906.seem to be popular choices, so there should be calibration info out there for these devices.
Have a look at page 126 of the PEK manual.
It also is setup to function at any PLL mode (since I use it at several different speeds)
Remember the acronym KISS
There are OBEXs for this.
Basically:
1. Permanently set the pin to low.
2. Set the pin to output, Discharges the capacitor.
3. Set the pin to input.
4. Remember the time.
5. Wait for pin to go high.
6. Read time again.
BTW, that's very similar to what the 555 does, but without the 555.
Note! I drew the schematic with a pullup thermistor. This same operation can just as easily be done with a pulldown thermistor configuration.
Duane J
You could simply clone the 555, but then you have C variations in the equation, and the transfer is Non-linear. However, it could work ok for a single set-point.
Or you could look somewhere like this
http://ww1.microchip.com/downloads/cn/AppNotes/cn_00685b.pdf
and the run the Prop in Resistor-ADC mode. Sounds complex, but really is just a resistor from FF.D (ADC-in) to GND which sets the current, and then the Thermistor + correction resistor in parallel, connect to the FF.Q (ADC Feedback). Plus the standard SDM caps.
The negative feedback keeps a constant voltage across pulldown resistor (== constant current) and now the Counter ADC value, is the average voltage needed on the Thermistor to give stable operating, (drops as temperature increases) and gives (CalValue-CounterValue) Scaled as ~temperature.
Spice plot added for clarity : This shows a raw NTC, and a parallel compensated NTC, and an error plot.
Highest voltage is at lowest temperature, so you would scale Current and Correction R, to suit temperature range of interest.
The Prop ADC has a virtual Gnd of ~50% Vcc so has a Vlimit of ~1.65V
Duane has made it easy and as I pointed out in post #5, the PEK documentation (which you can find under the Help menu in the Propeller Tool) has all kinds of good information starting on page 126.
I used Excel's equation calculator (I forgot what it's called). It gives you the numbers based on 3 or more sample values.
Get 3 or more samples across as wide of a range as you will be using.