Not A Pot, Not An Encoder: Exploring Synchros For Rotational Sensing

We’re all familiar with getting feedback from a rotating shaft, for which we usually employ a potentiometer or encoder. But there’s another device that, while less well-known, has some advantages that just might make it worth figuring out how to include it in hobbyist projects: the synchro.

If you’ve never heard of a synchro, don’t feel bad; as [Glen Akins] explains, it’s an expensive bit of kit most commonly found in avionics gear. It’s in effect a set of coaxial transformers with a three-phase stator coil and a single-phase rotor. When excited by an AC reference voltage, the voltage induced on the rotor coil is proportional to the cosine of the angle between the rotor and stator. It seems simple enough, but the reality is that synchros present some interfacing challenges.

[Glen] chose a surplus altitude alert indicator for his experiments, a formidable-looking piece of avionics. Also formidable was the bench full of electronics needed to drive and decode the synchro inside it — a 26-volt 400-Hz AC reference voltage generator, an industrial data acquisition module to digitize the synchro output, and an ESP32 dev board with a little OLED display to show the results. And those are impressive; as seen in the video below, the whole setup is capable of detecting tenth-of-a-degree differences in rotation.

The blog post has a wealth of detail on using synchros, as does this Retrotechtacular piece from our own [Al Williams]. Are they practical for general hobbyist use? Probably not, but it’s still cool to see them put to use.

Continue reading “Not A Pot, Not An Encoder: Exploring Synchros For Rotational Sensing”

Make Your Own Pot And Encoder Knobs, Without Reinventing Them

Rotary potentiometers, switches, and encoders all share a basic design: adjustment is done via a shaft onto which a knob is attached, and knobs are sold separately. That doesn’t mean one knob fits all; there are actually a few different standards. But just because knobs are inexpensive and easily obtained doesn’t mean it’s not worth making your own.

A simple and effective indicator can be easily printed in a contrasting color.

Why bother 3D printing your own knobs instead of buying them? For one thing, making them means one can rest assured that every knob matches aesthetically. The ability to add custom or nonstandard markings are another bonus. Finally, there’s no need to re-invent the wheel, because [Tommy]’s guide to making your own knobs has it all figured out, with the OpenSCAD script to match.

By default, [Tommy]’s script will generate a knob with three shims (for interfacing to a splined shaft) when pot_knob(); is called. The number of shims can be adjusted by modifying potKnobDefaultShimCount. To give the knob a flat side (to interface with D-shafts), change flatted = false to flatted = true. And for adding a screw insert suitable for a set screw? Change tightenerDiameter = 0 from zero to the diameter desired.

The script is quite comprehensive and has sensible defaults, but it does require a bit of knowledge about OpenSCAD itself to use effectively. We have covered the basics of OpenSCAD in the past, and if you’re ready for a resource that will help you truly master it, here’s where to look.

Odd Inputs And Peculiar Peripherals: RoenDi Smart Knob Thinks Outside The Box

When it comes to design decisions, we’re often advised to “think outside the box.” It’s generally good advice, if a bit abstract — it could really mean anything. But it appears that someone took it quite literally with this nifty little smart knob display and input device.

[Dimitar]’s inspiration for RoenDi — for “rotary encoder and display” — came from an unusual source: a car dashboard, and specifically, the multipurpose knobs that often crop up in a car’s climate control cluster. Designed for ease of use while driving while causing as little distraction as possible, such knobs often combine a rotary encoder with one or more indicators or buttons. RoenDi builds on that theme by putting a 1.7″ round LCD display in the middle of a ring attached to an Alps rotary encoder, allowing the knob to be customized for whatever you want it to represent. The backplane sports a powerful STM32 microcontroller with a lot of the GPIO pins broken out, so customization and interfacing are limited only by your imagination. The design is open source, so you can either build your own or support the project via Crowd Supply.

Unlike the haptic smart knob we’ve been seeing a bit about lately, which also features a round LCD at its center, RoenDi’s feedback is via the physical detents on the encoder. We think both devices are great, and they fill different niches in the novel input ecosystem.

Continue reading “Odd Inputs And Peculiar Peripherals: RoenDi Smart Knob Thinks Outside The Box”

Abacus Synthesizer Really Adds Up

The abacus has been around since antiquity, and takes similar forms over the hundreds of cultures that have embraced it. It may be one of the first devices to be considered as having a “user interface” in the modern context — at least for simple arithmetic calculations. But using an abacus as the UI for a music synthesizer seems like something entirely new.

Part art concept project and part musical instrument, the “Abacusynth” by [Elias Jarzombek] is a way to bring a more visual and tactile experience to controlling a synth, as opposed to the usual knobs and switches. The control portion of the synth consists of four horizontal rods spanning two plywood uprights. Each rod corresponds to a voice of the polyphonic synth, and holds a lozenge-shaped spinner mounted on a low-friction bearing. Each spinner can be moved left and right on its rod, which controls the presence of that voice; spinning the slotted knob controls the modulation of the channel via photosensors in the uprights. Each rod has a knob on one side that activates an encoder to control each voice’s waveform and its harmonics.

