|
|
View previous topic :: View next topic |
Author |
Message |
Trio Guest
|
Temp sensor |
Posted: Fri Jan 27, 2006 12:52 pm |
|
|
Hi,
just looking for some advice/opinions really.
please bear with me because i'm quite new to programming and PIC work in general. I'm currently designing an intelligent NiMH battery charger using the PIC18f452. I have come a fair way circuit-wise but am quite stumped with regards to what, or how, to go about reading a temperature and sending the data back to the pic. To prevent the batteries from over heating/charging each of the four batteries will be placed on some kind of temp sensor. I am familiarish with the ADC and have used it successfully for reading a voltage accross a load. has anyone used multiple temp sensors before?. any ideas?
I'm quite stuck for time with this project and am trying to stay clear very complicated methods.
What would you recommended for my situation and why.
Thanks for any help, however small. All will be greatly appreciated.
cheers, Jamie |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1907
|
|
Posted: Fri Jan 27, 2006 1:15 pm |
|
|
Your situation is actually pretty complicated. Because you want to measure the temperature of the batteries, that raises all sorts of mounting issues. In other words, your sensors will have to be off the pcb unless you design your charger so that each of the batteries (assuming there's more than 1) are in contact with the pcb.
You can go two ways: analog or digital. If you go with digital sensors, it simplifies your circuitry a lot since you don't have any analog signals to worry about. Dallas Semiconductor makes quite a few really good digital sensors. I've used the DS1722S, 18B20 and 18S20 before. They're all accurate and reliable. However, the 18's are a little difficult to 'speak to.' Since you say you're new to this, I'd recommend staying away from the 18's until you're more experienced with coding.
If you go analog, then there are a lot of options open to you. There are numerous analog temperature sensors available, but at the added expense/difficulty of the analog circuitry/filtering/amplification/A/D, etc. I can recommend one sensor in particular, the National LM35DH. You supply it with +5V and ground, and it has an analog output which is 10 mV/degree C. Very straightforward, but in order to maximize the 'resolution' of the A/D reading, you'll have to add an external voltage reference of perhaps 1.2V or so instead of using the PIC's internal Vdd reference. That adds to the complexity of the circuit and of properly scaling the result.
Lastly, do you really need multiple temperature sensors, or can you get away with 1, and assume that it's representative of the other batteries in the charger? Also, do you use a sensor in a metal package to increase the thermal transfer through the case, or do you use a sensor in an ordinary plastic package? |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Fri Jan 27, 2006 4:06 pm |
|
|
Having the off-board sensors is probably your biggest nuisance (correct me if I’m wrong). I would minimize the number of wires, and ideally, each sensor would have just 2 wires. So, here are 2 more options:
- Thermistors. 2 wires per channel plus one resistor on the main board. The output is nonlinear, but it can be linearized, or you can just compare it to your threshold value, since you are just looking for overheat.
- Digital sensors with remote diode sensing element. 2 wires per channel. Such as LM84 (single), LM83 (triple), MAX1668 (quad), all of these connect through I2C. |
|
|
Trio Guest
|
|
Posted: Sat Jan 28, 2006 4:20 am |
|
|
Thanks for the replies.
newguy- you're right about the mounting issues. The batteries will probably be mounted in something like this
the plan was to cut a small bit of the casing out from directly behind each batteries head to mount a sensor. We also thought a small piece of silicon on each to aid heat conduction.
At first my plan was infact to go digital but i think i underestimated how complicated it would be. I did however find some info on a digital thermometer 'DS18S20 High Precision 1-wire Digital Thermometer' this sounded nice because more than one can be connected in series, and hey looks like a small transistor, which surely could be taken off the PCB?however they are quite expensive....
Has anyone used these or have any views on them? easy to set up?
Then there's Analog. I quite like the idea of this but would it possible to use another 4 ADC's on the PIC 18f452 and how straight forward would it be. I will look into the 'National LM35DH'thanks for the advice.
Multiple sensors are needed really because we cannot assume that all batteries are in the same charged state when they go in. i.e. A battery at the end that's being recorded might be of average heat and another might
be frying away on the end. We've thought about trying to conduct the heat
from all four onto one pad but i just dont think there's enough. Any ideas on that would be a great help too.
Kender- thanks alot i will look into these different sensors too. The idea was to keep it nice and simple like you said.
Any other opinions/help.
Cheers Jamie |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1907
|
|
Posted: Sat Jan 28, 2006 12:29 pm |
|
|
Jamie,
The DS18S20 (the '18S20' I referred to previously) is a nice little sensor - expensive - but nice. However, it's a little tough to talk to, and that's why I suggested something else.
I have a suggestion for the mounting of the sensors. Cutting holes in parts is never easy, and rarely looks good unless it's done by a CNC machine. Drilling holes, however, is much easier.
I suggest mounting your battery holder either directly over your pcb, or partly overlapping it. On your pcb you place 4 metal pins (more on these later) which will protrude through 4 holes that you drill in the battery holder (one for each battery). The metal pins are either just the right height to just contact the batteries or they're spring loaded so they are guaranteed to touch the batteries. The metal posts are small, and your battery holder/cradle won't look like it's been modified.
With a metal "thermal short" actually touching the battery, a temperature sensor place very close to the pin will read a temperature very close to that of the battery. Particularly if you run a thick copper trace on the pcb from the pin to the sensor, and keep other copper traces or planes well away from this area. It won't be exact, but, you can easily calibrate the device once you build it. For instance, real battery A temp = 37.5C, sensor A reads 31.0C, therefore "fudge factor" for sensor A is to add 6.5C to the reading to arrive at the real battery temperature.
As for the pins, there are lots available. Go to: http://www.mill-max.com/ and search for the part number "3117" (fixed pin) or "0901" (spring loaded). I'm sure there are other examples available.
I hope this helps you. |
|
|
jds-pic
Joined: 17 Sep 2003 Posts: 205
|
|
Posted: Thu Feb 02, 2006 10:48 am |
|
|
newguy wrote: | Jamie,
The DS18S20 (the '18S20' I referred to previously) is a nice little sensor - expensive - but nice. However, it's a little tough to talk to, and that's why I suggested something else. |
it is a very straightforward adaptation from DS1822 code...
http://www.ccsinfo.com/forum/viewtopic.php?t=19520
jds-pic |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1907
|
|
Posted: Thu Feb 02, 2006 11:47 am |
|
|
jds-pic wrote: | newguy wrote: | Jamie,
The DS18S20 (the '18S20' I referred to previously) is a nice little sensor - expensive - but nice. However, it's a little tough to talk to, and that's why I suggested something else. |
it is a very straightforward adaptation from DS1822 code...
http://www.ccsinfo.com/forum/viewtopic.php?t=19520
jds-pic |
Yes, but he stated in the first post that he's new to programming and PICs. That's why I said that it's perhaps best to avoid the one wire protocol entirely. It's pretty intimidating if you're new to all this stuff. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|