arduino due + dimmer for controlled heating


in a little projekt i want to control the temperature of the water in a bucket. i got a 240V heating element, a dimmer, a waterproof digital heat sensor and an arduino due.

so far i know that i have to connect 240V to the "AC Power" of the dimmer and the heating element to the "load". the temperature sensor gets 5 Volts, GRD connection from the arduino but how do i connect the arduino to the dimmer? and how do i connect the Data line from the sensor to the arduino

You don't "dim" a heater.* Temperature doesn't change instantly (especially the temperature of water).

You turn the heater on 'till you reach your target temperature, then you turn it off, and turn it on again when the temperature drops below the target. I'm sure you've noticed that's how your home furnace/heater works... That's the way almost every heating/cooling system works.

There is usually some hysteresis (AKA "swing"). That means you turn don't turn it off 'till you are 1 degree ( or 0.1 degree, etc.) above the target, and then after it shuts-off you don't turn it on again until you are 1 degree (or 0.1degree, etc.) below the target.

And, that dimmer won't work "directly" with the Due because it needs a 0-12V DC "analog" voltage. The Due puts-out 3.3V maximum, so you'd need an amplifier stage (an op-amp). Or, you could use a transistor or MOSFET, and a 12V power supply to "adapt" that thing as an on/off solid state relay.

You can use a relay to turn on & off the power and isolate the AC from the low-voltage. A mechanical relay will usually require driver circuit (and typically 12V) for the coil.

Or, you can get [u]solid state relays[/u] that can be driven directly by an Arduino. A solid-state relay is the easiest (and probably the best) solution (but probably not the cheapest).

i got a 240V heating element

What's the power or amperage rating? Make sure your relay or control circuit can handle the current.

waterproof digital heat sensor

It's up to you, but I think the software for an LM34/LM35 is easier. (But, the LM34/LM35 isn't waterproof as-supplied.)

* It's tricky and mathematically very complicated to make a linear/analog control system when there's delay. It can be done, but it takes some advanced engineering & math.

Imagine trying to drive a car straight down the road with a few seconds of delay in the steering... If you drift a little left so you turn right to correct. You might over-correct or under-correct and you won't know for a couple of seconds.... After a short time you've got a bunch of (maybe wrong) corrections in the cue and you end-up going-off the road...