Go Down

Topic: Relay Control Web Interface Timing Problem (Read 10470 times) previous topic - next topic


With my CubieBoard II, I simply run it in headless mode, no keyboard and no screen.
I just SSH into it from one of my other computers.

I selected this as it will save on power consumed and also it is not something that needs its own screen.
Saying that, I do have the DELL420 running on the right side of the desk with Debian in text mode and showing the main status screen for Quadlog. This staus screen is partially implemented in the web application for remote viewing direct on the web app. Or you can see the status screen again bia SSH, either locally or remotely.

The DELL420 runs a dual core Atom, and the fan does come on on the warmer days, but I guess it's a lot less power than a full blown Intel i5/7 or what ever they use these days.

The ARM as used on these small boards like CubieBoard run very low power, like I mentioned, typically 500mA for the whole board, which I think is pretty good, especially when needing to run it 24/7 on a solar system.

Yes, my initial tests with using SQLite3 was very impressive, compared to how I have seen other SQL apps.
Using it in Quadlog will really help in making it more stable and solid as it seems to be a well proven database application, that needs no special server itself.

For Quadlog, are you comfortable to get your hands dirty with GNU/Linux, in particular, Debian?
It's like working in rich garden soil, with lots of things to take care of to make a productive garden grow  :D
Paul - VK7KPA


Yes I'm keen to learn Debian I've been resisting it for years but have come to the reality that I really need to learn it. I know the basics I can install stuff and get around ok know most common commands had no problems setting up php mysql and apache and am using it on a daily basis now using it with the arduino.

I'm still tossing up between the raspberryPi and cubieboard I just think that the sata is the thing I will need most.


You may not need the SATA really, you have an SD card slot as well as USB slots that can be used as standard storage.

Debian can be installed and run from either the SD card or the onboard flash memory.

I have it installed into flash, but I will make all data logging go to SD card or USB as flash is not where you want to store rapidly changing data due to its potential to ware factor.
Paul - VK7KPA


to right i was forgetting about usb hdd's that would work fine i have heaps of them lying around got a 600gig one sitting right in front of me doing nothing as i put most of my stuff on the 12tb RAID 6 NAS box.

Even my i7 desktop only has a 128gig high speed intel ssd.

Looks like the RaspberriPi 2 is the go then there very cheap $55.. Will have to get a 64Gig uSD for it if they support that size will have to have a look at the specs.

I love my windows and even thou most people hate it i love the new windows 8 its just so damm fast.

Speaking of the ware factor of SSD memory when you have one in a windows box you have to remember to turn off disk defrag it kills SSD drives.. Is a Windows 8 bug!


Feb 18, 2015, 12:25 pm Last Edit: Feb 18, 2015, 12:34 pm by rockwallaby
Slow at the moment with software while I'm building the new battery cabinet from 25mm MDF at around 2200mm high by 600mm by 600mm square at the base, so hands full of sanding dust today, which is a bit of a change from clean hands on the keyboard.

The new cabinet will hold the new LiFeYPo4 batteries, inverter and the Arduino DUE and Cubiebiard and assorted parts.

You can see the batteries on the Energy Matters forum, where I started a thread there about the our adventures in getting the new Lithium batteries. This page is from the other day showing one of the other guys install.

I'm helping my neighbour with his full install,so building the complete cabinet and installing all the electrical gear. I've suggested to my neighbour to replace his PL40 and get a TriStar TS-MPPT-60, so we'll have a few people using TS-MPPT-x charge conrrollers.

I'm wondering if skype is a better place to chat?
Paul - VK7KPA


Thanks for this thread, very informative.
I am planning to build an off grid house over the next few years and I will try to incorporate all that I've learned here.

What life expectancy do you think you will get out of those Winston LiFeYPO4's?
I was planning on flooded lead b/c they're cheaper and if you take care of them properly you can get 15 years, but I'll keep watching your updates to see how you like the Lithium.


Hi psablo,

With the Winston 400A/hr cells, I'm expecting to get at least 15 years, but maybe as high as 20 years of good useful life from them.

The reason is that with Lithiums you can use up to 70% of capacity for at least 5000 full cycles.
This means if I were to use 70% of capacity each day, then that already amounts to over 13 years of use.

