0
\$\begingroup\$

I plan to purchase a DS18b20 water temperature probe, and hook up the data line to an arduino. I would then connect the arduino to ten 5VDC 6A relays , and each relay would be connected to a 120VAC power source and a 300W heater. The resulting circuit will be able to control the temperature of a curing tank I've built, when temp hits 73degF, the arduino will send a LOW signal to all the relays, shutting off the heaters. When temp drops, the arduino will send a H signal, turning them back on. What do you all think? Opinions are much appreciated. The picture included is one heater to one relay. circuit

\$\endgroup\$
  • 1
    \$\begingroup\$ So you ask us if a certain circuit will work... without showing us the circuit? \$\endgroup\$ – PlasmaHH Feb 2 '17 at 22:30
  • \$\begingroup\$ I had to omit these links to the parts I'm using: DS18b20 water temperature probe (adafruit.com/product/381); 5VDC 6A relays (allelectronics.com/item/rly-499/5-vdc-spdt-6a-relay/1.html) \$\endgroup\$ – Krishneel Sahdeo Feb 2 '17 at 22:41
  • \$\begingroup\$ Sorry @PlasmaHH I'm a silly dude. \$\endgroup\$ – Krishneel Sahdeo Feb 2 '17 at 22:43
  • 1
    \$\begingroup\$ You shouldn't drive relays from MCU pins, even if the relays are 5v. \$\endgroup\$ – Wesley Lee Feb 2 '17 at 22:44
  • 1
    \$\begingroup\$ You should really use an off-the-shelf PID controller for this. You can get waterproof K-type thermocouples for them, and they already handle switching heaters on and off. \$\endgroup\$ – Bryan Boettcher Feb 2 '17 at 22:47
3
\$\begingroup\$

Given you are new to electronics PLEASE STAY OFF THE MAINS. It doesn't matter if your circuit works or not, you might get yourself or worse - someone else - killed.

Buy a heat source that is controlled by a thermostat. Or something else with the mains part already assembled. I'm sure the kind folks of this forum whom are familiar with your part of the world will direct you to something suitable. Btw where do you live?

That being said - no your design is flawed. It will not work. The sensor should not be fed more than 5.5V for instance. And your relay-circuit is incomplete unless you ground your arduino to the mains ground which is A BAD IDEA.

STAY SAFE - STAY OFF THE MAINS!

\$\endgroup\$
1
\$\begingroup\$

when temp hits 73degF, the arduino will send a LOW signal to all the relays, shutting off the heaters. When temp drops, the arduino will send a H signal, turning them back on. What do you all think?

The DS18B20 (digital temperature sensor) produces an output that is capable of delivering a resolution of fractions of a degree so, think about what happens when the temperature reaches the set-point determined by the arduino. There's bound to be noise and that noise might generate +/- 0.1 degrees of uncertainty in the value. If you didn't apply numerical hysteresis, you'd be turning the relays on and off rapidly at the set point and they won't last long (maybe a few hours or a day or a week).

You need to engineer-in some hysteresis and this means you turn the relays off at one temperature and then only turn them back on when the temperature drops by (say) 1 or 2 degrees. Now the relays might switch every minute or so.

This is referred to as a bang-bang controller and it dramatically extends the life of the relays and reduces EMI considerably.

If you can't cope with a degree (or two) of hysteresis then you are looking at a PID controller and linear power amp.

MAINS AC IS DANGEROUS.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.