What do you do when it’s tricky to get data from your solar power setup? Hack it with a Raspberry Pi of course, as Rob Zwetsloot finds out.
Renewable energy is something we’re pretty interested in here on The vikilix.com – and not just because of the ways you can use it to power your outdoor Pi projects, even if that is very cool. So when Clive Maynard contacted us to share his project about keeping an eye on the performance of solar power inverters, we were all ears. “It starts with establishing communications with the inverter and then goes on to logging the data retrieved,” Clive tells us. “This involves the creation of CRC16 calculations to determine the validity of the data. Having logged the data, there is a need to display it for easy human understanding. The project involves two types of plot: the first traces the output of the solar inverter over a day of generation, and the second is a bar chart summary of the daily performance plotted over a month period.”Solar inverters take the photovoltaic (PV) output from a solar panel and convert it to a more usable AC current. Why did Clive feel the need to build this system, though? Well, his solar inverter didn’t make it easy to read its data.
A simple solution “I have had a PV system at my home since 2015 and have kept records of its performance compared with the National Renewable Energy Laboratory (NREL) predictions for my location since getting it, every month scrolling through the menus on the inverter front panel to find the information I need and entering it into a spreadsheet. Interesting, but not as good as extracting the information from the solar inverter electronically.” To read the data, all Clive needed to do was connect the RS-485 serial output to the Pi using a USB converter and then parse that output for the relevant information for his graphs. “It is a cheap, powerful system which has a good programming environment and operating system, together with relatively easy interfaces to collect the data,” explains Clive about his reasons for using a Raspberry Pi. “I have spent many years using UNIX, C, and Python, so [it was] an easy choice.”
Renewable graphing :The results speak for themselves, with graphs aplenty for data lovers to look over. It’s important to know how solar energy works if we’re to rely on it more in the future. For now, Clive has a couple of things he’d like to improve with his setup: “Physically I should make a more secure mounting for the Raspberry Pi and interface in my garage. I’ll also set the logging program up to automatically run on reboot, to allow for power failure and get the logging back on as soon as possible.”