A Forum run by Enthusiasts of MidNite Solar

The Open Source software/hardware corner => Arduino => Topic started by: WillEert on January 24, 2016, 10:42:42 AM

Title: Stand alone WbJr device
Post by: WillEert on January 24, 2016, 10:42:42 AM
I have been thinking about how handy the WbJr device is. I cannot find another system that measures actual current flow into the batteries with an add on device. Maybe there is one??? I am wondering if it would be possible to develop an Arduino based stand alone WbJr device using the existing card. I think the ability to measure actual current flow to the batteries on other systems that have lesser charge controllers would be very handy and allow implementation of a diversion control that could limit amps based on current flow. I have been following the discussion on communication to the WbJr but do not fully understand how it gets its results. Possibly the Classic does a lot of computation while the WbJr provides the data. It that is the case the  Classic functions might be replaced by Arduino in some fashion.

Will
Title: Re: Stand alone WbJr device
Post by: ClassicCrazy on January 24, 2016, 03:26:21 PM
The Bogart Engineering Trimetric meter does the same thing . But now the Classic Whizbang does the same thing and even better because the Trimetric was not temperature compensated for the readings. Something with the wiring got a bit messed up on my Trimetric and I didn't even bother to try and fix it since not needed now. The only thing that I miss on the Trimetric was that then you had a nice bright LED display showing the SOC at a glance.

Here is one article on using an Arduino to measure current
http://www.vwlowen.co.uk/arduino/current/current.htm

Larry
Title: Re: Stand alone WbJr device
Post by: dgd on January 25, 2016, 12:32:53 AM
Will,
The WBjr is an analogue to digital converter, reading the voltage drop over the shunt and converting it to a digital number that the Classic can process. Its the Classic/Kid's ability in firmware to use the true battery current to control battery charging (EA terminating Absorb) that puts the Classic and KID features way out in front of the competitions controllers.
I'm not aware of other controllers that do this. (ok the Bogart BM can feedback to their Pwm controller)
There are many other devices available for reading DC and AC current and voltage.
The Open Energy Monitor project is one of the best for interfacing to an ARduino and many low cost current sensors on Ebay, eg.
http://www.ebay.com/itm/New-design-5A-range-Current-Sensor-Module-ACS712-Module-Arduino-module-/181026550454?hash=item2a2605f2b6:g:4kMAAOSwDN1UP4CT (http://www.ebay.com/itm/New-design-5A-range-Current-Sensor-Module-ACS712-Module-Arduino-module-/181026550454?hash=item2a2605f2b6:g:4kMAAOSwDN1UP4CT)
http://www.ebay.com/itm/5A-20A-30A-Bi-Directional-AC-DC-Current-Sensor-Module-arduino-compatible-/121686377854?var=&hash=item1c5512c57e:m:mL3gbLqDWKfxk67AOPbwq3Q (http://www.ebay.com/itm/5A-20A-30A-Bi-Directional-AC-DC-Current-Sensor-Module-arduino-compatible-/121686377854?var=&hash=item1c5512c57e:m:mL3gbLqDWKfxk67AOPbwq3Q)

dgd
Title: Re: Stand alone WbJr device
Post by: ClassicCrazy on January 25, 2016, 08:59:34 AM
I have a trimetric that I some how managed to blow  - maybe the processor ? But if one of you electronic whizzes wants it to play around with you can have it - if I can find where I put it that is !
Larry
Title: Re: Stand alone WbJr device
Post by: dgd on January 25, 2016, 04:23:38 PM
Larry,
You should email Bogart as they are pretty good with servicing their stuff.
Especially as the Trimetric is not cheap junk and its worth getting repaired.

dgd
Title: Re: Stand alone WbJr device
Post by: ClassicCrazy on January 25, 2016, 06:16:21 PM
I did email Bogart when it first messed up . Never heard a thing back from them.
I guess I should try again - maybe it got lost. It always worked great and not sure what happened. Was moving some wires and it went goofy - don't think I shorted anything out and also had it fused.
But I should contact them again like you say.
Larry
Title: Re: Stand alone WbJr device
Post by: dgd on January 26, 2016, 10:47:24 PM
Will,

