JeeNode v6 - Send Data to Raspi emonbase

Hello there,

i have a question and i hope you understand me in my english.

I have a JeeNode v6 with RFM12B on board. Some Years ago i have transmit some data over it. But its a long Time ago. Now i want to transmit Data to the Raspi where emonbase is running. But i have tryed so many versions of code but nothing is shown on emonbase input side.

Have someone a running code for JeeNode v6 that only send data. The data can be static, the point is to understand the transmit. Collecting data from RoamBoard or something like this can i try to code myself.

Only sending and in best case set the board in sleep mode and wake up every 10 seconds is my problem.

I hope i explain my problem.



Robert Wall's picture

Re: JeeNode v6 - Send Data to Raspi emonbase

As I understand it, a JeeNode uses the same basic parts that the emonTx uses - an Atmel ATMega328P processor and a RFM12B radio module.

Therefore, I think you need to approach your problem this way:

Find your old Jeenode sketch. That will have all the correct pin numbers, which you will need to know.

Look at an emonTx sketch. I suggest the simplest one that uses the RFM12B:

This is a demonstration and all it does is send a packet of numbers every 2 s. Either copy from Tx_SimpleRFM12B_demo.ino the parts that make up the message into your sketch, or copy the hardware parts from your old JeeNode sketch into the Tx_SimpleRFM12B_demo.ino sketch. I think it is only the LED output in the Tx_SimpleRFM12B_demo.ino sketch, that you will need to remove, because the JeeNode has no LED.
You will need a copy of JeeLib - instructions to get that are here:

If you can get that working, then look at the emonTx V3 sketches or the emonTH sketches to see how to put the board to sleep between readings. You might find this useful:

MueThoS's picture

Re: JeeNode v6 - Send Data to Raspi emonbase

first thanks for the tips!

I have tried a lot and this is my result:

i have one jeenode as sniffer and one as tx.

At the sniffer i can see the tx. I have seen that the Nodes where at the wrong config.
With the RF12_config i have correct the config. Now i am on 210 433.
With some test i have seen the Data on my EmonHub.
​Now i have to find out how to measure something.


But i have a second Problem. I dont know is this the right location to ask this. Its a question about electric.
I know a lot about electrics but this is me a mystery:

our stove runs for three phases! Phase two and three are ok. When the oven is off, there is no Electricity. However, the consumption is displayed with -30 Watt on phase one. Although the stove is off.
I have another fuse where - is displayed. it is also on phase one but another fuse. I do not know what it is there because it is not labeled.
But negative values?

This is a mystery. Have someone a idea?



mpruessmeier's picture

Re: JeeNode v6 - Send Data to Raspi emonbase

HI Thorsten,

try to turn the inductor 180°. if you go the wrong direction through a inductor you get negative values.

Greetings Marc

MueThoS's picture

Re: JeeNode v6 - Send Data to Raspi emonbase

Hi Marc,

I had also made first.
However, the decisive is right by load.
the Inductor is therefore right side up.

The problem must lie on the stove

Greetings Thorsten


pb66's picture

Re: JeeNode v6 - Send Data to Raspi emonbase

What sketch are you running?

If you are using a single phase sketch and measuring 3 phases you can expect each to report a different value for the same fixed load as 2 CT's will be sampled out of phase.

With a single AC adapter you can measure 3 phases to a lesser accuracy by offsetting the measurement timing on the other 2 phases.

If using a 3 phase sketch try moving each ct to the next phase to create a comparison depending on whether the "faulty" reading moves with the CT/jeenode or remains on the same phase of the stove will help diagnose.

Or if using a single phase sketch put all 3 CT's on one wire to confirm they all report the same.


Robert Wall's picture

Re: JeeNode v6 - Send Data to Raspi emonbase

To expand on Paul's answer:
The 3-phase sketch works by recording the voltage of Phase 1, then "replaying" it 120° later to calculate the power for phase 2, and again 120° later than that for phase 3. You must have the order of the phases correct; that is, CT1 must be on the phase that has the voltage monitor, CT2 must the on the next phase and CT3 must be on the last phase. In the diagram here: Phase 1 is red, Phase 2 is yellow, Phase 3 is blue.

This is not the most accurate method, the limitations are all listed in the comments in the sketch. You must calibrate it according to the instructions in the sketch.

MueThoS's picture

Re: JeeNode v6 - Send Data to Raspi emonbase

There was the standart sketch on the emonTX. So i think the single phase.

Now i have uploaded the 3 phase sketch.
And i connect the uart-bridge. This is  the debug result:

Voltage: 258.49
 Current 1: 0.52 Power 1: -56.35 VA 1: 135.02 PF 1: -0.42
 Current 2: 0.24 Power 2: -3.97 VA 2: 62.76 PF 2: -0.06
 Current 3: 0.76 Power 3: -157.43 VA 3: 195.20 PF 3: -0.81

Voltage: 258.87
 Current 1: 0.52 Power 1: -55.22 VA 1: 134.61 PF 1: -0.41
 Current 2: 0.25 Power 2: -5.99 VA 2: 63.62 PF 2: -0.09
 Current 3: 0.74 Power 3: ovf VA 3: 192.70 PF 3: ovf

Voltage: 258.66
 Current 1: 0.51 Power 1: -57.00 VA 1: 133.06 PF 1: -0.43
 Current 2: 0.25 Power 2: -5.23 VA 2: 64.31 PF 2: -0.08
 Current 3: 0.73 Power 3: -152.81 VA 3: 189.57 PF 3: -0.81

Voltage: 258.55
 Current 1: 0.52 Power 1: -55.41 VA 1: 133.73 PF 1: -0.41
 Current 2: 0.25 Power 2: -20.62 VA 2: 65.53 PF 2: -0.31
 Current 3: 0.74 Power 3: ovf VA 3: 190.20 PF 3: ovf

It looks horrible 8-)


i connect the ac-adapter to phase 1 and the order from the ct's is right.
before the ac-adapter was on phase 3.

Robert Wall's picture

Re: JeeNode v6 - Send Data to Raspi emonbase

To see whether those numbers are sensible, you must tell us what your input circuit is:

What voltage does your JeeNode run at?
Which current transformer are you using, and what burden resistor?
Which voltage adapter are you using, and what values do you have for the voltage divider?

What is the power that you are expecting to measure?

Remember that using an emonTx with the standard 100 A current transformer and burden, you cannot expect an accurate measurement of current below about 2 A (2% of the maximum reading). Less than that, the ADC resolution and noise will make the reading increasingly unreliable. The standard YHDC SCT-013-000 current transformer itself is only specified at better than 3% accuracy at greater than 10 A.

MueThoS's picture

Re: JeeNode v6 - Send Data to Raspi emonbase

Not that you misunderstand me.
The currents I measure with the emonTX with 100A CTs.
The JeeNodes I want to use it later for other things.

The inaccuracy is not the problem for me.
Only negative should not be.
I have now written the 3-phase sketch.
and I turned the CTs.
The first looks pretty good.
I still need to test whether that is decisive according to Elictricity.

In the 3-phase Sketch the temperature measurement is missing, but that's not so bad first.
I observe now first the measurement of power

Robert Wall's picture

Re: JeeNode v6 - Send Data to Raspi emonbase

To begin, you wanted to know how to make a JeeNode work with a Raspberry Pi. Now I understand that you have both emonTx and JeeNodes.
You are correct, there is no temperature measurement in the 3-phase sketch, but you can add that very easily, after the 3-phase power has been calculated and before you send the data.

When you calculate apparent power (VA), you cannot know the direction of power flow, so the answer is always positive. When you calculate real power, you can know which way the power is flowing because you know the phase of the current compared to the voltage. We say imported power is positive and exported power is negative. To reverse the sign of power, you must change the relative phase of the current and voltage, and the easy way to do that is to reverse the CT on the wire, as mpruessmeier wrote.

Comment viewing options

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