[SOLVED] EmonTx v 3.2.1 direct to Raspberry pi

Hi there,

I'm trying to connect my emonTx v3 to rasp directly, via serial port. I know there is a lot of threads in this topic, but  no one is for me! :( On my emonTx there is a standard firmware, the baord version is 3.2.1 and I purchased it on December 2014. I have connected the emonTx to rasp correctly, so I see (on the rasp) what emonTx sends. The problem is that I receive data with variable NodeId!! This is my emonhub.log:

[...]

NEW FRAME: 1424955966.75 15 25540

Timestamp: 1424955966.75

Node: 15

Value: [25540]

NEW FRAME: 1424956066.75 14 24540

Timestamp: 1424956066.75

Node: 14

Value: [24540]

NEW FRAME: 1424956966.75 16 25440

Timestamp: 1424956966.75

Node: 16

Value: [25440]

[...]

So, it forwards correctly data to emoncms (local), but I think that tha data are meaningless.

I attach a screen of emoncms: 

(https://www.dropbox.com/s/jxl2ovpypjojkxw/emoncms%20screen.png?dl=0)

Thanks guys!!! :)

 

 

 

hercules71035's picture

Re: [SOLVED] EmonTx v 3.2.1 direct to Raspberry pi

The problem is that the first value sent by emonTx is the power  but emoncms read it as nodeId!!! Can anyone help me???

pb66's picture

Re: [SOLVED] EmonTx v 3.2.1 direct to Raspberry pi

Hi, The normal data packet stucture if for data to be preceeded by the node id, which is why emoncms is assuming the first data value as a node id.

If you are using a serial connection you will need to add a node id to the sketch as the current "serial" sketches do not provide one. emoncms now expects a node id of 1 or higher as does emonhub currently.

This is discussed on http://openenergymonitor.org/emon/node/6048 and other similar threads.

Paul

 

hercules71035's picture

Re: [SOLVED] EmonTx v 3.2.1 direct to Raspberry pi

Hi there, 

thank you for the reply. I have just modified the standard sketch adding the nodeId print on serial. The problem that I'm not able to upload the firmware. There is some strange procedure to do?? I connect my USB to UART, but I have this problem: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x01

How can I proceed??

Robert Wall's picture

Re: [SOLVED] EmonTx v 3.2.1 direct to Raspberry pi

That error simply means that your computer is not communicating with the programmer, or the programmer with your emonTx, but that could be for one of many reasons.

Have you followed exactly the installation procedure for the Arduino IDE here? That is the starting point.

Have you got the correct connections on the FTDI cable between programmer and emonTx?
Is the connector the right way round? ("GND" is marked on the circuit board and on the programmer if it is the Shop one.)

hercules71035's picture

Re: [SOLVED] EmonTx v 3.2.1 direct to Raspberry pi

Hi there,

I have resolved all. The problem on uploading firmware was on the procedure. In order to enable the upload I have to press the reset button on emonTx just before click the upload button on Arduino IDE. I don't knew this and I haven't read this nowhere.

Thanks a lot!

Robert Wall's picture

Re: [SOLVED] EmonTx v 3.2.1 direct to Raspberry pi

Your programmer should send a 'Reset' pulse on the "RTS" line, which should be connected to the "Reset" on your emonTx. If that is missing from your programmer, or the pulse is not correct in some way (amplitude, length or timing), then that is the reason that you need to press the Reset pushbutton.

As you don't have the RTS line (DON'T DOUBLE POST -IT WASTES EVERYBODY'S TIME), you need a different programmer.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.