My immersion water heater and relay (SSR-25DA) arrived in the mail, so today I will be talking about how I set that all up.
IMPORTANT: When using something like this immersion heater, make sure you are plugged into a GFCI outlet to prevent electric shock. I will be making a post about safety measures in the future so check that out if it exists for more information.
1. Test heater by boiling a pot of water
This was to make sure it worked before I cut the cord and wired it to the relay and arduino, and to take a few process planning notes for myself.
Note: I am going to fix the whole wood-plank-heater setup (make more secure, etc.), this was just something I threw together for testing. I don't want the heater coil to touch the pot because it is using electricity to heat and that could be dangerous since the pot is metal.
Using the temperature probe and arduino to measure while I boiled the water.
2. Cut the cord and separate the two wires - determine hot and neutral
When plugged in, one wire will be hot and one neutral. There are a couple ways to tell the difference between the two. Normally, one prong on the plug will be wide and one narrow, the narrow prong connecting to the hot wire (also, there is sometimes color coding on the wires). However, my plug has two narrow prongs, so either can be the hot wire depending on the orientation when I plug it in. That means I have to make sure to plug it in the same way every time, because I will only be running one wire, which needs to be the hot wire, through the relay (which acts as a switch to turn the heater on and off).
To solve this, I marked one wire with tape, and used a digital multimeter to check which prong that wire connected to. Another way to find the hot wire in general: one wire is ribbed (neutral) and the other is smooth (hot). So, I marked the smooth wire with tape and designated that to be my hot wire, and also marked the corresponding prong.
Using the DMM
3. Strip the ends of the wires and connect the heater to the relay
After stripping the ends, twist the filaments together.
I loosened the screws on the load side of the relay and inserted the relay between the two hot wires leading to the heater and plug. The neutral wires I twisted back together and secured with a wire nut and electrical tape.
P.S. Engineering majors - check out those heat-dissipating fins on the heat sink!
4. Connect the arduino to the relay
Here is a diagram of how I set it all up:
I connected the 3+ part of the relay to pin 10 (you can choose any, you will need to know which it is assigned to for the code), and the -4 part to ground via my breadboard (already connected to arduino ground for the temperature probe).
5. Write the code
We now need some arduino code that will tell the heater when to turn on and off. I am currently working on it and will make another post about it when I finish.