For my needs, I might expect that I will may only use between 0% to 40% of capacity each day, with rare events of maybe upto 50% of capacity. With this sort of light use, the useul life will most likely be more a function of natural ageing rather than loss of capacity due to use.

The reason I state as low as 0% is because I also operate a microhydro turbine, which provides my electrical needs when running, like right at this moment. I'm still wiring up the new solar panels, and this is the height of our summer.

It's now becoming more accepted that using Lithium LiFePO4 batteries have a cheaper overall lifetime cost over traditional lead acid batteries.

With using Lithiumm cells, you can for the same capacity of use, use 30% less that the equivalent lead acide capacity.

For example, if you have a 1000A/hr lead acid bank, then for the same performace and capacity in Lithium technology, this will be 700A/hr.

This is because lead acid batteries can only go as far as 50% DOD for usefull cost effective life, whereas for Lithiums, this same point is 80% DOD, the difference being 30%.

Also, lead acid cells are sluggish and slow to respond to either charge or to loads in comparision to Lithiums.
Lithiums can take a lot more charge if you can supply it, essentially, you can really open up the thottle on either pushing Amps in or pulling Amps out, a lot more so than lead acid.

If you like to keep upto date with progress, see the Energy Matters forum at this thread.

Currently, I'm in the process of building the new battery cabinet and designing the layout for all the switch gear, and am at painting stage, selecting the right colours. It will also form part of a small stand up workbench, where I can either stand up at or use a drafting chair which goes high.

I'm keen to do away with my standard solar charge controller and am designing and building up one using a DUE which will control high power MOSFETS to switch in the pv panels.

The Arduino DUE, will talk Modbus and act as the Modbus slave.
The DUE, since it has CANbus ports, will also connect into and talk to the BMS (Battery Management System) I have, which itself uses an ATMega chip of some sort.

Then I have a small dual core ARM based linux board, Cubieboard II which is the heart of my complete control system, and it will be the Modbus master and communicate with the DUE.

The Cubieboard II will run QuadlogSCADA which has an HTTP server also.

I'll be posting up some photos in the coming week with the current progress.
There are a number of us on the Energy Matters forum who have or are making to switch to Lithium battery technology and all reports so far is that everyone is very happy they have made the change.

I wonder where are you located psablo, and what sort of installation you might be wanting?

jawood (John) and I have been playing Arduino's and Modbus a little already, with trying to talk to his MorningStar TS-MPPT-60 charge controllers using Modbus, over RS485. He is organising a RPi which we intend to have talking to all three of his TS-MPPT-60 controllers over Modbus. Then develop the web application which will hook into QuadlogSCADA running on the RPi.
Paul - VK7KPA


I am in Colorado USA and I am fed up with paying a high base charge to the power company;  around here you are penalized for conserving energy and rewarded for wasting it.

