TeensyStep – Fast Stepper Library for Teensy

The Teensy platform is very popular with hackers — and rightly so. Teensys are available in 8-bit and 32-bit versions, the hardware has a bread-board friendly footprint, there are a ton of Teensy libraries available, and they can also run standard Arduino libraries. Want to blink a lot of LED’s? At very fast update rates? How about MIDI? Or USB-HID devices? The Teensy can handle just about anything you throw at it. Driving motors is easy using the standard Arduino libraries such as Stepper, AccelStepper or Arduino Stepper Library.

But if you want to move multiple motors at high micro-stepping speeds, either independently or synchronously and without step loss, these standard libraries become bottlenecks. [Lutz Niggl]’s new TeensyStep fast stepper control library offers a great improvement in performance when driving steppers at high speed. It works with all of the Teensy 3.x boards, and is able to handle accelerated synchronous and independent moves of multiple motors at the high pulse rates required for micro-stepping drivers.

The library can be used to turn motors at up to 300,000 steps/sec which works out to an incredible 5625 rpm at 1/16 th micro-stepping. In the demo video below, you can see him push two motors at 160,000 steps/sec — that’s 3000 rpm — without the two arms colliding. Motors can be moved either independently or synchronously. Synchronous movement uses Bresenham’s line algorithm to plan motor movements based on start and end positions. While doing a synchronous move, it can also run other motors independently. The TeensyStep library uses two class objects. The Stepper class does not require any system resources other than 56 bytes of memory. The StepControl class requires one IntervallTimer and two channels of a FTM  (FlexTimer Module) timer. Since all supported Teensys implement four PIT timers and a FTM0 module with eight timer channels, the usage is limited to four StepControl objects existing at the same time. Check out [Lutz]’s project page for some performance figures.

As a comparison, check out Better Stepping with 8-bit Micros — this approach uses DMA channels as high-speed counters, with each count sending a pulse to the motor.

Thanks to [Paul Stoffregen] for tipping us off about this new library. Continue reading “TeensyStep – Fast Stepper Library for Teensy”

A Vintage Morse Key Turned into USB Keyboard

Time was when only the cool kids had new-fangled 102-key keyboards with a number pad, arrow keys, and function keys. They were such an improvement over the lame old 86-key layout that nobody would dream of going back. But going all the way back to a one-key keyboard is pretty cool, in the case of this Morse keyer to USB keyboard adapter.

To revive her dad’s old straight key, a sturdy mid-20th century beast from either a military or commercial setup, [Nomblr] started with a proper teardown and cleaning of the brass and Bakelite pounder. A Teensy was chosen for the job of converting Morse to keyboard strokes; careful consideration to the timing of dits and dahs and allowances for contact debouncing were critical to getting the job done. A new wooden base not only provides stability for the key but hides the Teensy and makes for a new presentation. The video below shows it in action; our only complaint is the lack of sidetone to hear the Morse as you pound out that next great novel one click at a time.

Lovingly restored telegraph gear is a bit of a thing around here; we featured this vintage telegraph sounder revived with a Morse code sender not too long ago.

[via r/DIY]

Thanks to [Liz] for the tip

MIDI to CV/Gate The Easy Way

Let’s say you’ve got a modular synthesizer. You’re probably a pretty cool person. But all your cool laptop DJ friends keep showing off their MIDI-controlled hardware, and you’re getting jealous. Well, [little-scale] has the build for you.

The Teensy 3.6 is the current top-of-the-line Teensy from PJRC, and it’s [little-scale]’s weapon of choice here. With USB-MIDI and two 12-bit DACs on board, it’s made creating an interface between the worlds of analog and digital music into a remarkably simple job. Control voltages for pitch and velocity are pushed out over the analog pins, while pin 29 is used for gate signals.

It’s a testament to the amount of development that has gone into the Teensy platform that such projects can be built with virtually no off-board components. The build is a further step forward in simplicity from [little-scale]’s previous work, using a Teensy 2 with an offboard DAC to generate the output voltages.

