#[1]Louwrentius Full Atom Feed [2]Louwrentius Full RSS Feed
[3]Louwrentius Categories Atom Feed [4]Louwrentius Categories RSS Feed
[5]Louwrentius
* [6]Home
* [7]Contact
[8]This Blog Is Now Running on Solar Power
July 06, 2020 Category: solar
Introduction
This blog is now running on solar power.
I've put a solar panel on my balcony, which is connected to a solar
charge controller. This device charges an old worn-out car battery and
provides power to a Raspberry Pi 3b+, which in turn powers this
(static) website.
[9]solar
Some statistics about the current status of the solar setup is shown in
the sidebar to the right.
Low-tech Magazine as inspiration
If you think you've seen a concept like this before, you are right.
The website [10]Low-tech Magazine is the inspiration for my effort. I
would really recommend visiting this site because it goes to incredible
length to make the site energy-efficient. For example, images are
dithered to save on bandwidth!
Low-tech Magazine [11]goes off-line when there isn't enough sunlight
and the battery runs out, which can happen after a few days of bad
weather.
In January 2020, the site shared [12]some numbers about the
sustainability of the solar-powered website.
The build
My build is almost identical to that of Low-tech Magazine in concept,
but not nearly as efficient. I've just performed a lift-and-shift of my
blog from the cloud to a Raspberry Pi 3b+.
I've build my setup based on some parts I already owned, such as the
old car battery and the Pi. The solar panel and solar charge controller
were purchased new. The LCD display and current/voltage sensor have
been recycled from an earlier hobby project.
[13]controller
I've used these parts:
Solar Panel Monocrystalline 150 Watt 12V
Battery 12 Volt Lead Acid Battery (Exide 63Ah)
Solar Charge Controller Victron BlueSolar MPPT 75|10
Voltage/Current sensor INA260
LCD Display HD44780 20x4
Computer Raspberry Pi 3b+
Communications cable VE.Direct to USB interface
The Solar Panel
The panel is extremely over-dimensioned because my balcony is directed
towards the west, so it has only a few hours a day of direct sunlight.
Furthermore, the angle of the solar panel is sub-optimal.
My main concern will be the winter. It is not unlikely that during the
winter, the panel will not be able to generate enough energy to power
the Pi and charge the battery for the night.
I have also noticed that under great sunlight conditions, the panel can
easily produce 60+ Watt^[14]1 but the battery cannot ingest power that
fast.
I'm not sure about the actual brand of the panel, it was the cheapest
panel I could find on Amazon for the rated wattage.
The Solar Charger
It's a standard solar charger made by Victron, for small solar setups
(to power a shed or mobile home). I've bought the special data
cable^[15]2 so I can get information such as voltage, current and power
usage.
chargecontroller
The controller uses a documented protocol called ve.direct. I'm using a
[16]Python module to obtain the data.
According to the manual, this solar charger will assure that the
battery is sufficiently charged and protects against deep discharge or
other conditions that could damage the battery.
I feel that this is a very high-quality product. It seems sturdy and
the communications port (which even supports a bluetooth dongle) giving
you access to the data is really nice.
The controller is ever so slightly under-dimensioned for the solar
panel, but since I will never get the theoretical full power of the
panel due to the sub-optimal configuration, this should not be an
issue.
The battery
In the day and age of Lithium-ion batteries it may be strange to use a
Lead Acid battery. The fact is that this battery was free and -
although too worn down for a car - can still power light loads for a
very long time (days). And I could just hook up a few extra batteries
to expand capacity (and increase solar energy absorption rates).
To protect against short-circuits, the battery is protected by a fuse.
This is critical because car batteries can produce so much current that
they can be used for welding. They are dangerous.
If you ever work with lead acid batteries, know this: don't discharge
them beyond 50% of capacity, and ideally not beyond 70% of capacity.
[17]The deeper the discharge, the lower the life expectancy. A 100%
discharge of a lead acid battery will kill it very quickly.
You may understand why Lead Acid batteries aren't that great for solar
usage, because you need to buy enough of them to assure you never have
to deep discharge them.
Voltage, Current and Power Sensor
I noticed that the load current sensor of the solar charge controller
was not very precise, so I added an [18]INA260 based sensor. This
sensor uses I2C for communication, just like the LCD display. It
measures voltage, current and power in a reasonable presice resolution.
Using the sensor is quite simple (pip3 install
adafruit-circuitpython-ina260):
#!/usr/bin/env python3
import board
import adafruit_ina260
i2c = board.I2C()
ina260_L = adafruit_ina260.INA260(i2c,address=64)
print(ina260_L.current)
print(ina260_L.voltage)
print(ina260_L.power)
Please note that this sensor is purely optional, the precision it
provides is not really required. I've used this sensor to observe that
the voltage and current sensing sensors of the solar charge controller
are fairly accurate, except for that of the load, which only measures
the current in increments of 100 mAh.
The LCD Display
The display has four lines of twenty characters and uses a HD44780
controller. It's dirt-cheap and uses the I2C bus for communications. By
default, the screen is very bright, but I've used a resistor on a
header for the backlight to lower the brightness.
lcddisplay
I'm using the Python RPLCD library (pip3 install RPLCD) for interfacing
with the LCD display.
Using an LCD display in any kind of project is very simple.
#!/usr/bin/env python3
from RPLCD.i2c import CharLCD
lcd = CharLCD('PCF8574', 0x27, cols=20, rows=4)
lcd.clear()
lcd.cursor_pos = (0,0) # (line,column)
lcd.write_string("Hello")
12 volt to 5 Volt conversion
I'm just using a simple car cigarette lighter USB adapter to power the
Raspberry Pi 3b+. I'm looking at a more power-efficient converter,
although I'm not sure how much efficiency I'll be able to gain, if any.
Script to collect data
I've written a small Python script to collect all the data. The data is
send to two places:
* It is send to Graphite/Grafana for nice charts (serves no real
purpose)
* It is used to generate the infographic in the sidebar to the right
Because I don't want to wear out the SD card of the Raspberry Pi, the
stats as shown in the sidebar to the right is written to a folder that
is mounted on tmpfs.
The cloud as backup
When you connect to this site, you connect to a VPS running HAProxy.
HAproxy determines if my blog is up and if so, will proxy between you
and the Raspberry Pi. If the battery would run out, HAProxy will
redirect you an instance of my blog on the same VPS (where it was
running for years).
As you may understand, I still have to pay for the cloud VPS and that
VPS also uses power. From an economical standpoint and from a
ecological standpoint, this project may make little sense.
Possible improvements
VPS on-demand
The obvious flaw in my whole setup is the need for a cloud VPS that is
hosting HAProxy and a backup instance of my blog.
A better solution would be to only spawn a cloud VPS on demand, when
power is getting low. To move visitors to the VPS, the DNS records
should be changed to point to the right IP-address, which could be done
with a few API calls.
I could also follow the example of Low-tech Magazine and just accept
that my blog would be offline for some time, but I don't like that.
Switching to Lithium-ion
As long as the car battery is still fine, I have no reason to switch to
Lithium-ion. I've also purchased a few smaller Lead Acid batteries just
to test their real-life capacity, to support projects like these. Once
the car battery dies, I can use those to power this project.
The rest of the network is not solar-powered
The switches, router and modem that supply internet access are not
solar-powered. Together, these devices use significantly more power,
which I cannot support with my solar setup.
I would have to move to a different house to be able to install
sufficient solar capacity.
Other applications
During good weather conditions, the solar panel provides way more power
than is required to keep the battery charged and run the Raspberry Pi.
I've used the excess energy to charge my mobile devices. Although I
think that's fun, if I just forget turning off my lights or amplifier
for a few hours, I would already waste most of my solar gains.
I guess it's the tought that counts.
Conclusion
In the end, it it was a fun hobby project for me to realise. I want to
thank Low-tech Magazine for the idea, I had a lot of fun creating my
(significantly worse) copy of it.
If you have any ideas on how to improve this project, feel free to
comment below or email me.
__________________________________________________________________
1. the position of the panel is not optimal, so I will never get the
panel's full potential. [19]↩
2. You don't have to buy the cable supplied by Victron, it's possible
to create your own. The cable is not proprietary. [20]↩
Comments
Solar Status
71 TiB NAS
[21][zfsnas01-small.jpg]
20C/40T 128G Server [22][dl380g8-sm.jpg]
18 TB NAS
[23][nas-small.jpg]
Projects
* [24]fio-plot
* [25]Grafana Dasboard for storage metrics
* [26]Showtools
* [27]Storage Fan Control
* [28]PPSS - Parallel Processing Shell Script
Categories
* [29]Apple
* [30]Bash
* [31]Blogging
* [32]Debian
* [33]FreeBSD
* [34]Hardware
* [35]Iptables
* [36]Linux
* [37]Lustre
* [38]Microsoft
* [39]Monitoring
* [40]NAS
* [41]Networking
* [42]OpenVPN
* [43]PPSS
* [44]Proxy
* [45]RAID
* [46]Robotics
* [47]Security
* [48]Server
* [49]Smartphone
* [50]solar
* [51]Solaris
* [52]Storage
* [53]Technology
* [54]Uncategorized
* [55]VMware
* [56]Windows
* [57]ZFS
Archive
* [58]2020
* [59]2019
* [60]2018
* [61]2017
* [62]2016
* [63]2015
* [64]2014
* [65]2013
* [66]2012
* [67]2011
* [68]2010
* [69]2009
* [70]2008
Social
* [71]louwrentius
Proudly powered by [72]Pelican, which takes great advantage of
[73]Python.
Based on the [74]Gumby Framework
References
Visible links
1.
https://louwrentius.com/feed/atom/all.atom.xml
2.
https://louwrentius.com/feed/rss/all.rss.xml
3.
https://louwrentius.com/feed/atom/solar.atom.xml
4.
https://louwrentius.com/feed/rss/solar.rss.xml
5.
https://louwrentius.com/
6.
https://louwrentius.com/
7.
https://louwrentius.com/pages/contact.html
8.
https://louwrentius.com/this-blog-is-now-running-on-solar-power.html
9.
https://louwrentius.com/static/images/solarpanelbalcony-large.jpg
10.
https://solar.lowtechmagazine.com/power.html
11.
https://solar.lowtechmagazine.com/about.html#offline
12.
https://solar.lowtechmagazine.com/2020/01/how-sustainable-is-a-solar-powered-website.html
13.
https://louwrentius.com/static/images/solarcontrollerboard-large.jpg
14.
https://louwrentius.com/this-blog-is-now-running-on-solar-power.html#fn:ideal
15.
https://louwrentius.com/this-blog-is-now-running-on-solar-power.html#fn:cable
16.
https://github.com/karioja/vedirect
17.
https://batteryuniversity.com/learn/article/lead_based_batteries
18.
https://learn.adafruit.com/adafruit-ina260-current-voltage-power-sensor-breakout
19.
https://louwrentius.com/this-blog-is-now-running-on-solar-power.html#fnref:ideal
20.
https://louwrentius.com/this-blog-is-now-running-on-solar-power.html#fnref:cable
21.
https://louwrentius.com/71-tib-diy-nas-based-on-zfs-on-linux.html
22.
https://louwrentius.com/my-home-lab-server-with-20-cores-40-threads-and-128-gb-memory.html
23.
https://louwrentius.com/20-disk-18-tb-raid-6-storage-based-on-debian-linux.html
24.
https://github.com/louwrentius/fio-plot
25.
https://grafana.com/grafana/dashboards/11801
26.
https://github.com/louwrentius/showtools
27.
https://github.com/louwrentius/storagefancontrol
28.
https://github.com/louwrentius/PPSS
29.
https://louwrentius.com/category/apple.html
30.
https://louwrentius.com/category/bash.html
31.
https://louwrentius.com/category/blogging.html
32.
https://louwrentius.com/category/debian.html
33.
https://louwrentius.com/category/freebsd.html
34.
https://louwrentius.com/category/hardware.html
35.
https://louwrentius.com/category/iptables.html
36.
https://louwrentius.com/category/linux.html
37.
https://louwrentius.com/category/lustre.html
38.
https://louwrentius.com/category/microsoft.html
39.
https://louwrentius.com/category/monitoring.html
40.
https://louwrentius.com/category/nas.html
41.
https://louwrentius.com/category/networking.html
42.
https://louwrentius.com/category/openvpn.html
43.
https://louwrentius.com/category/ppss.html
44.
https://louwrentius.com/category/proxy.html
45.
https://louwrentius.com/category/raid.html
46.
https://louwrentius.com/category/robotics.html
47.
https://louwrentius.com/category/security.html
48.
https://louwrentius.com/category/server.html
49.
https://louwrentius.com/category/smartphone.html
50.
https://louwrentius.com/category/solar.html
51.
https://louwrentius.com/category/solaris.html
52.
https://louwrentius.com/category/storage.html
53.
https://louwrentius.com/category/technology.html
54.
https://louwrentius.com/category/uncategorized.html
55.
https://louwrentius.com/category/vmware.html
56.
https://louwrentius.com/category/windows.html
57.
https://louwrentius.com/category/zfs.html
58.
https://louwrentius.com/archive/2020
59.
https://louwrentius.com/archive/2019
60.
https://louwrentius.com/archive/2018
61.
https://louwrentius.com/archive/2017
62.
https://louwrentius.com/archive/2016
63.
https://louwrentius.com/archive/2015
64.
https://louwrentius.com/archive/2014
65.
https://louwrentius.com/archive/2013
66.
https://louwrentius.com/archive/2012
67.
https://louwrentius.com/archive/2011
68.
https://louwrentius.com/archive/2010
69.
https://louwrentius.com/archive/2009
70.
https://louwrentius.com/archive/2008
71.
https://twitter.com/louwrentius
72.
http://getpelican.com/
73.
http://python.org/
74.
http://gumbyframework.com/
Hidden links:
76.
https://louwrentius.com/this-blog-is-now-running-on-solar-power.html