New System Install, Plus Arduino 'Waste Not' Controller Project

Started by Mholmes, February 27, 2014, 06:29:10 PM

Previous topic - Next topic

Mholmes

Hi Everyone,

I'm new to this forum, fairly new to solar, and very new to Midnite Solar products.  After living off the grid with my wife in a 5th wheel for over a year using a kludged-together solar system I inherited and patched up, we recently upgraded to a fairly significant installation.  I received a lot of great help reading this forum (and many others), and wanted to share our experiences in case it can be of use to someone. 

I'll save you the back story; suffice it to say, I spent a lot of time and effort in the last 18 months with a 12v PV system that was inherited (free), but undersized and not in great shape.  Batteries only lasted a few months before giving up the ghost.  Though there were many headaches during that time, it was a great learning environment on what to doâ€"and what not to do.

Our first step into something more robust came with the drilling of our well last winter.  They had to go 925ft down to find 7gpm; it was a rough several weeks.  We decided on setting the pump at 600ft where we could pump about 3.5gpm; we installed a Grundfos 6 SQF-3 pump, 8awg pump cable (ouch), a CU200 Controller, IO101 Switch Box all filling a 3,000g storage tank with a float switch.  These were powered directly by 8 180w, 24v panels wired in series to provide 270+ vdc for the pump; we ran this independent system for about 9 months with no trouble.

For the domestic power PV system we'd upgraded our batteries to 6 Trojan T-105s, added 4 similar 120w panels to the 12v PV system (powering the trailer exclusively); this system was also working fine for about 9 months, though the charge controller was a bit underpowered. 

But since our water use is relatively low, the array powering the well pump was sitting idle for 90% or more of the timeâ€"clearly a wasted opportunity.  We decided to bite the bullet and upgrade the entire system and combine the output of the two arrays, creating the foundation of a system that will also be able to power the house we'll be building in the next 2-3 years.  We determined that going with a smaller bank of T105s would work in the short term, with a possible battery upgrade in the next 4-5 years.  With the help from the nice folks at Arizona Wind and Solar, our new system would look like this:

• Move all equipment into well house, adding new battery compartment
• Rewire the 8 180w 24v panels into 4 strings feeding a Classic 150
• Rewire the 7 120w 12v panels in series feeding a Classic 200 Lite
• Midnite Solar e-Panel with appropriate breakers
• Magnum Energy 4448 PAE inverter
• Add 2 T105s to bring the total to 8 wired in series to 48v
• Power the well pump on 220v AC, not DC
• Add 1/2 hp AC booster pump for the pressure tank

My biggest concern was of course managing the two pump loads to make sure they wouldn't run at the same time, run at night, or when the batteries in a low SOC.  With a little Googling, I discovered the wonderful world of Arduino, and realized I could program it to accept inputs from the Classics and trigger a couple of SSRs for the pumps based on some intelligent criteria.

I'm not an EE or a programmer, but have some rudimentary experience with both skills.  It took several weeks of research, plus help from an Electrical Engineer friend of mine, to finally come up with the working solution... after burning out two Arduinos ;).  The big issue is that the Arduino Uno I used has a native 5vdc signal I/O voltage, and though AUX1 can be set to LOGIC/RELAY, AUX2 from the Classic is 12vdc.  You have to wire a couple of resistors to divide the voltage down.  Likewise on the output, the big SSR I chose for the well pump needed 10-40vdc signal voltage, so I had to use an external 12vdc power supply and a MOSFET transistor to let the Arduino trigger the pump.  The smaller 120v pressure pump SSR needed only 5vdc, and so could be triggered directly from the Arduino.   This hardware was all built into a 'shield' that attaches to the Arduino and provides terminal blocks to connect the various I/O wires.

The software was definitely the hardest for me.  But in the end I was able to establish daily criteria for running the pumps:

• Any pumping activity is only allowed while Classic 1 (there are 2 Classics) AUX1 is on -- this is set to 'Waste Not' or 'Opportunity HIGH'
• The pressure pump is triggered first, and is active for 10 minutes (there's a regular pressure switch inline on this circuit too as a backup)
• The well pump is triggered second, and runs for 40 minutes

Each of the pumps has a daily timer that accumulates; if AUX1 wavers in and out, the pumps will follow, resuming only when AUX1 is HIGH, and only until the daily timer totals out at 10 or 40 minutes respectively.  While the well pump is running, it's constantly querying the float switch to see if the tank filled up; it will shut down and not run again until the switch drops out.

At the end of the day, the Arduino looks for Classic 1's AUX2 signal which is set to 'Nite Lite HIGH'; this tells the software to reset the daily timers, end the day's work, then wait for the next AUX1 'Waste Not' before deciding what to do next.   There are two indicator LEDs on the Arduino enclosure panel to show activity status, plus three indicator lights inside the trailer to let me know when the pumps are on and if the generator is running (I installed the remote start package from Magnum). 

There are also two physical override switches on the front of the Arduino enclosure; you can manually activate either or both pumps at any time; currently they do not add to the daily accumulation timers, but they certainly could.  There is also a software switch for the pressure pump that can be activated by turning Classic 2's AUX1 to HIGH; I can trigger this from the remote MNGP that is mounted in the trailer.  This is great as I can force the pressure pump to run for a while if we get a few cloudy days in a row and the pressure is low.

The system has been running for a few weeks now and behaving as planned.  It's pretty exciting to be putting the excess power to use when and where it's needed, while preserving the life of this small battery bank.  I'm very happy that Midnite Solar chose to expose these great AUX options.  Obviously there are many, many more things that could be automated and controlled to manage the power, batteries, etc.

I'll attach some pix now, as I don't see a way to add them in line with the text.  Please let me know if anyone has any questions; I can provide a lot more detailed explanation of any of the steps, the Arduino shield, programming code, etc. if anyone is interested.

Thanks, and I hope you enjoy it.

Mark Holmes









dgd

Quote from: Mholmes on February 27, 2014, 06:29:10 PM

...  We determined that going with a smaller bank of T105s would work in the short term, with a possible battery upgrade in the next 4-5 years.  With the help from the nice folks at Arizona Wind and Solar, our new system would look like this:

• Move all equipment into well house, adding new battery compartment
• Rewire the 8 180w 24v panels into 4 strings feeding a Classic 150
• Rewire the 7 120w 12v panels in series feeding a Classic 200 Lite
• Midnite Solar e-Panel with appropriate breakers
• Magnum Energy 4448 PAE inverter
• Add 2 T105s to bring the total to 8 wired in series to 48v
• Power the well pump on 220v AC, not DC
• Add 1/2 hp AC booster pump for the pressure tank


T105s if I remember correctly are about 220Ah 6volt batteries, so your bank will be 48v 220Ah capacity?
My initial thoughts are this a tad on the low capacity side for dealing with a 4Kw+ inverter and the loads you are connecting to it.
On a decent day with that wattage of PVs the T105 bank would be in float in a couple of hours.
A couple of bad days and they would be exhausted.
Just my opinion but I would be looking at L16 size (about 400Ah) cells or even larger cells in the 600 to 800ah range that would give you some expansion room as you enlarge the new house
dgd
Classic 250, 150,  20 140w, 6 250w PVs, 2Kw turbine, MN ac Clipper, Epanel/MNdc, Trace SW3024E (1997), Century 1050Ah 24V FLA (1999). Arduino power monitoring and web server.  Off grid since 4/2000
West Auckland, New Zealand

Mholmes

Hi dgd,

Yes, the T105s are 220ah/6v, and the battery bank is quite small.  We had 6 T105s that were less than a year old from the 'legacy' system; it was a judgement call to add 2 more at this stage to make the 48v bank rather than try to sell and replace them with larger batteries that would be more appropriate for the size of the house. 

In fact this is one of the reasons I spent so much time getting the Arduino to work properly.  Now the pumps only run on surplus power, when the bank is close to full SOC.  Interestingly, though the Grundfos well pump is at 600 ft, the static water level is about 200.  So, the pump only draws about 450w when it starts, increasing to about 600w as the water is drawn down over the course of the timed daily run.  The pressure pump is about 1kw, and runs for 6 minutes or so a day.   With 2.2kw of PV available, there's plenty of left over juice to spare.

Other than the pumps, all our lights are 12vdc or 120vac LEDs, and our consumption is quite low.  The 8 T105s are fine -- we can get almost 4 days of normal use before getting down to 50% discharge, as we're a bit more careful when it's cloudy.  Plus we have the generator set up with the AGS to kick in at 60%, so no worries.

Thanks for the advice on the battery bank, the whole process has been a sharp learning curve.  By the time we get around to the house, I suspect we'll have a better idea of the size of our next battery upgrade.

Next step will be to start using our washer and gas dryer; I'll try to get the Arduino to send some kind of indication to the laundry area (signal LED for now probably) when the pumping is done and extra power is still available.

Best,

Mark

ClassicCrazy

Sounds like a good system but I have a feeling you will want to get a Whizbang and shunt to really give you a good idea of what is going in and out of the battery and SOC.  But then you wouldn't have your Aux 2 because the Whizbang uses that.

From what I just read about your program you use Aux 2 to reset at night time. But you could probably free up Aux 2  by using a photocell to determine night time or various light levels. See this Adafruit tutorial for more info . http://learn.adafruit.com/photocells/using-a-photocell

I didn't quite follow your voltage problems to the arduino. A simple 5v regulator like 7805 would give you 5v from the higher voltage but I thought the arduino would run on 12v and it's built in regulator handles the lower voltage pin output. A logic level mosfet or transistor should be able to switch 12v to turn on your relay .

I am no expert with Arduino's either but have played around a bit .

Larry


system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

Mholmes

Quote from: ClassicCrazy on February 28, 2014, 03:51:50 PM
Sounds like a good system but I have a feeling you will want to get a Whizbang and shunt

There's already a Magnum BMK in there, which integrates with the AGS to start the generator either automatically or manually.  I had a TriMetric in the legacy system, so had a pretty good sense of our usage when it was a 6 x T105 bank; the BMK reflects about the right amount of increased storage I'd have expected with the additional 2 batteries.

QuoteFrom what I just read about your program you use Aux 2 to reset at night time. But you could probably free up Aux 2  by using a photocell to determine night time or various light levels. See this Adafruit tutorial for more info . http://learn.adafruit.com/photocells/using-a-photocell

Thanks for the reminder -- Adafruit was a great resource in learning about Arduino.  And yes, there are a ton of great sensors out there... could put in some temp and pressure sensors as well.  I still have AUX2 on the second Classic as a spare output though in case I need it.  But I'll run out of I/O pins on the Arduino first (next step would be an Arduino Mega with a great deal more I/O pins).

QuoteI didn't quite follow your voltage problems to the arduino. A simple 5v regulator like 7805 would give you 5v from the higher voltage but I thought the arduino would run on 12v and it's built in regulator handles the lower voltage pin output. A logic level mosfet or transistor should be able to switch 12v to turn on your relay.

Arduino can accept 12vdc input for board power, but *not* at the I/O pins.  For the Uno, it must be dropped to 5vdc or it will fry the board (did it twice!).  My EE friend spec'd two simple resistors and a capacitor for the voltage step-down, which was easy to build; I'm sure it could be done other ways as you suggest.  My project does use a MOSFET transistor on the output side to drive the SSR, utilizing the 12vdc external power supply (feeds both the Arduino and the SSR switch).

What I can see from reading the (many) Arduino forums and projects on the web, there are lots of ways to do things.  I'm just glad I found a combination that works for me.

Thanks,

Mark

ClassicCrazy

oh okay - you mean you tried to 12v input on a pin  - I thought you meant output  to drive the mosfet
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable