Balcony Solar Panels — the Complete Guide and Results
By: Dmitrii Eliuseev
Tags: DIY, Power Generation, Solar Energy, Ecology, Electronics

This solar system is my second attempt at using solar power in the city apartment. I did the first experiments three years ago, but later everything was disassembled because of my relocation. Finally, at my new place, I decided to start from scratch using the experience I’ve got before.

Image(с) smartflower.com

I will show all components and the whole process, from setup and assembly to the feed of electricity back to the power grid. I will also show how to program a “smart plug” and collect statistics of generated electricity.

Before we begin, I have to note that the legal issues of feeding the electricity to the grid may depend on the country of residence. Check the legality of such a system with your electricity supplier. The author is not responsible for any direct or indirect losses.

Why solar panels?

I am sure that the question “why” will be the very first in the comments so that I will answer it right now. From the profit perspective, the solar battery on the balcony is mostly unprofitable, alas, the scale of generation is too small It depends on the geographical location, the profit in Spain will be more than in Finland, but anyway, it’s better to place solar panels, if possible, not on the balcony but on the house roof. But from a technical and engineering perspective, even a balcony system is quite interesting in terms of studying new and modern technologies. Plus, we should keep in mind that apartments consume more and more energy nowadays. We have a lot of always-connected devices: routers, smart bulbs, smart plugs, smart cat feeders, smart doorbells and other things. Compensating this consumption with solar energy, in principle, is not bad and environmentally friendly. Well, last but not least, looking at the electricity meter and seeing on the screen “current consumption -50W” is merely nice.

General Information

As we know, there are two main principles of using solar power.

Store the collected energy in batteries. Feed the energy back to the power grid.

The first method is perfect when we need an autonomous power supply that can work without external electricity, i.e. there is either no electricity at all, or it is irregularly supplied. In this case, solar energy is first stored in batteries, then using the inverter we create “normal” 230/110V AC voltage from the low battery DC voltage. The advantage of having batteries is that the system can work completely off-the-grid. Alas, there are much more disadvantages. Batteries are expensive, and their life span is limited, especially for lead-acid batteries. The battery can be deeply discharged or overcharged, and both are bad for its lifespan. If the battery is already charged, then the solar panels are not in use, and the energy is wasted. Now the situation is better, in particular, with Tesla Powerwall or similar devices. Everything works “out of the box” there, and Tesla offers a 10-year warranty, but at a price of about $6500, the payback of such a thing is in question.

The second method, and it is also the most effective, is to transfer electricity from solar panels to the electricity grid directly. In this case, the panels are connected to a special grid-tie inverter, which not only converts the DC from the panels to the 230/110 grid voltage but also synchronizes the phase with the mains. The electricity supplied to the “plug” is first consumed inside the house, the excess goes into the city grid, so we not only produce electricity for ourselves but also help to slightly unload the public electrical network. If our electricity meter can count both energy “import” and “export”, we can even get some money back, but not in all countries it still works.

In my case, the “off-grid” mode was irrelevant, and there was no reason to clutter up the apartment with batteries, so the choice was obvious. By the way, the grid-tie inverter has a drawback — in the event of the electricity blackout, it also turning off for safety reason. So even having a 3–4 kW solar panel roof, we can be without electricity if it suddenly disappears in the grid. But in my case, blackouts are so rare that they can be neglected. If needed, a separated DC-DC converter can be added later, that can power a laptop, smartphone, or LED lamps directly from the solar panels.

So, the general idea of what to do is clear, let’s get started.

The connection diagram is straightforward — we take the solar panels, connect them to the inverter, and plug it into a power outlet:

Let’s consider all the components of the system sequentially.

1. Solar Panels

The first important issue is the choice of solar panels. I’ve read the opinion that solar panels have different efficiency, and only the most effective ones should be taken. It is difficult to argue with this. However, the difference is really not so big. According to the Most Efficient Solar Panels 2020 article, the top 10 most efficient panels look like this:

However, they just were not in stock in my region, and in some shops where they were available, the price difference is much more significant than the declared 2–3% difference. Finally, I simply chose those that were available on the local Amazon and had the best reviews.

We also need to choose the size of the solar panels. In general, the larger the panel, the lower the price per watt is, the optimum is around 160W:

In principle, there are larger panels available, like 320 or 360W, but they are rather bulky and heavy, with more expensive delivery, and for the balcony are already too big. In general, 160 watts turned out to be the optimal value. The size of such a panel is 150x70cm, and the weight is 12.5kg.

The solar panel mount with adjustable angle was also purchased:

In practice, two 160W panels fit on the balcony, it’s even possible to install a third one, but then the balcony space would be occupied entirely.

On this photo, the panels are not yet turned towards the Sun, and the inclination angle is not quite right. Also, the wires are too thin, and a few watts are lost on these.

