[video] Completed Project : Digital Thermometer using PIC16F and AD595  - Page 1
Forum section: electronics / projects

author: mariush
author_rank: Super Contributor
timestamp: June 05, 2014, 04:21:30 pm
content: A few weeks ago I decided to stop procrastinating and use some of the parts I had around to build a K type thermocouple thermometer, because the IR thermometer I use is only good for 350c and all my other multimeters don't have temperature reading capability.So I picked up an AD595 that I originally wanted to use to use in a reflow oven controller and paired it with a pic16f1519 and a 4 digit seven segment display and made a tutorial of sorts.. well, 3 videos about it.I've actually suprised myself when i got stuck with 3+ hours of content, I initially thought it's only going to take 1h at most. Anyway, I'm probably speaking slower than native English speaking people so that could account for the long videos... and I wanted to explain some things as best as I could for total beginners (not sure how well that turned out)...Project page (and download source code location) :http://www.helpedia.com/pages/Designing_and_building_a_digital_thermometerPart 1 (explaining part selection, how they work together, what "gotchas" to look for, how seven segment displays work etc) :Part 2 (building on prototyping board/stripboard, some minor changes, measuring current consumption etc) :Part 3 (source code explained in detail) :

author: dannyf
author_rank: Super Contributor
timestamp: June 05, 2014, 09:45:34 pm
content: QuoteYou don't have to use a thermocoule amplifier. A regular amplifier + software approximation will work.9th order approximation will get you to within 0.05c (typically 0.01 - 0.02c), plus the added benefits of being flexibile - software configurable as to which thermocouple to use.5th order approximation is faster but less accurate -> mostly 0.1 - 0.2% -> good enough for 10-bit adc.

author: mariush
author_rank: Super Contributor
timestamp: June 05, 2014, 10:00:15 pm
content: Thanks for the suggestion.I bought the AD595 a while ago when I wanted to make a reflow oven - back then, i was thinking of using its "alarm" feature as an independent kill switch for home made reflow oven in case temperature got over 300c or something like that. But i got busy with other projects so now it was just wasting space.In the source code, i just did an average of the last 10 measurements, and it's doing 1 measurement every 100ms. It's good enough but I may improve it in the future.Will work on it anyway, as i want to change the led display with a cheapo 2x16 lcd display because I don't like the power consumption, the meter averages 70mA with the current display, a bit much for a 9v battery.

author: dannyf
author_rank: Super Contributor
timestamp: June 05, 2014, 11:07:51 pm
content: A couple suggestions:1) you can simplify the wiring by piggy-backing the led display right on top of the pic, RA0..5 and RB1..6. No current limiting resistors.2) To reduce current consumption, you can reduce the supply voltage: at 3.3v, you consume about 20-30ma, and at 2.5v, you consume 10 - 20ma. The leds are quite visible.Hope it helps.

author: mariush
author_rank: Super Contributor
timestamp: June 05, 2014, 11:44:20 pm
content: The lower voltage is a good idea, but that would prevent me from using the built in 4.096v reference. As the AD595 outputs 10mV per C, I wanted 4mV steps from the 10bit ADC (yes, I know, the adc isn't that great in the first place, it's only +/- a few counts but still). In the source code, I'm switching between the 2.048v and 4.096v reference levels depending on the measurements (if the voltage is less than ~ 1.8v, switch to 2.048v reference, hoping to get a better accuracy)As I wanted the meter to measure 500c (ad595 outputs 5100mV for that temperature so more than the 4.096 vref), i also used a 1:2 voltage divider which complicates things.The LED display pinout is a bit silly, with cathode pins mixed with the anodes. In theory yes, I could have piggy-backed it over the pins at least for the anodes, and skip the resistors as well because the pic can only do 25mA per pin (more than 20mA said in datasheet but since the duty cycle is 25% it would have worked) .. but i figured as long as i make a video maybe some beginners will learn how to properly drive those led displays (how to current limit, multiplexing, using transistors for cathodes etc)A LCD display would only use 3-5 mA, plus maybe 10-15mA for led backlight if it's going to need one, so it would be less power hungry no matter how you look at it.There's a lot of waste due to the 7805 regulator anyway. I could have used 4aaa batteries and a voltage doubler for the AD595 (because it only consumes maybe a couple of mA) and end up much better. But this works quite

author: dannyf
author_rank: Super Contributor
timestamp: June 06, 2014, 12:09:18 am
content: This is a case where an AVR would be quite helpful, given its variable gain settings for adc.