wireless voltage sensor

Hi everyone, I started a discussion on the JeeLabs forum (since it is the meeting point of RFM12B users) to see if it is possible to sense the voltage and current on two seperate devices. You can have a look at this page and contribute with your ideas/thoughts...

http://forum.jeelabs.net/node/1006

"Hi everyone, I am trying to make a wireless zero crossing detector with a jeenode and a nanode RF (arduino clone with ENC28J60 and RFM12B). The idea is to detect on the nanode when a voltage sinusoidal waveform starts and directly transmit one bit over the radio to the base (nanode RF). Since the transmission can be made in 160µs (see this post:http://jeelabs.org/2011/01/14/nodes-addresses-and-interference/) this would represent 0.008 of the waveform length (20ms) and can be corrected with software. Any ideas/thoughts/on this? Thanks"

Amin Zayani's picture

Re: wireless voltage sensor

the conversation is progressing here: http://forum.jeelabs.net/node/1006

Amin Zayani's picture

Re: wireless voltage sensor

 

From JeeLabs forums:

 

Actually the problem is that there is no plug next to the currents sensing node. You are definitely right about the voltage drop, but experience showed that the waveform doesn't really get distorted. And anyway, I think that the load distorts the current waveform and not the voltage right?.

I think measuring the power factor accurately is more decisive than the drop in Vrms.

My idea is to have the current measuring node listen to when the voltage waveform start (no amplitude, a single bit that tells: NOW the voltage waveform started) then it calculates the current's waveform phase shift, and it sends both values to the voltage sensing unit back, which multiplies both current Irms and PF by the Vrms and sends it to a server.

So in this order:

  1. current node listens to bit announcing voltage waveform start.
  2. voltage node broadcasts single bit announcing start of voltage waveform
  3. 160us later the current node receives that bit and counts till the start of a current waveform (wont be accurate but can be calibrated I think)
  4. current node computes phase shift of current/voltage waveforms and Irms
  5. current node sends both PF and Irms values to voltage node
  6. voltage node receives both PF and Irms values and multiplies them by Vrms

Feasible?

I saw a similar application with Bluetooth modules (3000 measurements/sec sent), is it possible with RFM12B ? Theory says YES

Amin Zayani's picture

Re: wireless voltage sensor

making slow progress here: http://forum.jeelabs.net/node/1006

Amin Zayani's picture

Re: wireless voltage sensor

 

PROGRESS!

I managed to send an empty packet from one node to another to indicate the start of a waveform. I am using two identical setups, one sender (jeenode 6) and one receiver (jeenode usb). Both are hooked to two identical AC-AC adapters with step down voltage dividers and a DC offset. I could manage to measure the time between the start of the waveform and the time of its reception on the receiving node, but the results are quite surprising:

Serial Monitor:

ZeroCross Wireless Receiver From 7 ok | Timer: 62084 uS

From 7 ok | Timer: 82036 uS

From 7 ok | Timer: 42444 uS

From 7 ok | Timer: 102100 uS

From 7 ok | Timer: 2316 uS

From 7 ok | Timer: 2300 uS

From 7 ok | Timer: 22236 uS

From 7 ok | Timer: 2308 uS

From 7 ok | Timer: 22220 uS

From 7 ok | Timer: 2316 uS

From 7 ok | Timer: 42420 uS

From 7 ok | Timer: 2332 uS

From 7 ok | Timer: 2324 uS

From 7 ok | Timer: 22388 uS

From 7 ok | Timer: 42340 uS

From 7 ok | Timer: 102004 uS

From 7 ok | Timer: 82120 uS

From 7 ok | Timer: 42452 uS

From 7 ok | Timer: 82068 uS

From 7 ok | Timer: 101980 uS

From 7 ok | Timer: 142116 uS

From 7 ok | Timer: 181784 uS

From 7 ok | Timer: 201844 uS

From 7 ok | Timer: 2316 uS

From 7 ok | Timer: 82156 uS

From 7 ok | Timer: 42036 uS

From 7 ok | Timer: 62436 uS

From 7 ok | Timer: 2316 uS

From 7 ok | Timer: 22204 uS

From 7 ok | Timer: 41988 uS

From 7 ok | Timer: 61964 uS

From 7 ok | Timer: 82164 uS

From 7 ok | Timer: 62524 uS

From 7 ok | Timer: 42020 uS

From 7 ok | Timer: 102140 uS

From 7 ok | Timer: 2300 uS

From 7 ok | Timer: 42452 uS

From 7 ok | Timer: 42036 uS

From 7 ok | Timer: 41988 uS

From 7 ok | Timer: 61988 uS

From 7 ok | Timer: 21964 uS

From 7 ok | Timer: 82148 uS

From 7 ok | Timer: 22388 uS

From 7 ok | Timer: 42348 uS

From 7 ok | Timer: 62364 uS

From 7 ok | Timer: 122020 uS

From 7 ok | Timer: 2300 uS

From 7 ok | Timer: 22348 uS

From 7 ok | Timer: 42444 uS

From 7 ok | Timer: 82020 uS

From 7 ok | Timer: 41972 uS

Here are the sketches I use:

[Sending]:

#include <JeeLib.h>

Port voltage (4); Port reference (1);

void setup () {

Serial.begin(57600);

Serial.println("ZeroCross Wireless");

rf12_initialize(7, RF12_868MHZ, 7); }

void loop () { word volt = voltage.anaRead(); word ref = reference.anaRead(); int diff1 = volt-ref; delayMicroseconds(500); volt = voltage.anaRead(); ref = reference.anaRead(); int diff2 = volt-ref; // Serial.println(diff2-diff1);

if (diff2 <10 && diff2 >-10 && diff2-diff1>0){ rf12_recvDone(); if (rf12_canSend()){ rf12_sendStart(0); Serial.println("RF OK"); delayMicroseconds (500); } }

}

[Receiving:]

#include <JeeLib.h>

Port voltage (4); Port reference (1);

unsigned long time = 0; unsigned long period;

void setup () {

Serial.begin(57600);

Serial.println("ZeroCross Wireless Receiver");

rf12_initialize(8, RF12_868MHZ, 7);

}

void loop() {

rf12_recvDone(); word volt = voltage.anaRead(); word ref = reference.anaRead(); int diff1 = volt-ref;

volt = voltage.anaRead(); ref = reference.anaRead(); int diff2 = volt-ref; if (diff2 <10 && diff2 >-10 && diff2-diff1>0){ time = micros(); } if (rf12_recvDone() && rf12_crc == 0 && rf12_len == 0 && rf12_hdr == 7) { period = micros()-time; Serial.print ("From 7 ok | Timer: "); Serial.print(period); //time in micros Serial.println(" uS");

}

}

Any thoughts on the strange results?

Amin Zayani's picture

Re: wireless voltage sensor

Progress was made here: http://forum.jeelabs.net/node/1006 I could measure 8uS between the detection of the beginning of a waveform on one node and the reception of that signal on another node. Now I need to measure the period between the beginning of the current waveform and the voltage to deduce the power factor.

 

Any ideas?

You can see all the code I use on the link: http://forum.jeelabs.net/node/1006

Comment viewing options

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