Category Archives: Solar

powering yourself: water heaterS – Most efficient setup with no tradeoffs

In the “Rethinking the Smart home series“, I proposed that if you have a solar PV system (or any system that generates electrical power), no one uses your own produced power better than the you. To summarize the proposition, I claim that “selling back” to the grid is environmentally less ideal than using the produced power yourself. The concept needs a nickname -something I can use to expand and apply the concept later. Towards that end, I think “Powering Yourself” works. I’m open to suggestions if you can think of something more catchy. Let’s market this idea and spread it around! The more eyes and ears on the concept, the more solutions we can come up with to make distributed smart-grids a reality and ultimately make the world a more energy efficient place.

Water heater relative efficiency

Hot water is essential for our daily lives. Hot water kills many types of bacteria that can infect our bodies. It is more effective for cleaning with as it helps loosen up bonds. In US homes, hot water is typically produced in a centralized tank. This insulated tank is mostly heated by burning natural gas (CH4/methane).

Rheem Performance Platinum 50 Gal. Medium 12 Year 5500/5500-Watt Elements Mobile Alert Compatible Electric Tank Water Heater
courtesy Rheem

Tank water heaters are generally less efficient than tankless or “on-demand” water heaters. This is because the water in the tanks is maintained at a set temperature (between 49C-60C) even when you are on vacation or shower less frequently, etc. Running a tank water heater is estimated to cost about twice as much as a tankless.

Even more cheaper to run than tankless is a type of water heater called a “hybrid water heater” or “heat pump water heater”. Some of the manufacturers claim they take “energy from the air” to heat the water. This is misleading in my opinion. These are actually using the same technology as your AC unit: it uses mechanical energy to compress and decompress a phase-changing medium from liquid and gas states. The in the decompression state, the phase change from liquid to gas will actually suck thermal energy from the air to help facilitate the phase change. You can experience the same effect if you get a can of compressed air and spray it for a while. The can gets cold fast because the phase change going on inside is sucking thermal energy from the can and your hand (and the air, etc).

On the flip-side, during the compression stage, heat energy is actually released to facilitate the phase change from gas to liquid. This energy would go back into the air or in the case of the hybrid water heater: into your water. The process isn’t even zero-sum because the compressor itself gives off some heat.

Courtesy of Stiebel Eltron

Hybrid water heaters use electrical power to turn the motor in the compressor. They use less energy than traditional electric water heaters which run at sometimes run at 5kW. Further, they use drops compared to tankless electric… which can go higher than 36kW. Yikes!

Tankless comfort

Of all these different types, tankless are the most comfortable in my opinion. Tanks fill with cold water at the same time they are being drained of hot water. This results in fluctuating temperatures at the start and end of use. If you’ve ever showered right after someone else in your household, you know this reality. Tankless heaters don’t have that problem. They have constant temperature from start to finish. So if you have or want to use a tankless heater for the comfort and savings, how do we achieve this while still following the “powering yourself” principle? Tankless heaters are gas or electricity powered. Gas is a bit more difficult to power under your own means (not impossible, maybe more on that later). For electric tankless, the electrical consumption is so high that very few solar systems can keep up (36kW or more). To power ourselves, we are left with tank solutions and really only hybrids as they require less electrical power. But to go with a tank we must sacrifice all the pro’s of tankless… or do we? Can we have our cake and eat it too?

Smarter water heating

In the last article, I wrote about an automation approach that uses smart budgeting to maximize the usage of your own energy production and reduce usage of the grid. Could we add a hybrid water heater as a device to this system? Let’s calculate and see if we can power it with solar PV. We don’t need to power it all the time since the tanks are insulated and will maintain some thermal energy. At an R-value of 20, a 50 gallon tank of 60C will cool by about 3C over 9 hours assuming a surrounding temperature of 8C.

A 50 gallon hybrid water heater stores 183 l (or 183 kg) of water. Worst case for my area, the temperature of the water will be 9C. We need to heat that up to a minimum of 49C (to meet government standards) or 60C (most manufacturer defaults). Using 60C as the worst-case target, we need to put in 40.3 MegaJoules of energy into the water to heat it up from 9C to 60C (Q = mC△T). No heater supplies that amount of power all at once, so lets divide that energy requirement over time. To get kWh we divide by 3600 (number of seconds on 1 hr). We get 11.2kWh. That’s pretty reasonable production rates for even a small solar system. With my 3kW system, I can average 11kWh a day for 8 out of 12 months or 2/3rds of the year. With a 6kW system, you can do 11 of 12 months.

We can almost power our water heating needs under the Powering Yourself concept! To cover the last little bit, we could put a tankless heater in-line after the tank water heater. The tankless water heater would only be active if the incoming water is below the setpoint. We can get the benefits of Powering Yourself and tankless comfort!

Copyright 2018

Cost savings of the Hybrid Approach

In the above diagram, we are using a fairly large tankless heater. Heaters at this price range can do 9 or more gallons per minute of hot water. For reference, a typical US shower head is 2.1 gallons per minute. This is probably overkill for what is actually needed in most situations. Even the cheapest 5 gpm tankless option will be better in the worst-case scenario than just having a tank.

For the 9gpm tankless, the time to payoff with the savings is about 9 years with a 3kW solar PV system. It’s about 7 years with a 6kW system. With a 5gpm tankless heater, you are looking at 3-4 years.

This payoff period is only for the added cost of the tankless heater in this setup. It is assumed that this is either a new install or you are replacing the existing hot water tank with a hybrid. Hybrids save about $100/year over traditional gas tank heaters. The payoff for the hybrid upgrade over traditional is around 5-8 years.


First, there is no point in even trying this if you do not have your hybrid tank optimized for solar with some sort of home automation software. It needs to essentially turn off if there is no solar power being generated. Wifi enabled versions allow setting the temperature setpoint remotely. There’s even an open source python API for talking to some Rheem models. If the hybrid heater has this capability, we don’t have to turn it off. we can just turn the set-point down appropriately to stop it from running… or run less. Another option is a wifi relay outlet like those supplied by Wemo or TP-Link Kasa. Be careful! Many of these only support 15 or 20A loads and some hybrid water heaters require a 30A outlet.

If you are able to automate the hybrid tank to only (or mostly) use solar generated power, you should save money (up to $100/year in some cases). Adding a tankless heater in-line will add the comfort, and will pay for itself eventually.

What other devices can we bring under the “Power Yourself” umbrella? If you have any ideas, leave a comment below or tweet me. Good luck and happy powering!


In Part 1 of the Rethinking the Smart Home series, we looked at how we can using batteries to offset the electrical usage of certain devices.  We did not discuss how and when that battery system is charged.  We will do that now.

Batteries are just devices

There are a lot of “devices” in our homes.  Devices are things that use power.  This includes lights, displays, HVAC systems, and even battery chargers.  Over the last few years, the market has flooded with relatively inexpensive smart light bulbs, switches and outlets.  Many of these offer power and energy consumption monitoring.  Many of them have APIs either provided by the manufacturer or reverse engineered by the community that can be used to communicate with these devices.  I decided that I could use one of the smart outlets I have to control when the battery system charges.  Obeying the Law of Using Your Own Generated Power, I will only charge the batteries when there is enough solar power available.  I realized quickly that there are many devices I have in my house that I can turn on and off in this way.  I have several grow lights for indoor food plants that are already connected to Ubiquity mFi WiFi outlets.  I have them on a schedule, but I was interested to see how much I could save if I only had them run when there was enough available solar power. 

The use-cases after that kept growing.  What if I tell my smart light switches to dim when there isn’t enough available solar power?  What if I raised the setpoint of my thermostat by a degree if there isn’t enough solar power?  What if I only charge my robot vacuum on solar power? 

