I have only just Arduino (not sure why but there you go). I have Solar panels and a Sunny Roo Inverter which I collect data via standard RS232 cable plugged into a PC, the output is then pushed up to pvoutput where I can access from anywhere, even my iPhone. The same PC is connected to a Current Cost device which monitors our Electricity usage, this is connected by an RJ45 connection on the Current Cost Device into USB (Serial to USB) on the PC. The output from here is sent to cosm and then to pvoutput.
OK, so now what I would like to do is not use the PC and this save having a PC on 24x7. I found a useful article describing how to do this with an XINO board which then led me to Arduino, so it looks like this can do what I want. My question is what Auduino hardward components do I need? And can this be done with just one board (if so which one), or do I need two?
Just in case my query is not clear enough, the question is more about the serial ports. As most board come with only 1 serial port, I see the MEGA has 4, the RS232 serial connection from the inverter will use 1. My novice thinking is that although the Current Cost cable has a USB plug on the end, I won't be able to plug it in to the Arduino USB and read data from it as there is no driver, my thinking is that the output will need to go to a serial connection on the Arduino.
Conclusion, 2 UNO boards or 1 MEGA or is there a shield to provide the extra serial needed. Or am I completely wrong..
I don't entirely follow that, but you seem to have a combination of RS232 and USB and goodness only knows what's coming in over that RJ45 (Ethernet ?) going in to a PC where some unspecified software interacts with the inputs.
You need to have a lot more information about what protocols those interfaces use and what the PC application(s) do before you have any hope of replicating the PC functionality on an Arduino. Getting RS232 and USB drivers are the least of your problems, but for what it's worth you'd probably need an RS232 shield, and either a USB host shield or a Mega to provide a USB host port, and either an Ethernet shield (or Arduino with built-in Ethernet) or something capable of interfacing with whatever that RJ45 is presenting if it's not Ethernet. If it's Ethernet then you'd need to get a library (or write your own) to handle whatever protocols are being used on top of that.
I think you have two instruments that generate serial data streams that you want to catch. This is possible with Arduino, although I would recommend a MEGA device, which has four hardware UARTs.
If the line levels are RS232, not TTL, then you would need a MAX232 or similar RS232 line transceiver.
You will need to have details of the protocols of course, and program the Arduino to handle them.
Now that you have your data, you want it "pushed up to pvoutput". Can you explain what this means? What is pvoutput and how is data pushed there?
Hi Guys, many thanks for the replies so far, to help with the detail and in case anyone else in interested in a similar thing later on, I'll detail the two devices sparately.
These come with RJ45 connectors on the bottom, the info in the manual says.. . The data cable is an USB to RJ45 cable that takes serial output from the Current Cost monitor and uses the Prolific PL-2303 chip to convert serial to USB.
The data from the serial output is in XML format, as shown below:
CC128-
v1.11dsb>0003712:03:5118.40<
/sensor>02723100396<
watts>0029600256
I found a useful article here... http://blog.cuyahoga.co.uk/2012/06/assembling-the-currentcost-interface/ using an XINO board and Ethernet Shield (no MAX232 so I am guessing it is TTL) to push data to cosm (www.cosm.com). Cosm is another site that allows you to upload any monitored data. He also includes a link to his code, and I also found an example in the Auduino examples, so looks pretty straight forward.
Solar Panels (Sunny Roo 4200TL Inverter):
In terms of hardware, the Inverter has a standard 9 PIN serial output, which I just plug into the 9PIN serial on my PC (set the COM settings) and run the software. The software reads the data from the serial port and stores it in an Access Database. I also have a document which details the serial output data.
Pvoutout (www.pvoutput.org) is a site that allows you to store data online showing how much energy you have produced and how much you are consuming. Then you can access it from anywhere or any device, even my iPhone. They provide software which can automatically upload the data stored in the Access Database mentioned above for my inverter directly to pvOutput. They also have detailed API instructions that provide info on creating your own.
So if my understanding is correct, it's just a case of connecting the correct wires from each source to it's own serial input (which means I need the MEGA) and start coding... or pulling my hair out... Add an Ethernet shield for posting the data on line.
nwillis:
I found a useful article here... http://blog.cuyahoga.co.uk/2012/06/assembling-the-currentcost-interface/ using an XINO board and Ethernet Shield (no MAX232 so I am guessing it is TTL) to push data to cosm (www.cosm.com). Cosm is another site that allows you to upload any monitored data. He also includes a link to his code, and I also found an example in the Auduino examples, so looks pretty straight forward.
Yup, interfacing between the CurrentCost device and Cosm, using an Arduino-alike as the go-between really is that simple. I should know as that's my blog you've linked to
Accessing the data is a case of doing SoftwareSerial reads at 57600 baud (for my CC128, your Envi might be different, but I doubt it) and parsing for the data you're interested in. Connect to the RJ45 port on the back of the device from your Arduino, send it power and ground and get back the data line - just three wires. This approach also means the device can parasite off your Arduino for power, so you've only got one PSU instead of many (and a PC in your case). Your post has just made me realise I never posted the latest version of the code - I'll sort that out, sorry, but if you're in a rush, an earlier incarnation is here.
As far as the hardware is concerned, you'll want an Arduino-alike with ethernet capability. These days, your choices for that are getting wider every day; Arduino + Ethernet shield, Arduino Ethernet, Nanode, Xino + ENC28J60 shield, Arduino + WIZ820io and probably a whole load of others. Which you chose is probably down to your budget or local availability - that choice then determines which library you'll use to handle the network communications.
You may have success with polling two instances of SoftwareSerial to also get data from your Inverter, or you could use hardware Serial - I'll leave other folks who've been there and done that to comment as it's not something I've played with.
Cool project by the way and a great blog... I have since found some of those other boards and also thought about the Raspberry PI, but the Auduino boards seem to be further ahead (as a newbie) and this forum looks more active than some of the others. I have to be honest and say the credit is down to your Blog, as that was what got me thinking...
Time to start playing with Arduino I think, I've been looking at one of the MEGA kits as then you get to play with all the other cool stuff too, I suddenly feel like a kid in a sweet shop...