Intro
My original plan was to use an idea from the Radio controlled clock/weather station, port it to the new architecture (Microchip Curiosity Nano SAME51) and receiver board (OOK RX click module), add voltage measurement and a relay to create fridge controller capable of storing excess electrical energy as a cold by lowering the temperature inside to create buffer allowing for energy conservation during other parts of the day.
Operation of such as storage would be based of the following principles:
- (most frequently used types of) renewable energy is prone to uncertainty of production level and thus hard to scale,
- installations scaled for average production level are prone of overproduction during energy production peaks,
- overproduction can affect large areas at the same time (both in case of solar and wind power),
- energy production during overproduction event is limited by the maximum voltage permitted in the mains (usually +10% of standard value),
- energy storage is a problem with no universal solution, especially at small scale,
- wasteful energy consumption during overproduction event (to keep generation from shutting down and not to be forced to buy energy) should be avoided if possible,
To be able to do this, several steps was needed:
- researching refrigerator operation and means of external control,
- measuring temperature inside, working cycle times and try to estimate thermal insulation quality and cooling power,
- building a controller capable of detecting overproduction event, overriding thermostat operation while keeping refrigerator temperature in the range safe for the food stored,
More detailed information about why energy overproduction happens, what it means for a local generation and how to detect it was included in my first blog.
Refrigerator operation
My second blog concentrated on compressor based, household refrigerator operation. It was shown that (especially old models, prone to decommissioning and scrapping - exactly the ones we will want to save in this challenge) are very simple from the electrical point of view: compressor is usually connected in series with mechanical thermostat, that has it's contact closed when temperature is high and opened when it gets below preset point. Temperature is regulated using mechanical knob that is setting the threshold in which thermostat trips, usually calibrated not in absolute temperature settings, but in arbitrary numbers (for example in range 1-7).
Temperature distribution measurements
My third blog concentrated on measurement infrastructure setup, when data provided by the wireless outdoor weather sensor (well fitting in temperature ranges we would like to measure) was received by RTL-SDR dongle, decoded by rtl433 software, stored in InfluxDB database and visualized using Grafana.
Fifth and sixth of my blogs were about data interpretation. The most unexpected observation was that temperature distribution inside a cooling chamber is very uneven. In the coldest corner it fluctuates (when thermostat is set to "4") between -4°C and 8°C and dropping to -8°C (that seems to be a lowest value obtainable in this chamber) on setting "6"
The cooling cycle has two phases - phase where temperature lowers, and the phase where it rises. Length of the last phase seems to change in semi-linear way, in line with lower temperature threshold setting:
- when thermostat is set to "4", rising phase lasts for about 1:40h (from -4.8°C to about 7.2°C),
- when thermostat is set to "6", rising phase lasts for about 2:00h (from -8.2°C to about 7.3°C),
Another interesting observation is that there is a possibility that a compressor starts somewhere before the temperature peak - which could limit our energy storage capacity (we cannot count the whole phase of rising temperature as unpowered).
And about uneven distribution of temperature - it seems that in even small distance from the coldest point, temperature is much higher and less changing (below there are shown curves from three sensors, put one in front of another, when the last is in the coldest point of the chamber)
Those measurements suggest that the thermal insulation is inadequate for energy storage and thermal capacity is low. To try to overcome this, about of 2-3 liters of cooling inserts from portable cooler were installed. This approach have prolonged phase of rising temperature to:
- when thermostat is set to "4", rising phase lasts for about 2:00h (from -4.9°C to about 7.0°C),
- when thermostat is set to "6", rising phase lasts for about 3:50-4:30h (from -8.8°C to about 5.9°C),
After analysis it seems that current model of refrigerator is not well suited for energy storage. Rising phase of the temperature graph cannot be extended beyond ~ 5 h, even at the cost of prolonging the cooling phase to about 10 hours (longer than anticipated time of energy overproduction event). Additionally, extending it further would probably require obtaining lower temperature inside, that could be harmful for the food stored (repeated freezing-thawing cycles can cause rapid decay).
Construction of the controller
As hinted in the fourth part of my blog, target architecture was planned to be Curiosity Nano SAME51, paired with two modules:
- OOK RX module for receiving data from wireless 433MHz band sensors,
- RMS to DC module for AC voltage measurement
and additional relay module for compressor control.
Application code and Arduino libraries used in my weather station project were planned to be adapted and ported to the new architecture. Unfortunately, due to some delays I have only recently received my processor board, with sensor boards still on their way. Considering this I have decided to settle for intermittent solution using my base project, modified to act as a refrigerator monitor/controller, with plans to prepare the final solution when all parts arrive.
Modified controller schematics is as below:
As CLICK modules I have planned to use are not rated for mains voltage, indirect measurement method was selected - when voltage is measured at the secondary winding of the transformer. For the final module, 3.5V/2W transformer was obtained, but during the prototyping it was substituted by the old unregulated DC power supply with several secondary wingdings and voltage selection using a switch:
Voltage measurement was built using internal ADC of Microchip ATmega328P, configured for internal reference voltage of 1.1V (to be independent of power supply voltage changes). Because of that, voltage divider built using R2 and R3 was needed, with additional over-voltage protection diode D2. Capacitor C2 was added to reduce signal ripple, and R1 as a load.
Prototype board is powered by USB and is writing measurements on the virtual serial port, which enables us to visualize them using the existing software. Some sample time period looks like this (with some averaging of voltage readings):
with some more long-term voltage data as below (there is not implemented serial port reconnect for now - so some blank ranges appear)
As can be seen - no major overproduction event was detected, which is not surprising, considering that we are in the middle of winter here (so solar overproduction is unlikely) with no wind farms in the vicinity.
Sample video of the controller running can be seen below - as we can see, repurposed weather station code still displays clock time and temperature, with the addition of measured mains voltage
and the code as below
Summary
During this design challenge I have got better understanding into refrigerator working and gathered some measurements that suggested that household fridge (at least tested model) is not very well suited for energy storage because of the low power and limited insulation.
I have seen some models with better thermal insulation (advertised as they are capable of keeping cool for 24 hours after power loss), or maybe dedicated freezer appliance would behave better. Dedicated freezer would also have such an advantage that there would be no danger of crossing 0°C and subsequently exposing stored goods to freezing/thawing cycles that can destroy them.
I have also built simple system of measuring mains voltage and identify over-voltage events, but serious testing will need to wait until summer.
I would thank both the sponsor - Microchip, and Element14 for the possibility to take part in this challenge and receive interesting processor board and modules of my choice. Unfortunately, time constraints caused by delivery delays prevented me from using them in the presented design, so I have decided to use another Microchip MCU - tried and true ATmega328 to be able to present something before the end of this challenge.