Friday, September 25, 2020

A blog running on solar power #CircuitPython #Solar #RaspberryPi #PiDay @louwrentius

Louwrentius is running their blog off 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.

I noticed that the load current sensor of the solar charge controller was not very precise, so I added an INA260 based sensor. This sensor uses I2C for communication, just like the LCD display. It measures voltage, current and power in a reasonable precise resolution.

Using the sensor is quite simple (pip3 install adafruit-circuitpython-ina260):

1
2
3
4
5
6
7
8
#!/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)

See all the details in the wonderful article here.

No comments:

Post a Comment