Programmable fridge...... how can anyone live without one!!

GHA

Well-Known Member
Joined
26 Jun 2013
Messages
12,552
Location
Hopefully somewhere warm
Visit site
Maybe getting a little carried away... ?
But after much time crawling about some very small inaccessible spaces with a gas soldering iron today the fridge now communicates with the world :cool:
Briefly, many years ago the thermostat gave up on my fridge, so outraged with the cost of a new one probably slightly more was spent with many trips to maplins and an arduino stepped up to the task and lasted longer than the original until today's retirement. Now it's an esp32 & circuit board made by the wonderful jlcpcb.
Now it does the same as any old thermostat but can be programmed pretty much to do react with any other data on the boat, which is a lot... maybe get colder with magnetic variation, or warmer with barometer pressure... though more likely make better use of power so when there's spare solar cool it down a good bit and it the batt voltage is down or the duty cycle is very high let it warm up a little. Early days, it can control the compressor speed as well which will be interesting - better running slow for longer? no idea.

Pity about the ballsups with the circuit though - 4 fet transistors to control the thermostat on/off with different resistance values for different speeds ... but I used a pin that's connected to the esp LED for one of them! And forgot to put resisters to pull the transistor gates down to ground, though the esp pins seem OK with that. And major bish, current sense resisters are to high so the INA219 current sensor gets out of range the fridge is running full revs. Oh well.
But all in all exciting, a whole new world of fridge data to investigate - does it even make much difference leaving the lid off... find out pretty soon ??
Some spare boards if anyone is interested, shan't leave for the post office just yet.... ?

w8K1pEy.png


GI4xq6l.png

QR7SvSX.png
 
That’s remarkable! GHA must have a sound grasp of electronics. I wish I could say I followed half of the explanation, but the result sounds impressive.
It may indeed link with the chart plotter, but not with the sextant and slide rule. ;)
 
let me get that straight, you used 3 DS18B20 for that poor fridge?
and why only three then? guess 4 would be excessive :p
tbh, should have 2 on the plate, one where the gass enters and one where it exits :D

I thought I was sad adding one DS18B20 on each fridge (inside for ambient) and for reporting on signalK/grafana but you're much worse :rolleyes: btw, why the double mA curves when compressor running on the graph above? playing with comp speed if cycling take more than x time or what?
As I mentioned in another thread, haven't seen any improvement on my Waeco front door fridge by altering comp speed. Interested to see what you find.

cheers

V.
 
I'm unsure about your outrage at the price, but a capillary thermostat, might also have been a solution, perhaps?
Do you mean “playing” with the thermosat only?
That seems a more feasable approach to me too. Of course playing with compressor speed is more efficient but the fridge might already do that and replacing the thermostat for a digial one with a relay seems much simpler to do in any fridge. Although it seems simplicity was not the goal of this project :)
Does your logic do something like this?:
Set target temp = 4 deg. If motoring or solar set target temp 2 deg, if on bat target temp 6 deg. If shorepower or genset target temp 4 deg.
 
Last edited:
, which is a lot... maybe get colder with magnetic variation, or warmer with barometer pressure... though more likely make better use of power so when there's spare solar cool it down a good bit and it the batt voltage is down or the duty cycle is very high let it warm up a little. Early days, it can control the compressor speed as well which will be interesting - better running slow for longer? no idea.
How do you know the boat “awareness” parameters to make decisions about what to do with the fridge?
 
How do you know the boat “awareness” parameters to make decisions about what to do with the fridge?
Lots of things get constantly monitored by a little Raspberry Pi zero running signalk and saved to a database, such fun :cool:
WIndspeed/direction, various battery info, gps data, various engine temperature, solar panels, even sun/moon rise times ?!
 
GHA, remind me, you have lots of independent ESPs scattered around your boat, they all gather various data. Do they all communicate and send their data to a signalK server running on a raspberry pi?
If I got right that far, two Qs:
1. how do they communicate? wifi?
2. can each one ESP querry the SignalK for data sent there from another one? (say the ESP that has the BMP on, sents temp/humidity to SignalK, fridge ESP, reads that and acts accordingly...)

V.
 
GHA, remind me, you have lots of independent ESPs scattered around your boat, they all gather various data. Do they all communicate and send their data to a signalK server running on a raspberry pi?
If I got right that far, two Qs:
1. how do they communicate? wifi?
2. can each one ESP querry the SignalK for data sent there from another one? (say the ESP that has the BMP on, sents temp/humidity to SignalK, fridge ESP, reads that and acts accordingly...)
Mostly it all goes through one esp32/board, 2 now with the fridge. Then atm there's a serial/usb for wind. The main esp board does temperatures & voltages plus data from the victron smartshunt, which does ve direct @ 3.3v so goes straight to a pin though there's a max232 chip on the board which will go onto some nmea maybe from depth when that gets sorted. All gets sent to the Pi Zero over wifi. Data can get sent back from node-red to any esp32 using mqtt. Could run a websocket to get at all the data but mqtt works fine and is a little less work for the esp to do. Micropython running on the esp's which is just great though no doubt bit slower that C++, but rock solid and you can update over wifi, I use Thonny as an editor. new boards in the pipeline but seems like a worldwide shortage of chips at the moment, jlcpcb don't have and ads1115 voltage sensors in stock and a few other missing so need to wait a while.
boatybits/boatymonpy
 
blimey,

that's proper messy (in my book at least!)
so with 5teensies, 1due and 1 raspberry looks like I win hands down :p - thought you had more onboard.
my approach is completely different and relies on the N2K bus passing all data about, raspberry simply using SignalK gathers the lot and sents them out to a influxDB for evaluation/remote monitoring/debuging purposes. Only problem is if I want to monitor something not supported by N2K, but then I set up custom PGNs and I can easily move things about.

V.
 
blimey,

that's proper messy (in my book at least!)
so with 5teensies, 1due and 1 raspberry looks like I win hands down :p - thought you had more onboard.
my approach is completely different and relies on the N2K bus passing all data about, raspberry simply using SignalK gathers the lot and sents them out to a influxDB for evaluation/remote monitoring/debuging purposes. Only problem is if I want to monitor something not supported by N2K, but then I set up custom PGNs and I can easily move things about.
Which bit's messy?

No N2K onboard, that's for them rich folks :) Not many wires either, mostly wifi though the boat can function just fine if all the toys break, standalone ais & windvane, needs little to keep sailing safe if you can cope with not knowing the exact power the fridge used in the last 2 hours :) Few instruments, depth about the only important one in the cockpit radio RAM does sog/cog if the interest is there. No MFD, never owned a chart plotter. Can't see the point cruising. I've a M5stack waiting some attention which should function as a little remote data viewer which is handy offshore single handed.

ESP32's are beefy little chips for the power they use, micropython uses sort of threading so a lot going on at the same time.
 
I'm sorry - but I now understand why some don't like anchor threads.

However I am not complaining and am just grateful that some people while away their remaining hours on arcane projects.

Sailing to me was about harnessing the elements to get from A to B and then anchoring (ts really very simple if you ignore the fear factor engendered by so many) having a really good meal, a decent drink (or three). If it been physically challenging I count the digits, I tend to start with 10 and always finish with the same number. Maybe an exciting game of Scrabble, hot shower, tour the domain - and then bed.

Fear of anchoring really pales compared to the nightmares some must have.

But each to their own - nice to have a fetish or two. It would not do if we were all the same.

But maybe we live in some sort of alternate universe

Jonathan
 
I have to admit I have just bought some kit to convert my cool box to a fridge. Part of today's work is to assess how to insulate the existing box with at least 50mm of Kingspan insulation. It will involve using a basic endoscope and cutting open a bulkhead under the sink that runs fore and aft. All highly technical and using a little brute strength The biggest problem to solve will be where the place the on/off switch.
 
@GHA re the INA219 What is the highest Amps your likely to measure on the fridge consumption? 8A? From your other message;

If so 8A/0.04ohm = 0.32v

Or higher?

I am struggling a bit with jlcpcb to see which components are in their basic range.
 
Top