Posts with «stepper» label

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.


Filed under: Microcontrollers

Landscape to Portrait at the Click of a Mouse

Modern 16:9 aspect ratio monitors may be great for watching a widescreen movie on Netflix, but for most PDFs, Word documents, and certain web pages, landscape just won’t do. But if you’re not writing the next great American novel and aren’t willing to commit to portrait mode, don’t — build an auto-rotating monitor to switch your aspect ratio on the fly.

Like many of us, [Bob] finds certain content less than suitable for the cinematic format that’s become the standard for monitors. His fix is simple in concept, but a little challenging to engineer. Using a lazy susan as a giant bearing, [Bob] built a swivel that can be powered by a NEMA 23 stepper and a 3D-printed sector of a ring gear. Due to the narrow clearance between the top and bottom of the lazy susan, [Bob] had to do considerable finagling to get through holes for the mounting hardware located, but in the end the whole thing worked great.

Our only quibble would be welding galvanized pipe for the stand, which always gives us the willies. But we will admit the tube notching turned out great with just a paper template. We doubt it would have been much better if he used an amped-up plasma-powered tubing notcher.


Filed under: misc hacks
Hack a Day 05 Apr 12:01

Linear Clock Slows the Fugit of the Tempus

We feature a lot of clocks here on Hackaday, and lately most of them seem to be Nixie clocks. Not that there’s anything wrong with that, but every once in a while it’s nice to see something different. And this electromechanical rack and pinion clock is certainly different.

[JON-A-TRON] calls his clock a “perpetual clock,” perhaps in a nod to perpetual calendars. But in our opinion, all clocks are perpetual, so we’ll stick with “linear clock.” Whatever you call it, it’s pretty neat. The hour and minute indicators are laser cut and engraved plywood, each riding on a rack and pinion. Two steppers advance each rack incrementally, so the resolution of the clock is five minutes. [JON-A-TRON] hints that this was a design decision, in part to slow the perceived pace of time, an idea we can get behind. But as a practical matter, it greatly simplified the gear train; it would have taken a horologist like [Chris] at ClickSpring to figure out how to gear this with only one prime mover.

In the end, we really like the look of this clock, and the selection of materials adds to the aesthetic. And if you’re going to do a Nixie clock build, do us a favor and at least make it levitate.


Filed under: clock hacks
Hack a Day 02 Apr 03:00

DIY Syringe Pump Saves Big Bucks for Hacker’s Lab

If you had a choice between going to your boss and asking for funds for a new piece of gear, would you rather ask for $3000 to buy off-the-shelf, or $200 for the parts to build the same thing yourself? Any self-respecting hacker knows the answer, and when presented with an opportunity to equip his lab with a new DIY syringe pump for $200, [Dr. D-Flo] rose to the challenge.

The first stop for [Dr. D-Flo] was, naturally, Hackaday.io, which is where he found [Naroom]’s syringe pump project. It was a good match for his budget and his specs, but he needed to modify some of the 3D printed parts a little to fit the larger syringes he intended to use. The base is aluminum extrusion, the drive train is a stepper motor spinning threaded rod and a captive nut in the plunger holders, and an Arduino and motor shield control everything. The drive train will obviously suffer from a fair amount of backlash, but this pump isn’t meant for precise dispensing so it shouldn’t matter. We’d worry a little more about the robustness of the printed parts over time and their compatibility with common lab solvents, but overall this was a great build that [Dr. D-Flo] intends to use in a 3D food printer. We look forward to seeing that one.

It’s getting so that that you can build almost anything for the lab these days, from peristaltic pumps to centrifuges. It has to be hard to concentrate on your science when there’s so much gear to make.


Filed under: chemistry hacks, tool hacks

Pint-Sized, Low-Cost CNC Machine

A little MDF, a little plywood, some bits of threaded rod – put it all together and you’ve got this low-cost desktop CNC build using very few parts you’d need to go farther afield than the local home center to procure.

We’ve seen lots of e-waste and dumpster diving CNC builds here before; what’s appealing here is not only the low price tag of the build but also its approachability. As the short videos below show, [Thimo Voorwinden] does an admirable job of using the tools and materials he has on hand. We also appreciate the modularity of the build – the X- and Y-axis carriages are nearly identical and could be interchanged to alter the dimensions of the work area, or even replaced with a larger carriage if needed. The Z-axis is a little different from the usual low-end CNC build in that it doesn’t use a Dremel or other small rotary tool but rather mounts the handpiece of a flexible shaft rotary tool. Keeping the motor off the machine allows for more torque, less vibration, and reduced dead load.

The end result is a desktop CNC for about €200 with a work area large enough to fabricate small wooden and plastic parts, or to mill foam blocks for use as casting molds. It looks like [Thimo] has more in store for his little CNC machine, and we’re looking forward to seeing what improvements he can come up with.

[ via r/CNC]


Filed under: cnc hacks
Hack a Day 17 Feb 00:00

