DS2760 Thermocouple Kit Driver for Propeller - oddities
Timothy D. Swieter
Posts: 1,613
Last November I setup a home SMD soldering station using a toaster oven. The setup is documented in another thread, but basically it uses a Propeller protoboard, some added electronics and the DS2760 thermocouple kit from Parallax. The Propeller is control the system and reads an internal temperature of the oven from the thermocouple.
I created a driver for the thermocouple to be used with the Propeller since I didn't see any others posted. I had trouble back when I was first writing the software because the code seems to fail or error at times. I am guessing it is the code, maybe it is hardware. What I am seeing is that sometimes when I start the system the temperature I am getting returned (after processing) is a -1 or error. Sometimes the system starts and is giving a good temperature and as the system is heating up then the temperature will go to -1. It happens as different points in the process and at different temperatures. Sometimes it seems like I can't get it to come out of reporting -1 until I shut down the system and fiddle with the thermocouple itself. So again, I am not sure if it is hardware or software. I have done various levels of troubleshooting and haven't figure it out yet, most of the trouble shooting was months ago.
Since there is a forum here for sensors I thought I would ask for help or someone else to hook up a thermocouple and a Propeller and try out my code. Look it over to see what I may have wrong or to confirm that the code is perfect. In the coming weeks I want to get back into details of my toaster oven system and do some software work, so I can better troubleshoot the thermocouple then, but for now I am hoping someone else can try out the code or offer advice.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
www.tdswieter.com
I created a driver for the thermocouple to be used with the Propeller since I didn't see any others posted. I had trouble back when I was first writing the software because the code seems to fail or error at times. I am guessing it is the code, maybe it is hardware. What I am seeing is that sometimes when I start the system the temperature I am getting returned (after processing) is a -1 or error. Sometimes the system starts and is giving a good temperature and as the system is heating up then the temperature will go to -1. It happens as different points in the process and at different temperatures. Sometimes it seems like I can't get it to come out of reporting -1 until I shut down the system and fiddle with the thermocouple itself. So again, I am not sure if it is hardware or software. I have done various levels of troubleshooting and haven't figure it out yet, most of the trouble shooting was months ago.
Since there is a forum here for sensors I thought I would ask for help or someone else to hook up a thermocouple and a Propeller and try out my code. Look it over to see what I may have wrong or to confirm that the code is perfect. In the coming weeks I want to get back into details of my toaster oven system and do some software work, so I can better troubleshoot the thermocouple then, but for now I am hoping someone else can try out the code or offer advice.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
www.tdswieter.com
Comments
obex.parallax.com/objects/385/
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
www.tdswieter.com
I am using your object. I have modified it to use type J thermocouples. I had to build a new table in the dat section. I am also writing an object using part of your code to use the DS2760 to read a ph sensor probe.
I am still sourcing some parts to build the ph amplifier as described here
I will be ordering the DS2760 kit from parallax this week. I should be ready for some testing next week on the thermocouples. Probably a little longer on the ph.
I would be glad to share my findings and any modifications I make with you.
Greg
Yesterday I ran my toaster oven again and right when I turned it on it was giving me the -1 error. I tweaked the end of the thermocouple that does the measuring and then I started getting valid measurements. I don't get it because the wires are twisted together well at the sensing end.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
www.tdswieter.com
Haven't had any time this last week to attack this yet. I will be ordering the thermocouple set today. I have 3 DS2760 Chips to put on my dev board that I am making, I wish they came in a dip. I did manage to get a ph sensor with an amplifier off ebay for 20 bucks so I am set to go. I have a few questions and I noticed you touched on one these these previously.
First off, did you make any headway using multiple DS2760's on the same pin? From what I am reading this would only be beneficial for getting an aggregate reading across multiple sensors from the same source without knowing the physical address of each chip. I need to monitor temps from 2 different sources and make separate decisions base on those readings. I can't think of an easy way to do this on 1 pin without knowing the address, which would require special code for each board. My solution right now is to put each DS2760 on a separate pin.
Second, on the ph sensor, it has an amplifier that outputs millivolts, is there a way to get the propeller to read that directly without the use of a DS2760? I think this is possible on the stamp using SHIFTOUT and SHIFTIN, I could be wrong there but I am not up to speed on the stamp yet.
Greg
I haven't had a need to get drive multiple DS2760 ICs on a single wire, so I can't offer much help there. One-wire busses can have multiple ICs on them and from a glance at the data sheet the DS2760 has a built in 64-bit unique address. You will have to construct your system in pieces, but you should be able to run a test on each IC to determine its address and then put all the ICs together on the bus and communicate with all them using the known addresses.
For your PH sensor, I can't offer much help there either as I have only used the DS2760 in the thermocouple application. Depending on the range of the sensor you may need to use an Analog to Digital IC (AD IC) or maybe you can construct a simple circuit that charges/discharges a capacitor using an I/O pin. The software then counts time and you can get close to what the voltage measurement, but it isn't precise and depending on the voltage levels of the sensor may not work. There are examples of this elsewhere for the basic stamp and the Propeller (I think). I remember the Toddler kit used this capacitor method to read some IR or light sensors.
Last time I used my toaster over/DS2760 thermocouple it worked fine. I don't get what is wrong with my setup that it sometimes works and sometimes doesn't. Someday I will need to devote time to this.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
I got my thermocouple kit today. I have found some wierdness.
So I hooked it up and sometimes it works and sometimes it gives a -1
here is the code:
I renamed your object and added a table for type J. I think the problem is the connection of the thermocouple to the ds2760. If I touch the wire, the temp reading will drop to -1. Also touching the bare twisted wire also results in a -1.
I am fairly convinced the problems you are seeing are related to the connection, not the code.
I am in the process of designing a board right now that has 3 ds2760 chips on board. It will use screw terminals for the connections which should make a cleaner connection.
So far it looks like your code is pretty solid. I will be doing more extensive testing on this over the next week or so.
Greg
Just thinking out loud here...
ElectricAye - no, I don't think it is an arc of any sort. I don't have a thermostat in my toaster oven, gutted everything but the heating elements and the light bulb and adding my own solid state electronics.
Greg, I am glad to get some other eyes looking and working with this code. Let me know if you find anything....and in time here I should add the tables for the J-type thermocouple to the listed object so others won't have to add them.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
I am going over the ds2760 pretty hard this weekend. Your driver returns Celsius, so I am trying to convert it to Fahrenheit
using the following formula
myTemp := (9/5) * tc.TCtemp + 32
this way always is about 15-20 degrees off for some reason. Being fairly new to the propeller, I can't make a solid assumption here but it may be because the calculations will not produce integers.
Could this problem arise from the type of the values being returned from your object? I guess I need to do a little reading in the prop manual and see if the operands are different for doing real math instead of integer math. Any input would be greatly appreciated.
Greg
As for the software, it would be good to indicate when the reading has gone beyond the entries covered by the tables. Say -1 when it is below the lowest entry, and perhaps 9999 when it is above the highest. I worked on some equipment that gave ridiculous readings when the incoming water was below the minimum temperature of the table, and as a result the heater would not come on. Basically the customer ended up waiting a long time until the water warmed up enough to give reasonable readings so the main software could then start the heater.
http://forums.parallax.com/showthread.php?p=637023
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
Does anyone know if you can submerse the DS2760 Thermocouple?
I want to use it in to interface with the Propeller for the purpose to measure and display (on an LCD) the temperature of the cooking oil. This would require it be submersed into the oil pot. The range of temp would be 0 to 550 degrees F.
Also can anyone tell me which model LCD on the PARALLAX wed site would be compatible with the Propeller. All the ones I seen seem to be for the Basic Stamp only.
Thanks
Tim U.
Although it's probably not necessary, it's a good idea to use a 2.2K resistor between the Propeller I/O pin and the serial input pin of a serial LCD that runs off +5V. It won't affect the serial I/O signal, but would protect the Propeller's +3.3V I/O pins from accidentally applied +5V signals.
Post Edited (Mike Green) : 10/13/2009 6:15:25 PM GMT