RDS
Posts: 739
Joined: Tue Oct 06, 2015 8:17 am
Location: Lancashire, UK

Detecting Electric Current

Fri Feb 26, 2016 8:57 am

I have one of those devices that clips around a Household Mains Consumer Unit Cable and detects if current is flowing.
How could I connect this item, that just has 2 connections, to my Model B Raspberry 2 Pi, to enable the Pi to Display the output.

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Detecting Electric Current

Fri Feb 26, 2016 8:59 am

DO you have a datasheet or at least a model number?

RDS
Posts: 739
Joined: Tue Oct 06, 2015 8:17 am
Location: Lancashire, UK

Re: Detecting Electric Current

Fri Feb 26, 2016 10:05 am

Thank you for your response.
It has a Part Number CMA113, made in China.
It is part of an Owl set and normally plugs into a Master device also Owl, Part Number CMR119.

User avatar
PeterO
Posts: 5623
Joined: Sun Jul 22, 2012 4:14 pm

Re: Detecting Electric Current

Fri Feb 26, 2016 10:57 am

A bit of googling turned up this : http://www.fowlerelectronics.co.uk/owld ... iption.htm which suggests it is simply a current sense transformer with an analogue output.
This means some additional electronics will be needed to interface to the PI's digital GPIO pins.

Note: There is no explicit mention of the model number of the current sense device used, so it could be that this is not relevant.
But I just found this photograph http://www.fowlerelectronics.co.uk/owlcircuitboard.pdf which shows what looks like the same design of sensor.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Detecting Electric Current

Fri Feb 26, 2016 11:32 am

I think they are sold only as a complete system. Or rather you can buy the parts individually but only to connect to each other. So they don't publish how each of the individual bits work. At Peter O says, it will be an analogue output but we have no idea what size it will be or how it varies. The only way to find out would be to put it on an oscilloscope and generate a full calibration curve.

drgeoff
Posts: 10321
Joined: Wed Jan 25, 2012 6:39 pm

Re: Detecting Electric Current

Fri Feb 26, 2016 6:07 pm

Detecting != measuring.

Which do you want to do?

RDS
Posts: 739
Joined: Tue Oct 06, 2015 8:17 am
Location: Lancashire, UK

Re: Detecting Electric Current

Fri Feb 26, 2016 7:37 pm

drgeoff wrote:Detecting != measuring.

Which do you want to do?
Interesting question. A bit of both I suppose.
I have solar panels fitted and I want to make sure I take full advantage of any Electric generated, rather than exporting it. I am thinking of fitting an additional Hot Water storage tank, with (say) a 1kw immersion heater so I am looking at how / when to switch it on and off automatically.

User avatar
DougieLawson
Posts: 37571
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Detecting Electric Current

Sat Feb 27, 2016 9:56 am

Replace your cost meter with one of these: http://www.currentcost.com/product-netsmart.html that unit that includes a USB interface so you can collect the data. They're also fully up to speed with supporting Raspberries.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

boyoh
Posts: 1415
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Detecting Electric Current

Mon Feb 29, 2016 4:04 pm

I understand how a solar panel system works, But no Idea of the costing/ saving.
Are you wanting to cancel out what your Inverter would be feeding into the Grid
to heat water with a 1Kw Emerson heater in a cylinder. The normal size Emerson
Heaters are 3kw , so a cylinder 1/3 the size of a normal cylinder would be needed
Would it be a cost saving Idea, I think you will be wasting energy just keeping the
the water temperature up, if you are not using much hot water. It would have to be
switched of at night, and you would be starting with a cold tank in the morning.,
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

RDS
Posts: 739
Joined: Tue Oct 06, 2015 8:17 am
Location: Lancashire, UK

Re: Detecting Electric Current

Mon Feb 29, 2016 6:11 pm