Here at Hackaday, we’ve always been big fans of adding computer control to analog hardware. This CNC mod to a guitar pickup winding machine is a great example.

Print A Flexible Keypad

[Micah Elizabeth Scott] needed a custom USB keyboard that wrapped around a post. She couldn’t find exactly what she wanted so she designed and printed it using flexible Nijaflex filament. You can see the design process and the result in the video below.

The electronics rely on a Teensy, which can emulate a USB keyboard easily. The keys themselves use the old resistor divider trick to allow one analog input on the Teensy to read multiple buttons. This was handy, but also minimized the wiring on the flexible PCB.

The board itself used Pyralux that was milled instead of etched. Most of the PCB artwork was done in KiCAD, other than the outline which was done in a more conventional CAD program.

Continue reading “Print A Flexible Keypad”

A Wii U That Is Both Computer And Console.

Legendary sudomod forum user [banjokazooie] has once again demonstrated their prowess in Wii U console modification — this time by transforming it into a powerhouse portable computer!

We loved [banjokazooie]’s RetroPie Wii U mod, and happy to see them back again with this build.  What’s in this thing this time around? Buckle up ’cause it’s a ride: an Intel M5 processor core M on their Compute Stick, 4GBs RAM, a 64GB solid-state drive, a 2K LCD touchscreen, Bluetooth, WiFi, a 128GB SD card slot, two 3.7V 4000 mAh batteries, a Pololu 5V,6A step-down voltage regulator, a Teensy 2.0++ dev board, a battery protection PCB, a USB DAC sound card, stereo amp, a USB hub for everything to plug into, and a TP5100 battery charging board. Check it out!

Continue reading “A Wii U That Is Both Computer And Console.”

Going Digital: Upgrading A Boat’s Analog Gauge

The odds are that many of you do not own a boat that you get to tinker around with. [Mavromatic] recently acquired one that had — much to his consternation — analog gauges. So in order to get his ship ship-shape, he built himself a custom digital gauge to monitor his vessel’s data.

Restricted to the two-inch hole in his boat’s helm, trawling the web for displays turned up a 1.38-inch LCD display from 4D Systems. Given the confined space, a Teensy 3.2 proved to be trim enough to fit inside the confined space alongside a custom circuit board — the latter of which includes some backup circuits if [mavromatic] ever wanted to revert to an analog gauge.

Two days of acclimatization to the display’s IDE and he had enough code to produce a functional display right when the parts arrived.

Continue reading “Going Digital: Upgrading A Boat’s Analog Gauge”

Heads-Up Display Turns Car Into Fighter Jet

While most of us will never set foot in a fighter jet, some of us can still try to get as close as possible. One of the most eye-catching features of a fighter jet (at least from the pilot’s point-of-view) is the heads-up display, so that’s exactly what [Frank] decided to build into his car to give it that touch of fighter jet style.

Heads-up displays use the small reflectivity of a transparent surface to work. In this case, [Frank] uses an LED strip placed on the dashboard to shine up into the windshield. A small amount of light is reflected back to the driver which is able to communicate vehicle statues without obscuring view of the road. [Frank]’s system is able to display information reported over the CAN bus, including voltage, engine RPM, and speed.

This display seems to account for all the issues we could think up. It automatically cycles through modes depending on driving style (revving the engine at a stoplight switches it to engine RPM mode, for example), the LEDs automatically dim at night to avoid blinding the driver, and it interfaces with the CAN bus which means the ability to display any other information in the future should be relatively straightforward. [Frank] does note some rough edges, though, namely with the power supply and the fact that there’s a large amount of data on the CAN bus that the Teensy microcontroller has a hard time sorting out.

That being said, the build is well polished and definitely adds a fighter jet quality to the car. And if [Frank] ever wants even more aviation cred for his ground transportation, he should be able to make use of a 747 controller for something on the dashboard, too.