0
\$\begingroup\$

I've seen many questions on here asking about hall effect sensors, and their capabilities, and although many seem to say that they can sense an AC magnetic field, I seem to be having a problem.

What I got:

I've successfully made a simple circuit that lights an LED and pulls low on a microcontroller GPIO when it senses a magnetic field. The circuit looks like this:

schematic

simulate this circuit – Schematic created using CircuitLab

*NOTE: The switch is not an accurate representation of how the sensor functions, but was the closest approximation
In this circuit, the pi's 3.3V supply and GND are to power the sensor, and the the resistor to Vout of the sensor pulls it high (LED is on, data shows 1) until a magnetic field is sensed, at which point the sensor pulls it low (LED is off, data shows 0).

Problem:

This circuit works perfectly to indicate the presence of a DC magnetic field, for example, it can sense a small neodymium magnet from almost 2cm away. However, I need this sensor to be able to detect the magnetic field from a DPDT AC relay (datasheet provided) when ac power is running through it. One would think a coil of it's size with 120V AC 50/60HZ would be enough for it to read, but when the AC coil of the relay is less than a few millimeters away, nothing. The sensor nor the LED shows any detectable reaction.

Why is this? Does the field oscillate too quickly for the microcontroller or my eye to pick up? Is this sensor simply not capable of detecting AC? Or is my circuit simply not right for the job? Any pointers are appreciated.

Hall effect sensor datasheet: http://www.digikey.com/product-detail/en/A1120EUA-T/A1120EUA-T-ND/2138527?WT.srch=1

AC relay datasheet: http://www.mouser.com/ProductDetail/Magnecraft-Schneider-Electric/782XBXC-120A/?qs=h3Xc2LqAealUHVBqYsNmcw%3D%3D

\$\endgroup\$
  • \$\begingroup\$ Please draw the full circuit of the hall sensor. The schematic you've drawn connects the LED between 3.3 and GND, bypassing the series resistor. If this is a red or green LED I would expect it to either pull the 3.3 V low or blow the LED on over-current. \$\endgroup\$ – Transistor Jan 19 '16 at 18:55
  • \$\begingroup\$ The full diagram of the sensor and all information about it's circuit is in the datasheet I provided. \$\endgroup\$ – Skyler Jan 19 '16 at 19:00
1
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. Reorganised schematic.

Your schematic shows the sensor pulling the Pi input to 3.3 V. In fact it pulls it to ground.

The relay armature forms a closed circuit when pulled in. The magnetic flux will take the easiest route through the iron which has a permeability hundreds of times that of the air.

schematic

simulate this circuit

Figure 2. Air-gap core DIY hall current transducer.

Air-gap toroid

Figure 3. Air-gap in torroidal ferrite core. Credit: SoftSolder.com.

You could make your own current transducer as shown above. (The link is for a different application.) The hall transducer is popped into the gap in the ferrite core. The conductor to be monitored passes through the core and, if not sensitive enough, additional turns can be wound to increase sensitivity. In your case you would use PVC insulated wire rather than the enamel coated wire shown here. Cutting the core is problematic and the article addresses that. I've seen other similar posts on the web.

This suggestion would only work for your application if there is current flowing all the time the power source is on.

\$\endgroup\$
  • \$\begingroup\$ Thank you for taking the time to do this. Does this expose any problems about why it can detect a DC but not an AC EMF? \$\endgroup\$ – Skyler Jan 19 '16 at 19:33
  • \$\begingroup\$ You don't say that you were able to detect 'DC' just 'DM' - direct magnetism! See the update. \$\endgroup\$ – Transistor Jan 19 '16 at 20:14
  • \$\begingroup\$ You sir are a gentleman and a scholar. This cohesively and completely answers my question about hall effect sensors. Thank you for your help. \$\endgroup\$ – Skyler Jan 19 '16 at 21:09
1
\$\begingroup\$

The magnetic field from the relay will be very small. The magnetic circuit of the relay is designed to be efficient. The core concentrates the field and directs it to moving the armature. This is vital in order to minimize the power required to activate the relay. Your sensor would need to be mounted very close to the relay coil. Alternative methods would be to wind a small coil with a gapped core and place the sensor in the gap. Pass the current that you with to detect through the coil rather than detecting it at the relay. Also you could consider using a spare contact on the relay to detect its operation instead of the hall sensor.

\$\endgroup\$
  • \$\begingroup\$ Thank you, that's an understandable reason. Unfortunately, turning 120V AC into 3.3V DC is extremely complicated and risky compared to the use of the sensor. Are you saying I should make a coil out of the hot wire (hot as in not neutral or ground) and position the hall-effect sensor inside of the coil to detect the presence of power? If this is what you're suggesting, do you think that the wires could remain insulated making the coil, or would they have to be stripped to produce enough current? \$\endgroup\$ – Skyler Jan 19 '16 at 19:29
  • \$\begingroup\$ The wire would remain insulated. If you want to detect current flow through a wire then a coil with a hall sensor allows this and maintains isolation. If you describe the total application then it may be possible to sugges a better method. \$\endgroup\$ – user1582568 Jan 19 '16 at 19:34
  • \$\begingroup\$ Placing a coil around the sensor didn't produce any visible effects. For a long explanation, the DPDT relay is used to switch between two power sources, when the primary is on, the coil has power and holds the switch on the primary's input. When primary power is lost, the coil is off and the switch falls to the backup, allowing backup power through. The hall effect sensor simply needs to be able to give a binary input, high or low (not important which indicates power), to indicate whether the primary has voltage. The plan was to simply detect the coil, but it can't do that so far. \$\endgroup\$ – Skyler Jan 19 '16 at 19:42
  • \$\begingroup\$ A relay with a 3rd pole would achieve this. Also an optocoupler could be used in and operated from the relay coil current. What is the relay coil resistance? \$\endgroup\$ – user1582568 Jan 19 '16 at 19:53
  • \$\begingroup\$ In order to make the coil work the sensor a lot of turns and a suitable core would be needed to generate enough flux through the sensor. \$\endgroup\$ – user1582568 Jan 19 '16 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.