Hi Boyoh
To try and answer your question.
I am aiming to use all (or even some) of the excess energy that my Solar Panels generate, rather than feeding back into the grid.
I currently have a Hot Water storage tank which is feed from the mains cold water supply and heated from my Gas Central Heating Boiler. My plan is to have an additional hot water tank that would be heated (or even just the chill taken of the water) between the mains supply and my existing tank. This should mean that the existing Hot Water tank is fed with pre-heated water, rather than cold. I don't expect it to achieve normal Hot Water temperature before being fed into the existing tank but any heat at all would reduce the amount of Gas required.

In order to make this at all feasible, the cost of making the change needs to be kept to an absolute minimum.

boyoh
Posts: 1415
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Detecting Electric Current

Mon Feb 29, 2016 8:26 pm

I see your point , using pre heated water to supplement you hot water cylinder.
Can I suggest fitting the 1Kw element in you existing hot water cylinder,
eliminating extra tank and pipe work, and keeping cost down
The water temperature in the cylinder would con troll the 1Kw thermostat
This would switch back on when the water temperature drops. This could
be don using trial & error
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

RDS
Posts: 739
Joined: Tue Oct 06, 2015 8:17 am
Location: Lancashire, UK

Re: Detecting Electric Current

Mon Feb 29, 2016 10:38 pm

boyoh wrote:Can I suggest fitting the 1Kw element in you existing hot water cylinder
I did consider that option but the existing cylinder already has a 3kw Immersion Heater and I have already accumulated (over the years) all the bits for additional cylinder with the exception of the 1kw Heater.

RDS
Posts: 739
Joined: Tue Oct 06, 2015 8:17 am
Location: Lancashire, UK

Re: Detecting Electric Current

Mon Feb 29, 2016 10:41 pm

rurwin wrote:The only way to find out would be to put it on an oscilloscope and generate a full calibration curve.
I have been looking at that oscilloscope 'HAT' that you can get for the Pi. Would that be suitable for this test?

gbru316
Posts: 4
Joined: Tue Mar 01, 2016 3:47 am

Re: Detecting Electric Current

Tue Mar 01, 2016 4:06 am

PeterO wrote:A bit of googling turned up this : http://www.fowlerelectronics.co.uk/owld ... iption.htm which suggests it is simply a current sense transformer with an analogue output.
This means some additional electronics will be needed to interface to the PI's digital GPIO pins.

PeterO
Why not just use an analog input pin (assuming you drop the voltage to within pin limits)?

drgeoff
Posts: 10321
Joined: Wed Jan 25, 2012 6:39 pm

Re: Detecting Electric Current

Tue Mar 01, 2016 8:21 am

gbru316 wrote:
PeterO wrote:A bit of googling turned up this : http://www.fowlerelectronics.co.uk/owld ... iption.htm which suggests it is simply a current sense transformer with an analogue output.
This means some additional electronics will be needed to interface to the PI's digital GPIO pins.

PeterO
Why not just use an analog input pin (assuming you drop the voltage to within pin limits)?
Because an RPi does not have an analogue input pin.

Anne Droyd
Posts: 1
Joined: Sun Feb 28, 2016 5:32 pm

Re: Detecting Electric Current

Tue Mar 01, 2016 10:58 am

RDS wrote:I have one of those devices that clips around a Household Mains Consumer Unit Cable and detects if current is flowing.
How could I connect this item, that just has 2 connections, to my Model B Raspberry 2 Pi, to enable the Pi to Display the output.
Hi

I think that you may have a DC generated supply, and only after conversion is an AC supply. So the OWL may not be the best thing.

Efficiency wise, surely using the raw DC to power something will avoid losses incurred by the inverter. Perhaps batteries and DC lighting as per caravan or http://www.windandsun.co.uk/products/Li ... tV0_tCbyM8.

When the batteries are fully charged a Pi could detect this and sell the excess to the National Grid?

gbru316
Posts: 4
Joined: Tue Mar 01, 2016 3:47 am

Re: Detecting Electric Current

Tue Mar 01, 2016 1:27 pm

drgeoff wrote:
gbru316 wrote:
PeterO wrote:A bit of googling turned up this : http://www.fowlerelectronics.co.uk/owld ... iption.htm which suggests it is simply a current sense transformer with an analogue output.
This means some additional electronics will be needed to interface to the PI's digital GPIO pins.

PeterO
Why not just use an analog input pin (assuming you drop the voltage to within pin limits)?
Because an RPi does not have an analogue input pin.

Oops, you're right. But...an mcp3008 would fit the bill.

RDS
Posts: 739
Joined: Tue Oct 06, 2015 8:17 am
Location: Lancashire, UK

Re: Detecting Electric Current

Tue Mar 01, 2016 10:38 pm

@gbru316
I have just googled the MCP3008 and found a link to it's use with a Pi.
http://www.raspberrypi-spy.co.uk/2013/1 ... n-mcp3008/
Looks like just what I need, not only for this project.
Excellent, Thank you very much!

Secondary Question:
The above link shows a great diagram to describe the wiring for the project.
Does anyone know what software is used to produce such a diagram

User avatar
Douglas6
Posts: 4826
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Detecting Electric Current

Tue Mar 01, 2016 11:41 pm

Secondary answer: that's Fritzing. It's free, and I think available in the Raspbian repo.

User avatar
PeterO
Posts: 5623
Joined: Sun Jul 22, 2012 4:14 pm

Re: Detecting Electric Current

Wed Mar 02, 2016 7:12 am

RDS wrote:@gbru316
I have just googled the MCP3008 and found a link to it's use with a Pi.
http://www.raspberrypi-spy.co.uk/2013/1 ... n-mcp3008/
Looks like just what I need, not only for this project.
Excellent, Thank you very much!

Secondary Question:
The above link shows a great diagram to describe the wiring for the project.
Does anyone know what software is used to produce such a diagram
Until you have connected the output of the sensor to a meter or oscilloscope and have found the voltage it produces I would not connect it to anything. It is most likley that the signal will be bipolar (going both positive and negative) and will need active rectification and filtering to get an signal suitable for feeding into that ADC.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

RDS
Posts: 739
Joined: Tue Oct 06, 2015 8:17 am
Location: Lancashire, UK

Re: Detecting Electric Current

Wed Mar 02, 2016 8:17 am

@PeterO
OK, thanks will do. Earlier in the post I asked about the Pi Hat, that enables the Pi to operate as an Oscilloscope.
Would that be suitable. I have always wanted an Oscilloscope but have been put off by the high cost based upon the fact that I would not use it that often. This seems ideal, if suitable.

RDS
Posts: 739
Joined: Tue Oct 06, 2015 8:17 am
Location: Lancashire, UK

Re: Detecting Electric Current

Wed Mar 02, 2016 8:18 am

@Douglas6
Thanks. I will look that up.

User avatar
PeterO
Posts: 5623
Joined: Sun Jul 22, 2012 4:14 pm

Re: Detecting Electric Current

Wed Mar 02, 2016 8:29 am

RDS wrote:@PeterO
OK, thanks will do. Earlier in the post I asked about the Pi Hat, that enables the Pi to operate as an Oscilloscope.
Would that be suitable. I have always wanted an Oscilloscope but have been put off by the high cost based upon the fact that I would not use it that often. This seems ideal, if suitable.
Probably, but without a link to details I can't say Yes or No.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

RDS
Posts: 739
Joined: Tue Oct 06, 2015 8:17 am
Location: Lancashire, UK

Re: Detecting Electric Current

Wed Mar 02, 2016 12:04 pm

PeterO wrote: Probably, but without a link to details I can't say Yes or No.

PeterO

This is a link to the Instruction manual
http://www.farnell.com/datasheets/1870660.pdf

User avatar
PeterO
Posts: 5623
Joined: Sun Jul 22, 2012 4:14 pm

Re: Detecting Electric Current

Wed Mar 02, 2016 4:10 pm

As long as the output of the sensor doesn't exceed the 30 volt maximum it should be fine. The circuit I linked to earlier would suggest the signal is less than 7.5V peak. So you probably need to connect it to an AC voltmeter to see what reading that gives (and don't forget any RMS to Peak convertion).

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Return to “Beginners”