Author Topic: Arduino based PWM diversion control system  (Read 8540 times)

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 1202
Re: Arduino based PWM diversion control system
« Reply #90 on: November 15, 2016, 10:24:00 PM »
Interesting panel structure - you get use under it .
But with the panels so steep - what do you do in the summer ? Just get a lot less power or is there a way to tilt them ?

Larry
system one
Classic 150 , 20 Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

WillEert

  • Full Member
  • ***
  • Posts: 106
Re: Arduino based PWM diversion control system
« Reply #91 on: November 16, 2016, 11:05:58 AM »
Hi Larry,

This building is a combination wood storage / array mount structure. I needed a firewood storage building as I have been storing my firewood under  a tarp in the winter to keep the snow off it. Digging wood out from under a snow covered tarp in a Manitoba winter has needed to be done but is not always pleasant. The new arrays primary purpose is to give enough power to enable us to do a meaningful amount of heating in the winter. The tilt angle of the new array is designed to maximize output in Nov and Jan. The first array is tilted to maximize output in Dec. My logic is that if I have enough power in the winter then I will have enough power in the summer. This tilt angle also sheds snow very well. With the added day-length in the summer  the difference in power output is not that great - about 20% or so. We also use much less lighting in the summer due to the added day-length. We are not big fans of LCD lighting and use good old incandescent light bulbs. The heat the incandescents create in the winter is good for us and we use them very little in the summer.

So I built a structure to to store wood and act as an array mount in the hopes the added power would mean that I would not have to burn wood.....

Cheers

Will
24 ET 185 mono, Classic 150,8x Surrette 6CS25p, 3x Magnum 4448, homecooked diversion system
+ 15 Heliene 330 mono, Classic 150

ClassicCrazy

  • Hero Member
  • *****
  • Posts: 1202
Re: Arduino based PWM diversion control system
« Reply #92 on: November 16, 2016, 01:53:57 PM »
Okay - makes sense to me Will . Except for not finding any types of LED lights that are suitable ?

I have quite a collection of different types of LED bulbs and LED strip lights. They certainly are not all equal in the quality of their light. Some are very good and bet you would be hard pressed to find difference between incandescent.

But if you are electric heating anyway then those incandescent are perfect
 !

Larry
system one
Classic 150 , 20 Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system two
Classic 150 ,5s 135 watt Kyocero , 16s Calb 100AH LiFePO4 , Outback VFX 3648 inverter
system three
Midnite KID MPPT 24 DC in to  12 volt AGM batterie

WillEert

  • Full Member
  • ***
  • Posts: 106
Re: Arduino based PWM diversion control system
« Reply #93 on: February 25, 2017, 02:56:34 PM »
I have been running my system with two arrays for a few months now. I thought I would post a few photos of it's operation. The two arrays are 4.4 and 4.9 kw for a total of 9.3 kw stc.

 This first photo shows the system. The two Classics are 150s. I divert excess power to my hot water tank using AC and a Crydom Evolution Dual relay. The inverter on the right is the diversion inverter. The center and left inverters are the load inverters. The diversion inverter is also the charging inverter. I can supply full load with my load inverters while charging. The logic is - If I need to charge then I do not have enough power to divert. This system lets me use a small generator that runs at an economical speed while also supplying all my loads. The hot water tank has 2 2kw elements in it. They can operate simultaneously. The diversion control first maximizes out the lower element and then turns on and maximizes the upper element (Paul - Thank You for this idea).

The diversion control diverts if the amperage coming in to the batteries, measured by the WBJr, exceeds setpoint (presently 65A) and also diverts if the voltage exceeds the divert voltage setpoint (presently .3 V below the Classic setpoint) when in Absorb, Float or Float Mppt. Amperage diversion at this time is done using the upper element in the tank. Voltage diversion starts with the lower element in the tank. All diversion setpoints change when the Classic setpoints are changed. The control reads the Classic and then adjusts the diversion control setpoints. The control also dynamically limits the amps flowing to the batteries, once again measured by the WBJr. This presently set at 70A. There are 2 megas in the diversion control. The first operates the 4 PID controls (Amp diversion, Amp limiting,Voltage diversion 1 and Voltage diversion 2) and displays on the two left hand and upper right hand 4X20 LCDs. It interfaces with the left hand Classic 150 (#10). The second mega interfaces with the right hand Classic 150 (#11). It also has the thermostat function and the does addition of KW and W from both arrays. It runs the lower right hand LCD. Both Arduinos read and write to each other using a serial without blocking system. It is not lightning fast but works well.

Will
24 ET 185 mono, Classic 150,8x Surrette 6CS25p, 3x Magnum 4448, homecooked diversion system
+ 15 Heliene 330 mono, Classic 150

WillEert

  • Full Member
  • ***
  • Posts: 106
Re: Arduino based PWM diversion control system
« Reply #94 on: February 25, 2017, 03:06:00 PM »
This photo of the diversion control shows the system when it is resting at the start of the day. All PIDs are turned off. The Thermostat shows "OFF" which means it is not active. I use Dgds method of switching the relay control voltage on or off to control the relay and therefore power to the HWT (Thanks David). If it says "ON" then the relay will not turn on and power will not flow to the elements. Upper and Lower are the two elements. C=00 is a counter I put in to watch the load limiter.

W
24 ET 185 mono, Classic 150,8x Surrette 6CS25p, 3x Magnum 4448, homecooked diversion system
+ 15 Heliene 330 mono, Classic 150

WillEert

  • Full Member
  • ***
  • Posts: 106
Re: Arduino based PWM diversion control system
« Reply #95 on: February 25, 2017, 03:27:05 PM »
This next photo shows the system in Bulk. Amps flowing to the batteries (23.4) are less than setpoint. This seen on the upper right lcd to the right of JR SP. Total amps coming in are TAmps 30.5. Amps from each Classic are 13 and 17.5. The Classic limit (CL SP) is set at 75A. The actual amp limit setpoint(ClLmt) is 75A.

The lower right LCD is displaying the charge mode the individual W and KW from each Classic. It also totalling the W and KW. The HWT temperature and setpoint can be seen.

The amp diversion is turned on (AOn). This means it will  divert when required. Amps to the batteries are below setpoint so the % diversion is 0.

Will
24 ET 185 mono, Classic 150,8x Surrette 6CS25p, 3x Magnum 4448, homecooked diversion system
+ 15 Heliene 330 mono, Classic 150

WillEert

  • Full Member
  • ***
  • Posts: 106
Re: Arduino based PWM diversion control system
« Reply #96 on: February 25, 2017, 03:32:11 PM »
This next photo shows the diversion control actually doing something!!!!!

Incoming amps are 80.2. The amp diversion is at 31%, diverting .63 of a KW to the HWT. WBJr Amps are being controlled at 65.2 with a diversion setpoint of 65.

Will
24 ET 185 mono, Classic 150,8x Surrette 6CS25p, 3x Magnum 4448, homecooked diversion system
+ 15 Heliene 330 mono, Classic 150

WillEert

  • Full Member
  • ***
  • Posts: 106
Re: Arduino based PWM diversion control system
« Reply #97 on: February 25, 2017, 05:19:00 PM »
The solar day continues. I only have the amp diversion coded to work on the upper of the tank elements at this time. This means that after that element is at maximum (2KW) the amps will continue to rise.

This photo shows the the upper amp diversion element at 100%, diverting 2 KW to the HWT. The amp limiter has turned on and is at 21.4%, writing a setpoint of 58A to the two Classics. The Classics are controlling at 59.2A and 59.6A. The code smooths the WBJr amp flow reading which makes it hard to tune the PIDs for the amp controls. Total amps is 118.8A with 71.6A going to the batteries (SP = 70A).

Attached is also a photo of the Classics when load limiting.

The system is doing 6783W instantaneously  and has produced 4.6KW for the day.
24 ET 185 mono, Classic 150,8x Surrette 6CS25p, 3x Magnum 4448, homecooked diversion system
+ 15 Heliene 330 mono, Classic 150

WillEert

  • Full Member
  • ***
  • Posts: 106
Re: Arduino based PWM diversion control system
« Reply #98 on: February 25, 2017, 05:25:03 PM »
Well we have made it to absorb voltage.

Voltage diversion has started on the lower element. Amp diversion is still taking place on the upper element however the amp limiter has shut down.The amp limiter set point ramps up to the Classic Limit setpoint (75A) before breaking the connection and shutting down. It took me a long time to get this to work as I wanted it.
24 ET 185 mono, Classic 150,8x Surrette 6CS25p, 3x Magnum 4448, homecooked diversion system
+ 15 Heliene 330 mono, Classic 150

WillEert

  • Full Member
  • ***
  • Posts: 106
Re: Arduino based PWM diversion control system
« Reply #99 on: February 25, 2017, 05:29:10 PM »
More absorb.

As the batteries charge and will no longer take in excess of the amp diversion set point the amp diversion turns off. The diversion is now taking place on voltage control only. This photo shows the lower element at 97% diverting 1.94 KW to the HWT.

Will
24 ET 185 mono, Classic 150,8x Surrette 6CS25p, 3x Magnum 4448, homecooked diversion system
+ 15 Heliene 330 mono, Classic 150

WillEert

  • Full Member
  • ***
  • Posts: 106
Re: Arduino based PWM diversion control system
« Reply #100 on: February 25, 2017, 05:35:48 PM »
More absorb

As the batteries charge and the day progresses more KW become available for diversion. In this photo the lower element is at 100% and the upper at 82.7%.  KW to the tank are 3.66. Note that when the upper element is on more than 5%  the code lowers the lower element setpoint by 1 Volt. This ensures that only the upper element PWMs and "locks" the lower element at max. This setpoint change reverses when the upper element turns off.

Will
24 ET 185 mono, Classic 150,8x Surrette 6CS25p, 3x Magnum 4448, homecooked diversion system
+ 15 Heliene 330 mono, Classic 150

WillEert

  • Full Member
  • ***
  • Posts: 106
Re: Arduino based PWM diversion control system
« Reply #101 on: February 25, 2017, 05:45:45 PM »
Float

Life is good. KW to tank at max - 4KW. System running at 6088W with 24KW produced. Batteries full. Since I use some of the RJ12/11 jacks on the Classic for the diversion control I cannot use the Midnite system of "follow me". Dgd offered good advice on how and when to handle forcing floats. The system finds its own way around resting to bulk to absorb. Classic 11 is set for an impossibly long absorb time - it will never end. When Classic 10 floats then Classic 11 has float forced and both the Classics are now floating. The system then finds its own way around float, float mppt and to resting. This has been working without any problems once I got the code to work.
24 ET 185 mono, Classic 150,8x Surrette 6CS25p, 3x Magnum 4448, homecooked diversion system
+ 15 Heliene 330 mono, Classic 150

WillEert

  • Full Member
  • ***
  • Posts: 106
Re: Arduino based PWM diversion control system
« Reply #102 on: February 25, 2017, 05:57:30 PM »
Resting at the end of the day.

All PID turned off. 39.2 KW for the day. Yay.

Will
24 ET 185 mono, Classic 150,8x Surrette 6CS25p, 3x Magnum 4448, homecooked diversion system
+ 15 Heliene 330 mono, Classic 150

Westbranch

  • Hero Member
  • *****
  • Posts: 2411
  • Building System (sort of) 1 weekend at a time
Re: Arduino based PWM diversion control system
« Reply #103 on: February 25, 2017, 06:01:11 PM »
Will, last pic before reset,  that DHW is at 153*F ? Isn't that too hot for DHW? do you  use a mixer? Or is is going into another tank first?
CL647 asleep
KID 51(B) FW1811 560W C&D 24V 900Ah AGM
CL 29032 FW V.2126-NW2097-GP2133 175A E-Panel WBjr, 3Px4s 140W > 24V 900Ah AGM,
2 x Cisco WRT54GLi/c DD-WRT Rtr &Brg, NetGr DS104Hub, 
Hughes 1100 Modem
Cotek ST1500 Inv OmniCharge 3024  Eu1/2/3000i Gens
West Chilcotin BC 1680W to come

WillEert

  • Full Member
  • ***
  • Posts: 106
Re: Arduino based PWM diversion control system
« Reply #104 on: February 25, 2017, 06:18:44 PM »
I am happy with how the diversion control is working and how this project is turning out. I could not run my house without it making hot water which we use for domestic hot water and radiant floor heating. I think likely a device you can code yourself is never done. Without Dgds orginal code and the help from Paul and David I don't think I would have made it too far.

 I have more power available from the arrays and will be installing another 2KW element in the HWT tank. My diversion inverter is maxed out so I plan to use on/off control for this element, feeding it from the load inverters. When it turns on the PWM elements will cut back and then pick up more load as they are able. Also I want to get the Amp diversion working on the lower element. It bothers me to be limiting power when I could be diverting it. Amp diversion may not work every day or work for too long but it is KW that can be produced. Also it you look closely at the photos you can see that the arrays do not always pick up the load when they could. The diversion setpoint is .3 Volt below the Classic charge setpoints. I want to widen this out to .4 or .5 volts to see if that gets me more production. This does mean however that when the thermostat opens my batteries will now be charging above the desired setpoint. I am thinking code can be added to write  lower absorb and float setpoints to the Classics when the thermostat is open and then change the setpoints back when it closes.

Code for the two arduinos attached. Amp_Div_5b etc has the pids. It should function as a black box with one Classic if desired however the thermostat function would not work as that issent from the DCT_2.

Will
24 ET 185 mono, Classic 150,8x Surrette 6CS25p, 3x Magnum 4448, homecooked diversion system
+ 15 Heliene 330 mono, Classic 150