DIY: PvControl+

nikitto

New member
Joined
Jan 22, 2017
Messages
8
First of all, this is a project that I'm doing with my partner mleon. He did it with a duinomite, but we've got much more control over system with raspberry.

In this moment, the system is working over a RPi 3b and other over a RPi 1b like a charm.

Basic components:

- 1 Rapsberry Pi
- 2 ADS1115
- 2 Shunts
- 2 Resistors (voltage divider)
- 1 Temperature sensor: DS18B20
- 1 PCF8574P
- 1 Relay module (several channels)


Optional components:

- 1 nodeMCu (Yes, we can control electrical appliances via wifi )
- 1 Relay module (Up to 4/5 channels)


Control:

System is controled by Web and/or Telegram.


In a future:

- Surplus diversion control system.

Some images:

Main page


image_yzmicg.jpg


Relays


image_diogpw.jpg


Electric scheme (RPi 1b)


image_fdfkwm.jpg

Telegram


image_ualrgy.jpg


As you see, we received some information every X minutes. And modify some values, relays status, ....


Well, this system works like a Battery Monitor System too, but cheaper. And a place, where you can get more information. Also, data log for a long time.

This image is from today:


image_lmzhha.jpg



Relays (local or wifi):

We can switch on/off relays manually (Web, Telegram) or automatically (photovoltaic conditions: vbat, ibat, ipanel, temperature, ... and/or by schedule)


More charts:

Historical chart


image_ogaboc.jpg



Batteries, production, ...


image_hrlvya.jpg


Averages


image_sedyoa.jpg



We used Highcharts library.

Stay tuned.


PS. Sorry for my english.
 
Really nice! :) Lots of work, and Lots of features. Great work. Will be keeping an eye on progress

Kori
 
We've been working on diversion, to run opportunity loads. For the moment, we get the signal from regulator. But we're thinking to use Vplaca (voltage output of solar panels) in a future.


image_kitzww.jpg


For diversion, we're using nodeMCU connected via wifi with Raspberry. If there's some problem with wifi, all relays (SSR) will be disconnected after 2 minutes. When we create the relays, we've got priority option and 'jump'.
It's possible to have more than one SSR or normal relay (for low consumption) with the same priority, then in each bucle there will be only one relay changing its value. When all relays with same priority are 100%, then will begin next priority.
Jump: we control number of jumps from 0 to 100%.
'if diversion=1' then 'status=status+jump'
'if diversion=0' then 'status=status-jump'


At the same time, trying to check voltage from each battery o cell, using a multiplexor and one port of an ads1115.


image_djlpxv.jpg


Some images:


image_crbbec.jpg



image_trytkp.jpg



image_dxfexd.jpg



image_shmmhi.jpg
 
Nice!

How do you get it to work to check voltages on all cells via multiplex and that adc? Or perhaps your the one i have been talking to over FB? :)
 
We're using 16-channel analog multiplexer 74HC4067. With it, we can control 12 cells, then 24 volts system. For 48V, we'll need 2 MUX.

We take general negative cable and the positive from each cell. Then:

Vcell_1 = Vpoint_1 (+ from first battery)
Vcell_2 = Vpoint_2 - Vpoint_1
Vcell_N = Vpoint_N - Vpoint_N-1

Sig from MUX to A2 of ADC1115. And we need a PCF8574P (bus I2C) to control each input of the MUX.

I've seen your channel in youtube and some videos, but I don't know you.
 
Very nice!!
 
Nikitto: Ok then it was someone else.

How do you do the switching since that Mux only are specified to max VCC between pins. That is max 10V diff between 2 pins and you will get alot more than that. Have you tested it yet?

Vsw in the datasheet. Im just saying it because i have done tests and we saw leakage. Also everyone I talked to said that you need high voltage mux if that is going to work properly. Yes voltage for one cell is 3.7v but between lowest and highest its more :)

Im not that good with those circuits though.
 
For each loop, we're going to read each input with a 'for' instruction, and update/write into DB, as we're doing with all data.
We're finishing diversion part, but we've already a part of the code and the circuit. Impossible to answer any other question about it in this moment.

We've got 2V flooded lead acid cells. So, the way is the same as for Vbat, using a voltage divider for each cell.
 
But are you voltage dividing each group down before it ends up in the mux? If so all is fine :)

Because if you hook up gnd on one end and then positive of the first cell to port 2 and then pos of next cell to port3 and so forth you get 3.7V on first one and 7.1 on next and so forth.. Ie from cell 3 you are above Vsw that the datasheet talks about. I might be wrong here but this is what i saw when testing and also what several other that work in it told me and they all said it wont work with above mux unless you voltage divide down each cell so you dont go above Vsw.
 
daromer said:
But are you voltage dividing each group down before it ends up in the mux? If so all is fine :)

Yes, of course ! I must think about voltage and resistors for each cell. I don't need more than 3.3V in the ADC.
Really, last battery point (+) is Vbat (with voltage divider, 2.2V -> 24V). So, the rest should be lower than this point.

Then, applying a formula, that uses both registers (V & R). As I know what cell I'm reading every time.
 
After some time, we've developed some PCB to connect to raspberry pi.



image_xvggtw.jpg

image_xbqrea.jpg



And now, we're working on a new PCB, to connect, directly to raspberry pi.


image_ymiuld.jpg



We've implemented MQTT to the system, too. All the communication RPi - ESP8266 (or ESP32) is via MQTT.
Time ago, we programmed ESP8266 with LUA, but now, everything is with micropython.


image_wmqcou.jpg

image_qdvksn.jpg

Some examples.
 
Back
Top