Show Posts
Pages: [1]
1  Using Arduino / Project Guidance / Re: Arduino - Solar and Electricity Monitor Hardware Query on: August 30, 2012, 04:24:16 am
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 smiley

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.
2  Using Arduino / Programming Questions / Re: Time and TimeAlarms Libraries – Ask here for help or suggestions on: August 14, 2012, 06:43:37 pm
A couple of folks earlier in the thread were wondering why the TimeGPS example didn't seem to be doing anything - I was too, until I spent a little while looking at it this evening. I've written it up over on my blog, but the basic problem is that the sketch invokes the sync provider function before any data has actually been received from the GPS, so there's never going to a suitable date/time at that point. However, because TinyGPS returns a value and the sketch doesn't validate it, it thinks that zero is a valid date value and that gets mapped to 31/12/1999. Job jobbed, date set, nothing more to do here then. Except that this means you don't see anything in the Serial Monitor window except "Waiting for GPS time ...".

I've added in some validation checks to the sketch and updated it to reference the SoftwareSerial libbrary instead of NewSoftSerial and it now works as expected. If anyone is maintaining the Time library and its examples, feel free to roll the code into the download version.



Cheers, Stu
3  Using Arduino / Displays / Re: ST7565 GLCD Library Functions on: March 26, 2012, 07:11:49 pm
This means, the constructor should be:
U8GLIB_LM6059(8, 9, 5, 7, 6)

Just to confirm, for anyone arriving here after a search (as I did), that the above constructor works correctly with the default pin assignments from the Adafruit tutorials for their ST7565, using the release 1.02 library.

PinAdafruit calls it...u8g calls it...
9Serial data out (SID)mosi: Serial data
8Serial clock out (SCLK)sck: Clock
7Data/Command select (RS or A0)a0: Data/instruction register select
6LCD reset (RST)reset: Display reset
5LCD chip select (CS)cs: Chip select

Cheers, Stu
Pages: [1]