2. Grid-tie Inverter

The choice of inverters for such small power is not so great. I chose this one:

This is a simple Chinese inverter at the cost of 80–100 Euro, there are models for 11–30V and 22–60V input voltage available. If it is possible to use a higher voltage and connect two panels in series, then the second option is better, but if there is only one solar panel, then the first can be used. Only one disadvantage was discovered — the inverter periodically makes noise because of a fan inside. It turns on only during the day when solar power is more than 100W and can be a bit annoying if the grid-tie inverter is placed in the living room.

Another option is the so-called “micro-inverter”, which is mounted directly on the solar panel:

The method is quite effective and convenient. The noise problem is eliminating, plus due to a higher voltage, there is less resistance loss in the wires. But for reasons of electrical safety, I did not want to use 230V wires on the balcony, so I had to stop at the first option when only low-voltage cables are placed at the balcony.

Collecting the data

In principle, our system is ready — it’s enough just to connect the solar panels to the inverter, plug it into a standard outlet, and everything will work. However, it is interesting to see, at minimum, how much power is given from the solar panels, and as a maximum, to have more advanced logging of the collected energy.

First, we need an energy meter that displays the actual parameters on the screen.

It can display the data (power, voltage, the sum of kilowatt-hours), but it does not have any “smart” functions, as well as no ability to save logs.

The amount of kilowatt-hours is useful when it comes to iron or refrigerator. However, for solar panels, it is essential to see the output during the day. I’ve compared different models specs and decided that a TP-Link Kasa HS110 smart plug provides the best functionality — it can not only measure the power, but there is also an unofficial Python API for getting the current values. As a bonus, the TP-Link software has its own “cloud”, and it’s possible to see the energy generation ​​online from anywhere in the world:

Unfortunately, none of the “smart plugs” has an LCD screen. I suspected for a long time that all marketing and design decisions are made by aliens, who in this case, consider more convenient to take a smartphone and make ten taps to see the energy generation than to just look at the screen. As a result, I’ve built such a “stack” — the first “dumb” plug shows the generation values ​​on the screen, the second “smart” one, provides a WiFi connection. Honour and glory to modern marketers (or maybe that’s what was intended — I spent money on two devices instead of one).

However, there is no built-in logging in the TP-Link application, and I had to add it myself using Python and https://github.com/python-kasa/python-kasa library. Of course, this could be automated using OpenHAB or Home Assistant, but it seemed redundant to use such a huge framework for what can be done with 20 lines of code.

The code is quite simple:

from kasa import Discover, SmartPlug, SmartDevice

import datetime, logging, time, asyncio log_format = "solarlog-%Y-%m.csv" def get_power_from_meter() -> float:

try:

logging.debug("Connecting the smart plug...")

devices = asyncio.run(Discover.discover())

for addr, dev in devices.items():

if dev.is_plug:

asyncio.run(dev.update())

if dev.has_emeter:

logging.debug("Smart Plug found: %s", addr)

emeter_status = asyncio.run(dev.get_emeter_realtime())

power = emeter_status['power']

return float(power)

logging.debug("Smart Plug was not found")

except Exception as e:

logging.error("get_power_from_meter exception: %s", e)

return -1.0 def write_log(power: float):

log_name = datetime.datetime.now().strftime(log_format)

with open(log_name, "a") as logfile:

logfile.write(f'{datetime.datetime.now().isoformat()},{power}

') if __name__ == "__main__":

logging.basicConfig(level=logging.DEBUG, format='[%(asctime)-15s] %(message)s') logging.debug("App started") # Read meter and save to the log

try:

while True:

power = get_power_from_meter()

logging.debug("Power reading: %f W", power)

write_log(power) time.sleep(60.0)

except KeyboardInterrupt:

pass logging.debug("App done")

When the program is running, CSV-logs will be updated every minute. Files are automatically month-separated. Data looks like this:

2020-06-25T11:36:27.021849,0.0

2020-06-25T11:37:32.646114,0.593

2020-06-25T11:38:38.207308,0.731

2020-06-25T11:39:43.695290,0.738

2020-06-25T11:40:49.320069,0.785

2020-06-25T11:41:54.805750,0.344

2020-06-25T11:43:00.367353,7.137

I collect the log on my dd-wrt based router, for which the nohup python3 /opt/solar.py >/dev/null 2>&1 & command was used. There was also an idea to add a mini webserver to access the logs, but in practice, the standard WinSCP was enough to download a new log when needed.

Results

First, I live in the Netherlands, not the sunniest country in the world, in other places, results may vary.

It was quite difficult to find a perfectly sunny or completely cloudy day as an example. The power generation during an average sunny day in summer looks like this:

The balcony is oriented to the west, in the morning, the panels are in the shade, and full energy production starts in the afternoon. Although at 9 am, up to 25W is given to the power grid, which is generally not bad. As can be seen from the graph, the peak power is about 175W, but power “drops” caused by clouds are also clearly visible. Generation ends after 9 pm — in summer the days are long, in winter, of course, they will be shorter.

For all the day, 0.73 kWh of electricity was generated:

Without any clouds at all, I can probably count on the 20–30% increase, i.e. the solar panels will generate about 1 kW*h/day.

The panels also work in cloudy weather, but the output, of course, is less, and only with dark thunderclouds can fall to zero. For comparison, this is how energy generation looks like on a cloudy, rainy day. For the whole day, 0.21 kWh was generated:

Is it a lot or a little? According to Google search, 0.2 kWh is enough to boil 2 litres of water with an electric kettle, which is not so bad for “free energy from the sky”.

Of course, the generations per days can vary. This is how the average week generation in summer looks like:

It can also be noted that efficiency is not as high as it can be. First, the panels tilt angle is not optimal — I cannot rotate the balcony a bit left. Also, the manufacturers write on the solar panels the maximum value, that can be obtained at a perfect tilt angle in the crystal-clean air somewhere on the Moon ;) or in the Himalayas. In reality, the Sun is continuously moving across the sky, and the optimal tilt angle will last no more than 1–2 hours per day. Of course, there’s nothing wrong with that; we should just keep in mind that for example, real 100W output from a “100-watt solar panel” will rarely be produced.