In my diversion water heating system I used a 30A DC current detector ( from the Ebay link in prev post ).
Power is diverted directly from PVs, either 700w or 1400w from one or two strings of 5S 18v mpv 140w PVs
switched via an SSR, Crydom D2D40 using Float high from AUX1 on Classic.

An Arduino nano measures current flow and voltage from PVs to a 2Kw 100v water heating element and using the wire library sends data on upper and mid tank temperatures, ambient outside tank (and its lagging), current and voltage from PVs plus some timing and summary info to my Arduino DUE wed server. A web page showing this info can be accessed from the main gauges page.
It refreshes data via AJAX every 4 to 5 seconds.

So those current detectors are easy to use and C++ code for Arduino is easily available.

dgd
Title: Re: Stand alone WbJr device
Post by: WillEert on January 27, 2016, 03:11:23 PM
Hi David and Larry,

Thanks for the information and thoughts. I realize that what is needed is to use the capabilities of the Arduino to get the battery current information I would like to have. I will learn about my shunt and look at current sensors.  Initially I like the idea of pulling the information from the shunt as I have a shunt already however the voltage will have to compatible although a voltage divider can always be devised.

I am  working on my heating system. I have quite a few temperature sensors measuring my hot water tank (3) in and out (2), well water (1) and floor temps in and out (2) as well as flowmeters measuring floor and hot water flow.  I treated myself to a freetronics ethermega that I hope to use for data collection on the sd card and then use it as a server to interface with my pc. If I can get the diversion control talking to heating system then I hope to be able to determine whole house energy use. Winters in Manitoba may no longer be long enough - once we get this house done and moved into.  :)

Cheers

Will
Title: Re: Stand alone WbJr device
Post by: Cniemand on January 28, 2016, 12:22:34 AM
DGD : Do you have a video of your diversion setup with the relays and arduino and how you went about it?
Title: Re: Stand alone WbJr device
Post by: dgd on January 28, 2016, 11:05:38 PM
Quote from: Cniemand on January 28, 2016, 12:22:34 AM
DGD : Do you have a video of your diversion setup with the relays and arduino and how you went about it?

I never thought about a video but I do have a few photos of the main parts of the system
Below is an MNDC alu box which has the Crydom SSR, a 3 phase bridge rectifier just used as a blocking diode and a decent size 15000uF 200v cap. This was just as I was installing it and the breakers on rhs of MNDC are not installed yet.  PV power in at top lhs and power out to water element at top lhs. PV power out to Classic and red control cable from SSR to Classic Aux1 go out bottom.

dgd
Title: Re: Stand alone WbJr device
Post by: Westbranch on January 29, 2016, 11:26:45 AM
Below is an MNDC alu box    ??  no attachment?
Title: Re: Stand alone WbJr device
Post by: dgd on January 29, 2016, 04:21:07 PM
Quote from: Westbranch on January 29, 2016, 11:26:45 AM
Below is an MNDC alu box    ??  no attachment?

Seems the 325k jpeg image does not want to post, I keep getting...

Quote
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator and inform them of the time the error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
Apache Server at kb1uas.com Port 80
Title: Re: Stand alone WbJr device
Post by: Westbranch on January 29, 2016, 04:26:03 PM
I seem to remember that ~ 200kB seems to work,    :)
larger ones sort of choke the forum software IIRC...
Title: Re: Stand alone WbJr device
Post by: Cniemand on January 30, 2016, 12:29:33 AM
Pretty Bird! Or is that "free bird" hmm :)
Title: Re: Stand alone WbJr device
Post by: WillEert on January 30, 2016, 11:23:15 AM
I have ordered an ads1115 16 bit adc from ebay. I always have a hard time believing how inexpensive these electronic boards are to buy. When it gets sunny and I have some time I will test it out to see if I can get  a reasonable +/- battery current measurement. Thanks to Larry and David for the information.

