Solar in CH
This is a build log of my work-in-progress project to solar power my home server.
Build log
2020-03-26
The inverter and AC –> DC PSU arrived and the system is all set up. A quick note on the power consumption:
- Base load (home server etc): 14 W
- Inverter on: 22 W (+8 W, 6.1 W in the datasheet)
- TV in hot standby: 38 W (+16 W)
- TV and stereo on: 106 W (+68 W, 84 W total)
These are based off the power delivered by the panel when the battery is fully charged. This is normally ~3 W higher than the actual load.
2020-03-02
I’ve had many sunny days, and now have enough data to estimate the cable loss.
Today at peak the panel developed:
- 176 W at the charger
- 30.1 V at the charger
- 34.3 V 1m from the panel
This gives 5.9 A through the panel, 202 W generated, and 25 W lost in the cable.
V=IR, so the cable is a total of 0.71 Ω. The cable is ~20 m giving 0.018 Ω/m.
This matches pretty well the expected loss on a 1 mm2 cable.
If the panel gets to 315 W, then the power at charger will be:
- I = 315 / 34.3 = 9.2 A
- Vcable = 9.2 * 0.71 = 6.53 V
- Vcharger = 34.3 - 27.7 V
So the charger will be below the battery full float voltage of 28 V and the cable will dissapate 60 W (!).
Going to 2.5 mm2 cable cuts the resistance to 0.0069 Ω/m, 0.28 Ω total, 2.6 V drop, 31.7 V at the charger, and dissapating 24 W.
2 pole mains flex is 0.89 EUR/m. Loudspeaker cable is 0.44 EUR/m. They should have the same resistance, right?
2020-02-24
The parts have arrived from Reichelt after almost 30d. I’ve wired in the new changeover relay and mains supply. I ordered a Meanwell 24 V supply which can be adjusted up to 30.2 V, but missed that the Victron charge controller requires the supply to me 5 V more than the battery to start charging. This is (just) OK as once charging has started the difference must be 1 V or more, so once it starts charging it will continue. Lesson is to order a 36 V supply.
2020-02-14
The 315 W panel is working well and is much more effective at low light than the 55 W. I’ve re-worked the two 12 V LiFePO4 batteries into a single 24 V battery using a HEYO BMS and added monitoring. One of the cells seems to overcharge so I’m not getting full capacity out of the battery, but it’s still much more than I need.
Today I’m 3D printing the remaining DIN mounts for the remaining parts. I’m waiting on an order from Reichelt which is taking forever but, after it arrives I’ll layout the modules into (probably) a power and a compute rail. Everything will be rewired for 20 A.
As a data point, today was sunny and the battery was fully charged at 10:53 AM after ~2h of charging. Adding more load will help.
2020-01-24
Since last post, I purchased a JA Solar JAM60S01-315/PR. It was surprisingly cheap at 120 CHF and comparable in cost to the used panels I’ve been looking at.
The panel is much higher output than I need, so I built a 20 deg from horizontal frame to keep the lift and sliding forces low.
The weather has been decent since I put it outside, and the total generation each day was:
- 240 Wh
- 290 Wh
- 130 Wh
- 200 Wh
- 120 Wh
i.e. the battery was fully charged each time.
I’m now in the final phases of the project as most of the remaining work is tidy up. Left to do is:
Take the two ENERpower 12 V batteries and use a LLT Power ‘Smart BMS’ to turn them into a single 24 V battery. According to the manufacturer the built-in BMS means the batteries can’t be connected in series and shouldn’t be connected in parallel, but I didn’t know that at the time. The new BMS also sends telemetry over UART but it looks like the ground is not the output negative, so I’ll add an isolator.
Rewire the unit. The cables are a patchwork, so I’ll add distribution blocks for the 12 V and 5 V rails and rewire everything with 2.5 mm2 cable. This is good for 20 A+ which is around the capacity of the MPPT and the peak discharge of the batteries, and is enough to drive a small inverter in the future.
Move the router and Wifi to solar. There’s plenty of extra generation and storage. The router takes 9 to 24 V so, rather than risk it with the peak charging voltage of 28.8 V, I’ll add a 12 V converter.
Extend the mains fallback logic. The panel can supply up to 9.5 A and the mains fallback supply 3.5 A. The mains supply has ‘hiccup mode’ overcurrent protection, so if the MPPT draws too much current then the supply will shut off and resume afterwards. I’ll update the logic to change the MPPT maximum charge current configuration before switching to mains, so the MPPT can act as the current limiter.
2021-01-10
The current system is working fine but there’s plenty of room to grow. The limits on the current system are:
- Vbatt, no load: 13.3 V
- V, charging at 4.5 A: 13.9 V
- Imax (MPPT): 15 A
- Imax (charge): 10 A (~0.5 C)
- Imax (discharge): 22 A (~1 C)
Assuming the voltages double for a 24 V system, then:
- Ppv (max):
13.9 * 2 * 10 = 278 W
- Pload (max):
13.3 V * 2 * 22 = 585 W
The current loads are:
- Server:
5 W * 24 h = 120 Wh
- Internet:
6 W ? * 24 h = 144 Wh
- TV: 200 Wh ?
- Stereo: 100 Wh ?
- Total: 560 Wh
The storage is:
- Storage:
12.8 V * 25 Ah * 2 = 640 Wh
Take the irradiance from PVGIS. Given my location, and a mount of 60 deg from horizontal, then the monthly solar irradiation is:
- 45 (min) / 170 (max) kWh / m2 / month
Changing to the optimal angle gives a peak of 200 kWh / m2 / month (+18 %).
The Victron SPM040551200 is 0.36 m2 giving ~15 % efficiency, so the power generated is:
- 2.4 kWh (min) / 9.2 kWh (max) / month
- 80 Wh (min) / 300 Wh (max) / day
- 1.45 Wh/w (min) / 5.45 Wh/w (max) / day
There’s not much data, but taking the recent sunny days in December:
- 92 Wh, 50 Wh, 47 Wh
which is the right ballpark.
Given the generation, storage, and load, then:
- Fully charge during winter:
560 Wh / 1.45 Wh/w = 390 W
- Fully charge during summer:
560 Wh / 5.45 Wh/w = 102 W
Taking a standard 215 W panel, then:
- Minimum kWh / m2 / month to fully run off solar:
- Consumption:
0.560 * 30 = 17 kWh
- Production:
215 W / 1.27 m^2 = 170 W / m^2 = 17 %
- Irradiance:
17 kW / 17 % = 100 kWh/month
- Consumption:
5 months of the year are below this irradiance limit.
Taking other sized panels:
- 55 W: 390 kWh/month, so no months
- 115 W: 186 kWh/month, so height of summer
- 305 W: 70 kWh/month, so all but 4
During summer, a 215 W panel will produce
165 kWh * 1.27 m^2^ * 15 % / 30 = 1050 Wh/day
.
2021-01-09
The Enerpower 12 V 25 Ah arrived. The BMS doesn’t support connecting in parallel or series so I’m limited to one battery ATM.
I cracked open the other and it’s a box full of cylindrical cells in a 4S8P configuration. The balance wires are easy to access so I’ve ordered a 8S 24 V BMS from Aliexpress to rewire the two into one.
2020-10-25
Wrote a Victron to Prometheus exporter. Now starting to get data from the controller. Peak output from the panel was 38 W.
Recorded a timelapse of the sun on the target area. The Hero 7 records timelapse at 2 Hz and stores at 30 FPS, so 1s = 15s. The area is totally in shade by 10:27 in = 157 minutes after starting. Stopped at 15:01, 164m long, so in shade at 14:54. The sun is at 223 deg / 20 deg at that time, so the nearby buildings are at 20 deg.
2020-10-26
Printed a Victron BlueSolar to DIN adapter. Took two tries as the Victron mount isn’t flat.
Made an adapter for the Raspberry Pi header that supplies power and has a voltage divider to make the 5 V VE.Direct connection work with the 3.3 V Raspberry Pi.
Used the extra ports on the Raspberry Pi 4. Enabled by adding
dtoverlay=uart0
dtoverlay=uart1
dtoverlay=uart2
dtoverlay=uart3
dtoverlay=uart4
dtoverlay=uart5
to /boot/firmware/config.txt
. This creates
/dev/ttyAMA0
through to /dev/ttyAMA4
.
ttyAMA4
didn’t work initially as the pin had the wrong
pinmux set. This can be fixed by running:
sudo raspi-gpio set 13 a4 pn
2020-10-27
Got most of a day’s worth of charge. The day was cloudy with good amounts of sun. Got around 100 Wh of generation out of the panel which charged the battery about by 50 to 70 %.
2020-10-28
Wired a relay and the fall back mains supply. The relay switches to mains fast enough, but the DC ready signal from the mains doesn’t decay fast enough causing the Pi to reset.
According to the Sonoff switch, the system pulls 8 W. On 12 V this is 4.3 W.
2020-10-29
Wrote a VE.Direct to Prometheus and MQTT exporter. Integrated with Home Assistant, works well.
2020-11-02
Printed the corner pieces for the stand and assembled. 11.5 mm U section aluminium for the posts. Designed for 28° which is good for winter here.
2020-11-03
Changed the power swichover relay to be driven by the Pi, and did a quick hack that checks the battery state every 10 minutes and switches using hysteresis.
2020-11-06
Tidied up powersel
, added monitoring, and set the
switchover values to their final values. Still runs as root.
2020-11-07
Added a udev rule to give gpio
access to the pins, and
made powersel
use that group.
Set up backups using http://rclone.org/ to
https://www.backblaze.com/b2/ on cron.weekly
.
2020-11-08
Got a first full day of OK sunshine. The switch over worked correctly and the system ran on solar or stored energy for 14h.
2020-11-08 pt2
What’s next:
- Move the panel into the final location
- Run the wires through the window and put the server in the final location
- Publish the
vedirect
exporter - ???
Ideally the outcome includes turning off the existing NAS. I have a solution for video, but not audio to Android.
2020-11-09
Looking at avg_over_time(victron_ppv_watt[24h])*24
,
gives:
2020-11-05 74 Wh 2020-11-06 39 Wh 2020-11-07 91 Wh 2020-11-08 65 Wh
Total of 269 Wh or 7c of electricity. 56 % of what’s needed to run the server.
2020-11-10
Looking at avg_over_time(victron_ppv_watt[16h])*16
gives
the total number of Wh over a day.
Date | Generation |
---|---|
2020-11-05 | 74 Wh |
2020-11-06 | 39 Wh |
2020-11-07 | 91 Wh |
2020-11-08 | 65 Wh |
2020-11-09 | 85 Wh |
2020-11-10 | 48 Wh |
On 2020-11-09, the battery was fully charged and some generation was dropped:
Load
2.35 W
2.08 W with /boot/firmware/usercfg.txt
hdmi_blanking=2
dtparam=pwr_led_trigger=none
dtparam=pwr_led_activelow=off
dtparam=audio=off
dtoverlay=disable-wifi
dtoverlay=disable-bt
Sun altitude
Location 47.37,8.53
Irradiance
Generation
From
https://re.jrc.ec.europa.eu/pvg_tools/en/tools.html
With a slope of 60 deg, produces 54 kWh/m2/month in December, which is ~1.8 kWh/d, or 75 W/m2.
December is 30 % of the peak output.
Taking a Victron BlueSolar 90 W @ 119 CHF with area of 0.52 m2. Solar irradiance is ~1120 W/m2, so the panel is 15 % efficient.
So a 90 W panel can supply 5.9 W for 24 H in December.
To check, a 90 kW (note: 1000x) system gives 4278 kWh in December and 13853 in July at 37 deg, which is 6.5 W continious in Dec and 19.2 (3x) in July.
At 60 deg, this is 4825 kWh in December, or 6.7 W. 2 d of storage is 320 Wh, 26 Ah @ 12 V, or 53 Ah @ 12 V with 50 % cycling.
Storage
Wind loading
Appendix: unsorted links
2910
https://keisan.casio.com/exec/system/1224682277
https://pysolar.readthedocs.io/en/latest/
https://re.jrc.ec.europa.eu/pvg_tools/en/tools.html
https://github.com/pingswept/pysolar
http://www.solarelectricityhandbook.com/solar-irradiance.html
Horizontal = 1.31 to 5.64 kWh/m^2/day = ~39 to 169 kWh/m^2/month
https://re.jrc.ec.europa.eu/pvg_tools/en/tools.html
Horizontal - 30 to 200 kWh/m^2/month
Actual solar - 32 to 177 kWh/m^2/month
Panel: 545 x 668 x 25mm series 4a
So sin 28 deg = O/H, O = 313,
cos 28 deg = A/H, A = 589.