#halleffectsensor

2022-02-08

3D Printed Maglev Switches Are So Hot Right Now

It doesn't happen all the time, but over the years we've noticed that once we feature a project, a number of very similar builds often find themselves in our tip line before too long. Of course, these aren't copycats; not enough time has passed for some competitive maker to spin up their own version. No, most of the time it's somebody else who was working on a very similar project in isolation, and who now for the first time realizes they aren't alone.

Thanks to this phenomenon we're happy to report that yet another 3D printable magnetic levitation switch has come to light. Developed by [famichu], this take on the concept is markedly different from what we've seen previously, which in a way makes the whole thing even more impressive. It's one thing for multiple hackers to develop similar projects independently of each other, as the end goal often dictates the nature of the design itself. But here we're seeing a project that took the same core concepts and ran in a different direction.

So what makes the MagLev Switch MX different from [riskable]'s recently released void_switch? In a word, convention. It seems that [famichu] wanted to create a magnetic switch that operated in more or less the same way a traditional Cherry MX switch does, while the void_switch represents a re-imagining of how keyboard switches should work entirely. So for example, rather than putting all the Hall effect sensors on the main PCB so there's no need to make an electrical connection to each individual switch, each MagLev Switch MX is pinned and must be wired together to form a matrix.

Internally, [famichu] has come up with a unique arrangement wherein the Allegro A1304 linear Hall effect sensor is actually placed in between two opposing magnets that stand in for the traditional spring. When the key is depressed the sensor will pick up the magnetic flux environment changing around it, but interestingly, the schematic for the keyboard PCB would seem to indicate that the senors are not being read directly by the microcontroller. Instead, their output is being used to trigger MOSFETs on each row of the matrix.

In this design, each switch carries its own Hall sensor.

In terms of getting them printed, the MagLev Switch MX has fewer parts than the void_switch, and [famichu] recommends printing them on an MSLA machine. This greatly accelerates the printing time compared to the FDM-printed void_switch, as there's no time penalty for filling the entire build volume of the printer for each run. As for customization, the Fusion 360 design files have been included in addition to the standard STL/3MF models. But for our money, nothing quite beats using OpenSCAD's customizer capability for a project like this.

The big takeaway here is that there's clearly more than one way to make an open source, 3D printable, magnetic MX-style switch. We're very excited to see both projects develop further, especially since a little birdie tells us that [riskable] has taken a close look at this design and has a few notes to pass on to [famichu] based on his experiences developing the void_switch. With these two magnetic mavens collaborating, the future of bespoke input devices is looking very bright indeed.

Thanks to [Stephanie] for the tip.

#peripheralshacks #3dprintedkeyboard #halleffectsensor #keyboard #magnetickeyboard

image
2021-05-20

Practical Sensors: The Hall Effect

Measuring a magnetic field can be very easy with some pretty low tech, or it can be very high tech. It just depends on what kind of measurement you need and how much effort you want to expend. The very simplest magnetic sensors are reed switches. These are basically relays with no coil. Instead of a coil, an external magnet gets close enough to make or break the contacts in the reed. You see these a lot in, for example, door alarm sensors.

Then again, there's no real finesse to a reed. It changes state when it sees enough of a magnetic field and that's about all. You could use a compass with some sort of detection on the needle to get some more information about the field, but not much more. That was, however, how early magnetometers worked. Today, you have lots of options, including the nearly ubiquitous Hall effect sensor.

You might use a Hall effect to measure the magnetic button on a keyboard key coming down when you press it or the open and closed state of a valve. A lot of Hall effects see service as current monitors. Since a coil generates a magnetic field proportional to the current through it, a magnetic sensor can estimate the current in a coil of wire without any physical contact. Hall effects can also watch a magnet go by in a linear motion system or a rotating system to get an idea of position or speed. For example, check out this brushless motor controller that uses three sensors to understand the motor's position.

History

Edwin Hall identified the effect in 1879. The basic idea is simple: an electrical conductor carrying current will exhibit changes due to an external magnetic field nearby. These changes show up as voltage you measure across the conductor. Normally, the voltage across a conductor will be nearly zero, but with a magnetic field, you'll get a non-zero reading in proportion to the magnetic field strength in a particular plane, as we'll see shortly.

Hall effect sensors are just one type of modern magnetometer. There are many different kinds including those that use inductive pickup coils that may or may not rotate or a fluxgate, which is a special type of coil. Some use a scale or a spring to measure force against another magnet -- sometimes microscopically. You can even detect a magnetic field using optical properties like the Kerr effect or Faraday rotation.

Then you get into the really exotic sensors. You can also measure proton resonance in hydrogen-rich materials like kerosene or detect energy states in gasses like cesium. Superconducting coils are also on the menu.

Still, Hall effects, especially those using semiconductors, are cheap and plentiful. They are also small. It is hard to imagine your PC keyboard using a superconducting coil to pick up small magnets glued to the bottom of the keys.

How Does it Work?

We like the video from [rcmodelreviews] that talks about the theory behind the Hall Effect (see below). however, the explanation is pretty simple even with no video. Consider a conductive sheet shaped like a dollar bill. Connected across the left and right sides is a constant voltage source, causing a current to flow through the conductor. If you measure the voltage -- the Hall voltage -- across the top and bottom of the bill, you'd expect the voltage to be nearly zero if the conductor is any good. With no magnetic field present, you would be right. The voltage across the top and bottom will be practically zero volts.

However, when a magnetic field is present with flux lines at right angles to the bias current, a Lorentz force acts on the electrons -- or other charge carriers, such as holes -- and they will bend away from the force as you can see in this animation. This will cause electrons to group together on one side of the conductor and tend to be absent from the other side.

<https://hackaday.com/wp-content/uploads/2021/03/Hall_Sensor.webm>

Hall effect animation is by [FraunhoferIIS], CC-BY-SA-4.0.

This causes the two sides to have different charges, and where we have a charge differential, we must have a voltage. In the animation, you can see the battery providing the current flow and the meter measuring the Hall effect voltage as the horseshoe magnet applies different magnetic fields to the device.

A practical device will have additional circuitry. Usually, there's an amplifier for the Hall voltage. Sometimes there's a regulator for the bias voltage. A digital output sensor may have a comparator and an output transistor, too.

Reading the Datasheet

Every device is different, so it pays to read the datasheet for the one you want to use. Hall effects generally have limitations on frequency range and can be rather expensive. Melexis, for example, has a 250 kHz device, and that's much faster than many other similar products. That particular device requires 5 V and less than 15 mA to operate.

From the datasheet, you can see there are two versions. One can operate up to about 7.5 millitesla and the other works around 20 millitesla. There's even a version that can work to 60 millitesla. Of course, there are many other choices from other vendors with different parameters.

Some sensors output a voltage proportional to the sensed magnetic field or you can get a digital on/off type sensor. Obviously, if you expect to deploy a sensor, you'll need different support for whichever sensors you choose to use. In some cases, you don't even need an external device. The ESP32, for example, has its own Hall effect built in, as you can see in this video.

Building with Hall Effect Sensors

If you want to build your own Hall effect projects, there are plenty to choose from. A portable magnetometer is quite simple and lives in a Tic Tac box. If you are measuring current, you might want to use a device that contains not just the Hall effect sensor, but everything else you need, too.

Or, why not build something new? If you do, though, be sure to send us a note on the tip line, so we can spread the word about your latest creation.

#engineering #featured #edwinhall #halleffect #halleffectsensor #magnetometer #sensor

image

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst