Author Topic: Arduino Web server for OZ Inverter  (Read 10997 times)

0 Members and 1 Guest are viewing this topic.

dgd

  • Jr. Member
  • **
  • Posts: 68
  • Country: nz
  • Never do today what can be done tomorrow
    • Lory Link
Arduino Web server for OZ Inverter
« on: March 04, 2016, 05:01:05 AM »
ClockmanFrance,

New topic as you suggested
I have gathered all the bits together for this and tested all of the sensors.
The Mega 2560 seems to have sufficient grunt for this server but as you said there is some discussion on ARduino forums about reliable power supply.
The only long term suitable way I have found to power a Mega or DUE system that I use with my Midnite Classic web server is to use the USB 5 volt input on the Mega/DUE. This seems to generate almost zero heat compared to the 7v to 12v DC power input jack. After a few hours to a day the board just gets too hot and becomes unreliable
I also found that most of the quality USB cig-lighter adapters will work with a 12V or 24V DC battery (up to 29v)
I used an APPLE DC adapter wired via 5A DC breaker to 24v distribution box.
Now that I moved my home RE system to 48v LiFeYPO4 bank and soon to the OZ 6Kw inverter, the inverter Mega needs a 48v to 5v DCtoDC converter.
For this I used an encapsulated unit made by DATEL with 18-72V DC input and regulated 12v output, then connected a 12v USB adapter to get the 5v supply. This method because I also need 12v DC supply for the Honeywell CSNP651 AC current sensor I retreived from the main board from one of my InspireSolar 1.5Kw GTIs
I also removed a teensy 240v/9v transformer for the AC voltage and frequency sensor.

dgd

Off grid since 4/2000
Midnite C150,C250,Clipper, 2.8Kw PV, 2Kw turbine,1025Ah24v FLA (1999), SW3024E (1997), 3q16 48v300Ah LiFeYPO4 6Kw OzInverter, Arduino DUE web monitor.

dgd

  • Jr. Member
  • **
  • Posts: 68
  • Country: nz
  • Never do today what can be done tomorrow
    • Lory Link
Re: Arduino Web server for OZ Inverter
« Reply #1 on: March 04, 2016, 03:58:35 PM »
The DATEL DCtoDC converter, there is also a 5volt output version of this the UWR-5/2000-D48E if a 12volt DC supply is not needed.
Somewhat more expensive than the cheap chinese buck converters via Ebay for just a couple of dollars but my experience with these has not been good, they work ok but continual use leads to short life even with added heatsink
All six I bought have now died yet the original Arduino PSU I made using a DATEL converter has been running since July last year.
For testing Arduino I also just use a USB wall wart.
Off grid since 4/2000
Midnite C150,C250,Clipper, 2.8Kw PV, 2Kw turbine,1025Ah24v FLA (1999), SW3024E (1997), 3q16 48v300Ah LiFeYPO4 6Kw OzInverter, Arduino DUE web monitor.

Mary B

  • Administrator
  • SuperHero Member
  • *****
  • Posts: 3171
Re: Arduino Web server for OZ Inverter
« Reply #2 on: March 04, 2016, 07:19:27 PM »
They sell small self stick heatsinks that will make your DC-DC converter run cooler.

clockmanFRA

  • Hero Member
  • *****
  • Posts: 952
  • Country: fr
    • Renewable Energy creation
Re: Arduino Web server for OZ Inverter
« Reply #3 on: March 05, 2016, 06:07:30 AM »
Thanks dgd for that excellent tip regards using the USB cable connection to power the Arduino board.

Ordered a car 12vdc, 2.1a, to USB adapter, wait a few days, around here its very quite and the local shops are a bit few and far between that stock stuff.
Everything is possible, just give me time.

OzInverter man. Normandy France.
http://www.bryanhorology.com/renewable-energy-creation.php

3 Hugh P's 3.7m Wind T's (12 years) .. 5kW PV on 3 Trackers, (8 yrs) .. 9kW PV AC coupled to OzInverter MINI Grid, back charging AC Coupling to 48v 1300ah battery

dgd

  • Jr. Member
  • **
  • Posts: 68
  • Country: nz
  • Never do today what can be done tomorrow
    • Lory Link
Re: Arduino Web server for OZ Inverter
« Reply #4 on: March 05, 2016, 05:54:07 PM »
The ethernet card plugs on top of the Mega. There is a set of six pins and a 2 by3 socket on them just below the mini SD slot on the ethernet card. This plugs into the six pins in 2by3 set in middle of Mega. If you line these up then the left and right rows of pins/sockets on ethernet card and Mega should be obvious. Just make sure no pins get bent away and miss the socket. Its important to get this right else on power up you could kill both cards.
The prototype shield needs assembling, solder in the pins and the screw wire receptacles.
Don't plug it on top of the ethernet shield yet.
Later this card (shield) is used to place components for the current and voltage sensors (various resistors,caps, lmv321 opamp  etc), a jack socket for the AC current sensor and the various temperature sensors will wire into some of the wire receptacles.

You can get the lmv321 here (if you don't already have them). These are the so teeny I needed a magnifying glass and real needle point soldering iron. Get 10 of them as they vanish in an eye blink  :o

http://www.ebay.com/itm/10pcs-LMV321M5X-LMV321-TI-SOT23-5-Rail-to-Rail-Output-Operational-Amplifiers-NEW-/172065901838?hash=item280fed4d0e:g:slYAAOSwGotWm5vf

You should also get a socket for the plug on the end of the SCT013 current transformer, a pcb mounting type or any will probably do.
Off grid since 4/2000
Midnite C150,C250,Clipper, 2.8Kw PV, 2Kw turbine,1025Ah24v FLA (1999), SW3024E (1997), 3q16 48v300Ah LiFeYPO4 6Kw OzInverter, Arduino DUE web monitor.

clockmanFRA

  • Hero Member
  • *****
  • Posts: 952
  • Country: fr
    • Renewable Energy creation
Re: Arduino Web server for OZ Inverter
« Reply #5 on: March 06, 2016, 06:07:41 AM »
Thanks dgd, Ethernet is now correctly on the Mega board.

I need to understand that prototype shield assembly.............

Lmv321 Opamps have been ordered, thanks for the link.

I have a PCB mount socket for the current transformer plug.
Everything is possible, just give me time.

OzInverter man. Normandy France.
http://www.bryanhorology.com/renewable-energy-creation.php

3 Hugh P's 3.7m Wind T's (12 years) .. 5kW PV on 3 Trackers, (8 yrs) .. 9kW PV AC coupled to OzInverter MINI Grid, back charging AC Coupling to 48v 1300ah battery

dgd

  • Jr. Member
  • **
  • Posts: 68
  • Country: nz
  • Never do today what can be done tomorrow
    • Lory Link
Re: Arduino Web server for OZ Inverter
« Reply #6 on: March 06, 2016, 07:04:55 PM »
Clockman,

The prototype card you have seems to be in kit form, blank pcd with terminal wire blocks and connector pin rows.
I bought the same one but it came assembled. Those screw terminals are all matched to the rows of signal pins. I have ordered another kit type protocard so that I get spare screw terminals to place in prototype area for input wires from
AC and DC voltage, DC voltage from battery input to inverter and AC voltage from tiny 230v to 9v (rms) transformer on inverter AC output.

dgd
Off grid since 4/2000
Midnite C150,C250,Clipper, 2.8Kw PV, 2Kw turbine,1025Ah24v FLA (1999), SW3024E (1997), 3q16 48v300Ah LiFeYPO4 6Kw OzInverter, Arduino DUE web monitor.

clockmanFRA

  • Hero Member
  • *****
  • Posts: 952
  • Country: fr
    • Renewable Energy creation
Re: Arduino Web server for OZ Inverter
« Reply #7 on: March 07, 2016, 03:48:44 AM »
Thanks dgd.

I can duplicate your board connections no problems. I have connectors like that in stock.

Is that SMD LED and resistor required? Its not on mine.

On the board I have been sent, I see that only the first two Holes after the connectors is active, others will require links/jumpers, no probs.
Everything is possible, just give me time.

OzInverter man. Normandy France.
http://www.bryanhorology.com/renewable-energy-creation.php

3 Hugh P's 3.7m Wind T's (12 years) .. 5kW PV on 3 Trackers, (8 yrs) .. 9kW PV AC coupled to OzInverter MINI Grid, back charging AC Coupling to 48v 1300ah battery

dgd

  • Jr. Member
  • **
  • Posts: 68
  • Country: nz
  • Never do today what can be done tomorrow
    • Lory Link
Re: Arduino Web server for OZ Inverter
« Reply #8 on: March 07, 2016, 09:37:06 PM »

I can duplicate your board connections no problems. I have connectors like that in stock.

Is that SMD LED and resistor required? Its not on mine.

On the board I have been sent, I see that only the first two Holes after the connectors is active, others will require links/jumpers, no probs.

Ok, that is a completely different board to mine, the reset button and the D13 line active LED on mine are not really necessary but I like the extra connections that should make sensor assembly easier.
The circuit you are building is for AC voltage and current measurement, circuit below from:
https://openenergymonitor.org/emon/buildingblocks/measuring-voltage-with-an-acac-power-adapter
including the buffered voltage bias here:
https://openenergymonitor.org/emon/buildingblocks/acac-buffered-voltage-bias

If you don't want to use up the proto board then construct it on a breadboard or piece of veroboard until tested and working then solder up a copy squeezed into the proto board. I soldered the lmv321 onto centre of 12 pin DIL plug then used DIL socket on veroboard
The transformer is located remotely (in the ozinverter or near it, along with current sensor  :)

dgd
Off grid since 4/2000
Midnite C150,C250,Clipper, 2.8Kw PV, 2Kw turbine,1025Ah24v FLA (1999), SW3024E (1997), 3q16 48v300Ah LiFeYPO4 6Kw OzInverter, Arduino DUE web monitor.

dgd

  • Jr. Member
  • **
  • Posts: 68
  • Country: nz
  • Never do today what can be done tomorrow
    • Lory Link
Re: Arduino Web server for OZ Inverter
« Reply #9 on: March 07, 2016, 10:27:19 PM »
... and for AC current measuring using the SCT013 CT sensor the article and circuit here:
https://openenergymonitor.org/emon/buildingblocks/ct-sensors-interface
Note from description that the same LMV321 voltage bias is used to improve accuracy

One other proto board I initially planned to use was the Mega proto, more room and access to all of the Megas digital and analogue pins. Just not so convenient with the ICSP header not under the ethernet card's ICSP plug that would need some interesting cabling solution.

dgd
Off grid since 4/2000
Midnite C150,C250,Clipper, 2.8Kw PV, 2Kw turbine,1025Ah24v FLA (1999), SW3024E (1997), 3q16 48v300Ah LiFeYPO4 6Kw OzInverter, Arduino DUE web monitor.

clockmanFRA

  • Hero Member
  • *****
  • Posts: 952
  • Country: fr
    • Renewable Energy creation
Re: Arduino Web server for OZ Inverter
« Reply #10 on: March 10, 2016, 01:51:29 PM »
dgd,

.............. and AC voltage from tiny 230v to 9v (rms) transformer on inverter AC output.

dgd

Sorry question again, can you give me some guidelines on that tiny?, AC AC transformer please!
Thanks
Everything is possible, just give me time.

OzInverter man. Normandy France.
http://www.bryanhorology.com/renewable-energy-creation.php

3 Hugh P's 3.7m Wind T's (12 years) .. 5kW PV on 3 Trackers, (8 yrs) .. 9kW PV AC coupled to OzInverter MINI Grid, back charging AC Coupling to 48v 1300ah battery

dgd

  • Jr. Member
  • **
  • Posts: 68
  • Country: nz
  • Never do today what can be done tomorrow
    • Lory Link
Re: Arduino Web server for OZ Inverter
« Reply #11 on: March 10, 2016, 04:35:46 PM »
The openenergymonitor uses a plugback (wall wart) 230v ac to 9vac transformer as the sensor for measuring AC voltage. Thats ok for testing but I found a small 20ma 230to9vac transformer that I planned to install inside the ozinverter box. Any Ma rating trsnformer will do but its easier to deal with a physically tiny one.

While on sensors I have ordered several of these in 150A and 200A unidirectional devices.

http://www.ebay.com/itm/50A-100A-150A-200A-Bi-Uni-AC-DC-Current-Sensor-Module-arduino-compatible-/111689533182?var=&hash=item1a013706fe:m:msZpOTmntlaR-hYEFieqFgw

Although I set up a Midnite WBjr on Deltec 500A shunt for DC current measurement, this is an expensive way to go and the 69ma accuracy it provides is not really necessary
So much cheaper and still half amp accuracy (or better) there is lots of Arduino code examples for the ACS758
used on this sensor

dgd
Off grid since 4/2000
Midnite C150,C250,Clipper, 2.8Kw PV, 2Kw turbine,1025Ah24v FLA (1999), SW3024E (1997), 3q16 48v300Ah LiFeYPO4 6Kw OzInverter, Arduino DUE web monitor.

clockmanFRA

  • Hero Member
  • *****
  • Posts: 952
  • Country: fr
    • Renewable Energy creation
Re: Arduino Web server for OZ Inverter
« Reply #12 on: March 11, 2016, 04:38:05 AM »
Just ordered that small 230vac to 9vac transformer.
http://www.ebay.co.uk/itm/271925520595?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Also Ordered  that Arduino compatible 200 amp shunt, to look see and play with.

Although I like the concept of it, I think that a 300 amp shunt should be seen as minimum rating. As the Ozinverter has 15kW boards and can do that for a few minutes, say 48v into 15000w is 312.5 amps.!

'Oztules' also talks about the PJ 15kW power board handling for just a brief second or so about 60kW.

So for my BigOzInverter a standard 500 amp shunt will be used, can we work with that?.
Everything is possible, just give me time.

OzInverter man. Normandy France.
http://www.bryanhorology.com/renewable-energy-creation.php

3 Hugh P's 3.7m Wind T's (12 years) .. 5kW PV on 3 Trackers, (8 yrs) .. 9kW PV AC coupled to OzInverter MINI Grid, back charging AC Coupling to 48v 1300ah battery

dgd

  • Jr. Member
  • **
  • Posts: 68
  • Country: nz
  • Never do today what can be done tomorrow
    • Lory Link
Re: Arduino Web server for OZ Inverter
« Reply #13 on: March 11, 2016, 04:23:34 PM »
I had thought that the average load on my inverter would often be well below 6Kw and the DC current draw would probably max out around 150 amps (@50v) occasionally. This would be ideal for a 200 amp shunt or hall effect device.
Keeping in mind the requirement to have actual current a decent margin below the detector current capability then it would be probably better to use a 500amp shunt for your projected over 300amp draw rather then a 300 amp shunt.

The Deltec 500A/50mv shunt looks like the one to use, either via a Midnite WBjr (somewhat more complicated to interface to the Mega/rPi/Cubie etc) or I have seen the Adafruit INA219 current sensor breakout used with this shunt. Although the INA219 26v voltage limit is an issue here but its a nice device because we get DC voltage measurement and it measure high side current making integration into inverter nice and easy  :)
I will get a Deltec shunt and experiment some more..

dgd
Off grid since 4/2000
Midnite C150,C250,Clipper, 2.8Kw PV, 2Kw turbine,1025Ah24v FLA (1999), SW3024E (1997), 3q16 48v300Ah LiFeYPO4 6Kw OzInverter, Arduino DUE web monitor.

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Arduino Web server for OZ Inverter
« Reply #14 on: March 12, 2016, 02:46:38 AM »
I am a happy user of INA219 with RPi to measure its own power draw (the yellow/W line in the graph):

http://www.earth.org.uk/off-grid-stats.html

Rgds

Damon

Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

frackers

  • Sr. Member
  • ****
  • Posts: 435
  • Country: nz
  • Picard spits "Hello"
Re: Arduino Web server for OZ Inverter
« Reply #15 on: March 12, 2016, 05:05:50 AM »
I've been using a 1mOhm (1000 Siemens) shunt with a DS2438 1-wire chip for the last 8 years which gives an accurate reading down to 50mA and the chip does voltage and temperature as well. This shows the 100A version I was running 3 years ago, now running a 200A version.



I guess that is why I have written 1-wire code for several micros over the years!!


Robin Down Under (Or Are You Up Over)

OperaHouse

  • Hero Member
  • *****
  • Posts: 1308
  • Country: us
Re: Arduino Web server for OZ Inverter
« Reply #16 on: March 12, 2016, 09:56:59 AM »
Just a reality check for some readers.  Pictured below is the inside of a TURNIGY 130.  I think everyone should have at least one of these.  The clones are abut $10 and they are indespensable for temporary gaining data about power min/max voltage and amps.  Those two black wires go to the current shunt rectangle.   This is miles ahead of those that just use a couple lengths of wire for stability and capacity.  They rate this at 130A peak, about 60 continuous.  Designed for use on model RC cars, the major complaint on boards is that these black wires become unsoldered because of heat.  When I use this on an inverter I use a 100A shunt even though running current is only 13A (120A 5 second surge).  Adjusting the length of wire to it (about 4 inches) I can multiply the amps and watts by ten.

I like the hall effect modules.  I only buy the 5A ACS712 version and use the with shunts.  I can cal up to 75A.DC and 110A AC.  The nice thing about these units is that with extreme loads the output will never get above 5V or below zero, simplifying design.  I would never consider using those high power hall modules.  They are rated at pulse duty, the printed board can not handle the current and module leads are only about 14GA.  Use a shunt.

dgd

  • Jr. Member
  • **
  • Posts: 68
  • Country: nz
  • Never do today what can be done tomorrow
    • Lory Link
Re: Arduino Web server for OZ Inverter
« Reply #17 on: March 13, 2016, 07:31:25 PM »
Clockman,

I think I will persevere with that 200A ACS758 hall sensor for measuring DC current into the OZ inverter. At least until I get the Deltec shunt and parts directly connected to the Mega.

When I was bench testing my OZinverter I checked the DC current usage while running different AC loads using a Deltec 500/50 shunt connected to a Midnite WBjr wired into one of my Classic150 controllers. Using an Arduino DUE based web server and extracting modbus register values for WBjr data. This worked well and avoided the need for more DC current sensors.
I even went as far as using my spare Mega with the OpenenergyMonitor interface shield to measure AC volts/amps and Hz then via IC2 connection to Arduino DUE web server, sent this data for display in my main web page.
It was a nice and easy solution if, like me, you want an integrated web monitoring system showing all power generating details (PV and WInd turbine) as well as output power details (Inverter info, hot water heating power diversion) and battery bank state monitoring.

It seems the INA219 can't easily be adapted for use here, its max voltage is an issue that does not appear to be easily resolved.

dgd



Off grid since 4/2000
Midnite C150,C250,Clipper, 2.8Kw PV, 2Kw turbine,1025Ah24v FLA (1999), SW3024E (1997), 3q16 48v300Ah LiFeYPO4 6Kw OzInverter, Arduino DUE web monitor.

dgd

  • Jr. Member
  • **
  • Posts: 68
  • Country: nz
  • Never do today what can be done tomorrow
    • Lory Link
Re: Arduino Web server for OZ Inverter
« Reply #18 on: March 13, 2016, 07:38:44 PM »
Frackers,

Did you have the code and necessary info on your one-wire current monitor available? I'm not sure what voltage battery bank you are monitoring but I'm guessing that doesn't matter OR perhaps the DS2438 is limited to 12v or even a 24v bank?

dgd
Off grid since 4/2000
Midnite C150,C250,Clipper, 2.8Kw PV, 2Kw turbine,1025Ah24v FLA (1999), SW3024E (1997), 3q16 48v300Ah LiFeYPO4 6Kw OzInverter, Arduino DUE web monitor.

frackers

  • Sr. Member
  • ****
  • Posts: 435
  • Country: nz
  • Picard spits "Hello"
Re: Arduino Web server for OZ Inverter
« Reply #19 on: March 13, 2016, 07:54:20 PM »
Frackers,

Did you have the code and necessary info on your one-wire current monitor available? I'm not sure what voltage battery bank you are monitoring but I'm guessing that doesn't matter OR perhaps the DS2438 is limited to 12v or even a 24v bank?

dgd

The DS2438 code itself is at https://github.com/g8ecj/bertos/blob/g8ecj/all/bertos/drv/ow_ds2438.c but it is a part of the overall BeRTOS system and so there  is lower level code, hardware interface and configuration.
The volts input is good for 10.23 volts so requires a couple of resistors to pot it down. All the firmware can be found at https://github.com/g8ecj/turbine and the rest of the project at http://gilks.ath.cx/~g8ecj/Mk3_Turbine/Mk3_controller.html
Robin Down Under (Or Are You Up Over)

clockmanFRA

  • Hero Member
  • *****
  • Posts: 952
  • Country: fr
    • Renewable Energy creation
Re: Arduino Web server for OZ Inverter
« Reply #20 on: March 16, 2016, 03:58:21 AM »
Hi dgd,

I will await that Arduino compatible 200a shunt unit, as its 50mv and the 500a shunt I need is 50mv I will look see and see if It can be modified.

Still awaiting the other bits.

I will let you know when I am making those little add on circuits, breadboard style, and show / rationalize here what is happening.
Everything is possible, just give me time.

OzInverter man. Normandy France.
http://www.bryanhorology.com/renewable-energy-creation.php

3 Hugh P's 3.7m Wind T's (12 years) .. 5kW PV on 3 Trackers, (8 yrs) .. 9kW PV AC coupled to OzInverter MINI Grid, back charging AC Coupling to 48v 1300ah battery