Author Topic: Mains/24VDC detection  (Read 5331 times)

0 Members and 1 Guest are viewing this topic.

Offline saintTopic starter

  • Contributor
  • Posts: 11
Mains/24VDC detection
« on: March 30, 2014, 07:57:52 am »
Hi,
first of hello to every one here at EEVBlog, special thanks to Dave for starting this great community.

Now on to my problem, part of my current project (AVR based 3V3) need to sense current (mains UE 230VAC) on 3 separate inputs. The current drawn by my detection circuit (below) is just few mA so most of the Hall sensors won't even detect it, meaning I'd have to run it threw amp and on to ADC input. The only Hall sensor that could potentially work is made by Melexis, sorry lost the partnumber somewere its range was 0...80 or 100mA. If there is a Hall sensor that would work just keep in mind that there are 3 detection circuits next to each other.
Any kind of relay mechanical (circuit needs to detect about 500k cycles/year) or SSR (fails colse, can't have that) is out of the question.
The only thing that I need is to know when the current is present don't need its value.
For now I'm using the attached circuit and it works just fine, the schematic only shows 1 of 3 identical circuits hence the  6-channel 7414. Right now I'm trying to moddify it so that it can also detect 24VDC. I am able to make it work in 24-230VAC range just by changing C8 value to something like 0.68uF but if I want to do DC detection I just omit C8 (in PCB assembly) and change the R11 to something like 2...7K. The solution is fine but I'd like the input to be universal AC/DC.
Hopefully someone out there has a brilliant idea or maybe I'm just missing some simple solution to this problem. Please don't suggest using trafo as it's bulky and would only work for AC.

Note: The pin 3 in C8 is there just to let me make a universal footprint for 2 capacitor packages
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2130
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Mains/24VDC detection
« Reply #1 on: March 30, 2014, 08:09:41 am »
Depending on what your peak load is, you could sense the voltage across a large value shunt resistor (that also has a pair of diodes across it to limit the peak voltage). The diodes will need to be large and heatsunk (P=~0.6v x I).

https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline saintTopic starter

  • Contributor
  • Posts: 11
Re: Mains/24VDC detection
« Reply #2 on: March 30, 2014, 08:17:31 am »
Depending on what your peak load is, you could sense the voltage across a large value shunt resistor (that also has a pair of diodes across it to limit the peak voltage). The diodes will need to be large and heatsunk (P=~0.6v x I).
Mains isolation is a priority so this won't cut it.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2863
  • Country: au
Re: Mains/24VDC detection
« Reply #3 on: March 30, 2014, 08:23:13 am »
Using 2 diodes in series (and just one in parallel but reversed) should give you enough voltage to drive the LED in an optocoupler.

You'd still need a series resistor for the opto LED (maybe 47R) of course.  That's assuming 1.4V drop across the 2 diodes in series and about 1.1V Vf for the opto LED.

I'm sure I did this a long long time ago to sense when a load was drawn on a 240Vac circuit.  I'd have to check what shunt resistor I used to stop leakage current turning the opto on.
 

Offline ptricks

  • Frequent Contributor
  • **
  • Posts: 672
  • Country: us
Re: Mains/24VDC detection
« Reply #4 on: March 30, 2014, 02:29:52 pm »
 Depending on the environment , a simple darlington pair of transistors can detect the load with no contact, it is generally how those pens that detect voltage by putting it near the wire work.
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2130
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Mains/24VDC detection
« Reply #5 on: March 30, 2014, 10:03:36 pm »
Depending on what your peak load is, you could sense the voltage across a large value shunt resistor (that also has a pair of diodes across it to limit the peak voltage). The diodes will need to be large and heatsunk (P=~0.6v x I).
Mains isolation is a priority so this won't cut it.
Split your problem into two areas. (1) detecting the small current (2) isolation.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline ali80

  • Contributor
  • Posts: 48
Re: Mains/24VDC detection
« Reply #6 on: April 01, 2014, 05:36:33 am »
hcpl7840 can be used for current sensing and it has optical isolation, by it maybe an overkill for your application.
 

Offline han

  • Frequent Contributor
  • **
  • Posts: 311
  • Country: 00
Re: Mains/24VDC detection
« Reply #7 on: April 01, 2014, 05:50:50 am »
by looping the wire you can multiple the current detected by the hall efect sensor ( depend on the sensor shape)
 

Offline saintTopic starter

  • Contributor
  • Posts: 11
Re: Mains/24VDC detection
« Reply #8 on: April 01, 2014, 08:38:10 am »
Thanks for the replays.
Using 2 diodes in series (and just one in parallel but reversed) should give you enough voltage to drive the LED in an optocoupler.

You'd still need a series resistor for the opto LED (maybe 47R) of course.  That's assuming 1.4V drop across the 2 diodes in series and about 1.1V Vf for the opto LED.

I'm sure I did this a long long time ago to sense when a load was drawn on a 240Vac circuit.  I'd have to check what shunt resistor I used to stop leakage current turning the opto on.
DaveCAD would be much appriciated :D

Depending on what your peak load is, you could sense the voltage across a large value shunt resistor (that also has a pair of diodes across it to limit the peak voltage). The diodes will need to be large and heatsunk (P=~0.6v x I).
Mains isolation is a priority so this won't cut it.
Split your problem into two areas. (1) detecting the small current (2) isolation.
So basically this is similar to my solution but uses diodes insted of RC combination. Isn't this the same as David_AND suggested?

Depending on the environment , a simple darlington pair of transistors can detect the load with no contact, it is generally how those pens that detect voltage by putting it near the wire work.
Already considered it but due to multiple detectors next to each other I'm afraid it might give flase detections.

hcpl7840 can be used for current sensing and it has optical isolation, by it maybe an overkill for your application.
Checked the price, yup it would be the most expensive part on the board times three  ;)

