I have a great affection for those switches, and I'm not sure why. I'm convinced they're very clever, even though their construction is straightforward. Once you stare at the switch contact pattern, it all makes sense - a binary counter in metal.
Nice, I have something like those in my pile of maybe one day I'll have a reason to use it pile. It will be fun to see some interesting ideas put into practice. Thanks David. Take care.
Not normally, as there are up/down buttons for control of each individual digit (the 1s, 10s, 100s, etc) and usually quicker to set them individually instead of hitting the lower digit repeatedly (spreads the wear too)
Wayyy too long ago I used rotary hex switches (same idea but twist knob instead of buttons, and 0-F) as inputs for an XR2240 programmable timer IC, as base for a darkroom exposure timer.
The janky in-between values (3 -> 1 -> 4) are mechanically inevitable unless they were to use grey codes instead of binary. Even then, the transition from 9 to 0 would still be rough. Also a shame the up button is down and the down button is up! Still, very cool devices, and a great clear demonstration.
Going from 3 (0011) to 4 (0100) requires changing 3 bits. But it’s impossible to build an infinitely precise mechanical device, so it’s impossible to make it truly simultaneous. One of those bits will change first, then another, then the last. If you rotate slooooowly enough, there are actually two undefined states between 3 and 4. Not a huge problem here, since the counter jumps thru the undefined states and settles where the signal is reliable. Rotary encoders could stop anywhere, though, so they use a really clever pattern called a Gray code where only one bit changes at a time.
For a single thumbwheel switch? I would use an analog pin on your micro. Add a 1k to the first pin, 2k to the 2nd, 4k the 3rd and 8k to the 4th. Then bring them all together with a 10k to ground. It should create a resistor divider you can read reliably. For multiple you could use the same approach but add a shift register to alternate which common pin is getting power.
@DavidWatts I always forget about this resistor divider technique. It sounds like a cheap and simple solution! When having multiple switches I was thinking of some sort of ic like an io expander. I guess that would be kind of overkill.
These come from an era where uP had full 8bit ports so you could multiplex quite a few to one port. 4 bits for the switch and 4 bits for the multiplexing. the thing we did before charley.
Cool looking things
I used to watch your chanel, but I forget your name... so here I 'm after about 6 years. :D
I have a great affection for those switches, and I'm not sure why. I'm convinced they're very clever, even though their construction is straightforward. Once you stare at the switch contact pattern, it all makes sense - a binary counter in metal.
Uno de los regresos mas esperados de youtube!
good to see that you are back from the renovation or rather restauration project !
Thanks for sharing David! I'm seeing these as an alternative to Doc Brown's key pad for setting time circuits.
Nice, I have something like those in my pile of maybe one day I'll have a reason to use it pile. It will be fun to see some interesting ideas put into practice. Thanks David. Take care.
Those are cool AF! So if you daisy chain the clickers - do they increment the next one after 9?
there is no mechanical connection between then in normal thumb wheel switches.
Not normally, as there are up/down buttons for control of each individual digit (the 1s, 10s, 100s, etc) and usually quicker to set them individually instead of hitting the lower digit repeatedly (spreads the wear too)
You're too handsome-mansome to not be on camera & we need a house update please. 😁
Wayyy too long ago I used rotary hex switches (same idea but twist knob instead of buttons, and 0-F) as inputs for an XR2240 programmable timer IC, as base for a darkroom exposure timer.
The janky in-between values (3 -> 1 -> 4) are mechanically inevitable unless they were to use grey codes instead of binary. Even then, the transition from 9 to 0 would still be rough.
Also a shame the up button is down and the down button is up! Still, very cool devices, and a great clear demonstration.
Interesting, I should have taken one apart to fully understand the sequence and where the wiper overlap was. Thanks.
Going from 3 (0011) to 4 (0100) requires changing 3 bits. But it’s impossible to build an infinitely precise mechanical device, so it’s impossible to make it truly simultaneous. One of those bits will change first, then another, then the last. If you rotate slooooowly enough, there are actually two undefined states between 3 and 4.
Not a huge problem here, since the counter jumps thru the undefined states and settles where the signal is reliable. Rotary encoders could stop anywhere, though, so they use a really clever pattern called a Gray code where only one bit changes at a time.
Did you buy them to make a resistor decade box?
Possibly, I thought that too but not sure why I would have picked the BCD variant.
How would i read these out with a microcontroller without wasting a lot of pins? Looking foward to your soltion.
For a single thumbwheel switch? I would use an analog pin on your micro. Add a 1k to the first pin, 2k to the 2nd, 4k the 3rd and 8k to the 4th. Then bring them all together with a 10k to ground. It should create a resistor divider you can read reliably. For multiple you could use the same approach but add a shift register to alternate which common pin is getting power.
@DavidWatts
I always forget about this resistor divider technique. It sounds like a cheap and simple solution!
When having multiple switches I was thinking of some sort of ic like an io expander. I guess that would be kind of overkill.
These come from an era where uP had full 8bit ports so you could multiplex quite a few to one port. 4 bits for the switch and 4 bits for the multiplexing. the thing we did before charley.