Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Current sensing and feeding value to micro controller

Status
Not open for further replies.

withloveshyam

Junior Member level 2
Joined
Mar 1, 2010
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,472
Hi ppl
I want to measure the current(AC) consumed by home appliances like Refrigerator, TV and then send the value to a microcontroller.
This is for home automation project.

For measuring current i think i can use current sensor like this https://media.digikey.com/pdf/Data Sheets/CR Magnetics Inc PDFs/CR9500 Series.pdf

Is this the correct method?

If so then how do i send the value to a microcontroller.

The current sensor will send the value to the microcontroller every second. How will the microcontroller take in the value?

Can i code the microcontroller to take the input value for every second or like for every 15 seconds..Is that possible?

Thanks.

Also let me know if any other better methods are available to sense current and send toe the microcontroller.
 

use an analog input of your micro:
the current sensor returns a voltage (0-5V) which is proportional to the current passing through the sensor...
 

Hi thanks for the reply

Do u mean the ADC input of a microcontroller.

Will giving the value to that input convert the analog value into a Digital value and store it in the memory of the microcontroller.

Also if possible kindly lemme know what current clamp sensor can be used in my case.

AS there are many current sensors available in the market which displays the value of current like this
https://www.google.com/products/catalog?q=current+clamp&cid=9049632966508792446&sa=title#p

But i am not sure which current sensor will have a output port to pass the value to the input of the microcontroller.

I want the microcontroller to get the value from the current sensor...

thanks
 

Just for your info: do not make crossposts asking for the same question:


- - - -

It seems you have not a clear idea regarding your requirements:
in your first question you are asking how to interface a CURRENT SENSOR to a microcontroller: because its signal is proportional to the current (0-5V) you have only to read its value with an analog input of your microcontroller (it would be better if your ADC resolution is 10 or 12 bit). Once done this, you can scale it accordingly to a referenece and you will get the current consumption of your device.

In your second request you talk about a clamp ammeter: this is an intrument, not a current sensor and I think it will be a bit difficult to interface it to a microcontroller, unless it has a serial port interface.

But please remember that you are comparing apples with oranges: one is a sensor, the latter is an instrument.
Because it seems you are a bit confused, I suggest you to buy a cheap device like a Kill-a-Watt:
http://www.thinkgeek.com/gadgets/travelpower/7657/
http://www.p3international.com/products/consumer/p4320.html
http://www.p3international.com/products/special/P4400/P4400-CE.html
http://www.p3international.com/products/p4460.html
http://www.thinkgeek.com/gadgets/electronic/7acf/
and to test it to try to understand what are your REAL requirements.
Once done, you are welcome to come here with more questions....

BTW, if you are looking for current sensors, I suggest you to visit the LEM website: they are one of the most important producer of current sensors:

**broken link removed**
see also some of the different technologies used to sense current:
 
Hi
THanks much for the reply.

I am sorry, I actually thought them to be the same..

Also sorry about posting the topic on another forum. I thought that to be a power related issue so i did that.

I actually need a current sensor only.

But in this case(link that u had sent me)
**broken link removed**

How do i happen to sense the current of the real world appliance..If we have current and neutral wires seperately then i can pass one of the wires through it and measure.

But in home appliances we have them both being together with outer insulation right. How do i split the wires then?

I think if we pass the wire as such through the loop it will show zero as they ll tend to cancel the magnetic fields.

thanks
 

You are completely right: if you try to use a clamp meter on a "appliance" cable, you will get a 0 value!
You are obliged to put your sensor/instrument only on one of the two mains cables (neutral or live, it is unimportant).
What I suggest you is to prepare a small "device" composed by a male and female plug/socket and with the 3 cables connecting them without the OUTER insulation (single wire insulation MUST be kept!!!): something like the attached picture:
 

thanks for the reply..i wish there be a ready made device for this purpose in the market...

i know there is AC line splitter available.

but this one is very thick that it can only be used for current clamp meter.

**broken link removed**

anyways thanks very much for the reply..

i ll get back to you if i had any other doubts.
 

