Controlling a dorm fridge with an arduino instead of built in thermostat.

OK, so, I have this tank that I use to grow cool growing orchids in. It's a ten gallon aquarium with a dorm fridge evaporator in it. The compressor and the condenser coil are outside the tank.

Right now I turn it on at night using the built in fridge thermostat, which, to put it mildly, sucks.

Basically, the thermostat has three wires that go to a start relay for the fridge compressor. Hot, neutral, ground. When the thermostat closes the circuit, the start relay for the fridge compressor fires and the fridge runs. When the temperature set point is reached, the thermostat opens the circuit and the fridge turns off. basically, I want to remove the built in thermostat and use an arduino thermostat to open or close the circuit to the start relay. I'm assuming I need to find a solid state relay that will handle the current/voltage that runs through the existing thermostat. Then control the relay state using something like a 5 volt pin from the arduino?

You’ve got the basic idea.

The next step would be to determine what you can from the existing thermostat, for instance the voltage and current rates will help you look for one suitable for use with both the fridge compressor and an arduino. Also keep in mind that you’ll want a relay where the control signal is not only 5V or less, but also <= 20mA (i.e. make sure it’s something that the arduino can actually control before buying it).

With regards to temperature sensors you’ve got a range of options that will work with an arduino; from temperature only to combined temperature and humidity sensors. put it mildly, sucks.

What's wrong with the existing thermostat?

A solid state relay is the simplest way to control the AC. If you use a mechanical relay, you usually have to add a transistor or MOSFET to drive the relay coil.

Unless you want to make a digital display, or something like that, the Arduino is overkill. Your logic is very simple... If the temp is too high, turn-on. If the temperature is too low, turn-off. You don't need a microcontroller & software for that. ;) It can be done with a couple of logic chips, or a couple of comparators. ... Plus a temperature sensor fo course, and probably an op-amp to kick-up the temperature sensor signal, but you'd need those with the Arduino too.

Do you want to do this for a project, or do you just want the most effective solution?

If you can find a programmable thermostat that works in your required temperature range, you'll get much better temperature control than an old mechanical thermostat because good programmable controller vary the duty cycle to maintain a constant temperature rather than relying on hysteresis. And you'll get a decent user interface and probably still not spend much more than an Arduino-based solution.

There are a few reasons I want to use the arduino.

The first is the existing thermostat only lets me get the tank to 48 at its warmest setting, no higher, and lower would be bad. I'd like to be able to use a clock breakout and a temperature breakout to precisely control the diurnal cycle (78 F in the day, 48-55 at night depending on the time of the year).

The second is I want to build off it. I want to be able to control the tank lights, the ventilation fans, etc. eventually. I also want to do logging, remote monitoring etc. (my brother is a programmer).

Here is the breakout I would use to inform the arduino and therefore control the relay.

The existing thermostat is 6 amps, 110 VAC

Would this work?

Looks like this is what I would want:

120D10. 120 VAC line, DC control.

This is cool in principle, but I couldn't find the heat sink necessary:

Looks like this is what I would want:

120D10. 120 VAC line, DC control.

Yes, that looks a good fit for your application.

Although this particular SSR will only need a low DC current (4mA, much lower than the ~20mA an arduino can sustain as an output) for 5VDC control, just for future reference you should note the datasheet section called “Control Current Calculation”. This is because the relationship won’t necessarily be the same, especially for different types, but relays’ control circuit current draw will vary with voltage.