Post a new topicPost a reply Page 1 of 5   [ 46 posts ]
Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: Cannot get a reading from Efergy
PostPosted: Mon Jul 09, 2012 3:58 pm 

Joined: Wed Dec 14, 2011 11:02 am
Posts: 120
I am really sorry to post but I have spent all day on this until now and I cannot seem to get a resolution, also I cannot find the right documentation.

In setup() I have...

// Initialise Smart Board
SensorSmart.setBoardMode(SENS_ON);
SensorSmart.setSensorMode(SENS_ON, SENS_SMART_EFERGY);
SensorSmart.setLoadResistor(40);
SensorSmart.setSensorMode(SENS_ON, SENS_SMART_24V_CONVERTER);
delay(50);

In loop() I have...

myfloatvar = SensorSmart.readValue(SENS_SMART_EFERGY);

I have the Smart Metering Board not v20.

I have tried the clamp around a range of 'live' wires and for each of these I get a value which is always e-41 (i.e. very very small!).

I have tried a cheap utility proprietary current clamp and transmitter with small table top display unit for each of the same 'live' wires and they all produce an expected result.

I have tried different instances of the current clamps you sent me and the same result.

As I say I am sorry to post, but I am at a loss to see from the doumentation where I have gone wrong. I only got the suggestion to call setLoadResistor by several forum searches.

Sorry again and thank you for your help / advice in anticipation.


Top
 Profile  
 
 Post subject: Re: Cannot get a reading from Efergy
PostPosted: Tue Jul 10, 2012 8:13 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7479
Hi hardya,

You are using the LEM current clamp, right? Then you don't need to turn on the 24V converter, since this sensor doesn't use it.

Your code to read the sensor seems right, it could be an error configuring the load resistor if you didn't turn on the RTC before owing to an I2C problem. Could you please post the whole code you are using so we can see if there is other possible dependece interfering the sensor operation?

Regards.


Top
 Profile  
 
 Post subject: Re: Cannot get a reading from Efergy
PostPosted: Tue Jul 10, 2012 11:02 am 

Joined: Wed Dec 14, 2011 11:02 am
Posts: 120
I don't see anything in the Smart Metering Technical Guide that says "LEM current clamp", so I am not really sure. I am using the item that your catalogue calls "Current 0 - 90A", which I can only assume is what your guide calls Efergy, which is in the subject of my post.

I shall remove the code relating to 24V converter and then post the code up. I do not quite understand what you say about the RTC. Could you clarify this?

Are you saying I MUST turn on the RTC or that I SHOULD turn on the RTC in certain circumstances? What is an I2C problem and how might one occurr?

I am using the Smart Metering Board not v20. I cannot find any api documentation or guide documentation about using the SensorSmart interface correctly. Are you able to point me to such documentation?

Also, I have come to the realisation that the C/C++ is AVR flavour, but I cannot find any links / refs to documentation for this on your site or in your guides. I am concerned to know how I can have confidence in the output using XBee.print(sensorValue); or USB.print(sensorValue);, since my sensorValue is a float and there is no print function which takes a float, so I am assuming implicit casting is going on and I don't know how avr c/c++ will treat this without being able to find doumentation on it. Can you help in that area?


Top
 Profile  
 
 Post subject: Re: Cannot get a reading from Efergy
PostPosted: Tue Jul 10, 2012 12:07 pm 

Joined: Wed Dec 14, 2011 11:02 am
Posts: 120
Here is the code you asked for:

char data[50];

float sensorValue;
unsigned int justStartedUp=0;

union ufloat {
float f;
unsigned int u;
};

ufloat u1;


void setup()
{
// Inits the XBee 802.15.4 library, though not used in this example
xbee802.init(XBEE_802_15_4,FREQ2_4G,NORMAL);

// Powers XBee
xbee802.ON();

// Initialise Smart Board and sensor, set load resistor
SensorSmart.setBoardMode(SENS_ON);
SensorSmart.setSensorMode(SENS_ON, SENS_SMART_EFERGY);
SensorSmart.setLoadResistor(40);
justStartedUp = 1;
delay(50);
}

void loop()
{
// Confirm started and not restarting
if ( justStartedUp )
{
XBee.print("Just Started");
XBee.println("");
justStartedUp = 0;
}

// Output float to com port
sensorValue = SensorSmart.readValue(SENS_SMART_EFERGY);
XBee.print("Current: ");
XBee.print(sensorValue);
XBee.println("");

// Output the floats actual bits as hex to com port
u1.f = sensorValue;
sprintf(data, "Current as hex: %x\n", u1.u);
XBee.print(data);
XBee.println("");

delay(5000);
}

Here is a sample of the output, sometimes no current sometimes 1000watts (I am guessing 4Amps) and sometimes 2000Watts (I am guessing 8 watts).


Current: -2.2500000000
Current as hex: 0

Current: 0.0010299839
Current as hex: 87

Current: 0.0010299839
Current as hex: 87

Current: 0.0009956512
Current as hex: 8083

Current: 0.0181620502
Current as hex: c895

Current: 0.0179217219
Current as hex: d093

Current: 0.0177157235
Current as hex: 2091

Current: 0.0177500557
Current as hex: 6891

Current: 0.0178187227
Current as hex: f892

Current: 0.0177843904
Current as hex: b092

Current: 0.1903067111
Current as hex: dfc3

Current: 0.1892423820
Current as hex: c8c2

Current: 0.1890363883
Current as hex: 92c2

Current: 0.1889677238
Current as hex: 80c2

Current: 0.1890363883
Current as hex: 92c2

Current: 0.0179217219
Current as hex: d093

Current: 0.0180247201
Current as hex: a894

Current: 1.6875257492
Current as hex: d8

Current: 1.6875257492
Current as hex: d8

Current: 1.6875257492
Current as hex: d8

Current: 1.6875257492
Current as hex: d8

Current: 1.6875257492
Current as hex: d8

Current: 0.0010643168
Current as hex: 808c

Current: 0.0010643168
Current as hex: 808c

Current: 0.0010643168
Current as hex: 808c

Current: 0.0010643168
Current as hex: 808c

Current: 1.6875257492
Current as hex: d8

Current: 1.6875257492
Current as hex: d8

Current: 1.6875257492
Current as hex: d8

Current: 0.0010643168
Current as hex: 808c


Top
 Profile  
 
 Post subject: Re: Cannot get a reading from Efergy
PostPosted: Wed Jul 11, 2012 11:45 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7479
Hi hardya,

unlike the LEM current clams, this is a low cost sensor that shows some nonlinearities and lack of accuracy, that's why we included the LEM 4-20mA current clam on the board, that's why calibration is advised.

Anyway, I see three different values in the list you posted, could you post to which current values correspond each of them and how did you carry out the test?

Regards.


Top
 Profile  
 
 Post subject: Re: Cannot get a reading from Efergy
PostPosted: Wed Jul 11, 2012 4:27 pm 

Joined: Wed Dec 14, 2011 11:02 am
Posts: 120
Quote:
that's why we included the LEM 4-20mA current clam on the board


I don't understand what you mean. You mean there is a current clamp ON my board? I don't see one can you point it out for me?

Quote:
that's why calibration is advised.


What calibration? Where is the documentation for this calibration? Your site appears only to include an english document for the v20 smart sensor borad not the one without a version number and the interface is not documented in the api browser. The relationship between the live current and the readValue() return value appears to be non-linear and I have no documentation to tell me what this relationship is and how to go about calibrating / calculating.

Quote:
could you post to which current values correspond each of them and how did you carry out the test?


I discovered that the mote was missing the 3v button battery. After I put this in the results were more consistent though still non-linear. I have explained about the wiring and provided the code, here are the values for three tests with a 2kw fan which has 3 settings, cold, hot @ 1kw and hot @ 2kw.

Mains live: fan only (cannot be read by my free proprietary utility reader either) or off
readValue returns mostly aprox: 0.001

Mains live: Aprox 1KW (Aprox 4 Amps?)
readValue returns mostly about: 0.021

Mains live: Aprox 2KW (Aprox 8 Amps?)
readValue returns mostly aprox: 0.191

Quote:
this is a low cost sensor that shows some nonlinearities and lack of accuracy


How inacurate? I did not realise that it would be especially inaccurate, if I had I probably would have spent the extra money to get the ones for specific ampage etc.

Regarding documentation - Can you tell me where I should have navigated on your site to find documentation to understand how to calibrate and interpret efergy readings? Or was this information simply not available through your site?


Top
 Profile  
 
 Post subject: Re: Cannot get a reading from Efergy
PostPosted: Fri Jul 13, 2012 10:20 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7479
Hi hardya,

I'm sorry I didn't explain properly, when I said the sensor was on the board I didn't mean the sensor itself, but the electronics to power and read it, the sensor must be wired to the connector.

We don't have a calibration document because, sincerely, we haven't had the necessity of it, you are the first customer who asks for it, but I can give you some guidance about our procedure we have followed when we have had to set it in a project (you'll need some AC current source for it).

First of all, select your measurement range and calculate the necessary load resistor by this approximation:

RL = 2V * 1500 / (Imax);

Where Imax is the maximum current to be measured and RL is the load resistor (take into account that the minimum resistor is 40 ohms and it must be defined in multiples of that minimum).

Set the load resistor and get a measurement for that current, checking that the result is around 2V.

Get some intermediate values to carry out the approximation. We usually take three intermediate values (Imax*0.25, Imax*0.5 and Imax*0.75) and approximate the function by a second order polynomial, but depending on the accuracy you need a linear approximation between does points may also work.

Regards.


Top
 Profile  
 
 Post subject: Re: Cannot get a reading from Efergy
PostPosted: Fri Jul 13, 2012 11:24 am 

Joined: Wed Dec 14, 2011 11:02 am
Posts: 120
Thank you for your explanation it is appreciated, however to clarify...

Quote:
We don't have a calibration document because, sincerely, we haven't had the necessity of it, you are the first customer who asks for it, but I can give you some guidance about our procedure we have followed when we have had to set it in a project (you'll need some AC current source for it).


At the time of my previous post enquiring about calibration, I had not even seen any available document or an api browser entry indicating any functions which even provided the possibility of calibration for my version of the board, let alone details of how to use them. Indeed the api browser still does not include that interface and the guide for the board is only available if you realise you need it and request it directly. I was therefore starting my previos post from a bad place only having half finished bits of forum threads etc and no proper documentation.

Once I had followed the link you provided to the correct document, I started my own investigations into how best to calibrate and came to very similar conclusions to those you have just sent me.

Because you had indicated in your complaint email to me that your doucmentation was "really long and complete" and that one should contact only "after a good personal study and several", I spent very many hours searching for the right guide and api documentation for my version of the sensor board, where as in reality I would never have found them because they were really not available to me and I would never find them without asking. I don't think it was a good idea to remove old doumentation only a few months after upgrading your board.

Any way, no worries. Thank you for looking into this for me, I do appreciate it and I am keen now to progress, hopefully now with fewer questions.

Out of interest, can you tell me when you expect your api browser to be up to date and when you will provide navigation on your site to previous board documentation, just inacse there may be other doumentation I am not aware of that I need?


Top
 Profile  
 
 Post subject: Re: Cannot get a reading from Efergy
PostPosted: Mon Jul 16, 2012 11:55 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7479
Hi hardya,

we are working on it in parallel with other research and development issues, so we cannot give you a definitive date, we hope iteverything will be ready in a couple of months.

Regards.


Top
 Profile  
 
 Post subject: Re: Cannot get a reading from Efergy
PostPosted: Wed Aug 08, 2012 6:03 pm 

Joined: Wed Dec 14, 2011 11:02 am
Posts: 120
I am trying to configure Efergy but with a maximum primary current of 8A and a load resistence value of 360 I see little more than 0.25 resultant value from a call to SensorSmart.readValue(SENS_SMART_EFERGY);

I realise approximation is expected, but I had expected something a little closer to 2v and intervening values (very) roughly in between 0 and 2.

At intervening primary current values eg 2A, 4A, 6A one gets very roughly linear values and I had expected to need to make adjustments, but they are all still below 0.25

Even gradually and repeatedly increasing the load resistance by 40 each time and eventually to very great value, the resultant voltage never ever reaches 2v and starts to exceed 0.25 by only a very little.

Any help or advice would be greatly appreciated.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 5   [ 46 posts ]
Go to page 1, 2, 3, 4, 5  Next


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use