Export to the grid

Finally, I’ll describe the issue of exporting energy to the grid. Everything is simple from a technical point of view but is complicated from the legal point of view. Technically, we are simply adding a new energy source to our household. This energy will be first consumed by the devices inside, and the excess through the electricity meter (and this is important) will be transferred to the city grid. The meter is important here because it will depend on it how the exported energy is calculated.

In general, it depends on the country of residence and local laws. There are options here:

When reversing the current flow, the old disk-based meter will most likely not spin the disk at all (it has a special reverse blocker), i.e. electricity generated by us will be sent to the grid for free, the readings on the meter will not change.

An old disk meter without a reverse blocker will turn the disk in the opposite direction, i.e. meter readings will decrease, which, of course, is beneficial to the owner of the solar panels. But such meters are not in stock now and have become a museum rarity.

A digital meter that “does not know” how to calculate the energy export, will consider it “modulo” regardless of direction, i.e. for every kilowatt-hour sent to the city, the owner of the solar panels will pay as for consumed.

A modern digital meter that can count both energy export and import will show individual values ​​for all parameters. In total, there are four readings on such a meter: daytime import, nighttime import, daytime export, nighttime export. Solar panels generation at night is obviously zero, but two tariffs are usually provided by a local electricity supplier.

Of course, the matter is not only in the meter itself but in the ability of the entire infrastructure and the bureaucratic system of the country to accept and process such payments. In Europe this works quite well, the meters in many houses and apartments have already been replaced with new ones by the municipality. In Holland, it is enough to notify the state by filling out the form on the website:

Of course, this is not so critical for a balcony solar station with a capacity of 100–200W; most of the electricity will most likely be consumed inside the apartment by a refrigerator and other devices. So even if someone does not have a new electric meter, it’s easier to consider this only as a charity to the environment — even if you “give for free” a few kWh per month to the city, and will pay, say, 1$, this will hardly make you poorer. Of course, if there are many solar panels on the roof, it is advisable to install a new meter or (if the local law does not allow the feed-in tariff) at least a special grid-tie inverter with a limiter. This separated current sensor is installed near the electric meter and inverter limits the output using this sensor, so that nothing is feeding out.

In my case, the new meter was already installed by the municipality for free, so on a sunny day, I can really see the negative energy consumption values on the screen:

By the way, the question of how much you can “earn” on investing in solar panels, is economically complicated. It depends on the geographical location, local laws and electricity prices. For example, according to the German online calculator, the payback for roof panels with a 31m2 area is about nine years for Germany:

Conclusion

Getting solar energy is a rather exciting hobby project in terms of learning something new. After all, as we know, the best way to study a new technology is to try it. We can read many other people’s articles, but it’s much better to do stuff yourself. It’s getting much more knowledge of how the system works, how parameters vary, like the influence of the panels tilt, rain or fog, learning how to make wind protection, how to collect statistics, and so on. It is much more exciting and finally gives more experience and understanding of different nuances.

In general, I am quite pleased with the results. The project cost was about 500 Euro, which in terms of the hobby is not a huge amount, and is quite comparable with an average smartphone or photo camera. Two 160Watt solar panels provide 10–190 watts output depending on the weather and time of the day, which compensates for the consumption of different home devices, and even if there is no current consumption, the surplus goes to the city power grid.

To anyone who wants to repeat something similar on their own, I wish successful experiments and more sunny days.

Thanks for reading.