by looping the wire you can multiple the current detected by the hall efect sensor ( depend on the sensor shape)
Don't won't to do that the mains/24VDC input is done threw connector.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2863
  • Country: au
Re: Mains/24VDC detection
« Reply #9 on: April 01, 2014, 08:46:20 am »
This is from a very old design to raise and lower a TV concealed in a cabinet.  The 10R stopped the standby current of the load (CRT TV) triggering the opto.

Some of the values may have been tweaked for correct operation, but it will give you a starting point.
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2130
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Mains/24VDC detection
« Reply #10 on: April 01, 2014, 09:03:08 am »
Depending on what your peak load is, you could sense the voltage across a large value shunt resistor (that also has a pair of diodes across it to limit the peak voltage). The diodes will need to be large and heatsunk (P=~0.6v x I).
So basically this is similar to my solution but uses diodes insted of RC combination. Isn't this the same as David_AND suggested?
Yes, both David_AVD and I have suggested the same thing basically.  He has also been good enough to find a relevant schematic.

As you haven't given much indication what peak load is going to be, you will have to size the diodes carefully.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline saintTopic starter

  • Contributor
  • Posts: 11
Re: Mains/24VDC detection
« Reply #11 on: April 01, 2014, 09:15:30 am »
Depending on what your peak load is, you could sense the voltage across a large value shunt resistor (that also has a pair of diodes across it to limit the peak voltage). The diodes will need to be large and heatsunk (P=~0.6v x I).
So basically this is similar to my solution but uses diodes insted of RC combination. Isn't this the same as David_AND suggested?
Yes, both David_AVD and I have suggested the same thing basically.  He has also been good enough to find a relevant schematic.

As you haven't given much indication what peak load is going to be, you will have to size the diodes carefully.

The detection is done in parallel to the load, 470k resistor limits the current to be below well below If max (50mA) of the opto.
The current drawn by my detection circuit (below) is just few mA...
~7mA@230VAC so it can work down to 24VAC but with DC the 470k resistor is just to much, that's why I swap it for a smaller few k one.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2863
  • Country: au
Re: Mains/24VDC detection
« Reply #12 on: April 01, 2014, 09:29:58 am »
Oh, so you are wanting to detect a voltage, not a current ?   :-//

This is why I thought current:
Quote
part of my current project (AVR based 3V3) need to sense current (mains UE 230VAC) on 3 separate inputs.
 

Offline saintTopic starter

  • Contributor
  • Posts: 11
Re: Mains/24VDC detection
« Reply #13 on: April 02, 2014, 09:37:44 am »
Oh, so you are wanting to detect a voltage, not a current ?   :-//

This is why I thought current:
Quote
part of my current project (AVR based 3V3) need to sense current (mains UE 230VAC) on 3 separate inputs.
To clarify the load is driven through a triac/relay/ssr so there might be some leakage current, sorry about the confusion.

Isn't David_AVD's circuit basically shorting mains half of the time?

EDIT:
I guess I should have started with a better schematic. For simplicity I've drawn a switch S1 and a lamp as a load. Basically I just need to know when the lamp is on/off.
« Last Edit: April 02, 2014, 09:42:10 am by saint »
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2863
  • Country: au
Re: Mains/24VDC detection
« Reply #14 on: April 02, 2014, 10:14:56 am »
The circuit I described and showed is for detecting current and as such is inserted in series with the load.  You since clarified that you want to detect a voltage.  This will require a different approach.

Trying to use the same circuit to detect 24V DC and 230V AC may not be the best idea due to the vastly different voltages.

The 24V DC detection can be done with a resistor (say 4K7) in series with an opto coupler LED input.

The 230V AC version could use two (or more) much higher value resistors in series.  Keep in mind that resistors have a (working) voltage rating.  Using several in series will keep the voltage across each one within their limit.  You'll also be sharing the dissipation that way too.

Any AC version (high or low voltage) will need a reverse diode across the opto's LED, or an opto with back to back LEDs.  When searching, they will be specified as AC input optos.  Hopefully this gets you started.
 

Offline saintTopic starter

  • Contributor
  • Posts: 11
Re: Mains/24VDC detection
« Reply #15 on: April 02, 2014, 10:43:23 am »
Trying to use the same circuit to detect 24V DC and 230V AC may not be the best idea due to the vastly different voltages.

The 24V DC detection can be done with a resistor (say 4K7) in series with an opto coupler LED input.

The 230V AC version could use two (or more) much higher value resistors in series.  Keep in mind that resistors have a (working) voltage rating.  Using several in series will keep the voltage across each one within their limit.  You'll also be sharing the dissipation that way too.

Any AC version (high or low voltage) will need a reverse diode across the opto's LED, or an opto with back to back LEDs.  When searching, they will be specified as AC input optos.  Hopefully this gets you started.
Thank's but I'm already doing it using two separate circuits, the goal is to detect voltage using a single circuit :)
The only difference is for AC I'm using capacitor instead of more resistors so I don't have to dissipate so much power. The DC uses 2...7K resistor and just a gap in place of the capacitor.
R11 and R13 are minimelf rated at 500V wanted to use 2512 SMD (1W) but they are only 200V, R12 is just a 0603, C8 is na 630 VDC/400 VAC PET capacitor, opto is AC input.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf