[Colin] loves his PicoScope, a USB based “headless” oscilloscope. While using it he found himself longing for a classic oscilloscope interface. Mouse clicks just weren’t a replacement for grabbing a dial and twisting it. To correct the situation he created his USB-Connected Box-o-Encoders. The box maps as a USB keyboard, so it will work with almost any program.
[Colin] started by finding encoders. There are plenty of choices – splined or flatted shaft, detents or no detents, panel, PCB, or chassis mount. He settled on an encoder from Bourns Inc. which uses an 18 spline shaft. His encoder also includes a push button switch for selection. With encoders down, knobs were next. [Colin] chose two distinct styles. The two knob styles aren’t just decorative. The user can tell which row of knobs they are on by touch alone. Electronics were made simple with the use of a Teensy++ 2.0. [Colin] used a ATUSBKey device running Teensy software, but says the Teensy would have been a much better choice in terms of size and simplicity.
Once everything was wired into the box, [Colin] found his encoders would “spin” when the knobs were turned. They are actually designed to be PCB mounted, and then screwed into a control panel. Attempts to tighten down the panel mounting nut resulted in a broken encoder. Rather than redesign with purely panel mounted encoders, [Colin] used a dab of epoxy to hold the encoder body in place.
The software setup is simple: Whenever an encoder is moved, Teensy outputs a unique keystroke for that encodrer’s clockwise rotation, counterclockwise rotation, and press-to-select. The PicoScope software keyboard shortcut keys are setup to respond to the keys programmed into the encoder box. The final result is very slick. Timebase, channel voltage, and trigger level, all work like a regular scope.
The PEC11-4215K-S0024 used in his project is no longer being manufactured.
Yes – Bourns had a product change and the encoders are now the PEC11R series (http://www.bourns.com/data/global/pdfs/PEC11R.pdf). Damned if I can spot the difference compared with the old ones!
While I’m at it – here’s a shameless plug for my own encoder module:
http://eyejayinstruments.com/ij8_encoder/ij8_module.shtml
Additionally, the standard Chinese rotary encoder available all over EBay has pretty exactly the same footprint and is compatible, but with fewer clicks per rev (I think 18). They’re also much cheaper.
Alas, it’s impossible to find it the Chinese encoders are RoHS compliant, so I can’t use them in my module ;-(
PEC11 has been superseded by the PEC11R series. PEC11R-4215K-S0024 is available from Mouser and Digi-Key for $1.47/qty 1.
Damn… they were on sale at Newark at the time for super-cheap so that must be why ;-)
looks like you built a macro box or a video editing keyboard or gaming mouse where each encoder can be programmed to do something so you can turn 1 and vertically scroll and another horizontally scroll and another volume for sound or another could be brightness or contrast in a photo editor or video editor
BTW you can laser print onto transparency and iron on your faceplate
design onto Plexiglas i.e toner transfer. Using that on top of the
aluminum panel instead of permanent markers would make it look more
professional.
could just put is all on a pcb, only use back side for tracks, front side for text
Yeah, I may yet build a PCB! Had planned on doing that idea, and perhaps even integrated the USB stuff onto the PCB so the backside doesn’t have anything sticking out.
Nice. I think the headless O-scope companies should consider a project line for this (i.e., PC is just used for the display screen). Another solution for cleaner look on the mounting panel is FrontPanelExpress.com (I haven’t tried them, but it looks like relatively painless way to get a nice result).
Yes, if such a company takes this on, I hope they would use a PCB to solder the encoders to reduce the “rat’s nest”.
I had no idea encoders could be had for those prices. Is there an item available for obtaining scrap encoders, like maybe a mouse wheel?
Scroll wheels usually do have a small optical encoder attached. Old ball mice contain two or more. For a mechanical encoder with a shaft, look in discarded consumer electronics which use a rotary knob for a digital function: car radios, stereo receivers, and radio scanners.
Cable ties or lacing (en.wikipedia.org/wiki/Cable_lacing) would clean up the mess.
DX (and possibly others) sells Rotary Encoder (SKU: 275658) $3.26 for 2.
They used to sell a few similar items at QTY 10.
Dat “encodrer”
werd
The only good encoder is optical and it will have a power input for the LED. The mechanical ones don’t always output one pulse per click or bump. I have a stereo where the big knob skips pulses and has to be turned slowly to get volume change at all. They get dirty and wear off their carbon tracks. Though I prefer knobs to a buttons especially for volume in a car radio, some of these leave something to be desired.
This overall hack could make for some better action for keyboard based games or editing.
I agree that the mechanical ones can sometimes not output a pulse. However this is generally only a problem at higher rotational speeds where the contacts bounce, or it’s given a quick flick, in which case you’re not expecting it to settle on an exact value anyway.
The insides aren’t carbon track, they’re metal contacts. Here’s the innards of one of the cheap Chinese ones:
http://imajeenyus.com/temp/DSCN6381.JPG
Note the grease – at higher speeds, the sprung contacts will ride over the surface of the grease (“greaseplaning!”) and won’t make proper contact. However, I found that even at 500rpm, the encoder still produces (or rather, my little circuit detected) correct pulses 95% of the time. At 2000rpm, that’s down to 90%.
Generally you’re going to sneak up on whatever value you want, so the final adjustment will be at a very slow speed, so contact bounce shouldn’t be an issue.
BTW, totally agree about knobs on car controls instead of encoders!! With a knob, you can easily tell where it is without looking, unlike an encoder.
professional $xxK oscilloscopes work just fine with mechanical encoders
The mechanical ones need SW debouncing…. if you are lazy (as in my project) they won’t be very reliable. But lots of products use them & work great (e.g. real scopes) because they were not lazy!
Very nice! this will have to be added to my list of things to do. Only thing that would irk me is that the Picoscope software would need to be the active window for the keyboard short-cuts to work, so I couldn’t have the scope on a second monitor (usually my TV) while working on something else on my main monitor. This is already an issue though, having to mouse on over to the TV to change anything
I might add a button to the panel which would run a Windows Hotkey which would make the Picoscope window active. This could maybe also run the software if it isn’t already open. Or see if I can run the Hotkey on the first click of any encoder without the window minimising when I turn another one.
Seems like the generic HID (covered in HAD a while ago)
http://hackaday.com/2010/06/23/working-with-the-at90usbkey/
would be a logical alternative for firmware, if wanted HID, rather than keyboard emulation.
(Though might have to use different encoders, or adapt generic HID encoder support).
Keyboard is HID… just a specific class. Thus if you want to use generic HID it’s about 2 lines of code to change! The problem is then you require your computer SW to be designed to use this box properly & know what the codes are. I didn’t have that option (scope software is closed-source) so had to hack the available input options.
This is a complete waste of time. For the cost of a Picoscope and the encoders, you can just go out and buy a better bench oscilloscope WITH VGA output. A much cleaner, much more functional solution that doesn’t require 4 boxes (picoscope, CPU, Monitor, switch box).
This is what happens when people stop thinking analytically.
Huh? AFAIK this is far cheaper… the reasonably-priced scopes have very small buffers (1MSample) seems to be more expensive, although the Pico devices have insanely large buffers (512MSample for my device). Besides 95% of the time I like the GUI interface anyway instead of encoders, but wanted to build this out of interest…
Huh? AFAIK this is far cheaper… the reasonably-priced scopes have very small buffers (1MSample) seems to be more expensive, although the Pico devices have insanely large buffers (512MSample for my device). Besides 95% of the time I like the GUI interface anyway instead of encoders, but wanted to build this out of interest…
My comment got screwed up there sorry… it should have read “the reasonably-priced scopes have very small buffers like below 20KSamples, devices with OK sized buffers (1MSample) seems to be more expensive”. I don’t think the comment system liked my ‘less than’ sign for some reason!