Help - Can't get Pi Sensor to read anything - Hair Pulling out

I have the CT Sensors hooked up to the raspberry PI and it WILL NOT display anything on the CSV file but 18,18,-127.50.  1st is 1st ct Sensor, 2nd is 2nd ct sensor, 3rd is the temperature sensor.

If I use an AC Line Splitter that has an X10 option on it and put the ct clamp around it, it reads fine.  What am I doing wrong?  Did I buy the wrong CT Sensor?

Link of one I bought:

http://www.ebay.com/itm/141690866804?_trksid=p2057872.m2749.l2649&ssPage...

Thanks for your time !

dBC's picture

Re: Help - Can't get Pi Sensor to read anything - Hair Pulling out

How did you "hook up" the CT to the RPi?  What software are you running on the RPi?  An RPi doesn't have a native analog input.

JBlackham's picture

Re: Help - Can't get Pi Sensor to read anything - Hair Pulling out

This is what I used:

Raspberrypi Current & Temperature Sensor Adaptor - emoncms compatible

http://www.ebay.com/itm/141683476414?_trksid=p2057872.m2749.l2649&ssPage...

 

It will work if I use an AC Line Splitter with 10X Magnification.  Else it won't work.

Bill Thomson's picture

Re: Help - Can't get Pi Sensor to read anything - Hair Pulling out

Here's another link to the RasPi Current & Temp sensor that JBlackham used:

http://lechacal.com/wiki/index.php/Raspberrypi_Current_and_Temperature_Sensor_Adaptor

The page gives some tech specs and a How-To, on reading data from it.

Slick little device, but it reads only apparent power.

Excerpt from the page: Default Voltage for power calculation: 240V (can be modified in firmware)

JBlackham's picture

Re: Help - Can't get Pi Sensor to read anything - Hair Pulling out

Thanks Bill, so is this the wrong device and wrong setup to be measuring the AC Mains with?  The person I bought it from modified the firmware so its 120V.  Is there a better CT Meter to use instead?

Bill Thomson's picture

Re: Help - Can't get Pi Sensor to read anything - Hair Pulling out

Not the wrong device, just not the optimal one. Your electric utility meter measures, and you pay for, real power, this device measures apparent power. The two values are only the same with regards to a resistive load, like an electric heater. Toss in a motor, say an air conditioner, swimming pool pump, refrigerator, etc. or a switching mode power supply like those found in computers and electronic items, and the apparent power/real power values become significantly different. Hence, the reading you get, isn't representative of the energy you're consuming.

The emonTX measures real power, and would indeed be a better choice.

If you search the site for emonTX, you'll find lots of info about it.

 

 

JBlackham's picture

Re: Help - Can't get Pi Sensor to read anything - Hair Pulling out

Well at this point I can't even get it to read anything :(

Bill Thomson's picture

Re: Help - Can't get Pi Sensor to read anything - Hair Pulling out

If I use an AC Line Splitter that has an X10 option on it and put the ct clamp around it, it reads fine.

 

When you're not using the line splitter, are you attaching the CT to a cable with two or more wires in it?

If so, you need to break out the line or the neutral wire and attach the CT to either one, but not both.
(or use your line splitter)

It didn't hit me right away that you mentioned it worked when you used the splitter. Then it dawned on me, that's probably why you're not getting any readings without the splitter. The CT reads the magnetic field generated by the current flowing in the wire. The magnetic fields of the line and neutral are opposites, so if you have the CT around both the line and the neutral, the magnetic fields cancel each other, and you get no reading.

 

JBlackham's picture

Re: Help - Can't get Pi Sensor to read anything - Hair Pulling out

Bill you may laugh at me and that's fine.  It seems like with life its always something stupid that is overlooked.  So the CT Sensors I bought have REALLY REALLY cheap pieces of plastic right below the jack part of it.  I have complained a bunch to the seller on ebay about them that I got them.  Its like they tried to save money on the sensor by putting the cheapest piece of plastic on the jack.  Problem was the jack was a little bit over the plug and when I pulled it back and pushed hard into the board I heard a click.  Then boom I started getting data.