Cheers

Will
Title: Re: Stand alone WbJr device
Post by: WillEert on January 30, 2016, 11:54:16 AM
Diversion system configurations

It is interesting how diversion systems are configured. Same problem - how to maximize pv production from a system. Many different solutions.

I divert on the AC side using a dedicated Magnum 4448 mspae inverter. I also use this inverter for charging when required. This allows me to use a smaller generator as the other two ms4448's carry the load as the diversion inverter charges the batteries. Also the changes in diversion load does not affect my lighting or general piece of mind as the inverter alters its output. Likely I could tie the inverters together as one system again as the diversion control pwms at 10Hz but initially when I started the system the Classic pwm rate was so high the inverters could not keep up to changes and my whole electrical system resembled a Krazy discotec going wild while diversion was taking place. I use a Crydom Evolution Dual ssr cd48503wu 50A per channel mounted on on a Crydom HS053 heat sink. I think now the heat sink was overkill as the ssr does not get hot but maybe that's good  :). The relay feeds 2 2Kw 240 V elements individually in the hot water tank. The diversion control turns the lower one on incrementally first and when the lower is full on pwms the upper element. I sense the tank temperature at the top, middle and bottom of the tank and control my thermostats and floor heating with the middle sensor.

I appreciate that I lose efficiency diverting on the ac side however before arduino I could not find dc thermostats. Also I had not figured out that I could configure my array strings to produce about 200+ V at vmp which would allow the use of conventional elements. I though about rewiring the strings and going to dc diversion during the upgrade however when I add the additional 2 Kw of panels I now get two separate arrays. Each array would have to divert separately which would not fully load the elements as often. I want to have the full array output available to be applied to each element in turn as load output allows to get the most heat out of the elements.

Will
Title: Re: Stand alone WbJr device
Post by: ClassicCrazy on January 31, 2016, 11:18:15 AM
It does not sound any electron will go to waste on your system Will !
Title: Re: Stand alone WbJr device
Post by: dgd on January 31, 2016, 03:55:06 PM
Will,

I think the AC Crydom SSR I played with was a 2450 when I tried PWMing to an AC heating element.
It wasn't just the light flickering that made me change to DC, even though I used AUX1 that was a much slower duty cycle pwm rate, but it was fact that all power for both battery charging and water heating was going through the Classics and the inverter.
This just didn't seem right  as it felt like the inverter, batteries and controllers were being unnecessarily beaten up/pushed to limits for the sake of water heating.

I considered DC water heating at battery voltage but that still pushes all the energy through the Classics
hence I decided to divert energy directly from PVs.
Its probably not so important for me to be concerned with diversion during absorb as water heating is primarily done with a small 24 evac tube solar heating system that generates lots hot water even on clouded over days.
The problem I have more often now is what to do with all the energy that I could generate but don't have a use for.

dgd

Title: Re: Stand alone WbJr device
Post by: WillEert on February 20, 2016, 08:35:53 AM
Hi David,

I agree - dc diversion is much preferable. If the strings are wired to produce about 200+V  then conventional 220-240V elements could be used with a reduction in wattage. The Classic of choice would then be the 250. The arduino would function as a diversion control and  thermostat and use a suitable  ssr for control. That is what I would like to do. The problem I face with dc diversion is that it limits the array size to what one Classic can handle or if the array is larger than one Classics input limit each array would have to divert on it's own as you cannot tie the arrays together on the dc side. This means I would have to have 2 diversion systems. In low light conditions I want to put all the available spare power into one element. I notice with the 2 KW elements I presently use that the tank does not seem to change temperature unless I am putting in about 500w or so as a minimum. I think a 2 KW element that is supplied 500w just does not heat up very much. With Manitoba winters and since I use this system for heating I can use all the hot water I can get - particularly on low light days.

Will