ADICON Support Forum Applied Digital, Inc.
Page 1 of 2 12>
Topic Options
#19398 - 01/30/08 01:59 PM A better current detector?
Timoh Offline
journeyman


Registered: 04/23/03
Posts: 97
Loc: Montreal, Québec
Would this idea work for a current detector?

Wrap your AC line around a split ferrite core and then use a Hall effect sensor into an analog input? Since Hall effect sensors need Vcc for power, you could generate a nice voltage 0-5v depending on the current flowing through the line.

The goal is to eliminate matching a resistor/# of wraps to the load.

Tim

Top
#19402 - 01/30/08 06:37 PM Re: A better current detector? [Re: Timoh]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 5821
Loc: Montreal, QC, Canada
Hall effect sensors normally detect a steady magentic field, and put out a dc voltage. A ferrite core is not the same as an electromagnet.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#19405 - 01/30/08 07:43 PM Re: A better current detector? [Re: Guy Lavoie]
Timoh Offline
journeyman


Registered: 04/23/03
Posts: 97
Loc: Montreal, Québec
Ahh...

Thanks
Tim

Top
#19415 - 01/31/08 08:48 AM Re: A better current detector? [Re: Timoh]
Timoh Offline
journeyman


Registered: 04/23/03
Posts: 97
Loc: Montreal, Québec
In doing some research, Hall effect sensors are used in AC current detection. It looks like the CR Magnetics split core tranducers (http://www.crmagnetics.com/newprod/TransducerSC.asp) probably use Hall effect sensors, as do the electrician wire "clamp" instruments that measure current, and even the phidgets current sensor is a Hall effect based device.

I found references to "closed loop" hall sensors detecting currents from DC-150kHZ.

On the CR magnetic tranducers and clamp instruments, it is merely a toroid ferrite around the conductor to generate a field which is read by the hall sensor.

I haven't found any schematics yet, but am still looking.

Tim

Top
#19417 - 01/31/08 10:49 AM Re: A better current detector? [Re: Timoh]
Timoh Offline
journeyman


Registered: 04/23/03
Posts: 97
Loc: Montreal, Québec
Looks like the chip makers make a few different Hall sensor chips for different applications including AC/DC and just DC. (Bi-directional and uni-directional)

The conductor just needs to pass through "slotted ferrous toroid" or wrapped around it generate a magnetic field. So won't wrapping the conductor around a ferrite core generate a magnetic field?

The sensors I'm going to try Allegro Micro ACS712 http://www.allegromicro.com/en/Products/Part_Numbers/0712/index.asp.

Tim

Top
#19418 - 01/31/08 11:06 AM Re: A better current detector? [Re: Timoh]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 5821
Loc: Montreal, QC, Canada
You might try it, but "ferrous" and "ferrite" are not the same thing. Plus, an AC current would create a constantly reversing magnetic field, so the hall effect sensor might not react to it as if it were a steady field.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#19421 - 01/31/08 12:32 PM Re: A better current detector? [Re: Guy Lavoie]
Timoh Offline
journeyman


Registered: 04/23/03
Posts: 97
Loc: Montreal, Québec
Yes it will output a signal that's in sync with the AC line.

In the application notes there is a circuit that rectifies the output, and designed for exactly what I need...

"Rectified output. 3.3v scaling and rectification for A-to-D converters. Replaces current transformer solutions with simpler ACS circuit."

Looks like I'm in business for $3 + some resistors, diode and caps.

\:\)

Top
#19456 - 02/06/08 08:27 AM Re: A better current detector? [Re: Timoh]
Timoh Offline
journeyman


Registered: 04/23/03
Posts: 97
Loc: Montreal, Québec
My Hall effect sensors arrived today. I haven't had a chance to play with them yet and still need to find some "cores" that will produce a magnetic field.

The chips are 8 pin surface mount, but I found these great little boards not much bigger than the chip itself. This will allow me to mount the chip close to my core and hopefully get a good reading.

I ended up going with the Allegro Micro ACS713, which is the "unidirectional" DC version. This will only measure current in one direction and eliminate the need for rectifying the output as it will only produce a DC output as well.

I'll keep folks posted.

Tim

Top
#19460 - 02/06/08 03:31 PM Re: A better current detector? [Re: Timoh]
Timoh Offline
journeyman


Registered: 04/23/03
Posts: 97
Loc: Montreal, Québec
It works!!!

I soldered up my circuit... (Very simple, chip + 2 caps) And tested it on the closest magnetic field possible... My fridge door! It shows a great range of .5 to 4.6v. So the circuit is good.

Next I tried my coffee grinder with no ferrite core. Nothing. Then I tried it with the wire straight through the core nothing. Then I tried it with 1 wrap, still nothing. I had to stop there since the core I purchased had a small centre hole.

I then tried wrapping several coils around a metal shaft and still nothing with my <1A coffee grinder. But when I tried it with my >12A toaster, I got .5v more output. So the circuit does work.

So now it's a question of optimizing the magnetic field to produce the greatest strength and placing the sensor in that spot.

Tim

Top
#19462 - 02/06/08 04:05 PM Re: A better current detector? [Re: Timoh]
Timoh Offline
journeyman


Registered: 04/23/03
Posts: 97
Loc: Montreal, Québec
Hmmm... I just re-read the spec sheet closer and the device is not designed to detect a proximity of a magnetic field, it's desgined to generate it's own field!

The current it actually suppose to flow *through* the chip. It has it's own conduction path and hall sensor inside the chip... This is how they can get such accurate values from it.

I rewired putting the chip in current patch using the proper pins, but it didn't seem to change much. Still no response from my coffee grinder and pretty much the same readings from my toaster.

I originally soldered the chip in backwards (pins reversed) so had to yank it off and resolder. In the process I snapped one of the current pins. That's the only thing I can think of that is reducing the current flow through the chip and producing inaccurate readings. I purchased 8, so I will swap out the chip for one that has good pins and try again. (The current sense pins on the chip are supposedly wired together internally, so I'm not sure of the difference it'll make.)


Tim



Top
#19465 - 02/07/08 11:00 AM Re: A better current detector? [Re: Timoh]
Timoh Offline
journeyman


Registered: 04/23/03
Posts: 97
Loc: Montreal, Québec
Swapped the chip and no improvement for sensitivity. Playing with some resistors and caps in the circuit got me a higher value on large loads. In fact, the value is spot on if I take into account that I'm only sensing current 1/2 the time.

Still absolutely no luck on lower power devices. I can get a reading from my amp if a turn up the volume, but other than that, on current draws less than an amp, I don't even get millivolt.

Since I have limited success on the 20A DC version, I've ordered some AC chips to play with. A 5A and 20A version. On the 20A AC version I might get better results since I can grab the full AC waveform and rectify to get a nice strong constant signal. I'm hoping this will work giving me the ability to measure the full range, as well as low currents.

If not, my plan is to use the 5A version, and not be able to measure anything greater than 5A. The output will just max out at 5V. The specs say they chip can tolerate 5x the max load current through it. So even the 5A chip will not fry past 5amps... You just can't measure anything.

Tim

Top
#19476 - 02/09/08 12:26 PM Re: A better current detector? [Re: Timoh]
Timoh Offline
journeyman


Registered: 04/23/03
Posts: 97
Loc: Montreal, Québec
This current detector works and works well!

I ended up using the ACS712 5 amp version. The 20 Amp version worked down to about 0.5A, but after that, it just wasn't sensitive enough for my receiver or audio amp. Or it probably was, but since my voltmeter only measures 0.01v, I wouldn't see a change if it generated a 0.003v difference.

Using the 5A version detected everything but my satellite receiver. Again, I'm sure it was detecting it, but my voltmeter just doesn't have a fine enough resolution.

I added an LM321 op-amp with a gain of 3.3 and was in business. I can detect my DVD player even when it is idle. It's rated at 20W, but I suspect it's 10-15 when not spinning a disc, so ~100mA. This generates a 10-20mV reading.

My satellite receiver is interesting... It produces about 90mV when off/standby; and about 140mV when on. But when it's "off" but downloading a program guide or something, it's about 110mV.

I'm going to do some more tuning, and see if I can't improve it some more. I have definitely sacrificed top end readings to get low end readings. But since my goal is detect on/off, I don't really care about knowing exactly how much current is flowing... Just that *some* current is flowing.

Overall I like the ACS chip and circuit. It will serve my needs well. I plan on making a power-strip that has 8 plugs that I can read the on/off state. The circuit costs ~$5 which is very reasonable. I made some ordering mistakes which were a pain... Surface mount diodes and lm321... I've had enough surface mount soldering for a while. :s

Hope someone finds all this useful.

Tim

Top
#19501 - 02/13/08 05:25 PM Re: A better current detector? [Re: Timoh]
Joe Kane Offline
journeyman


Registered: 03/12/03
Posts: 85

But in the end, was it easier than a couple of turns and a burden resistor?

Top
#19509 - 02/14/08 08:13 AM Re: A better current detector? [Re: Joe Kane]
Timoh Offline
journeyman


Registered: 04/23/03
Posts: 97
Loc: Montreal, Québec
Easier? No. More fun (for me)? Yes. More powerful? Yes. Cheaper? Yes.

The flexibility is what I like... The fact I can determine if something is on from low current devices to high current devices without having to worry about # of turns or the correct burden.

The 2nd is cost. The most expensive components is the ACS chip at $3 and the op-amp at $0.50. $3.50/plug is far cry from $15/plug using a current transformer. At 8 plugs, it's $90 cheaper.

For detecting current on a single device, no, it's not worth it.

Tim

Top
#19523 - 02/19/08 09:07 AM Re: A better current detector? [Re: Timoh]
JeffreyB Offline
newbie


Registered: 02/25/07
Posts: 6
Tim,

I'm not sure if you did this, but I'm pretty sure you have to use only one conductor of the ac cord otherwise they will cancel out almost like a differential circuit.

JeffreyB

Top
#19524 - 02/19/08 03:18 PM Re: A better current detector? [Re: JeffreyB]
James V Offline
junior


