Intro: Fridge Hack - Load Shifting
This is a write up of a project I completed a few years ago. The aim is to move (load shift) the electricity used by my fridge to times when the electricity is cheaper. Where I live (Sydney, Australia) we have very expensive electricity costs, indeed one of the the highest in the world. At it's worst peak electricity is about 53c/KWh. My house is fitted with a time of use (ToU) meter and peak electricity is from 2pm to 8pm every weekday. Off Peak is Midnight to 6am and there is a middle rate (or shoulder as it's called) which is all other times. So, it makes sense to try move ones use of electricity to times where the price is lowest.
The way to achieve that with my fridge was to change the temperature setting on the fridge on a daily basis. Now this is boring and bothersome to do manual but something quite easy for an Arduino. Now, to be honest I don't expect anyone to copy this Instructable to the letter - its based on a specific model of Fridge (Samsung) but I thought I'd share this as its a good use of an Arduino and its a concept I'd like to introduce to all who read this as I believe load shifting is going to be a built in feature of many household appliances like fridges, air conditioners and washing machines in the future. Also, the charging of electrical vehicles will require to be controlled but for different reasons, ie we can't all get home at 6pm and expect the grid to charge our vehicles at the same time!
Step 1: Safety
This project is on a mains (240v AC) domestic appliance. Please do not attempt to do this project if you are not aware of the risks and are competent to carry out the modifications necessary to complete this project. Hopefully this warning dos not discourage you too much as you can do projects like this but it's best to be aware of the risks rather than a victim of them!
Step 2: Side Note: /solar Electricity and Feed in Tarrifs (FiT's)
Just a side note to add some background to my electricity supply and how it influenced me to undertake this project. No need to read this if you understand FiT's!
I had a 2.5kw solar system installed in 2007. There are 2 ways a home with a solar system can connect to the grid, that is either through:
1) A gross metering scheme
2) A net metering scheme
Here in Australia (Sydney, NSW) we have had a few changes in legislation and the law has gone from net, to gross and now back to net. Apart from causing a whole lot of unnecessary meter changes it also has left users/owners with a few changes in habits with respect to when it is best to use electricity.
With a gross metering scheme it was most financially advantageous to restrict my usage during the daytime (to avoid peak rates), and use more at night. Now, its not always convenient to 'not' use electricity but, you can make some minor changes without impacting your life too much. For example:
1) Do your washing at night (clothes are ready in the morning to hang out)!
2) Charge batteries at night - not so much of an issue with many people yet but I do have an electric bike with a 1.4KWh battery and when we all change to electric cars.........!
3) Load shift the fridge
Moving to a net metering scheme, where the rebates for my generated electricity are only about 6c/KWh it is only sensible to turn this on it's head and start using the electricity during the day (ie use the electricity I generate and hopefully not the expensive stuff from the grid).
Step 3: Explaining the Concept
As mentioned in the 1st step the idea is to lower the temperature setting of the fridge/freezer compartments to "pre-load" the contents with coolth (yes, that is a real word), and then change it to a higher set point when you want to minimise the electricity usage. Initially I wrote the software to have the period of (hopefully) low electrical usage to coincide with the peak rate charges (2pm-8pm). As I said in the last step, this was to my advantage as I have a solar installation and I was being paid a generous (some say over generous) rate for the power I exported to the grid. That scheme has now changed and it is no longer a gross FiT but a net FiT so I've recently changed the timings in the software to change things around.
The fridge temperature can be changed by pushing the buttons on the fridge door - the temperature range is -21 to -16.5Deg C for the freezer and -1 to +6 for the fridge. All I need to do is identify the wires from the buttons and wire some relays in parallel....
Step 4: "Faking" the Push Buttons on the Fridge Door
To get the Arduino to do the equivalent of pressing the buttons on the fridge door I had to do some more investigating and find out how/where the wiring was organised for these 2 functions. Once I had discovered which wires it was it was a relatively simple task to splice in wires in parallel with these buttons
Step 5: The Arduino and the Circuit
The circuit is fairly simple and can be constructed in a couple of hours. The main elements as as follows:
1) Arduino pro mini - You could use any member of the Arduino family and this should work fine. I choose the cheapest (and smallest) and clones can be obtained for a few dollars on ebay.
2) A Real Time Clock (RTC). I used a module from Freetronics which is a well made and locally available item. Alternatives are also available from ebay/aliexpress. The RTC does what it 'says on the box' and it keeps a log of time/date and is backed up by a battery. This means that when the fridge is power cycled (for example after a blackout), The RTC will know the right time and data and the fridge will synchronize correctly. The RTC module talks to the Arduino over the I2C bus and I've used a library function to call the data from the module.
3) 2 x Reed relays are used to interface with the fridge. I wanted this circuit to 'fake' the push buttons on the front of the fridge and the best and simplest way was to use a pair of small relays. Two digital outputs on the Ardiuno are used to drive the relays.
4) 2 Zeners diodes protect against 'flyback'
All these components were mounted on a small green perf board.
Step 6: Parts List and Links
1) Arduino Pro Mini - you can use any Arduino for this project - Here I'm taking the minimalist view and using a Pro Mini but I'll need an FTDI to program it later. (you might want to use something already with a USB connection like an Uno).
(I used a 5V version of the Pro Mini)
2) RealTime Clock - To provide the arduino with the correct date and time I used an add on board from freetronics
3) 2 x Reed Relays
pretty much any relay will do!
4) 2 x zener 'flyback' diodes for the relays
5) Green perf boards - something like this!
Step 7: Constructing the Circuit
There is not too much wiring to do for this circuit - a bit of skill is required soldering but I'd rate this in the easy category.
1) Start by soldering 2 wires onto A4/A5 on the Arduino Pro Mini (soldered underneath the Arduino PCB)
2) Add some headers to the Pro Mini and the RTC module and mount these along with the 2 reed relays directly to the Green perf board.
3) Add some headers to the green board to allow 5v to be applied and common these up on the rear of the green board so that both the Arduino Pro Mini and the RTC module are fed with the required 5v DC
4) Add the 2 zener diodes (across the coils)
5) Wire up the 2 outputs from the Arduino to the reed relays
Now all you need to do is load the Arduino software!
Step 8: Providing 5v for the Project
I thought I'd find 5V on the fridge main control board and I did!! I just probed around and found one which I think was powering the MCU. I don't think I'll be overloading it by adding an Arduino.... a few extra mA can't hurt! Well it has been running for a couple of years already!
Simply add a +ve and -ve wire to this point (which I did to the underside of the board)
Step 9: The Arduino Software
This is quite a large program - mostly not written by me so I can only provide limited help in explaining it!
Basically, on powering up the Arduino asks the RTC for the date and time and based on this information it synchronizes the fridge temperature. (The fridge always boots up with both fridge and freezer set to the mid temperature point).
From this point on-wards the program loops continuously (for ever) just polling the RTC for the updated date and time information. When a particular time period is reached the Arduino command the temperature to change by closing and opening the reed relay a set number of times, thus changing the temperature set point of the fridge/freezer.
The program also takes into account the weekend and also can make allowance for daylight saving time (summer/winter).
Once you have loaded the program you need to set the date and time. You should only need to do this once as the RTC is battery backed up and should be ok for a few years! The setting is done in the serial window (set to 9600 baud). You can type the work 'help' to get a list of commands but the two you will need are 'date' and 'time'. Good luck!
Note on Arduino Libraries
For the program to work you will need to have some libraries load up to the Arduino IDE, The libraries are included in these statements in the program:
- #include <Wire>
- #include <Time.h>
- #include <avr/pgmspace.h>
- #include <string.h>
- #include "DS3232RTC.h" // DS3232 library that returns time as a time_t
Refer to the Arduino website if you are unfamiliar with how to add libraries to the Arduino IDE.
Step 10: Comments and Suggestions
Let me know what you think. Constructive comments are always welcome and I'll try answer any queries you may have.