This is a little bit complicated. I spent a lot of time on this as I wanted to really understand the power production of my solar panel system. I enjoy working with electronics and I wanted to take my skills and apply them here so I could gather this important information.
My objective was to be able to monitor and graph the power output of my solar panels, individually, and also monitor and graph the battery system. I have a good understanding of the arduino boards and also am very familiar with computers and the php coding language. So that is really the reason I chose to go the way I did. I had most of the parts already and wanted to keep this low cost but effective.
First I purchased some voltage meters from ebay, just basic guys that were just a couple of bucks, they are like one of these:
Once I had that down it was time to connect a prototype to the arduino and start figuring out the code to make it work. In this picture you can see my basic first test. I connected one of the digital voltage meters and I also chose to use a relay to turn on and off my voltage divider circuit, I didn’t want to leave it on all the time for fear that it would burn up my arduino board. The down side is a relay uses a lot of electricity and also creates a spike when initially activated, so I had to account for that in the code.
I tested it out and it worked. It displayed the voltage on the meeter and the arduino code just printed the value to the serial connection to my computer, and the values were really close – most voltmeters like these will need some adjustments but since mine were so close I didn’t worry about it. Oh, and just FYI I think the two different resistors I used in my voltage divider were 10k and 100k, but not having it right in front of me at this moment I could be wrong. Just do some web searches and do some of your own testing before you select which set of resistors you plan to go with.
Now that the test worked out I went ahead and used the same board to add the other 4 sensors. I plan to monitor 4 solar panels with this system and saw that they would all fit nicely. You can see several views of the process:
Next I played with a amp meter sensor, I also got these off ebay, they use the ACS712 chip for current sensing. I also found them on amazon:
Also I use some large voltage diodes to go from the current sensors to the bus bars.
You can also see how I had it all wired up, the fuse box is what goes to the solar panels, the two bus bars is what goes to the solar charger and the battery array. I didn’t mention this before but along with the arduino there is a wifly wifi board and a prototyping board that I used to connect everything together, this allows me to remove the wifi board or the arduino board if either of them goes out.
Here you can see the terminal block that goes to the battery for monitoring. You don’t see it here but I also put a volt meter to this so I would have a visual display. Also this is the full view before I added that volt meter and before I mounted it.
Well I have mounted it and it is graphing, the wify board allows my home server to query it every five minutes, and then it takes the output, the code is php and bash scripting, and it then used RRDtool to create graphs like these, you will want to click on them to see the full graph. The interesting thing is the type of curve that one type of panel gets as opposed to the other panel:
I did find a couple of issues with my setup that I haven’t taken the time to correct. Firstly I need to replace the wire that goes from the fuse box to the bus bars since the guage is too small and is a hinderance to the flow of power. Secondly I seem to have a bug in the wiring of my voltage dividers since the voltage of one panel does affct the voltage of another panel, just need to put some diodes in the right places I think.