Detecting a vibrating magnet

Gramps

Senior Member
We are building a project that vibrates a small rare earth magnet. It looks like a picaxe 08 would be perfect for this job.
We want to detect the intensity of the vibrations and read it on an analog meter.
Some options we're considering are a vibration sensor, a manometer sensor, or a hall effect sensor.
Looking for a cheap but accurate reading.
What other ways could we do this?
Thanks, Gramps
 
Hi,

The first questions I would ask are what causes the magnet to vibrate, and at what frequency (range)? A vibrating magnet will generate an alternating electromagnetic field, which might be detected, but that's probably not appropriate if it's a magnetic field which is causing the magnet to vibrate in the first place! Also, what does "accurate" mean, a wide measurement range, high sensitivity, or very stable over time/temperature, etc.?

Similarly, Hall Effect and some "Vibration" sensors are likely to be affected by alternating magnetic fields and I would normally consider a "manometer" to have high inertia, thus having only a very slow (low frequency) response. A "barometric" (air pressure) sensor might be appropriate, with some of the I2C Bus sensors being very accurate and stable; or a direct (analogue) type could operate at higher frequencies.

Cheers, Alan.
 
The first questions I would ask are what causes the magnet to vibrate, and at what frequency (range)?
The magnet vibrates because we are powering 4 ohm air coils with an audio amplifier about 18 inches away. Frequency range is between 5 and 300 hertz.
what does "accurate" mean,
"accurate" was a misleading term..
I'd like to scale the different frequencies to compare their relative strength.
 
Hall effect will be no good, it will be swamped by the field from the coils.
I don't understand the manometer concept.
Most cheap vibration sensors are just switches, like an Old Skool mercury switch.

If this is some kind of lab experiment, then you could attach a tiny mirror to the magnet, then bounce a laser off it. This would let you see tiny vibrations expanded to size of a wall. A bit difficult to record the output though.

If the magnet is supported by a springy bar, then the most suitable solution would be a strain gauge measuring the flexing of the bar. This would give an analogue output.

There is also the possibility of a digital image correlation system, using a video camera and special software.

If you tell us more about the physical arrangement of the magnet and its surroundings then there might be other ideas.
 
Last edited:
The magnet vibrates because we are powering 4 ohm air coils with an audio amplifier about 18 inches away.
Hi,

Is it the air coils or the amplifier that is 18 inches away from the magnet?* If it is the magnetic (field) coils, then that is probably far enough away that you could detect the voltage generated (by the moving magnet) into a "search coil" very close to, or preferably around, the moving magnet.

The frequency could be measured with a PULSIN to detect the period (3.3 up to 200 ms) or even a direct software "counting" loop; even the 08M2 has an on-chip comparator that can be configured to detect zero-crossings. An (unbiassed) search coil will generate a sine wave around zero volts, but a simple diode detector would probably be too insensitive or non-linear. However, continuously monitoring the voltage with a PICaxe ADC input over a full input cycle (200 ms) and calculating the maximum value may be sufficient. The voltage generated will be proportional to the frequency (if a constant amplitude of movement), but one would expect the (peak-peak) distance of the physical movement to be larger at 5Hz than at 300 Hz (distance = speed * time).

*ADDED: For magnetic coupling it's important to understand the "Inverse Square Law". Magnetic circuits (in Relays, Solenoid Magnets, Motors or Loudspeakers, etc) are normally designed with a "conducting" path of Iron, Ferrite or perhaps now a "Rare Earth" material, with a small "Air Gap" of usually less than a millimetre. For example the gap between the rotor and stator of a motor or generator might be a few tenths of a mm, perhaps 20 thou (thousands of an inch). Thus the magnetic field (or force) coupled over an air gap of 20 inches could be around one million times smaller (i.e. one thousand squared).

Cheers, Alan.
 
Last edited:
Thanks for many interesting ideas!
My first thought was to just read the amplifier output with a vu meter. But what we're really after (I think) is not volume but wattage used (amps times volts).
Perhaps we could monitor the output wattage of the power supply that feeds the amplifier.
Some frequencies seem to draw a lot more current from the amp than others.
Both sine and square waves are used and that changes the readings, too.
If the magnet is supported by a springy bar, then the most suitable solution would be a strain gauge measuring the flexing of the bar. This would give an analogue output.
This idea will work well thank you!

you could detect the voltage generated (by the moving magnet) into a "search coil" very close to, or preferably around, the moving magnet.
Another cool idea!
Thus the magnetic field (or force) coupled over an air gap of 20 inches could be around one million times smaller (i.e. one thousand squared)
If I hold the rare earth magnet in my hand I can feel the vibrations as far as 18 in from the coils and of course the closer you get to the coils the stronger the vibrations.
 
I have some motion detectors. Going to try to box one in with the rare
earth magnet and see if I can get some readings.
 
