0
\$\begingroup\$

I'm trying to make a very simple magnetic field detector. Now I have a very simple circuit (the transmitter/magnetic field generator) with an inductor and a push button. Whenever I press the button 'on/off' really fast, the inductor produces a magnetic field.

I have ATMEGA328 with ADC enabled (the receiver/detector circuit) (voltage reference set to 1.1v). I have a primitive antenna (a 6cm wire floating in the air - plugged directly into ADC input, no op-amp).

If I move the micro-controllers ADC input 'antenna' next to a 220v power socket, I can see a sine wave being formed, so I believe the ADC is picking up the 50/60Hz AC sine wave from the wall, so it's detecting magnetic/electric field.

The problem is when I place my inductor circuit next to the microcontroller and trigger it, the micro-controllers ADC doesn't pick up anything, even when the 'antenna' and inductor is right next to each other. I tested the same inductor in the 'dc to dc boost converter' and it was working very well on 2A 0.3v.

I can't understand why it doesn't detect the magnetic field generated by the inductor, but picks up the field generated from the wall.

Is it because I need to 'convert' the magnetic field/current into voltage (as ADC shows voltage levels) or is the magnetic field produced in the inductor too weak for the simple wire to pick up and I need ether another inductor to pick it up or an op-amp for my 'antenna'? Thanks

\$\endgroup\$

2 Answers 2

3
\$\begingroup\$

so I believe the ADC is picking up the 50/60Hz AC sine wave from the wall, so it's detecting magnetic/electric field.

Electric field, but not magnetic field. The wire and the AC mains wire work like a low value capacitor, allowing the 50/60 Hz to pass through to the ADC.

The problem is when I place my inductor circuit next to the microcontroller and trigger it, the micro-controllers ADC doesn't pick up anything

It cannot pick anything up. The frequencies required for any measureable inductive coupling into a 6cm wire are in the GHz range and waaay outside usable ADC frequencies on an AVR µC.

\$\endgroup\$
2
  • \$\begingroup\$ Thank you very much for the answer! "The frequencies required for any measureable inductive coupling into a 6cm wire are in the GHz" this is where I get completely lost. Does that mean I will be unable to make this magnetism detector using AVR? could you please give me few keywords I could use to learn about this problem further. Sorry I'm a complete beginner in electronics.. \$\endgroup\$
    – 0x29a
    Commented Jan 2, 2017 at 17:47
  • \$\begingroup\$ @0x29a Instead of a wire, use a secondary coil and an op-amp. Be careful when feeding the signal into an ADC as it can only detect positive voltages, negative can damage the whole AVR. \$\endgroup\$
    – Golaž
    Commented Jan 2, 2017 at 20:13
0
\$\begingroup\$

To respond to a magnetic field, ground one end of your wire, and tie the other end to your ADC. Beware this may strongly push the ADC pin both positive (OK) and negative (not OK).

For safety, tie 2 resistors, both 1Kohm, in series from GND to VDD, and couple the inductor to midpoint with 10uF capacitor (this gives 30 Hertz high-pass filter, quite OK for 60 Hz power). You now can digitize the peak-peak signal out of the inductor (your wire).

Bring this magnetic-sensing circuit near a kitchen blender motor, and you may get exciting large voltages. Or use a long wire, with many turns around a plastic water bottle; be very careful with this, because this N-turn sensor produces HIGH OUTPUT VOLTAGES if near motors or those BLACK BRICK battery chargers, and you may damage your ADC; for protection, install a 1Kohm resistor between your magnetic sensor and the 10uF cap, so the ADC's protection diodes can more easily protect the ADC.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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