Deck the Hall Effect Sensors with boughs of holly

I keep forgetting how to properly orientate the magnets for my the hall effect sensors. Courtesy of Allegro (the maker of these fine sensors) I copy the significant bit of their application guide.


Operating Mode Enhancements: Compound Magnets


Because the active area of a Hall switch is close to the branded face of the package, it is usually operated by approaching this face with a magnetic south pole. It is also possible to operate a Hall switch by applying a magnetic north pole to the back side of the package. While a north pole alone is seldom used, the push-pull configuration (simultaneous application of a south pole to the branded side and a north pole to the back side) can give much greater field strengths than are possible with any single magnet (see figure 43). Perhaps more important, push-pull arrangements are quite insensitive to lateral motion and are worth considering if a loosely fitting mechanism is involved.

figure 43Figure 43. Examples of compound magnet configurations (either the Hall device or the magnet assembly can be stationary), with a south pole toward the branded face and a north pole toward the back side: (left) push-pull head-on and (right) push-pull slide-by 


Figure 44 shows the flux-density curve for an actual push-pull slide-by configuration that achieves a magnetic slope of about 315 G/mm.

figure 44Figure 44. Example of magnetic flux characteristic in push-pull slide-by magnet configuration 



Another possibility, a bipolar field with a fairly steep slope (which also is linear), can be created by using a push-push configuration in the head-on mode (see figure 45).

figure 45 Figure 45. Example of a push-push head-on compound magnet configuration (either the Hall device or the magnet assembly can be stationary), with south poles toward both the branded face and the back side 


In the push-push, head-on mode configuration shown in figure 45, the magnetic fields cancel each other when the mechanism is centered, giving zero flux density at that position. Figure 46 shows the flux-density plot of such a configuration. The curve is linear and moderately steep at better than 315 G/mm. The mechanism is fairly insensitive to lateral motion.

figure 46Figure 46. Example of push-push head-on mode magnet configuration, in which the fields cancel in the middle of the travel range

back up

My internet provider had made a boo-boo and we were offline for maybe 90 minutes. All is well now, carry on.

Handle USB Host Suspend/Wake on Arduino Sketch

The lighting plan for my game seat uses a lot of LEDs driving by a few Arduino’s,  and I thought it would be nice to shut down the LEDs when the host PC shuts down.

It turns out the current USB Device implementation of Arduino does not implement such a feature so I decided to hook into the USBCore.cpp file with a few simple statements.

I have submitted the change as a pull request on the Arduino github. Find the patch here: