vendredi 3 avril 2020

Solar power monitoring & diverting

Today I focus on Solar power generation and monitoring.
The project started from Open energy monitor.
https://openenergymonitor.org/

The system I am building is a variant which will look like this :



Due to the fact that prices of Photovoltaic generators, panels and converters are much cheaper now than a few years ago, they have become a must for anyone who can install them on his roof or garden. They are also much less of a burden to install and declare, at least here in France.
Due to several constraints, I had to realize my own version of this system. And of course I had to share it...

The main unit is this :


For those interested in this power monitoring circuit, this is what it does:

- Displays actual used power from the grid
- Displays power generated from the PV cells
- Displays power used by a secondary circuit (second part of the house)
- Shows a few additional symbols for PV usage, operation, percent of diversion, etc...
- Uses an independant OLED display. One can easily customize what information it provides.
 - Fully independent. It is enclosed in a box which fit in a standard electrical board.
- Has a flashing LED on the front face whose colour is changing (more fancy). The more PV power you generate, the more bluish you get, plus green when you are diverting your surplus of energy.
- Has the capability to manage Power diversion.
- reset button on the front




What is power diversion ?
When you generate extra solar capacity, this power is not returned to the grid but is delivered (and modulated) to your power heater. This acts like an energy storage.

Now, if you need to design the same:
Look at first OpenEnergyMonitor.org and you will have plenty of resources to understand what we want to achieve. Mine is just a special variant of EmonTx.
Because I had plenty of problems and constraints, I had to finish with that special version, but it is eventually working very well for the purpose.

The files are on Github here
https://github.com/francfly12/autoconsommation

There should be enough comments in the code to make or modify it. Email me if needed or to show what you have done.

As mentionned, I have used an EmonTX shield on top of an arduino board.
A classic Arduino UNO is not fit for my usage, more memory required. Therefore a board with a minimum of 80 K Sram is required. That should be easy to transpose to another board but I have not tried yet. I have used the Arduino 101 because I had one in my box and it is fit for the shield, has lots of memory and is faster.
But Arduino101 is discontinued now.
If you need another board, make sure that libraries you use are compatible. Also check voltage.

I had tons of problems to setup all that. They started with installing correctly the libraries. Just before I became asphyxiated, I found the right info here :
https://learn.openenergymonitor.org/electricity-monitoring/arduino-ide/ubuntulib

Libraries : After many tryouts, I eventually ended with the library EmonLib. It performs all the magic to measure  power, voltage and more if needed.

the board under development.
OLED graphic displays are easy and relatively simple to handle. I have used the library U8glib which has plenty of examples. Also, it does not interfere with the routines of Emonlib and enables data transmission on serial bus if needed. My display is a pure chinese 128x64 found on Amazon. Should work with most other displays. It operates either on 5V or 3.3V. But it is quite sensitive to power supply quality. Make sure there are no interferences passing trough the supply. Also add 4.7K resistors to positive on SDA/SCL.

Power diversion : The software is ready for it. Nevertheless, I will need to setup a second device which will come soon on those pages. be patient, but Covid will help a lot by giving all this spare time !



The EmonTX shield had to be modified. I had to cut two pins, A4 and A5, which were blocking operation of the I2C bus used for the display. You must do so, even if you want to use pins SDA/SCL. Radio module on the shield must not be installed.(I had to remove it)

Pins A4 and A5 cut on the shield

Enclosure : if you need to make an enclosure, I have put the STL files in the parts folder, as well as the original file for Designspark mechanical. I have used the box made of the orange "PRUSA" Petg. The box is a bit tight for an Arduino UNO size but fits well in the power cabinet.


STL. files are availble to build a casing


All must fit in !

And the future of this :
Things to come;
- Additional remote unit to operate the power heater from the PWM signal.
- Temperature sensor on (inside) the water heater. Water has to be kept at sufficient temperature, at least once a day. And once every 3 days pass over 65°C to avoid water contamination.
Testing


4 commentaires:

  1. HI Bonjour
    do you speak frenck?
    have you got all of the documents, fotos and diagram. i woul like make and have emomtx shield

    RépondreSupprimer
  2. and semd for me
    email didier.colin1972@gmail.com

    RépondreSupprimer