These boxes make music out of metal and wood

Les Boites Mécaniques are a set of four automated boxes that produce music out of wood and metal. These experimental instruments enable anyone to explore the magic of making sound by pressing buttons on a remote, which activate each respective device to vibrate, knock, and rub materials.

The boxes were developed by Kogumi‘s Anatole Buttin and Yan Godat for educational electronic music workshops, and can be played either solo or in unison. There’s even a mode that allows users to control it all via MIDI notes on a computer.

In terms of hardware, each box is equipped with an Arduino Uno, a TLC59711 LED driver, step motors with AccelStepper library and a 3D-printed microstep driver.

You can watch how it all comes together to create a unique sound below!

Arduino Blog 27 Oct 11:19

Rotating Frame Will Change Your View of Vertical Images

[Tim] was tired of compromising his portrait-oriented digital photos by shoehorning them into landscape-only frames. Unable to find a commercial solution, he built his own rotating digital photo frame from a 27″ LCD TV.

It uses a Raspi 3 to find [Tim]’s pictures on a giant SD card. He originally wanted to have the Pi pull pictures from Google Photos and display them randomly, but the API doesn’t work in that direction. Instead, a Python script looks at the pictures on the SD card and determines whether each is landscape or portrait-oriented. If a picture was taken in portrait-mode, the display will rotate 90 degrees. Rotation is handled with an Arduino, a stepper motor, and some 3D-printed herringbone gears. The first version was a bit noisy, so [Tim] re-printed the motor mount and the pinion gear out of flexible filament.

[Tim] designed the mount and frame himself and laser-cut the pieces out of birch plywood. We like that he accounted for the front-heaviness and that he covered the high voltage circuitry with acrylic to mitigate the risk of shock. All the code and design files are available on his project page. Make the jump to see a brief demonstration followed by a walk-through and stay for the six-minute slide show.

 

Filed under: Arduino Hacks, Raspberry Pi

Star Track: A Lesson in Positional Astronomy With Lasers

[gocivici] threatened us with a tutorial on positional astronomy when we started reading his tutorial on a Arduino Powered Star Pointer and he delivered. We’d pick him to help us take the One Ring to Mordor; we’d never get lost and his threat-delivery-rate makes him less likely to pull a Boromir.

As we mentioned he starts off with a really succinct and well written tutorial on celestial coordinates that antiquity would have killed to have. If we were writing a bit of code to do our own positional astronomy system, this is the tab we’d have open. Incidentally, that’s exactly what he encourages those who have followed the tutorial to do.

The star pointer itself is a high powered green laser pointer (battery powered), 3D printed parts, and an amalgam of fourteen dollars of Chinese tech cruft. The project uses two Arduino clones to process serial commands and manage two 28byj-48 stepper motors. The 2nd Arduino clone was purely to supplement the digital pins of the first; we paused a bit at that, but then we realized that import arduinos have gotten so cheap they probably are more affordable than an I2C breakout board or stepper driver these days. The body was designed with a mixture of Tinkercad and something we’d not heard of, OpenJsCAD.

Once it’s all assembled and tested the only thing left to do is go outside with your contraption. After making sure that you’ve followed all the local regulations for not pointing lasers at airplanes, point the laser at the north star. After that you can plug in any star coordinate and the laser will swing towards it and track its location in the sky. Pretty cool.


Filed under: Arduino Hacks, cnc hacks, news, solar hacks

Keytar Made Out Of A Scanner To Make Even the 80s Jealous

Do any of you stay awake at night agonizing over how the keytar could get even cooler? The 80s are over, so we know none of us do. Yet here we are, [James Cochrane] has gone out and turned a HP ScanJet Keytar for no apparent reason other than he thought it’d be cool. Don’t bring the 80’s back [James], the world is still recovering from the last time.

Kidding aside (except for the part of not bringing the 80s back), the keytar build is simple, but pretty cool. [James] took an Arduino, a MIDI interface, and a stepper motor driver and integrated it into some of the scanner’s original features. The travel that used to run the optics back and forth now produce the sound; the case of the scanner provides the resonance. He uses a sensor to detect when he’s at the end of the scanner’s travel and it instantly reverses to avoid collision.

A off-the-shelf MIDI keyboard acts as the input for the instrument. As you can hear in the video after the break; it’s not the worst sounding instrument in this age of digital music. As a bonus, he has an additional tutorial on making any stepper motor a MIDI device at the end of the video.

If you don’t have an HP ScanJet lying around, but you are up to your ears in surplus Commodore 64s, we’ve got another build you should check out.


Filed under: Arduino Hacks, digital audio hacks, musical hacks

Weekend Watch: B2Builds Dives into Electronics and Woodworking

Woodworking and electronics, automatons and camera sliders. Ben Brandt's YouTube channel offers lots of cool projects.

Read more on MAKE

The post Weekend Watch: B2Builds Dives into Electronics and Woodworking appeared first on Make: DIY Projects and Ideas for Makers.