Pages: [1] 2   Go Down
Author Topic: current/voltage sensor?  (Read 5007 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,
 
I have an arduino controlling some home appliances (220v) with some relays, via I2C.
When each relay is closed, these appliances may be consuming power or not, because each one of them have their own switch (some are floodlights with presence detector, water boiler with its own thermostat, etc.).
 
I'd like to know when the appliances are really on (consuming power), because turning it on with the relay cannot tell me for sure (their internal switch may be on or off). For each appliance I have an output port, driver and relay, and will have an input port that should tell if the appliance is consuming or not.
 
I used some ACS712 kits connected to a PCF8591 (I was planning to know if the appliances were on/off by reading the value on each ADC port). There are kits of 5, 10 and 20A. I tested a 5A kit, the datasheet says it will increase 185mv per Ampere. The appliance I tested is a 20w Led floodlight and therefore consumes around 90mA (220v AC). This means the ACS712 would increase 16mV when ON, which is difficult for the PCF8591 to notice any difference (8 bits). Also, since my appliances are AC, the output of the ACS712 is also variable (50 Hz).

So I gave up of detecting if the circuit is closed by current sensors, and I believe I need to approach this problem differently.
 
Basically I need a circuit that detects that the appliance circuit is closed (relay and internal switches) and then puts a digital pin at "1". I saw some ideas in the web with phototransistors, like the TLP620, but I'm not sure it could support voltages like 220V AC.
 
Any suggestion?
 
Thanks,
Joaoabs
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One way you may consider to detect if you device is drawing power on an ac load is to use a current transformer in series with the load.
It is like a shunt resistor used in current meters.  These have just a few turns of wire in the primary that wont effect your load (be it a light or heater etc.) .  You can also use non-contact current transformers that clamp over the wire and produce a small ac voltage when the device is drawing current.  To get a go / no go  signal from that to your monitor circuit, you can connect a (resistor and optocoupler) to the output wires from the transformer. 
Logged

Offline Offline
Sr. Member
****
Karma: 9
Posts: 296
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

jtech's advice is spot-on... especially since you're working with AC line voltages.

If this was a low voltage application, you can use a 0.1ohm resistor and read the voltage drop across it, using some ohms law compute for current. But this is not advisable if you'll be doing this with high voltage AC.

Mouser sells current transformers starting at $1 each, and going up from there. They have 20A primary rated costing less than $2.50 each.
Logged

0
Offline Offline
Shannon Member
****
Karma: 159
Posts: 10409
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, current transformers are much less noisy than the hall-sensor ACS712 - however you must be careful with
current transformers, they must have the secondary correctly terminated to prevent high voltages.   Many home electricity
monitors come with optional / spare current transformer sender modules - probably available on eBay too.
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

Thank you for your answers.

I was thinking having a voltage detector rather than a current sensor, because I want a circuit that can be suitable for currents from 90mA to 2A AC. Anyway, this solution based on the current transformer seems good.

Would it work with any type of transformer? Could I use a led driver like this?

http://www.ebay.co.uk/itm/3-1W-220V-LED-Drive-Power-LED-Constant-Current-Power-Supply-/390564184347?pt=UK_BOI_Electrical_Test_Measurement_Equipment_ET&hash=item5aef70811b

Thank you,
Joaoabs
Logged

Montreal
Offline Offline
Edison Member
*
Karma: 22
Posts: 2483
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I designed 2$ current sensor, look in part 2-1, see if you may find it useful:
http://coolarduino.wordpress.com/2013/02/08/power-meter/
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I have found on ebay a cheap non-contact voltage detector.
http://img.inkfrog.com/pix/gomepls/18252_3.jpg
I ordered one and it actually works: The led turns ON whenever its close to a wire with electrical current, and goes back OFF when its far away.

So I though: I'll just open it and re-use the circuit in my project, so I can detect whenever the relays are ON or OFF. I can measure the voltage drop on the LED in order to know if the detector circuit its detecting voltage or not.
I dismantled it and powered it with 3V to test (equivelent to the 2XAAA batteries that it uses).
https://www.dropbox.com/s/u9d8uy6s7dmjdy4/2013-06-12%2021.34.07.jpg

However, when is not fed by batteries, the LED is always ON, making the detection circuit useless. I tried back again with the AAA batteries and it works fine!

Am I missing something here? Any idea why is working with batteries and why is not working with a wired power supply?

Thanks,
Jooabs
Logged

Earth
Offline Offline
Edison Member
*
Karma: 41
Posts: 1382
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Cool!







Please trace the circuit to see if it use CD4069. then only D1, D2, D4 is needed, one CD4069 will be able handle 2 AC chanels.

http://www.fairchildsemi.com/ds/CD/CD4069UBC.pdf
« Last Edit: June 12, 2013, 09:13:01 pm by sonnyyu » Logged

Earth
Offline Offline
Edison Member
*
Karma: 41
Posts: 1382
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

However, when is not fed by batteries, the LED is always ON, making the detection circuit useless. I tried back again with the AAA batteries and it works fine!

Am I missing something here? Any idea why is working with batteries and why is not working with a wired power supply?

Use optocoupler to replace LED, this will be isolated between. Use isolated dc supply or wireless power module to power up the board. Use decouple cap at 3 V power. put small cap at input of IC for low pass filter.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Thanks for your reply. Yes, the circuit seems the same as the one you show. In my case, the IC is the 74HC14D.

However, when is not fed by batteries, the LED is always ON, making the detection circuit useless. I tried back again with the AAA batteries and it works fine!

Am I missing something here? Any idea why is working with batteries and why is not working with a wired power supply?

Use optocoupler to replace LED, this will be isolated between. Use isolated dc supply or wireless power module to power up the board. Use decouple cap at 3 V power. put small cap at input of IC for low pass filter.

What I don't understand is why should I replace the LED by an optocoupler. The circuit itself is contactless (It should only touch the plastic of the wire, not the metal), so why the need to isolate?
Also, could you please provide more details on "Isolated DC supply or Wireless power module"?  In my test I used a 220VAC/12VDC power supply, and then on the breadboard I used a step-down to 3V based on LM2596, like this one:

http://thmb.inkfrog.com/thumbn/geiliablestore/LM2596_001.jpg=450

So I think the 3V already have decouple capacitors, right?
How can I isolate further the power supply?
And finally, what is a wireless power module?

Thanks,
Joaoabs
Logged

Earth
Offline Offline
Edison Member
*
Karma: 41
Posts: 1382
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Isolated dc converter;-

Linear technology has nice video which last 4:37.
Isolated power supplies Linear

Improved Power-Supply Rejection;-

Maxim integrated has nice web page about it,

  • Second-order cascade RC ripple filter
  • LC Filter
  • An Additional Linear Regulator

Improved Power-Supply Rejection for Linear Regulators

in your case Linear Regulator will does better job than LM2596.

Wireless power;-



Buick cuts the cord: Riviera plug-in concept offers wireless charging

http://www.gizmag.com/buick-riviera-plug-in-concept/27172/

wireless power module,
Wireless Charging Module, Seeedstudio, $7.90


« Last Edit: June 13, 2013, 07:58:25 am by sonnyyu » Logged

Northwest Missouri
Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do a search on ebay for Arduino Current Sensor.   I was actually just looking for Arduino stuff and saw the current sensor modules.  I thought about getting this one:

http://www.ebay.com/itm/5A-20A-30A-Bi-Directional-AC-DC-Current-Sensor-Module-arduino-compatible-/111085883206?pt=LH_DefaultDomain_0&var=&hash=item19dd3c0f46

Michael
Logged

 Working on instrumentation amplifier for experimental rocketry to measure thrust and chamber pressure.  Could be used where instrumentation

Earth
Offline Offline
Edison Member
*
Karma: 41
Posts: 1382
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There are a lot ways detect AC, but OP's way is the most coolest way.



if concerned reverse voltage of LED, use diode or ac opto isolator instead.

Quote
You could probably eliminate three of the diodes because half-way rectification would be adequate in this case.
Yes we could, all we need add one electronic capacitor at output half-way rectification.

or use this



since we face 24V instead of 110V, cap could be droped.

second one use Optocoupler with AC Input.




buy one from ebay?



Opto Isolation 4 Input Channels, Ebay, $18.00



only half of it shown.
« Last Edit: June 13, 2013, 04:28:49 pm by sonnyyu » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do a search on ebay for Arduino Current Sensor.   I was actually just looking for Arduino stuff and saw the current sensor modules.  I thought about getting this one:

http://www.ebay.com/itm/5A-20A-30A-Bi-Directional-AC-DC-Current-Sensor-Module-arduino-compatible-/111085883206?pt=LH_DefaultDomain_0&var=&hash=item19dd3c0f46

Michael

Yes, I already tried similar sensors based on that same Allegro ACS712. However, for AC currents, the output will also be AC, and what I need is a logical "1" (or equivalent) so I can detect on a digital port. Check my initial post:


I used some ACS712 kits connected to a PCF8591 (I was planning to know if the appliances were on/off by reading the value on each ADC port). There are kits of 5, 10 and 20A. I tested a 5A kit, the datasheet says it will increase 185mv per Ampere. The appliance I tested is a 20w Led floodlight and therefore consumes around 90mA (220v AC). This means the ACS712 would increase 16mV when ON, which is difficult for the PCF8591 to notice any difference (8 bits). Also, since my appliances are AC, the output of the ACS712 is also variable (50 Hz).

So I gave up of detecting if the circuit is closed by current sensors, and I believe I need to approach this problem differently.
 
Basically I need a circuit that detects that the appliance circuit is closed (relay and internal switches) and then puts a digital pin at "1". I saw some ideas in the web with phototransistors, like the TLP620, but I'm not sure it could support voltages like 220V AC.
 
Any suggestion?
 
Thanks,
Joaoabs

Thanks anyway,
Joaoabs
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There are a lot ways detect AC, but OP's way is the most coolest way.



I had seen some schematics with similar approaches, but never quite understood how it works. Is it connected in series or in parallel? I have the feeling its in series...

My AC detectors should be able to detect if a 20W lamp is ON or OFF (low current), but also the same for an 2000W water-boiler resistor (~10A). Can these optocouplers handle such high currents? If they can, I believe I have my problem solved....

Looking at the datasheets of the PS2501 and PC817 (used on the board from ebay) there is the value of "forward current" and is ~1A....

Thanks,
Jabss
« Last Edit: June 13, 2013, 06:52:44 pm by joaoabs » Logged

Pages: [1] 2   Go Up
Jump to: