Are reed switches more precise than hall effect sensors for timing measurements? - Page 1
Forum section: electronics / beginners

author: e100
author_rank: Frequent Contributor
timestamp: April 16, 2018, 07:14:11 am
content: I see +-5% jitter on a 2 Hz signal when measuring the rotational speed of a water wheel. I'm assuming that this is due to sensor noise.Do reed switches perform better for this type of low speed frequency measurement? (I realise that I'll have to deal with switch bounce.)

author: ogden
author_rank: Super Contributor
timestamp: April 16, 2018, 08:18:11 am
content: Quote from: e100 on April 16, 2018, 07:14:11 amWow. Hellova jitter for such a low frequency pulses. Are you sure everything mechanically is OK in your device?Quote from: e100 on April 16, 2018, 07:14:11 amMechanical switches are not so fast nor precise as Hall, optical or electromagnetic sensors.

author: mikerj
author_rank: Super Contributor
timestamp: April 16, 2018, 02:41:01 pm
content: Quote from: e100 on April 16, 2018, 07:14:11 amHow many magnets (or at least poles) are there around the wheel i.e. what does your 2Hz relate to in terms of RPM? If it's just a couple of magnets then is 5% actually an unreasonable speed variation?Are the magnets poles small enough that the hall sensor only triggers when directly over the magnet? If the sensor is triggering with the magnet some distance away that will introduce jitter.Water wheels are not precision devices in general, can the distance between the magnet and the sensor vary e.g. due to run out on the wheel or excess clearance in the bearings?

author: e100
author_rank: Frequent Contributor
timestamp: April 16, 2018, 04:49:38 pm
content: Picture attached (prior to potting).The sensor is on the left and has been formed into an upside down loop to allow the alignment to be adjusted.A single 6mm long x 3mm diameter magnet is glued to the end of a fibreglass shaft supported by a ceramic bearing. The rest of the hardware is fibreglass.As the shaft rotates the alternate poles of the magnet sweep past the sensor. Only one pulse is generated per revolution, hence a 2 Hz output equates to 2 revolutions per second.

author: ogden
author_rank: Super Contributor
timestamp: April 16, 2018, 05:11:28 pm
content: Quote from: e100 on April 16, 2018, 04:49:38 pmI see. No wonder you have jitter because magnet is tiny, you rotate it(!) and it is far from sensor. You can count revolutions, but forget about timing measurements. In such case you shall put magnet on disk and magnet shall be small compared to disk circumference:Picture from:http://www.trainelectronics.com/artcles/Sensors_Part_II/

author: ovnr
author_rank: Frequent Contributor
timestamp: April 16, 2018, 05:53:53 pm
content: As ogden said, this isn't really the right way to do it. It'd also help if you increased the coupling between the magnet and the sensor - they're much farther apart than they need to be. At least squish the sensor up against the casing.A reed switch will not help you.

author: Brumby
author_rank: Unknown
timestamp: April 17, 2018, 01:15:17 am
content: Agree with the previous posters...To improve your results, you will need to borrow ideas from the disk solution:1. Get the magnet out from the central axis of rotation (the further the better)2. Get the sensor closer to the magnet's path (the closer the better)What you want to achieve is a high rate of change of magnetic flux that is tied as closely as possible to an exact point of the shaft's rotation. You do this by increasing the speed of the magnetic field going past the sensor, by the magnetic field being localised (using a magnet that is physically small compared to the path it traverses) and by the sensor being close to the magnet as it passes.What I would be tempted to do (if physically possible) is to fit the magnet at the end of an arm and affix the arm to the rotating shaft. If you could get the magnet's path out to a circle of 2" radius, you will find things vastly improved. More than that would be better, but less than that could still offer improvement. Even with the current arrangement, putting the magnet on a very short arm so that is just misses the sensor housing would make a useful difference. (If you used hot melt glue to mount the magnet - just heat it up until it softens and then push the magnet off centre, so that it almost touches the sensor housing as it rotates.)Oh - and ALL of these suggestions will give better results by getting the sensor closer to the magnet's path.PS. Forget about a reed switch. That would be adding another level of mechanical uncertainty. The Hall effect device is the correct choice here.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: April 17, 2018, 04:02:41 am
content: Ditto on paying attention to the magnetic circuit. It is as important as any electrical/electronic circuit you wrap around it. I would also like to say that reed switches are more than capable of providing far better accuracy than you have reported. In today's world they are unlikely to be the right choice for economic or other reasons for new production, but if you have access to some (from salvage or whatever) don't be afraid to use them.

author: e100
author_rank: Frequent Contributor
timestamp: April 17, 2018, 05:53:17 am
content: The picture of the magnet used on the disk drive sensor got me thinking, why did they use a thin rectangular magnet? Why not a square magnet, or a bar magnet like the one I used?Here's my theory. The field calculator athttps://www.kjmagnetics.com/fieldcalculator.aspshows that a thin magnet has tightly curving field lines linking the poles and this allows you to use the directionality of the hall sensor to your advantage. As you approach from the side the flux rapidly increases but the field lines are almost parallel to the face of the sensor so the measured field strength is still low. It's only when you approach the edge that field lines rapidly become perpendicular to the sensor and hence the measured field rapidly increases.If my theory is correct, it's effectively triggering on the change in direction of the field lines at the magnet edge rather then the absolute magnitude of the magnetic field as you get towards the middle of the magnet.Reed switches are interesting because they are passive devices and therefore don't have any self generated noise which could in theory could make them more precise than active devices.

author: ogden
author_rank: Super Contributor
timestamp: April 17, 2018, 07:26:59 am
content: Quote from: e100 on April 17, 2018, 05:53:17 amIncorrect. You do not care about thermal or supply noise in revolution counting (on/off) applications, but you do not need bounce noise which is "feature" of dry mechanical contacts. Mechanical sensors are not as precise nor as fast as active sensors, bounce noise makes them " noisier' as well.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: April 17, 2018, 06:03:28 pm
content: Reed switches have additional "features" such as magnetization. But again, they are usable, and have been used successfully in many applications. All devices have advantages and disadvantages, but this application is simple enough that almost anything will work. But almost anything will require some attention to detail. For example not all packaged hall switches have internal hysteresis, so "switch bounce" can be an issue. The same thing applies here as everywhere. Think about what your application needs. Think about how the solution you are applying works, and more importantly how it might not work or not work perfectly. Then think about how you will deal with those imperfections.That thinking can occur as you design your setup, or as you debug and troubleshoot your breadboard approach. Different folks have different thinking and work styles and both ways get to the end.

author: IanMacdonald
author_rank: Frequent Contributor
timestamp: April 17, 2018, 06:20:22 pm
content: Since the field will be weak and will vary slowly, any outside disturbance, eg current in motor windings, could cause multiple triggering of the hall sensor. You can reduce this problem by having some hysteresis in the amplifier (Schmitt trigger) but a closer magnet for a cleaner signal is what you need.Also remember that hall sensors come in differentorientationswithin the package. A type that expects a lateral field will not respond well to a perpendicular field.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: April 18, 2018, 03:45:51 am
content: The field calculator that you used to generate your plot is showing field strength - a scalar value. A hall device provides an output that is proportional to the component of the field strength in the sense direction of the device. A plot of the field lines will help you in understanding the relationship. To a first approximation the field lines are perpendicular to the field strength lines in your plot. Combine that with an understanding of the sense axis of your device.