In use, the synthesizer is a nice blend of electronic music and kinetic sculpture. The knobs seem to spin forever, so Abacusynth combines a little of the fidget spinner experience with the exploration of new sounds from the built-in speaker. The synth also has a MIDI interface, so it works and plays well with other instruments. The video below shows the hardware version of Abacusynth in action; there’s also a web-based emulation to try before you build.

Continue reading “Abacus Synthesizer Really Adds Up”

Absolute Encoder Teardown

According to [Lee Teschler], the classic representation of encoders showing code rings is out of date. His post says that most industrial absolute encoders use a special magnetic sensor known as a Wiegand wire to control costs. To demonstrate he does a teardown of an encoder made by Nidec Avtron Automation, and if you’ve ever wondered what’s inside something like this, you enjoy the post.

This is a large industrial unit and when you open it up, you’ll get a surprise. Most of the inside is empty! There is a very small encoder inside. The main body protects the inside and holds the large bearings. The real encoder looks more like a toy car motor than anything else.

The inner can is nearly empty, too. But it does have the part we are interested in. There’s a Melexis Hall effect sensor The Weigand wire is a special magnetic wire with an outer sheath that is resistant to having its magnetic field reversed and an inner core that isn’t. Until an applied magnetic field reaches a certain strength, the wire will stay magnetized in one direction. When the field crosses the threshold, the entire wire changes magnetic polarity rapidly. The effect is independent of the rate of change of the applied magnetic field.

In other words, like old core memory, the wire has strong magnetic hysteresis. Between pulses from the Weigand wire and information from the Hall effect sensor, you can accurately determine the position of the shaft.

It is always amazing to us how many modern pieces of gear are now mostly empty with the size of the device being driven by physical constraints and not the electronics within.

A Rotary Encoder: How Hard Can It Be?

As you may have noticed, I’ve been working with an STM32 ARM CPU using Mbed. There was a time when Mbed was pretty simple, but a lot has changed since it has morphed into Mbed OS. Unfortunately, that means that a lot of libraries and examples you can find don’t work with the newer system.

I needed a rotary encoder — I pulled a cheap one out of one of those “49 boards for Arduino” kits you see around. Not the finest encoder in the land, I’m sure, but it should do the job. Unfortunately, Mbed OS doesn’t have a driver for an encoder and the first few third-party libraries I found either worked via polling or wouldn’t compile with the latest Mbed. Of course, reading an encoder isn’t a mysterious process. How hard can it be to write the code yourself? How hard, indeed. I thought I’d share my code and the process of how I got there.

There are many ways you can read a rotary encoder. Some are probably better than my method. Also, these cheap mechanical encoders are terrible. If you were trying to do precision work, you should probably be looking at a different technology like an optical encoder. I mention this because it is nearly impossible to read one of these flawlessly.

So my goal was simple: I wanted something interrupt driven. Most of what I found required you to periodically call some function or set up a timer interrupt. Then they built a state machine to track the encoder. That’s fine, but it means you eat up a lot of processor just to check in on the encoder even if it isn’t moving. The STM32 CPU can easily interrupt with a pin changes, so that’s what I wanted.

The Catch

The problem is, of course, that mechanical switches bounce. So you have to filter that bounce either in hardware or software. I really didn’t want to put in any extra hardware more than a capacitor, so the software would have to handle it.

I also didn’t want to use any more interrupts than absolutely necessary. The Mbed system makes it easy to handle interrupts, but there is a bit of latency. Actually, after it was all over, I measured the latency and it isn’t that bad — I’ll talk about that a little later. Regardless, I had decided to try to use only a pair of interrupts.

Continue reading “A Rotary Encoder: How Hard Can It Be?”

Electronic leadscrew

Electronic Lead Screws – Not Just For Threading Anymore

An electronic leadscrew is an increasingly popular project for small and mid-sized lathes. They do away with the need to swap gears in and out to achieve the proper ratio between spindle speed and tool carriage translation, and that makes threading a snap. But well-designed electronic leadscrews, like this one from [Hobby Machinist], offer so much more than just easy threading.

The first thing that struck us about this build was the polished, professional look of it. The enclosure for the Nucleo-64 dev board sports a nice TFT display and an IP65-rated keyboard, as well as a beefy-looking jog wheel. The spindle speed is monitored by a 600 pulses-per-revolution optical encoder, and the lathe’s leadscrew is powered by a closed-loop NEMA 24 stepper. This combination allows for the basic threading operations, but the addition of a powered cross slide opens up a ton more functionality. Internal and external tapers are a few keypresses away, as are boring and turning and radius operations, both on the right and on the left. The video below shows radius-cutting operations combined to turn a sphere.

From [Hobby Machinist]’s to-do list, it looks like filleting and grooving will be added someday, as will a G-code parser and controller to make this into a bolt-on CNC controller. Inspiration for the build is said to have come in part from [Clough42]’s electronic leadscrew project from a few years back. Continue reading “Electronic Lead Screws – Not Just For Threading Anymore”