Pages

Monday, December 22, 2014

Raspi Block Heater Control

Well, I have a Raspberry Pi controlling a 5VDC relay, which in turn controls a 120VAC Relay which can then turn my vehicles block heater on & off. For those of you who don't live in the colder Northern climates… a block heater is an electric element that is positioned within the water jacket of your automobile engine. When the temperatures drop below -10C to -20C, the engine is cold, the engine oil is much thicker, the battery loses some of its capacity, and starting can be difficult. When we talk of plugging our cars in, we're referring to plugging the block heater in to provide heating (much like a hot water kettle) for the engine so that it will be much easier to start at those frigid temperatures. My first attempt:


You can see the Raspberry Pi in the upper left hand corner, and the 2x5VDC relays (blue) just above it.  The 5VDC relays can safely be driven from the Raspi's GPIO pins and they can safely trigger a 120VAC relay that will power the block heaters. You can see the 2 x 120VAC relays on the DIN rail just above the 3 white/grey circuit breakers. There is an advantage to using these relays (commonly known as ice cube relays, because they are about that size), and that is 1) there is an indicator light to tell me if it is powered on and 2) there is a manual lever that I can move to manually activate the relay for troubleshooting purposes. Also, if for some reason, my Raspberry Pi was not running, I could manually activate the relays to power the block heaters continuously to ensure my vehicles start in the morning. There are 2 sets of relays to power 2 different block heaters in 2 vehicles.

The only problem with the above setup is that if there is a power failure during the evening, the Raspi's SD card may become corrupted and not restart when power is applied. I find this happens on occasion and I assume it is because the SD card is being written to when the power fails.

So version 2 includes my thoughts on a UPS that I've talked about here on this blog. I've installed a power supply (upper right) and 6 x AA batteries in a holder mountain just above the Wall Adapter on the right.

Now the 12VDC wall adapter powers the power supply (small circuit board to the upper right of the DIN rail) through a 1N4007 diode. Also the 6 x AA (6 x 1.5VDC = 9VDC) batteries are tied to the power supply as well through a 1N4007 diode. Normally when the wall adapter is working, it's diode is forward biased and the power supply is supplied by the wall adapter. Should the House Power fail, the voltage will drop until it reaches 8.3VDC (9VDC from the batteries - 0.7VDC to forward bias that diode). At this point the Raspberry Pi power supply will be powered from the batteries.

Our power outages occur fairly frequently (several times a month), however they are short lived. I am hoping this battery pack will last me thru the winter…..grin.

I'm running the WebIOPi software which allows me to have the block heaters turn on and off via preset times, as well as through a webpage on my smart phone or tablet. Thanks got to Eric Ptak (trouch) who is the author of this wonderful software, WebIOPi


No comments:

Post a Comment