Could you just use a decent 6"to 10" speaker as a cheap & easy sensor?
The speaker cone would capture the air pressure(s) being directed towards it, and the speaker itself will generate fluctuating voltages on it's own voice-coil terminals (as it moves along its own magnet) which can then be fed into an op-amp buffer to drive into a picaxe analog input.

just my 2 cents, but sometimes my ideas are worth 4 cents ;-)
 
Gramps,

You first asked this:
We are building a project that vibrates a small rare earth magnet.
We want to detect the intensity of the vibrations and read it on an analog meter.

and so people suggested different approaches that could be used to detect the magnet's vibrations.
Later you posted this:
what we're really after (I think) is not volume but wattage used (amps times volts).
Perhaps we could monitor the output wattage of the power supply that feeds the amplifier.
and then this:
My first thought was to just read the amplifier output with a vu meter. But what we're really after (I think) is not volume but wattage used (amps times volts).
Perhaps we could monitor the output wattage of the power supply that feeds the amplifier.
...
Both sine and square waves are used and that changes the readings, too.

I'm pretty certain that detecting the vibrations of your magnet will not give you something that can be interpreted as the wattage.

From the posts I've quoted above, this is my understanding of what you are trying to do:
Something you want to measure -> generates a voltage somehow -> amplifier -> speaker -> rare earth magnet

Can you tell us what you want to achieve with your project? i.e. What is it that you want to measure?
 
Can you tell us what you want to achieve with your project? i.e. What is it that you want to measure?
Flenser, please forgive my ramblings.
The objective is to detect the vibrations in the rare earth magnet and convert them to an analog signal.
 
Hi,

But what is causing the magnet to vibrate ? Whatever it is may be easier to measure than the "vibration" of the magnet, and/or may interfere with any measurement that you are attempting to make. For example a strain gauge (or your hand) will restrict or damp any physical movement, or a varying magnetic field will probably "swamp" any change in the magnetic field from the magnet itself.

Cheers, Alan.
 
Gramps, I don't think I made myself clear enough.

Here is an analogy for what I'm trying to ask.
A common method to measure the rpm of a motor is to put a slotted disk on the shaft and use an LED+photodiode to generate a pulse every time the LED shines through a slot while the motor is running, like this example from the web:
Slotted disk & photointerrrupter.PNG

In this case the LED+photodiode are the sensor and if you asked the forum how to measure the number of pulses per second from the photodiode I'm certain that someone would be able to provide you a with a circuit and a program but if this sensor was putting out 2000 pulses per second and you told someone your motor was running at 2000 pulse/sec that would not be very meaningful to them.

That 2000 pulses/sec is the raw value from the sensor and sensors are calibrated so that the raw value can be reported in units that have more meaning to a person. In this case there look to be about 20 slots in the disk so 2000 pulses/sec is 100 revolutions per sec and 100revolutions x 60sec is 6000 rpm which is probably what I would be interested in knowing in this case.

It sounds like your magnet is your sensor so is your project to report something like "my magnet is vibrating like <and here you give some freq or amplitude description> or something more meaningful the the person you are describing it to?

Did you build the air coil just to move the magnet or to does the air coil do something else you are interested in? If so then what does the air coil do?

If the magnet is just the sensor you have chosen to measure what the air coil does then the forum might be able to make more helpful suggestions if we know what you built the air coil to do.

It sounds like the air coil is driven by an amplifier. Do I understand correctly?
If so, where does the signal into the amplifier come from?
 
Last edited:
It sounds like the air coil is driven by an amplifier.
Yes this one
where does the signal into the amplifier come from?
The input is a variable frequency oscillator that will produce square and sine waves

does the air coil do something else you are interested in? If so then what does the air coil do?
The coil generates a magnetic sphere approximately 3 ft in diameter. We want to examine its properties, map the lines of force, and investigate whether it would have any effect on the human body.
 
The coil generates a magnetic sphere approximately 3 ft in diameter. We want to examine its properties, map the lines of force, and investigate whether it would have any effect on the human body.
This is outside my expertise so to kick off the discussion I did a web search for "diy magnetic field strength measurement using 3-axis hall effect sensor" and got the youtube hit 3-Axis Magnetometer Build where a hobbyist uses 3 x hall effect sensors to measure the field strength on the three axis using a microcontroller's ADC.

Is this the sort of thing you are looking for?

The 08M2 could be used to do this as it has 3 ADC channels for the READADC10 command.
This would leave only the Serial Out pin C.0 to write out the field strength readings.
 
Last edited:
Is this the sort of thing you are looking for?
Nicely done project. Thanks for the link.
I have some hall effect parts in my sensor stock box and had thought about playing with them to see how far away from the coil we could get readings.
barometric" (air pressure) sensor might be appropriate,
Alan, does an electromagnetic field change air pressure?
 
does an electromagnetic field change air pressure?
Hi,

No, but the movement of a magnet (which is what you were asking about in #1) within a closed space such as a tube (cf. a manometer or mercury barometer) could change the air pressure, like a piston.

But it seems that your magnet is a red herring; if you want to measure a magnetic field, then it's sensible to use an "off the shelf" magnetic sensor or transducer ! Hall effect devices are generally best for "static" magnetic fields (e.g. created by a direct current) and a "search coil" for an alternating field, as from your amplifier and air coils. Basically you'd just be re-inventing a (very inefficient) transformer. The generated voltage is proportional to the "rate of change" of the magnetic field, so generally the higher frequency the better. The "Induction Loop" paging systems that were once used in hospitals, employed frequencies in the 20kHz to 150kHz range, and similarly for the "wireless charging" of mobile phones, etc. now.

Your magnetic field is unlikely to affect the human body: MRI scanners (Magnetic Resonance Imaging) are preferred to X-rays because they have less damaging effects (provided that you don't have any metal in your body). That's even though the (5 Tesla) field strength is about 100k times the Earth's magnetic field, and the operating frequency a million times that of your amplifier (typically 300 MHz for MRI). Then MRI scanners do make sufficient noise that you need to wear ear plugs and/or ear defenders!

Cheers, Alan.
 
My co experimenter on this project connected the coils to a 24 volt transformer hooked to a power stat.
He cranked it up to three amps and placed his arthritic hands in the field for 10 minutes.
He said it seemed to relieve the pain and make his fingers easier to move. He was quite impressed.
 
Here are a few starter ideas... I have found the linear HES a brilliant little bit of tech as a 180 Deg rotational (sine wave) detector as well as suspending neolib pole near the 'knife edge' you can detect solar weather / earths mag field rumblings etc if not a car or bus driveing past 10 meters away :)
IMG_2704.JPG
 

Attachments

  • Anchor Milk Sin Cos.jpg
    Anchor Milk Sin Cos.jpg
    121.5 KB · Views: 5
  • IMG_2700.JPG
    IMG_2700.JPG
    154.8 KB · Views: 7
  • IMG_2712.JPG
    IMG_2712.JPG
    125 KB · Views: 7
Hi,
... what do you mean by a search coil?
Basically, just a small version of your "air coils", perhaps about the size of your magnet (or a few coins) with long, flexible connecting leads to allow it to be located where the field is to be measured. Either three coils at right angles to directly measure a 3D field (i.e. X, Y, Z), or simply orientate a single coil for maximum (at right angles to the plane of the coil) or minimum (parallel to the plane of the coil) to track the field lines. Monitor the a.c. value from the coil(s) in the same way as any other analogue sensor.

But you hardly need to measure the field inside an air-cored solenoid because it can be predicted and calculated (the field is much lower outside the coils): The field strength inside is approximately one Micro-Tesla (or 0.01 Gauss) for each ampere and each turn (of wire) in the solenoid (the Earth's field is about 0.5 Gauss). Obviously 50 Hz (or 60 Hz in USA) is a very convenient frequency to generate higher magnetic field strengths.

There is plenty of information on the Web, including some double-blind tests with positive, significant results, for example
https://pmc.ncbi.nlm.nih.gov/articles/PMC4795538 which gives details of the "Pulsed" nature (100us at 1kHz rate) of their high frequency electromagnetic field (27 MHz), but some have used very low frequencies around a few Hertz (also not achievable with your audio amplifier). Also, there is discussion of the use of "Proton (Nuclear) Magnetic Resonance" OA Therapy, HERE. NMR is interesting because the frequency scales downwards with the magnetic field, so that at more "practical" values (e.g. the approximately 1 milli-Tesla described there) the frequency appears to be only about 20 kHz.

Cheers, Alan.
 
Last edited:
"Proton (Nuclear) Magnetic Resonance" OA Therapy
Thank you Alan, two weeks ago I broke my leg which has created a renewed interest in magnetic healing therapy. So of course I got out my old equipment that has been boxed up for years.
Then got to thinking about how to really measure what's going on and I sure appreciate your input.
I had thought about hanging some 12 volt relays in the field and monitoring the coil outputs but I imagine at certain frequencies the output would be pretty strong with an iron core in the relay.
We're going to create some little monitoring coils as you suggested and see what happens. 😁
.

(also not achievable with your audio amplifie
When I bought the amplifier I was under the impression that it would go to extremely low frequencies even 10 Hz without distortion.
I believe it was the technician at Texas instrument who recommended this amplifier that told me that it would still functionat 10 HZ.
 
Last edited:
Somewhat off -topic but I was playing with a Stamp 10 years ago reading musical frequencies, using just a microphone and a 1-transistor amplifier.


 
Back
Top