To see how much money I could save, I wrote some code to help manage the devices based on a “power budget” which was set by the output of the solar PV system.  For example, if the PV system was producing 2000 Watts of power, I would turn on “managed” devices until I either reached 2000 Watts or they were all powered.  If the solar PV output dropped to 1000W, I would need to turn off some devices.  To do this, I wrote some code I call the “Device Manager”.  The Device Manager would maintain the power budget and turn on and off devices as required.  It would also run device-specific rules (more on that later).


Some devices are more important to me to have powered than others.  For example, my phone charger is more important than the robot vacuum charger.  If the power budget is exceeded, Device Manager will first turn off the lower-priority devices.

Runtime Modes

 Many utilities offer variable rates depending on the “time of use” of your power.  For example, rates are often cheaper in the night when fewer people are using lights and appliances.  Rates can also be more expensive during “peak usage” when the grid is experiencing more load for example, at noon on a hot summer day when everyone’s air conditioning is running.

The Device Manager should be smart enough to take these time of use modes into account.  If I go over my local power budget, I may want some devices to remain running if it’s during off-peak hours of the day.

A perfect example of this is my greenhouse preemptive cooling system.  I run this system at night during off-peak hours for the cheapest rates.  It also runs more efficiently at night because it’s cooler.  Double-bonus.

Rules Engine

Turning on/off devices is powerful enough for many devices.  But what about devices you don’t necessarily want completely off?  For example, I need lights at night to see.  I can’t just have them turn off if there isn’t enough power.  I can have them dim, however.  There are lots of use cases from dimming lights to adjusting thermostat settings that calls for a rules engine.  I have written rules to turn off devices, or dim lights or even check occupancy.  Devices can have many different rules so rules can be combined in interesting ways.  My lights have occupancy rules and dimming rules.  I even have a rule that “links” devices to a master devices so that the on/off state mirrors the master device.

Batteries as a buffer

In the first part of this series, I built a battery system to help optimize when I charge my laptop and other devices.  That system really cannot work to peak efficiency without the Device Manager managing when the batteries charge.  I charge the battery banks when I am under budget with medium priority.  I found this works best for my usage.  I am able to charge all phones in the house and my laptop from this simple battery system.  While it doesn’t amount to huge savings (only $5/year), it does make a good proof of concept that we can use to power additional devices later.

In practice

With the system running and managing about 8 devices ranging from grow lights, to chargers to the thermostat, we observed considerable savings.  Our power usage is about 30-50% less year over year.  That’s much more than Not all of that can be attributed to the Device Manager system, but a lot of it can.  Most of the savings is probably in the thermostat automation, but the light management probably helps a lot.  I believe it also helps us get to sleep faster since the lights are not so bright at night.

In the next part, we will look at how using AI and machine learning makes this system even better.


Greenhouse solar heating

The ultimate source of heat for my greenhouse is the sun.  Even if the outside temperature is less than 10C, inside, due to the energy input from the sun, I’m seeing up to 40C on sunny days and almost 30C on overcast days.  However, my water reservoir, which I pump through a geothermal bank 6 feet under the ground and through my soil bed, is only seeing a maximum of 15C on those hot days.  As nights have been dropping below freezing (-4C), it drops about 5C to 10C when I wake up.  That’s not acceptable.

The issue is that the air in the greenhouse can only heat the water if it comes in contact with the reservoir container.  Further, waiting for the air to heat up by the sun, and then the air to heat up the water isn’t ideal.  Air is a poor conductor of heat and has relatively low energy storage capacity.  To improve this situation, we need to increase the surface area of the water system.  We could put in a bigger reservoir but space is a scarce resource inside my greenhouse.  A larger reservoir will increase the surface area, but only a little bit of that will receive direct photon penetration from the sun.  What we really need is a solar heater.

I have a 4 ft x 6 ft area above my components.  I could mount a board of some sort up there are coil some water tubes to increase the surface area.  I also have 2 old CPU radiators with fans.  This will increase the effective surface area of the water’s contact with the air.

