DIY Mini-chiller

<a href=showthread.php?s=&postid=12943099#post12943099 target=_blank>Originally posted</a> by BeanAnimal
To add to what Mark said, the DS18S20 is a digital sensor that needs to be triggered to take a sample... you can't just hook it up and read continuous data from it like the analog sensors. The "internal conversion" is this sampling process. The sensor is triggered, it does a conversion and write the data to the scratchpad so that the user can read it. If you don't do a conversion, then you are reading whatever was on the scratchpad last.

Bean

Yeah, after I re-read what I posted, i realized how wrong my earlier post was. I should have stated I was doing the non-parasitic mode.

To be honest, with this particular device, I'm using the open-sourced One-Wire libraries for the Arduino (link here) . So I don't have a high-level of understanding as to what's going on behind the scenes.

What I do understand is that I'm basically polling the bus for the devices, selecting an address and doing a read of the data in the scratch pad.

My command set is *very* limited at this point on these, I'm not using any of the temperature alarm functions... Though the more I think about how this is all turning out, I may want to, and see if there is a way to tie these into some sort of Interrupt sequence..

As I mentioned this is my first microcontroller project, so I'm still wrapping my head around all of the possibilities that these things enable.. I usually work with simple OpAmps like the LM3875/4780 and similar devices, so all this is still pretty new to me.

I'm still doing the PWM v.s. on/off debate in my head for the TEC. I may just go on/off since I don't have a MOSFET laying about and "The Boss" is starting to raise eyebrows every time another digi-key box shows up at the house. I have a basic on/off relay circuit already and a handful of relays, so this just may be the easier route.
 
I disagree with Bean on the PWM issue, and I do so because I remember reading somewhere that it is the best way to bring the power requirements of the TEC under control or something to that effect. The problem is that I cannot remember where I read that or exactly what it stated, so I cannot back it up. I trust Bean. Even though I don't agree with him, go with what he says unless I can find my references.
 
:)

If you do find an article to the contrary, I would love to read it. I am always eager to learn something new or correct something I have a poor understanding of.
 
<a href=showthread.php?s=&postid=12946784#post12946784 target=_blank>Originally posted</a> by BeanAnimal
:)

If you do find an article to the contrary, I would love to read it. I am always eager to learn something new or correct something I have a poor understanding of.

I don't think it was an article. I believe that it was mentioned on another board I used to frequent that dealt with computers and computer cooling. I don't remember the specific, but I'll try to find it.
 
I'm curious ... *most* of the TEC "Temprature Controllers" out there, are PWM based, though there are a few that handle the smaller ones that use SSRs. I'd be interested too on finding a good article or thread on the subject.
 
As I mentioned before, the current/voltage need to be tweaked for efficiency as the temperature differential between the hot/cold sides of the TEC changes. In our case the HOT/COLD side differential is not going to change. The water temperature is only going to fluctuate by a few degrees and the room temperature will also vary by only a few degrees.

In other words, the operating parameters are not goint to be very dynamic, so a single operating point will likely be as efficient in this situation.

In other situations, the differentail may change rapidly and over a large range (think of a CPU that can heat up in seconds and change in temperature over a range of 10's of degrees depending on load).

Bean
 
Makes sense Bean.

I'll go the relay route for now, since I have some on hand... though I just pulled up the specs on 'em, and they might be a bit much. I have a handful of PB370's which are the mechanical type and a lot beefier than I need methinks;

Contact Rating @ Voltage 3A @ 120VAC
Coil Voltage 5VDC
Control Off Voltage (Min) 0.25 VDC
Control On Voltage (Max) 3.75 VDC
Coil Current 40mA
Coil Type Standard

They DO have a nice loud "click" when the Ard trip's 'em though. I fired a handful of leds to test 'em and see if they still worked. Guess they'll do the trick for now, and i'll go find some smaller mechanical or perhaps an SSR type to do the job before I take the unit into "production" and drive the wife nuts with the clicking noise. :)
 
just a quick update. i did some preliminary bath tub testing yesterday. input water temp was about 97 degrees, and after running for about 20 minutes, my output temp was 93-94 degrees. Not a major temp difference, but this was only with a 250W PC power supply (about 9A max on the 12V line). I could tell I was taxing the power supply quite a bit so i think I need more juice. I just picked up a 550W power supply (28A max @ 12V) from a discarded server @ work, so that should help some.

I'm also modifying the derlin section and thinning it down some to make better contact with the heatsink. i'll do some more testing this weekend.

My MCU based heat controller circuit is mostly complete as well. I'm still trying to decide if I really need transistors off the ground leg of the relays (i don't think so. it seems to operate fine with and without them...) and my 20x4 LCD screen still hasn't shown up yet (i expect it here in a few days). But i can control the PSU, pump, and TEC/Heatsink assembly just fine with my current circuit and read the temp from the serial output.
 
Your no tripping the relays directly from the MCU pins are you? You are sinking current and not sourcing it right? You really should use a transistor to sink the current. The relays should have supression diodes on them to protect the MCU pins.
 
<a href=showthread.php?s=&postid=13004981#post13004981 target=_blank>Originally posted</a> by BeanAnimal
Your no tripping the relays directly from the MCU pins are you? You are sinking current and not sourcing it right? You really should use a transistor to sink the current. The relays should have supression diodes on them to protect the MCU pins.

Yes, please tell us that this is how your relay is connected:

Relay.jpg




Scroll down to "Signal diodes (small current)" here for an explanation why they are needed.
 
Last edited:
Yeah. I have the supression diodes, but tripping the relays directly from the MCU seems to work OK.

I suppose I can go ahead and use the Transistors. I've got some BC547's on hand that I can use for this if they're really needed....
 
Sourcing i think.. pin goes high, relay trips..

sort of like this.. pardon the poor Eagle schematic. :)


Click for full size

Actually, now that i look at it, I have the +12Vcc and GND reversed in this schematic.. but you get the idea. also, GND is common, not actually "split" between a 5v and 12v.

If I've got this wrong.. and now that I've done some research, it would appear that I have.. at least according to this:
http://www.arduino.cc/playground/uploads/Learning/relays.pdf

looks like i'm back to breadboarding. At least I haven't etched a board for this yet. :)
 
Most MCUs sink current better than source... That is why we use a pullup resistor and transistor to drive a reley. Some MCUs have internal pullups.

Pin is high, pullup ensures that it is high and transistor does not conduct.

Ping goes low, transistor bias changes and current flow from +Vcc rail through transistor and relay coil to ground.

The way you have it setup, you are trying to use the MCU pin to source enough current to drive the reley. Fine and dandy, it may work with a single relay but may be very hard on the MCU. Furthermore the MCU is directly exposed to inductive kicks (even with the diode) from the relay coil. Furthermore, lets imagine you are trying to drive a dozen relays from a dozen pins! Now add up the current that the MCU has to provide :)
 
Yes, definitely use a transistor. The problem is that the coil will start to act as an inductor and can easily draw more current than the MCU can supply, burning out the chip.

Also, your diode is in backwards. This is key to the protection diode. You have it orientated correctly for an average circuit, but not for this one.

[edit] Never mind... It took me two minute to reply. Bean got it right.[/edit]
 
Last edited:
Yeah, I noticed the diode error as well..

So essentially, what I'm looking for is more along these lines;


Click for full size

As I understand it, when the arduino pin goes high, there's enough current to switch "on" the transistor, and complete the ckt to ground, thus the current flow, right?
 
Ok so now for another quick update.

I managed to complete most of the controller circuit. Since I had some extra pins, I went ahead and threw a wavemaker function on there as well. The relays I have are 120V 30A AC rated, so they should handle the current draw just fine.

Couple of quick pics;

breadboarded circuit and Arduino

Click for full size

LCD Screen (hard to see... sorry about that)

Click for full size

The unit is hardcoded with it's delay settings at the moment while I figure out how best to handle a menu/settings structure in the code. I may just go with some pots for ease of use..

at any rate, it's programmed to kick 'on' @ 86, and 'off' at 80. The fan on the heatsink is programmed to run for an extra 30 seconds after the peltier unit shuts down.. I probably don't need a 'cooldown' feature, but I had an extra relay. :)

Wavemaker functions basically toggle two AC outlets - AC1, and AC2. Again these times are hard-coded at the moment for a 5 minute cycle.

As for the temp sensor, I'm now trying to figure out the best way to embed it in something waterproof. I attempted a small tube filled with silicone but I wasn't sure how much impact that'd have on the temp reading. I also built one embeded in some aquarium-safe epoxy. I'll see what the different temp readings are compared to my normal mercury based in-tank thermometer, as well as compared to my little coralife digital one.

making progress.. slow but sure. :)
 
Insulating the temperature sensors behind epoxy or silicone will only slow the time it takes them to sense the actual temperature... no big deal at all in our process. The thermal mass of the potting material will rather quickly come to the same temperature as the water and therefore the sensor will read correctly, albiet slightly delayed compared to the non coated sensor.
 
Back
Top