I will most likely use:
Magnum Energy MS4448PAE inverter since there are very few that run 240VAC at 60Hz.
12 - 300W PV panels (~38Voc so 4 parallel strings of 3 panels each => ~32A total)
2- Outback FlexMax 60 charge controllers (I don't think one FlexMax can handle 4 strings, but not sure)

48VDC would imply 16 - 3V Winston cells which will be very expensive.  I may consider the MS4024PAE with 8 - 3V cells and then expand to 8 more in parallel later, thus doubling my Amp Hours.

If I go with flooded lead acid I will probably use 8 - 6v 375Ah and then add 8 more later to get 750Ah.

Sounds like you're saying I could get even more storage with the 300Ah LiFe than the 375Ah Lead?

Hopefully the cost of LiFe comes down over the next couple of years b/c I can get flooded lead acid for about a third of the price.

I may need to join the EnergyMatters forum as this is a bit off topic for Arduino, but for now my two biggest questions are fire hazard and off gassing of LiFe.


Mar 01, 2015, 11:47 am Last Edit: Mar 01, 2015, 11:49 am by rockwallaby
my two biggest questions are fire hazard and off gassing of LiFe
With LiFePO4 generally, there is no fire hazard and there is no gassing, all that is left behind in the realm of lead acid. Look online at the Winston LiFeYPO4 cells, they shoot at them with a handgun, they put them into an incinerator, they compress them, shear them in half. Try doing any of these things to a lead acid. As well, lithiums are considered eviromentally clean in terms that the components used to build the cells andalso end of life recycling, again, so unlike lead acid cells.

If you wish to start a new thread in an appropriate section or make a comment on one of the threads on the Energy Matters forum, let me know.

Sounds like you're saying I could get even more storage with the 300Ah LiFe than the 375Ah Lead?
Yes, that is correct, in fact, a 300Ahr bank of LiFePO4 could be consisdered the same as a traditional 400Ahr lead acid bank.

Depending on your loads, it might be that a 400Ahr bank at 25.6V will be more than suitable for your off grid home. If you have heavy loads such as air-conditioners that run all night or a workshop, then possibly between 400Ahr and 800Ahr.

But just before I finish, I am working with one other guy in Montana, who was the first to use QuadlogSCADA who does operate 2 Magnum Energy MS4448PAE inverters and so I am coding up the communications protocol for these inverters as they do not use Modbus, but their own propriety serial protocol. I have the protocol data sheet. He also has 2 Midnight Classic 150 charge controllers that do use Modbus, which would be similar to the Outback charge controllers in terms of available data to be pulled out.

Lastly, remember you can have more solar panels than your charge controller can handle, it will just clamp at it's maximium output, so 60Amps. With more panels, you will get greater input charge in the morning and afternoon with fixed pv arrays which can be a bonus.

With what mention, 12 lots of 300Watt panels would not seem to match a battery size of 300Ahr to 400Ahr.
That number of panels can produce in the order of 140Amps charge current into your battery. It does mean you can potentially charge such a bank in 1 to 2 hours of direct sunlight

Carefully think about your loads to determine the optimal size for each component.
See you on the EMforum  8)
Paul - VK7KPA


Mar 01, 2015, 04:42 pm Last Edit: Mar 01, 2015, 04:44 pm by psablo
With what mention, 12 lots of 300Watt panels would not seem to match a battery size of 300Ahr to 400Ahr.
That number of panels can produce in the order of 140Amps charge current into your battery.
perhaps I wasn't clear:
I will have 12 - 300W modules (with option to add more) at 38Voc and 9A each for a total of 3600W.
The Outback charge controller can only handle an input of up to 150VDC, so the array will be 4 parallel strings of 3 modules; each string will be 114VDC and 9A for a total of 36A.
I realized after my post that I will only need one FlexMax CC b/c I can combine the strings before the CC as long as I up-size the wire.

my biggest loads will be a 300' deep well pump, which is why I need 240VAC, and a refrigerator, plus I will have a generator to charge the batteries if needed, so you may be right in that a 4024 inverter will be enough.  I will also have an air compressor, but I will only run that off the generator.

thanks again for your input and I will be on EnergyMatters soon.


Hi guys, if I may join the conversation...

This is directly from the TS-MPPT-60 manual

The EIA-485 port has 4 connections Power, Data A, Data B, and ground Data A&B are differentially driven data lines that carry the network data. Power and ground connections provide power to the network. the tristar MPPt does not supply power to the EIA-485 network, therefor an external power source is required. The source voltage must be between 8-16 Vdc. For 12 volt systems the network can be powered directly from the system battery. Use a DC-DC converter for 24, 36 and 48 volt systems..

Yes i understand that MODBUS is the protcol and that RS-485 is just the physical medium..
I have a TS-MPPT-60 in a semi-automated greenhouse I have built.
My system is in 24v. I had power switching to step down to 5v for Arduino and soon BeagleBone Black for remote control.

I failed miserably to connect the TS-MPPT-60 trough the modbus port and had to resort to using the serial port.

I got told that all my modbus devices had to be powered and stepped down trough the same power source and for the differencial signal to work...
and that using 2 different power switching modules would not work...
24->power switching->5 v -> Arduino
24->power switching->12v -> EIA-485

I got told to do:
24->power switching->12V->LDO->5v
Connect the EIA vcc to 12v and the arduino to the 5v provided by the LDO

My questions:
1- Can I power each device by it's own power switching regulator ?
2- Also if I power the EIA-485 in 12v and the Arduino Max485 chip is on 5v, will it burst into flames?

Go Up