Over a couple weekends, I took the 200 ft of black poly tubing and made two spiral loops almost 2 feet in diameter on a 8 ft by 4 ft Styrofoam board I picked up at home depot.  In between the two spiral loops, I placed the radiators in series.  To hold down the tubes, I used automotive-grade 3M double-sided tape in an “X” pattern.  On the top, I used gorilla tape, but this wasn’t effective.  Right before installing, I used 10 gauge wire to lock it down in case the 3M tape fails.


I mounted the setup at a 30 degree angle near the top of my greenhouse facing south.  This is not ideal.  In my area, a 70 degree angle would be better, but space is limited, so this will have to do.


Before I installed it, I tested it on the ground at a 70 degree angle.  Over the space of an hour or two, the water heated up from 13C to 19C.  It was a sunny day.  This is about the same as pouring two good size pots of boiling water inside the reservoir.

I’ll continue tracking the performance, but today I’m optimistic this will help.  The running cost is pretty cheap too at only 28 Watts (12V @2.4A max).  I’ve coded up an algorithm in my automation controller to only turn on the pump if the air is hotter than the reservoir.  This is good for the winter time, but this rule probably won’t work will in the summer.  In fact, I may have to add a rule to turn on the solar heating system to help cool the greenhouse.  We’ll see.

What about the cost?  Well, this addition was relatively cheap.  If you want the cheapest solution, this might be it.

Cost breakdown:

Total: $104


Bonus Total: $119

Auto-irrigation system for raised garden using the Intel Edison

The Plan

I want a raised garden but I don’t want to have to manually water it like my lawn sprinkler system.  So I’ve been planning and gathering parts for an auto-irrigation system.  Here are the key parts:

  • Rainwater gathering system
  • Valve control to drip-water plants
  • Solar power (with solar tracking?)
  • Soil temperature and humidity sensors
  • Auto water-soluble fertilizer mixing

In this part, I’ll talk about the solar power system -specifically power storage.

Solar Power: Power Storage

I have a bunch of 350 farad super capacitors laying around.  The cool thing about super capacitors is that they can charge directly from the solar panel.  I picked up a balancer on ebay and connected six of them in series to give me about 16 volts.  I also have a spare 10W Instapark solar panel that I’ll use to charge the cells.  The Instapark solar panel is rated for 22V closed circuit.  I shouldn’t charge my super caps over 16 volts so I will need to reduce the voltage a bit.  The easiest way to drop the voltage is to use a resistor.  Using Ohm’s law we can calculate how much resistance we need:

R = V/I

My voltage drop (V) is 22V (the panel max) / 16V my super cap array max which is 6V.  The current (I) I expect to see is 600mA or 0.6A.  Plugging in my variables I get

36.66 ohms.  I want 10 watts to be safe (I figure, probably wrongly so, that a 10W resistor for a 10W panel will be fine).


I found some water resistant enclosures on amazon.  This was perfect size for my super cap bank.  I got an additional one to put the Intel Edison and related circuits in.  To keep it water tight, but also allow cables to get in and out I picked up 4 of these from adafruit along with matching water resistant cables.



I used a 5/8″ spade bit to create two holes for the cable glands for the super cap box.



Carefully I screwed in the glands and put some gasket sealer on the inside to seal some of the uneven spots from the drill.



I did the same thing with the “Edison box”, but on opposite sides.



I then stacked two power supplies on top of each other.  I got the power supplies from amazon.  They have adjustable output and a wide input range.  I have one set at 12V for the valve solenoid and the other at 4.2V for the Edison.


Finally, I attached a power button so I can turn on and off. This too needed to be water resistant.  The white LED color is a nice touch, IMHO:



Finished Power Enclosure

The enclosure works pretty well.  It took about 15 minutes to fully charge.  My hope is that it will power the Edison and friends for an entire day and most of the night.  If it turns off in the night, I can live with that.




Next part we’ll look at the 2nd Enclosure for the Edison and friends.  Stay tuned!