0
\$\begingroup\$

I'm wanting to monitor the power consumption of my Fridge (and Freezer) on a boat where the voltage runs from 12-15.6vDC

Circuit

The Thermostat is an Inkbird(from Amazon) that closes a relay when the compressor needs to come on. This alerts the Compressor controller to turn on the compressor. This controller also activates a small computer type fan to blow air over the coils. I'm wanting to capture the time period the unit is running so I can track the power consumption. There are several factors that can cause the consumption to go up.

  • Door gets left slightly ajar
  • Frost builds up over time
  • Compressor leaks Freon
  • Exterior Temperature changes.

Rather than rely on a meat computer (me) to track these things I want to post them to a raspberry pi which will track them over time and alert me when things go off the rails. To do that I need to know when the unit is running and I need to do it with very low power consumption (because I'm living on batteries and sunlight).

There is a single Voltage ADC on the Arduino that will measure the voltage between 0 and the supply voltage. I could do some type of voltage divider and look for something there using the fan connections which are only powered when the compressor is on, but that means I need 2 Arduinos. Is there some simpler mechanism for detecting the thermostat has closed the relay? Maybe something that does i2c so I can deal with everything in a single unit. Would be even better if I could feed that back directly to the raspberry pi, relying on the fan voltage to activate the device so it is only consuming power while the compressor is running.

The things I want to do is have the rPI watch the runtimes and alert me if the consumption rises over several days, or if the unit is on continuously for longer than expected; I also want to be able to send alarms onto the navigation bus, and an audible alarm when there is something I need to look at. But that is just software. I need the sensing to drive that. What is a super simple, low power way to deal with that?

The rPi is already being used for other things (navigation, wifi, media player, etc....)

\$\endgroup\$
3
  • \$\begingroup\$ This is a bit broad and short on key details, but you shouldn't need to use the ADC (or even really, the Arduino). If it's the positive lead being switched, you can indeed use a voltage divider. If it's the negative, things get a bit more complex, but you could use an optoisolator or another relay. You could also use something like a hall effect current sensor, or possible with care even a direct DC shunt one. Keep in mind your pi is going to be power hungry and so is not really the best choice, though apparently you are already settled on that for other reasons. \$\endgroup\$ Aug 8 '20 at 19:53
  • 1
    \$\begingroup\$ You appear to prefer things to be complex, I'd make things much more simple. Use an optocoupler to detect what the fridge is doing, the LED in the opto + series resistor in parallel with compressor. Then I'd use an Arduino to monitor on/off time ratio and when that gets out of hand: sound an alarm (beep or LED). An Arduino can run for more than 1 year from 2 AA cells if you use it properly. \$\endgroup\$ Aug 8 '20 at 20:29
  • \$\begingroup\$ You can do this with simple hardware only to choose the alert number of Power-On minutes (POM) per hour or any other period or consecutive POM threshold. Or you can track each minute of activity to track the history if you want more details. Tilting the unit can make the door more gravity fed closure. But interference of goods might block that. Define your preference of input POM /h or consecutive POM for alarm threshold. H/W only or S/W computed? \$\endgroup\$ Aug 8 '20 at 21:19
1
\$\begingroup\$

Since you're monitoring a DC powered system the solution should be quite simple. Monitor the voltage to the fridge and the current consumed by it. Take a reading periodically (1s, 10s, 60s, or whatever you like) and calculate the instantaneous power (*P = V × I) and total it. If you monitor every 10 s, for example, then you can assume constant power for that interval and the energy used can be calculated by \$ E = \frac 1 {10} VI \ \text {Ws}\$. (That's watt-seconds.) To convert to watt-hours divide by 3600 (60 × 60).

You can monitor the voltage as you suggest using a voltage divider. 4:1 gives you a maximum input of 20 V which keeps your 5 V ADC input safe in the event of a spike from the alternator.

For monitoring the current you can use one of the popular ACS712 Current Sensor Modules.

ACS712 Current Sensor Module

Figure 1. ACS712 modules feature a simple +5 V, GND and analog output. These seem to be available in 5 A and 20 A versions. The current sense terminals are isolated from the 5 V side (see the traces on the photo) so you can monitor either the positive or negative lead to the fridge.

The module can be powered from the Arduino. Only one is needed as they have six or eight analog inputs.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.