DIY – Connecting a magnetic field sensor

Gary plays with a Magnetic Field sensor…

“Here is a quirky module to play with…an Inex ZX-Magnetic field sensor. It has a hall effect device which will give an analogue output voltage depending on magnetic field strength and polarisation.

The datasheet gives details on measuring current flow and rotational speed of say gears, but for our purposes it could be used in science projects to compare different types of magnets and their strength/polarisation (1.3mV/G).

OR maybe build a box with a wheel/handle on it, so when spun/turned it controls the outputs of your choice (sound, light etc), even a little “windmill” could be made so blowing and turning the sails would produce an output. So for any idea you have for a sensory object that requires motion this could be a good solution.

The first thing you need to do when using one of these units is to make a “potential divider” network. This is because the module outputs 2.5v with no magnetic field (0 Gauss) present, but the Hub reads 100% at around 2.3volts. We need to approximately half the output signal from the module to bring it inside our working range. For this I used two 5K7 (R1 & R2) resistors.

So V1 is the output from the module 0-5volt range, R1 & R2 are both 5K7, V2 is the new output to our hub 0-2.5~ volt range.

On the hubs I have tested this with I get a reading of around 47-49% with no field present, I placed the resistor network inside the 1/4″ plug and protected it with heatshrink…

The module does require quite a strong field if you are going to get to around either end of the percentage scale, but both the centre of the range you achieve and the min/max can all be edited inside device monitor to give the range you require. Each potential divider/hub combination will give slight variations on centre point in your application/magnetic field so you may want to adjust the response anyway.

The picture shows the unit size compared to a hub. As I said the uses only limited by your imagination! I would be interested in seeing or hearing ideas for this neat little unit!”