Registered: 02/06/04
Posts: 33
Loc: Lomita, CA
When you get this working, I would love a description (step by step if not to much to ask) of how maybe non Electrical Engineer could do this. I like the idea of a cheaper current sensor.

Edited by James V (02/19/08 03:19 PM)
_________________________
James V

Top
#19525 - 02/20/08 08:37 AM Re: A better current detector? [Re: James V]
Timoh Offline
journeyman


Registered: 04/23/03
Posts: 97
Loc: Montreal, Québec
Yes... That is my plan. Better instructions, what parts to buy, how to assemble.

I have one more tweak I want to try to improve the accuracy.

You will need some surface mount soldering experience since the current detector chip is surface mount. But other than that, everything else should be regular components.

Ultimately I want to make the device Dallas 1-Wire compatible. Once I get to that level I might make a kit available. That will most likely be about a year from now.

I will keep folks posted.

Tim

Top
#19530 - 02/21/08 04:36 PM Re: A better current detector? [Re: Timoh]
dovregubben Offline
newbie


Registered: 02/21/08
Posts: 3
Loc: Tacoma, WA
Wow, I'm working on exactly the same thing! Quite literally! I found this forum while doing research.

I'm having limited success. My first attempt was with Honeywell SS49E linear halls. I used two 1N5407 diodes to make my magnetic field the same on both halves of the AC waveform, thusly:



I cut a slot in the ferrite bead with a Dremel cutoff wheel and inserted the hall effect with superglue. I'm not very happy with how it works. I'm not getting accurate readings, plus the PCB footprint of the diodes and ferrite beads is freaking huge.

I'm connecting the outputs of my hall effects to a DS2450 1-wire quad AD converter and collecting data using OWFS (running on Debian).

I think I'm going to try the Allegro ACS712 next. Have you read Allegro's app note #295034? It gives a simple schematic to rectify and level shift the output of a current sensor for sensing AC currents. The only problem is it would take three supplies to do it (+5, +12, and -12). I'd like to come up with a way of doing the same thing with a single supply. I could always use a DC-DC converter to get my negative supply, but I'm trying to keep part count and price as low as possible.

I'll post here when I make some progress.

Kurt

Top
#19531 - 02/22/08 06:21 AM Re: A better current detector? [Re: dovregubben]
dovregubben Offline
newbie


Registered: 02/21/08
Posts: 3
Loc: Tacoma, WA
Upon further reflection, I'm not ready to give up on the SS49E yet. I just need more gain. Any old op amp should do the trick (the LM2902 is rugged, inexpensive, and readily available). I also decided to do away with the diodes. They were taking up too much space anyway.

I'm not exactly sure what the bridge rectifier Allegro used in their app note is for. Since the output of the hall effect is always positive it seems like it would do nothing. I'll check it out on my o-scope at work. If it has a desirable effect I may add it, but for now this is what I have in mind:



A quad op amp will provide all four channels for my DS2450. Falloff time can be adjusted by changing the values of R1 and C1, gain can be adjusted by changing R2. In theory, at least. By adjusting the gain, virtually any range could be acheived. My target is 2.5-5V at 250mV/A, for a range of 0-10A.

including the DS2450, price per outlet should be well under $5.

Kurt

Top
#19534 - 02/23/08 07:31 PM Re: A better current detector? [Re: Timoh]
Heathhunnicutt Offline
newbie


Registered: 02/23/08
Posts: 1
Loc: Seattle, WA
Tim, Kurt:

I found this document Magnetic Cores for Hall Effect Devices by Magnetics, a division of Spang & Company. The document contains drawings of the Hall effect current-sensing arrangement of a gapped ring surrounding a current sense wire. Also included are calculations of number-of-windings for various sensitivities.

Hope this helps.

I have seen in action a motor controller which used current sensing as you seek to build. The leads to each of six motor coils were wound ten (10) times each around the gapped toroid cores. (N=10 for the equations for documentation above.) As described in the above document, gaps precisely matching the Hall effect sensors used allowed for the measurement of magnetic field induced in the toroid by the wound current-carrying conductors. In this application, the toroids were approximately 3/4" in diameter and 1/8" thick. A PIC microcontroller monitored the sensor voltages and controlled the switching of motor power.

Heath Hunnicutt

Top
Page 1 of 2 12>


Moderator:  Dan Smith, Monte G, ADI Tech Support, Guy Lavoie 
Hop to:
Who's Online
1 registered (Freezer) and 4 anonymous users online.
Recent Posts
Ocelot Lost Connection
by Guy Lavoie
12/01/08 06:40 PM
Using Ocelot IR to train learning remote
by Guy Lavoie
12/01/08 06:39 PM
Problems with serial port commands
by Guy Lavoie
11/30/08 06:34 PM
Whole-house power monitoring, need op-amp help
by JeffVolp
11/30/08 11:14 AM
Benq W10000 Projector
by Guy Lavoie
11/29/08 07:05 PM
Shout Box

Newest Members
vbcodep, Sonn, UVerseJerry, JerrySchull, jams001
2471 Registered Users
Forum Stats
2471 Members
19 Forums
3465 Topics
20595 Posts

Max Online: 58 @ 12/05/07 03:33 PM
December
Su M Tu W Th F Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31