Its interesting seeing the data as I have an Enerati Sensor which by the way is a total POS.  The company went belly up and I got stuck with garbage.  Which is a whole other story by itself and why i didn't want to go with a 3rd party build solution.  Anyways the data I am seeing looks a whole lot more accurate than what the Enerati one is reporting.  I do see the problem you mentioned about not having the PI directly tied to the 120V source.  It can't read the power factor and thus can't really decipher apparent from real power?  At least that is what I understand.

The emonTX looks interesting but I am a little nervous about being tied down to something like I was with Enerati before.  I like having total control over the thing.

By the way I see in the Raspberry PI Output the power from each leg:  907,875

Included picture.

 

 

 

 

Bill Thomson's picture

Re: Help - Can't get Pi Sensor to read anything - Hair Pulling out

Bill you may laugh at me and that's fine.  It seems like with life its always something stupid that is overlooked.  So the CT Sensors I bought have REALLY REALLY cheap pieces of plastic right below the jack part of it.  I have complained a bunch to the seller on ebay about them that I got them.  Its like they tried to save money on the sensor by putting the cheapest piece of plastic on the jack.  Problem was the jack was a little bit over the plug and when I pulled it back and pushed hard into the board I heard a click.  Then boom I started getting data.

Don't feel like the Lone Ranger, it happened to me too, and I've been an Electronics Tech since '74! There's been at least a couple of other instances I can remember reading here on the forum, where the "plug not pushed fully home" has bitten someone.

The EmonTX is good stuff. I've built an emonTX v2, and v1.4 of the emonGLCD. Both of them have run for two years without any issues.

Make magazine says "you don't own it if you can't change it." The OEM project is open source, both software and hardware, so changing it isn't an issue as it would be with a commercially copyrighted product.

 

I do see the problem you mentioned about not having the PI directly tied to the 120V source.

That would actually be dangerous. The emonTX uses an AC-AC adapter (wall-wart) for isolation from the mains,but yes, you're otherwise correct about your sensor being unable to read real power.
Sounds good to here you got 'er going.

 

 

Robert Wall's picture

Re: Help - Can't get Pi Sensor to read anything - Hair Pulling out

"It can't read the power factor and thus can't really decipher apparent from real power? At least that is what I understand."

That's right. "Cheap" systems - and some not-so-cheap ones - rely on the constancy of the mains supply voltage and the fact that most heavy domestic loads are close to being purely resistive. When you do that, you can make assumptions and measure only current. It makes it easy for the non-technical user because they just clip a CT over a wire, plug it in to a transmitter, plonk the receiver/display on the shelf, tell it the nominal mains voltage and they're in business.

The trouble with that is it's only guessing real power. If the assumptions are wrong, so are the numbers. To get over all those assumptions, the emonTx actually does the same sums that your supplier's meter does: it reads voltage and current around 40 times for each mains cycle (for you, 50 for us), multiplies them together and computes the average. And that number is genuine real power. At the same time, it also computes the separate rms averages of voltage and current and from those it calculates the apparent power (and even that is more accurate than something that guesses the voltage and assumes it's constant all day, every day). Then knowing real and apparent power, power factor is easy - it comes straight from the definition (and that's NOT cos(φ))!

[Edit]
It may be possible to alter that add-on board to accept a voltage input. It's probably using much the same input circuitry as the emonTx, and the voltage input on that is very similar to the current input, the only real difference is the current input has a low-value burden resistor whereas the voltage has a voltage divider, but both feed roughly the same voltage into the ADC.

JBlackham's picture

Re: Help - Can't get Pi Sensor to read anything - Hair Pulling out

I guess I am going in a new direction now with all of the information you all have given me.  I could use some advice.  I have a ton of Raspberry PI's because I love to code on them.  I want something that will be accurate and not flaky like the Enerati system is.  I am fine with going with anything.

Would I be better off than buying the EmonTX and have that communicate back with one of the RaspBerry Pi's and just buy the RF kit that talks to the EmonTX for the PI?  Or should I just get the EmonPI, or can I just get the parts for the EmonPI and use one of the Raspberry PI's I already have?

I think I would rather pay a lot more than go thru the pain and suffering I have already been dealt.

I live in the U.S.  A lot of these seems built for the UK and I am not sure how easy they will work in the states.

I am thinking of the following:

RFM69PI and use with one of my existing PI's.

EmonTXV3 for the breaker box.  

Any suggestions/thoughts on that design?

Robert Wall's picture

Re: Help - Can't get Pi Sensor to read anything - Hair Pulling out

You're right that all the hardware and software is designed primarily for the UK. There's a page of information about using the emonTx system in the USA, and I'm sure Bill will join in, as he has direct experience.

I'm not totally sure of the direction we are going, certainly I'm not aware of any intention to move away from the emonTx - emonBase - server - emonCMS concept, it just where the physical boundaries are located. The emonPi puts all four entities/devices in one box, whereas if you go the emonTx route, you start separating them out. But I've got to be very careful not to over-simplify: The emonPi can function as an emonBase and send to a server on the your LAN or the Internet as well as hosting a server locally, and the RPi + RFM12Pi is the same - in effect it's an emonPi without the emon. Both can listen on RF for an emonTx.

I'm not sure that you can buy an emonPi without the Raspberry Pi filling ( ! ), but if you want to go that route, email the shop and ask.

Otherwise, if you've got a spare Pi, you plan looks to be the way to go.

Bill Thomson's picture

Re: Help - Can't get Pi Sensor to read anything - Hair Pulling out

I live in the U.S.  A lot of these seems built for the UK and I am not sure how easy they will work in the states.

I'm in the US too. The only hardware change I had to make was the CTs and burden resistors.

If you search the forum for US, or USA, you'll find a few others in the US that use the OEM system, or parts of it.

Here's an article Robert wrote about using emonTX in North America:
openenergymonitor.org/emon/buildingblocks/EmonTx-in-North-America

I have a ton of Raspberry PI's because I love to code on them.
Would I be better off than buying the EmonTX and have that communicate back with one of the RaspBerry Pi's and just buy the RF kit that talks to the EmonTX for the PI?  Or should I just get the EmonPI, or can I just get the parts for the EmonPI and use one of the Raspberry PI's I already have?

Since you have lots of RPis, it makes more sense monetarily, to buy an emonTX and Radio module for the Pi. That was the route I went, since I had three RPis at the time.

If you prefer, or need, a single package, i.e. an all-in-one unit, then you might want to buy the emonPi. From what I've seen in the shop, the emonTX component of the emonPi isn't available separately.

An additional aspect of the OEM system is the emoncms software. I've seen some mighty nice things folks have done with their dashboards. For example: http://167.114.114.94/emoncms/meter

As with the rest of OEM, emoncms is open source too.

To top it all off, there's support here on the forum quite unlike any I've seen elsewhere.
Read that as "much better than many companies I've dealt with"

 

JBlackham's picture

Re: Help - Can't get Pi Sensor to read anything - Hair Pulling out

You all have been so awesome and helpful.  I ordered the emonTX and the RF Adapter for the PI.  I may come back and ask for some help on it.  

I am getting power with the ct clamps and its about 10% off from what the meter is.  I am guessing that is the real power vs perceived power problem.  

Robert Wall's picture

Re: Help - Can't get Pi Sensor to read anything - Hair Pulling out

Or it could be a calibration problem. If you've got the necessary meters (current and voltage), you can adjust the calibration coefficients in software to get it right. Ultimately, it's right when it agrees with your supply tariff meter - people have claimed agreement within 1% after they carefully tweaked the calibration over an extended period.

Comment viewing options

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