Honeywell 201SN1B1 Hall Effect Switch

Our Larval Engineer has begun writing the Arduino code (Baby’s First Real Program!) that will control ground effect lighting on her longboard, with RGB LED colors keyed to the wheel rotation speed. Her back of the envelope says the wheels spin at about 60 rev/s (= 17 ms/rev) at 30 mph, which rules out mechanical / reed switches; some experimentation with a simple mechanical switch showed why the Arduino bounce library is a Good Thing even for pushbuttons.

Some rummaging produced a collection of these Hall effect switches:

201SN1B1 Hall Effect Switch Components

201SN1B1 Hall Effect Switch Components

I thought they were ordinary keyboard switches, but nooooHoneywell 201SN1B1 switches turn out to be Mil-Spec items, with brethren serving in B-52 bombers, F-16 fighters, and even long-departed Peacekeeper ICBMs (most likely in the ground support equipment). There are no data sheets at this late date, but this compressed specs burst gives some hints:

General Characteristics Item Description: Switch body 1.060 in. l; 0.740 in. h; 0.740 in. w; hall effect solid state switching; alternate action; 5V dc; 9 ma.; operated at 0.4V dc max.; sinking 4 ma. per output; pulse output; printed circuit terminals

A gentle twist of a small screwdriver under the plastic latches releases the base plate and frees the Hall effect switch module, which is the square black plate above. It contains an IC (downward in the picture) with wire-bonded leads embedded in a flexible silicone seal that has pale gray smudges on its surface:

201SN1B1 IC - Overview

201SN1B1 IC – Overview

A closer look at the IC shows actual components:

201SN1B1 IC - Detail

201SN1B1 IC – Detail

That’s from back when you could see components on an IC…

I soldered wires to the +V and Gnd pins, plus a 10 kΩ pullup resistor to one of the two output pins, applied 5 V from the bench supply, then waved a small neodymium magnet nearby:

201SN1B1 Switch Output

201SN1B1 Switch Output

The two output pins appear to produce separate-but-equal 50 µs output pulses that are completely independent of the magnet’s proximity, speed, and polarity, which is a Nice Touch. The IC draws about 10 mA when inactive and 12 mA with the magnet nearby.

The form factor seems a bit awkward for a longboard wheel sensor, but it’ll get her closer to the goal. Most likely, it’ll wind up embedded in an epoxy block strapped to one of the wheel trucks.

The Arduino’s Bounce update function / method / whatever has a polled view of the input pin, which means that if you don’t call it during that 50 µs pulse you’ll completely miss that revolution. Sooo, the pulse must go into one of the Arduino’s external interrupt pins, which can catch short pulses with no trouble at all if you write a suitable interrupt handler.

Somewhere I have a handful of Hall effect motor commutation sensors, but they have an internal latch that requires alternating magnetic poles to switch the output, thus requiring two magnets halfway around the wheel circumference. Haven’t figured out how to embed the magnets in the wheels or mount the sensors, but …

About these ads

  1. #1 by dithermaster on 20-June-2012 - 14:51

    Could you do something optical instead by painting white/black on the inside of the wheel and using a phototransitor? One could keep a running average of the last half-second of samples and compare the current sample to the average to decide if you were on white or black. Add some hysteresis to the thresholding so a non-moving wheel doesn’t start generated randomness.

    • #2 by Ed on 20-June-2012 - 15:13

      something optical

      She reports a week of rain pretty well trashed the first set of bearings, so I doubt anything applied to the wheel rims would retain enough contrast to work. The factory-painted logos on the outboard wheel edges (between hub and rim) are already flaking off, which leads me to doubt the adhesion of a homebrew paint job.

      However, I’m also unconvinced we know enough to embed a magnet in the rim and I suspect she’ll be surprised at the amount of ferrous junk drifting around on the paths. I’m thinking of a milled hole with an undercut to mechanically secure an epoxy plug.

      It’s relatively easy to build the hardware & write the code. Making the thing survive out on the pavement will be quite a challenge!

  2. #3 by phooky on 20-June-2012 - 17:29

    Hey, that die resembles my old mystery switches: http://electronics.stackexchange.com/questions/2355/old-hall-effect-keyswitches
    Maybe this is the impetus I need to get that thing running again…

    • #4 by Ed on 20-June-2012 - 20:09

      I’d guess two of the pins are power & ground, then a third is the switch output (which may need a pullup or pulldown). I can’t imagine the keyboard needed duplicate outputs, though, so what to do with the fourth pin remains a mystery. Poking around the PCB may give some hints: if all the switches have two pins in common, you’re halfway to the goal.

      I was astonished to feed the bare part number into Google and get some useful references back. Surely, with what you know about the switch and its original use, there’s gotta be a hint out there.

  3. #5 by david on 20-June-2012 - 17:37

    You quite likely want two magnets anyway to preserve the balance of the wheel at high speeds. A magnet and a counterweight works too but two identical magnets is a lot less work. I recommend http://www.5bears.com/magnut.htm for inspiration. Yes, I know you’re running at 1/2500th the speed, but the *ideas* are there…

    • #6 by Ed on 20-June-2012 - 20:17

      two identical magnets is a lot less work

      The wheels (tires, whatever) have a nicely machined (!) flat on the inside edge that’s exactly right for the smallest neodymium magnets I have. If the tool cabinet had an itsy-bitsy Woodruff cutter, I’d undercut the hole, but I fear I must stick a teeny ball mill in the hole and wave it around in a small circle.

      The wheels are made of cast & machined urethane that’s probably as grabby as rubber and utterly un-freezeable… this could get exciting in short order.

      I’m trying to keep this in perspective: she’s rolling on brick paving, so a little unbalance isn’t going to be the end of the world. Losing a magnet might be, though!

      • #7 by david on 21-June-2012 - 14:49

        My intuition says that if you’re running at better than 2% of jet turbine speeds the balance is going to matter a lot, bricks or no bricks. Let me know what you discover! :)

  4. #8 by david on 20-June-2012 - 17:41

    Oh, actually you’re only running at 1/45th the speed, if 60 rev/s is right. So even better. :)

  1. Contact Bounce: Why Capacitors Don’t Fix It « The Smell of Molten Projects in the Morning
  2. Longboard Ground Effect Lighting Case « The Smell of Molten Projects in the Morning