Search This Blog

Monday, 21 May 2018

Measuring magnets with a hall effect probe

Permanent magnets vary a lot in strength. The position of the North and South poles can be in unexpected places too. At school we compared magnets by how many paperclips they could lift, and it is possible to plot the field lines using iron filings and a compass needle. But these are rather inexact methods.   It would be nice if there was a digital magnet-meter.
It turns out that such a thing is quite easy to make. I have found one very useful for investigating the magnets in guitar pickups.

I used a hall-effect device from a company called Melexis. I bought it from RS components, in a pack of five, and they worked out at just under a pound each. The particular component I used seems to be obsolete, but hall effect devices are still being used, so I'm sure it would be possible to find something
suitable. I plug the probe into a digital voltmeter to get a reading.




The data sheet is here: https://www.melexis.com/-/media/files/documents/datasheets/mlx90242-datasheet-melexis.pdf

The device runs off a 5V supply, so I used a 78L05 regulator. It might have been better to have used something a little more accurate, because the output voltage swings from just above 0 Volts, maximum north-south, through 2.5V with no field to 5V maximum south-north, and that mid-point of 2.5V end up being a few mV offset if the supply isn't accurate. Anyway, the circuit is given in the datasheet. I used this:


The circuit runs off a 9 Volt PP3 type battery and connects to a Digital Voltmeter. I built it on a small piece of veroboard. The veroboard is actually covered with thin transparent tape. You need to be able to see where the sensor is and you need to be able to get it very close to the surface of the magnet you are measuring. So avoid having components that are taller than the device close to it, or they will get in the way. But the tape is needed because some magnets are conductive and cause short-circuits. The photos show it with the tape removed.



The diagram at left shows how it is laid out, using chip capacitors, and breaking the veroboard track between pins 1 and 2.

You need some fairly fine soldering. It helps to make sure the copper strips are really clean and shiny, use a very fine tipped soldering iron and some thin solder.

Calibration is quite straightforward, because the sensitivity is given in the data sheet, you can work out how many volts you get for a given value of milliTesla. If you wanted to calibrate "properly" you will need to put the device in a known magnetic field, perhaps generated in the Helmholtz coil that I describe elsewhere. http://m0wye.blogspot.co.uk/2018/05/building-helmholtz-coil.html



I drew a graph in Excel based on the figures in the table above.

Now some magnets are too strong to measure - they read either 0 or 5V depending on which pole, but you can always space the sensor away from the magnet to be able to compare the strength to a different one.
It is worth noting that the device is not sensitive enough to use as an electronic compass. If you amplify the output you will soon find that the limiting factor is noise. The Hall effect device is quite noisy, so magnets like the Earth's magnetic field, which is of the order of 50 micro Tesla, are lost in the noise from the device.
But for comparing the strength of the magnet in one guitar pickup with another, it is ideal.

And here's a picture of my hall effect probe being used in this way.

Hope you found it interesting.
73
Hugh M0WYE

Monday, 7 May 2018

Building a Helmholtz Coil

I wonder if anyone else who regularly plays an electric guitar in different venues, has the problem I have ... the hearing aid induction loop is picked up by the pickups in the electric guitar and is amplified by the guitar amp. This amplified sound is then picked up by the mikes, amplified and fed into the hearing aid loop, causing a "howl-round" or feedback situation. With the hearing aid loop running right round the building it is very hard to get away from it.

A guitar pickup is a coil of wire with a permanent magnet inside it. The steel strings move in the magnetic field and generate an alternating current in the coil. The trouble is that any alternating magnetic fields will also be picked up by the coil and amplified. The usual problems are caused by hum fields around the mains transformer in the guitar amp, but a lot of halls and churches now have induction loops that provide a signal for people with hearing aids that work on the same principle.

Now the obvious solution is to use a "humbucking" pickup. This type of guitar pickup has two coils, wound in opposite directions, and wired in series, so that any background magnetism is cancelled out. One coil has a magnet running north-south, the other is south-north so the signal from the guitar strings is in-phase and adds together. It is the perfect solution, background hum is cancelled and the wanted signal is doubled.

My bass guitar is a Hohner Arbor Series "Precision" bass.  I blogged about it a few weeks ago. It looks very similar to a Fender Precision Bass, and, since 1957, these instruments have been fitted with a pair of pickups wired in a humbucking configuration. Wikipedia page about the Fender Precision Bass

So what's going on? Why do I have such problems with my bass?
Replacement pickups are available for a few tens of pounds, but if I changed them, how would I know whether the problem was solved? I need some way of exposing the guitar to a magnetic field like the one from the hearing aid loop, in a controlled way, so that some comparisons can be made.

I did some reading about hearing aid loops, and they have to meet certain standards (BS7594 / IEC60118-4). They are designed to produce a field strength of 100mA/m. They have compression circuits to keep the field strength within that range even when the person speaking into the microphone varies their volume. So 100mA/m looks like the field-strength to aim for.

I decided to make a Helmholtz Coil. Wikipedia Page about Helmholtz Coils
This sort of apparatus looks like a pair of hoops. When fed with a current (d.c. or a.c) the coils produce a uniform field in the space between the two coils. It is also possible to do a sum, based on the number of turns of wire, the diameter of the coil and the current flowing trough it, to work out the exact strength of the field inside.
Some sort of former was required to wind the coils on, and I found an old cable drum in the garage which has a diameter of about 40cm. The two coils must be spaced at a distance which is the same as the radius of the coil, in this case it is 19cms. The body of the guitar would fit inside this, with the pickups in the uniform part of the field.

The equation above looks a bit scary, but it turns out that if we want to calculate the field in terms of mA/m we can leave out the permeability, and the 4/5ths raised to the power of 3/2 works out to be 0.71554.
It works out that with 53 turns of wire on each coil, 1mA of current will produce the 100mA/m field strength required. I wired the two coils in series and put a 100 ohm resistor in series with the both of them. Driving the coil from my Levell Oscillator easily achieves 1mA. I put my True RMS Multimeter across the resistor. By ohms law, 1mA produces a voltage of 100mV across the resistor.

But I'm getting ahead of myself, I need to make a former to wind the wire on ...

After separating the end-cheeks of the cable drum (required an angle grinder!) I drew a circle with a radius of 19cm (piece of string and a pencil). I cut some small pieces of wood from a strip of pine and glued them round the circle I had drawn, with PVA glue. Repeated the task on the other half and let the glue set hard.







I found a small sheet of thin MDF, and cut that up to make the inside edge of the former for the wire. Glued that on with PVA and, again, left the glue to set.

Then I wound the 53 turns of wire on the former. To make this easier I found an old plastic pill-pot which was an exact fit in the centre hole of the wooden disk. I could use that as an axle to rotate the disk around. I set up the spool of wire on a big screwdriver in a vice so that it would dispense wire freely. I made a mark on the wooden disk so I could count the turns. I used 0.56mm dia. enamelled copper wire - but almost any type of wire would suffice.

Once wound, the two disks were joined together with wooden spacers. I used proper brass screws for this, because any steel in, or around the coils, will tend to distort the magnetic field.

The photo below shows the final set up with a guitar in the coils. the Levell oscillator is feeding an a.c. signal into the coils and the meter is used first to set the current to 1mA (100mV across the 100 ohm resistor) and then to measure the output from the guitar pickups.


Finally, here's the bass guitar in the coil. I tried it vertically and horizontally, but it didn't make much difference to the measurements, although the pickups are closer to the centre of the coil in the horizontal position shown.

As long as the frequency is below 1kHz, the meter reads very accurately. If I wanted to look at how the pickups performed at higher frequencies, I would need to use an oscilloscope or a different kind of meter.

So what do the results show?
The black-coloured guitar is a useful comparison because it has hum-bucking pickups in bridge and neck positions and a single coil pickup in the middle. I measured the output of the guitars at three different frequencies, 50Hz, 100Hz (mains hum frequencies) and at 800Hz, more representative of a hearing aid loop. On the black guitar the humbucking pickups had almost no signal at any frequency - and the background hum (with the oscillator switched off) was low too. The middle, single coil pickup picked up the Helmholtz signal quite strongly giving an output of about 10mV at 800Hz. But the output from the bass was twice as strong with over 20mV. So clearly the bass pickups are behaving like single coil pickups - not humbuckers.
Now 20mV is meaningless on its own. When you pluck a guitar string, it is quite tricky to get a consistent output, because it depends how hard you pluck it. I developed a "standard" way of plucking a string. Hold the string down on the fret-board at the 12th fret (in the middle) with the point of a plectrum, then slide the plectrum off the string, this gives the same amount of deflection to the string each time you pluck it. Using this method, and using the peak-hold function on the meter, and averaging 10 separate readings I got the following figures:
E string 89.9mV
A string  57.7mV
D string 56.8mV
G string 80.8mV.
This may seem a bit over the top, but I want to be able to compare the outputs of different pickups. You will see that 20mV is about the quarter of the output of the guitar when a string is plucked. A most unacceptable level of background signal.

The reason that the bass guitar picked up more signal from the Helmholtz coils maybe because the pickups are physically bigger. The signal output is proportional to the area of magnetic flux which the coil encloses, so a larger diameter coil will have more magnetic field lines passing through it.

So the next step is to get some new pickups and see how they perform.
73
Hugh M0WYE