I have checked the **broken link removed** you gave me (LEM): please remember that this is a CURRENT TRANSFORMER: and you need to "terminate" it with a resistance load. This is not one of the easiest way to measure current loads, especially if you are not used to those devices...
May I suggest you a different device line?
I have already used the **broken link removed** line of sensors and they require a single (+5V) power supply (instead of the typical +-15V)
The LTS-R ones are really good and you can even set their sensitivity!
Please remember that those devices will return the ISTANTANEOUS current of your device: it is up to you and your micro to compute its RMS value.

[some minutes later]
it seems to me that your first choice can be simpler to use because it returns a DC voltage which is the mean RMS value of the load.
You have only to read its output value with an HIGH impedance input (> 1 MOhm).
 

hey sorry i am confused again now..just give me the link of the current sensor u r talking about...

i want the easiest way i can do it...

i will split the neutral and live line as u told....

sorry about that..
 

Sorry for confusing you....
There are several ways to measure power consumption of ac devices, some of them are:
1) Using an instrument like a multimeter (must be True RMS) or a clamp ammeter: it is the easiest but in general you can't interface it to a microcontroller. BTW, in general it is the most expensive one.

2) Using current transformer (TA) like the ones in this **broken link removed**: they can be used only with ac current (NOT for dc): their output is an ac voltage proportional to the current drawn by your load. It is up to you to (if needed) rectify this signal and to sample it. In general you combine the current value with the mains voltage, so you can calculate the wattage/power factor of your load. This require some calculation and not all of the microcontrollers can be up to it. All depends on your precision requirements.

3) You can use a sensor like the ones in this **broken link removed**: they are like TAs (see 2) but they can sense also dc currents. They require an external power supply but they are more linear then TAs and in general they are more practical to use. In general they are VERY fast (more than 100kHz bandpass). As with TAs you will need to make several calculations to get a good estimation of the real value you are analyzing.

4) You can use a sensor like the one in this link: it seems the simpler one to use. It does not require an external power supply, it returns a voltage (0-5V) which is proportional to the current drawn by your load. The returned value is a MEAN of the RMS value of the drawn current. I think this sensor is more expensive than the ones in 2 and 3. I have also some doubts on its linearity with really low loads, but I can't be sure for all.

5) you can use some specific ICs made exactly for measuring power: among several producers, Analog Devices sells some of them. They have a very good linearity (best than several expensive instruments) but even if they are really interesting, I have never used them, so I can't tell much.

6) use a device like the "Kill-a-Watt": I do not think you will be able to get something cheaper. Unfortunately they come ready made... :wink:

There are other ways to measure an ac load, but the previous ones are the most used (to my knowledge).

[some minutes later]
I forgot to mention the Rogowski Coil....
 
hi thanks very much for the detailed reply.

But i am going to ask u some basic doubts now as i am not familiar with the electrical devices.

I am going to go with the option 4.

1)But it says its self powered so does it mean that we jus need to pass the wire through the loop and it will give the output 0 to 5V?? no other connections are required???

2)Then i see a wire going out of the sensor..Is that the wire which gives the output voltage?

3)Then how do i decode the current value from the voltage value..Will that be given in the manual..

I mean the the value of current for a particular output voltage value.

thanks
 

I do not know the inner details of the sensor at (4) because the producer's site is awful!! I was not even able to find the data sheet of the CR9500 series on their site!!!!
BTW, if you refer to the first .PDF in the data sheet: **broken link removed** you will see how to connect your sensor...
Maybe the connections will be different (wires instead of screws) but the result will be the same.

1) Yes, you do not need to power your sensor. This one is the reason for my doubts of its linearity at very low loads. You did not say what are your requirements regarding precision/lowest_value/highest_value you want to read, I'm not sure if this device is the correct choice.

2) Yes. You have to read this voltage with an high impedance input (> 1 MOhm): by default the typical input impedance of an ADC on a micro is about 100KOhm, so you will need to buffer the output voltage, otherwise your results will be wrong.

3) The output value of the sensor is proportional to the MEAN of the RMS current of your load.
Example: you are using a 20Aac full scale sensor; its output at 20Aac is exactly 5.0Vdc.
If the load is 10Aac, the output voltage will be 2.5Vdc (5V/20 * 10)
If the load is 2Aac, the output voltage will be 0.5V (5V/20 * 2)
If the load is 100mAac, the output voltage will be 0.025V (5V/20 * 0.1)
If the load is 10mAac, the output voltage will be 0.0025V (5V/20 * 0.01)

I'm assuming you are living in the USA (CA), so your mains voltage should be 115Vac. If you want to measure very low loads (1-2W) the output voltage of your sensor will be VERY low (few millivolts) and you will have troubles to measure it correctly!

Please also remember that measuring the current of a load does NOT require to know its supply voltage!
Only if you want to compute the wattage of the load you have to know the supply voltage.

Unfortunately, as I have already wrote, I really do not know your exact requirements (precision/dynamic/...) so it is a bit difficult to try to help you... :(
 

HI
thanks again.

Even i am not sure of the precision.

The project we are into is to avoid overload of the electrical appliances in the home. So that we can cut off the power to the device if there is a overload.

Then we are automating the home appliances using a home server which uses zigbee protocol to control the individual devices. every individual device will have a microcontroller and a zigbee transceiver to transmit the current consumed to the home server. It also receives the command from the home server to shut down the device in case the user wants to do so.

THe user can operate the home server from a distant place through internet.

This is our project.

So in case i need to avoid overload of appliances like refrigerator then i think i need to see if the current consumption goes beyond a particular value. I think i can get those specs from the appliance website.

kindly offer ur views.

Added after 14 minutes:

Also can i use an external resistance to keep the resistance to 1 megaohm...if i connect 1 Mohm to the microcontroller adc input, will that be fine?
 

If you need to use SEVERAL sensors and your requirements are for avoiding overloads, my suggestion is to use TAs (2): their price is the lowest of all sensors!!!
Take as an example the following Digikey code:
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=237-1103-ND its price is 2.89 for 1 piece.
The device you are suggesting is about 34USD: more than 10 times the price for a TA!!!
If you buy such TA from the producer and not Digikey, its price can be not more than 1/1.5USD.
I think the savings can be enough to spend some time in developing some firmware which can manage your TA...

See attachment on how you can use a TA connected to your microcontroller ADC: Rload is dependent on your TA.

[added some minutes later...]
Also can i use an external resistance to keep the resistance to 1 megaohm...if i connect 1 Mohm to the microcontroller adc input, will that be fine?
Sorry, but the answer is NO.
I think you have to ask to some of your colleagues who I think are more fond on electronics, to explain the reasons for a "buffer".
 
Thanks... I ll work on it and finalize...I ll let you know once i am done finalizing.

thanks for all ur help and guidance.
 

hi
i have gone through the attachment u sent on "how to connect the TA to the micro controller's ADC" in your previous post.

I had some doubts in it, like what is
1) 4K7
2)120k 1%(what does 1 % mean)
3)say if i am using the same TA u have told me in ur last post then what can be the approximate value for Rload?

Then when i downloaded the datasheet of the TA u mentioned in ur last post it say the typical output is 110mv.

So will the range here be 0 to 110 mv instead of 0 to 5 V that we were talking in the previous posts?

Thanks
 

The schematic I posted is JUST a generic way to interface a TA to a micro: nothing more, nothing less...
So you have to take it ONLY as a SUGGESTION on how to use a TA: it was extracted from a working schematics; the specific TA is custom and now (I'm at home) I have no info about its characteristics.

1) The 4.7k resistor+the 10nF capacitor act as a low pass filter. It will filter some noise which can be for certainly on the signal.

2) 1% means the tolerance on the resistor.

3) If you take a look at the TA documentation, you will see that the load resistor (burden) is 60 Ohm.

4) The typical output is 110mv/A, not 110mV!!! So, with a load of 10A, the output will be 1.1V. I think this value is Peak-Peak (not RMS).
So, with a load of 30A, the maximum span will be 3.3Vac

Please remember that this circuit will give you a 2.5V when there is no load connected.

What I suggest you to do is:
1) buy one of those TA
2) connect the primary of the TA to your load ad the secondary to the shown schematic (use a 60 Ohm resistor as Rload)
3) apply different (calibrated*) loads to the circuit and measure with an oscilloscope if the output voltage is Pk-Pk or RMS.
4) Once characterized your TA, you can write a software routine which samples your TA and returns the applied current.

*) you can use some light bulbs (filament) with different wattage to test your circuit. I also suggest you to buy a good RMS multimeter to compare your reading with the circuit.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top