DIY spillover fridge fan control

Jun 17, 2022
542
Hunter 380 Comox BC
Not sure if this is the right section .... forum admins, please feel free to move it to a more appropriate section.
20260808_100956.jpg

Background:
I was never happy with the temp range of our fridge compartment. Originally, we had a balmar compressor and large evaporator in the freezer and a spillover fan that was activated by a mechanical thermostat that was active only if the fridge compressor (condenser fan) was active. The bottom of the fridge would freeze, the top would be around 5-8 deg C.

The compressor/evaporator were replaced with a Nova Kool 3 plate / DB50 compressor. The freezer works great, can keep -12 to -18 C and uses much less power than the old Balmar.

Proof of concept:
The first iteration used a cheap $20 amazon thermostat (Inkbird) to activate the spillover fan when needed and an internal fridge compartment circulation fan to circulate cold air up when the fridge got too cold (below 1.5 deg C). This got us down to + - 0.5 deg C..... but, sometimes at the cost to the freezer compartment, which could reach -1 to -3 deg C in the top. This would soften the ice (kept near the top) and increased frost on the evaporator plates... thus slowly reducing the accuracy of the freezer thermostat and the efficiency of the system. (yes I know, ice cube trays / bags should be sealed to avoid inserting moisture in the compartment....)

20250926_142952 (1).jpg

so....

Final solution:
With a lot of assistance from Chat GPT and Claude AI (They each have different strengths), we now have a dedicated fan controller that considers: freezer temp, fridge temp. It can indepedantly control the spillover fan and the circulation fan. It maintains the fridge within temp limits, but there is a lockout if the freezer gets too warm. It uses small, cheap, waterproof DS18B20 temp sensors.

There are also alarms (visual and audio buzzer) if the freezer or fridge gets too warm (these are disabled during initial system startup / cooldown). The system connects to wifi and thus to Signalk (which can run on your CerboGX or Rasperri Pi) and sends key info (temps, errors)..... ultimately we'll have temps error states sent to VRM via the CerboGX so that we can be remotely advised of an issue....

Bench testing is complete, it's going in the boat next week.

The 3rd temp sensor monitors the compressor compartment (or ambient air temp), your choice. I did this to help identify if I have heat soak issues in that compartment.

Everything is open source. The code is available for hobby use (not commercial use) via github. The hardware is available from DFRobot and the code to generate a custom enclosure and 3D print it is on thingaverse



What you need:
- the hardware
- install VS Code (free) on your computer
- copy the code into VS Code
- build and send it to your ESP32 (USB)
- get a friend to 3d print the enclosure
- spend an hour wiring the kit together
- spend an hour pushing temp sensors to the freezer / fridge of your boat and pulling 12V from the refrigeration breaker (don't forget the 1A fuse)
- enjoy cold not frozen beer and milk that doesn't spoil in 3 hrs


Should the fridge temp sensors fail, there' s a manual overide to set a duty cycle for the spillover fan.

Setup can be done via webui (connect to the esp32 vs it's own wifi access point) or via the rotary encoder ( knob) right of the OLED screen. I was going to use a small touchscreen at first, the changing values would have been tricky as the touch areas would have been small and there'd be no tactile feedback. The screen can be set to sleep after x minutes but will wake if there's a new alarm trigerred.

SignalK can run on a CerboGX (install Venus OS Large) but there isn't a lot of overhead on the Cerbo when it's also connected to an NMEA2000 network. If the CerboGX is connected to N2K, a seperate instance of SignalK is preferred. A RaspberriPi 4 or 5 is very power efficient and (like a DC wifi router) can be left running 24/7, especially with a display off or used in headless mode.

The Open Marine Data Platform (can be installed on a PC, Raspberri Pi, CerboGX, etc...)
SensESP Home (this is the main code that runs on the ESP32 microcontroller that handles UI, wifi comms and messaging to /from SignalK).


After the device is installed on the boat and tested for a week, the next logical step is to try to skip SignalK as an intermediary. If we can send the temps to Node-Red, Node-Red can run on the CerboGX (it's much lighter on the CPU) and send the data natively to the CerboGX.

Fridge Controller Conceptual concept.png
 
Last edited:
Jun 17, 2022
542
Hunter 380 Comox BC
I think we will be able to bypass SignalK alltogether. We'll send the data directly from the ESP32 to the CerboGX via MQTT. A short flow (script) in Node-Red will handle that. This should require minimal processor overhead in the CerboGX. Node-red can be installed (enabled) after enabling the Venus-Large OS option in the firmware update menu.

This will have to be tested on the boat as I'm missing some components in the lab/workbench.
 

Jan_H

.
Aug 17, 2009
41
2 26 Midland
Very nice system indeed! I also had issues with the mechanical thermostats, and replaced both with Inkbird units that I mounted in a printed housing. I also included a small circulation fan in the bottom of the freezer. Not quite as fancy a system as yours, but very much better than what I started with.
1786242656296.png
 
Jul 8, 2012
152
Catalina 36 MKII North East
I arrived at a similar solution via a different route - a Shelly Uni board reads the 2 temperature zones ( freezer and fridge), controls a computer muffin fan on the divider wall and measures the voltage draw of the compressor. All of the data is reported and the switch is controlled and programmed in Home Assistant.
The Shelly Uni Plus devices are 12 volt powered, essentially ESP32s with built in voltage handling, ability to measure up to 4 DS18B sensors, two programmable dry contacts and the ADC can measure voltage up to 30 volts. It is all on a small board with built in wifi readable by SignalK, NodeRed, Home Assistant, etc.
The advantages are not having to provide 3 or 5 volts for the ESP ( I fried a lot of little boards over the last few years) and doing the reading and automation in Home Assistant.
 
Jun 17, 2022
542
Hunter 380 Comox BC
That's a great implementation as well! The wide range dc input avoids installing a dc converter. Since it has wifi and mqtt built-in, it's an easy way to integrate it with Victron and control it via wifi / web page.

Would you mind sharing your code / control scripts?
and the config screen for the limit temps?
Are you using the solid state relays directly to power the fans or using the relays as triggers for a MOSFET ?

The shelly devices have a lot of applications on boats. I wanted to be able to control the macerator pump from the helm instead of from the DC panel. I put a shelly device in parallel with the push button, which is automatically detected by the Victron Cerbo GX. I can then pull up the switches menu from the Cerbo at the Chartplotter and activate / deactivate the macerator while under way, and while being able to monitor it's output, avoiding dry running. It's a cheap way of implementing remote control (or parallel control) of circuits without going for a full C-Zone implementation. One could also use a shelly device to automatically switch on / switch off the anchor light.
 
Jul 8, 2012
152
Catalina 36 MKII North East
The Shelly devices as well as Cerbo, Signal K and other sources all are read, displayed and used in automations in Home Assistant. HA can run on a Raspberry Pi or other platforms. I use a Home Assistant Green, when you figure a case, fan and connectors for a Pi it is roughly the same cost (similar to a kitted out Pi versus a Cerbo).
Cerbo is great for gathering data but while running SIgnalK or SignalK and Node Red it slows down. The Venus GUI or VRM are fine for occasional use like checking alarms or resetting parameters.
A Shelly switch could be run through the Cerbo and probably can be displayed and activated from a chart plotter, my guess is it would be pretty slow and limited in how it can be displayed and used.
Home Assistant is better for displaying data (and automating) in as many dashboards as anyone might want, the dashboards can be used on computer, iPad, phone etc. I keep an old iPhone mounted next to the Axiom, easier than messing around with Raymarine screens.
HA works with Alexa or its own voice assistant so most switching is done by voice in my system. As a single hand sailor it makes a cumulative big difference in day to day life on the boat. Everything is redundant - if Home Assistant or and of the individual Shellys dies the system reverts to the original breakers and switches without a hiccup.
Code and control scripts are different than programming the ESPs, in HA integrations catch all the data from various sources as entities. Those entities can be displayed directly in dashboards or changed as templates into modified versions. All can be used individually or in combinations for more refined displays or in automations.
Example - I use Shelly 1s on the domestic water and the propane solenoid circuit to automatically turn them off after a set time - 5 minutes for water, 15 minutes for propane - in case I forget to say "turn off the -------". Another Shelly controls the deck light so it can be turned on from shore or anywhere with internet, handy for heading out at night on anchor or a mooring.
Here is a dashboard that is a catch all for anything on a switch, some of the switches are on multiple dashboards depending on what or where they may be needed.
HA Switch Dashboard.jpg