Tuesday, 21 February 2012

Teleinfo update

I''ve been using a teleinfo shield on a nanode to try and datalog our electricity usage, but the logging to the CSV file kept truncating as if the arduino had locked up. There have been discussions elsewhere that this may be related to the code in arduino 1.0 so I decided to rewrite a step at a time to try and debug the problem.

Some observations on the way:
1) having to flip a jumper over on the shield between programming and run is *very* annoying in a cold garage, so I'm going to rewire it slightly to use SoftwareSerial on a spare input (leave JP1 open and wire from one side of it to a spare pin) - I already have a link since the shield tries to use DIG6 by default which is used by the red LED on a nanode.

2) the arduino IDE doesn't like anything other than 8N! on the serial monitor. close it and use kermit. if you can't read serial with kermit, then it's *very* broken :-)

3q) our usage is going UP not down :-( -- lowest figure I managed to get the baseline to was 340VA

With a very simple logger

I can stream the output to a kermit session log as
ADCO 040222048573 <
BASE 040912359 ,
IMAX 029 J
PAPP 00340 (
next trick is to try and get the processing organised into blocks and validate the checksum, but my code doesn't seem to detect the stx/etx properly
void loop() {
if(meter.available()>0) {
  if((c = meter.read()) == 02) {     // start of block
    Serial.println("DEBUG: Start Loop");
    while((c = meter.read()) != 03) {      // Loop until end of block
    digitalWrite(LED, LOW); // Flash LED
    digitalWrite(LED, HIGH);
so mode debugging called for. Once thats done, then I'll send the values to an emon style display over rfm12b

No comments:

Overlaying SLURM job timings on Grafana plots

As you may have noticed, I'm quite fond of Grafana and use it at home and work. One of the dashboards I have at work is the general sta...