Bolt-On Stepper Motor Driver For The Raspberry Pi

For his entry into the 2019 Hackaday Prize, [Tobius Daichi] is working on adding some motion control capabilities to everyone’s favorite Linux SBC. His 3+Pi board attaches to the Raspberry Pi’s GPIO header and gives you a convenient way to control four individual stepper motors. Perfect for a 3D printer, laser cutter, CNC, or anything else you can think of that needs to move in a few dimensions.

But such a simplistic description of the 3+Pi might be underselling it a bit. While [Tobius] says he was inspired by the classic Arduino CNC Shield that powers countless DIY 3D printers, he’s managed to improve on the concept. Rather than having the host Pi communicate directly with the stepper drivers, the 3+Pi features an onboard STM32F302CBT6 that handles the actual motor control. The Pi just needs to tell it what to do over UART.

If you’re looking to do things in real-time, having an onboard microcontroller handle the low-level aspects of talking to the stepper drivers can be a big help. A natural extension for this board could be support for the Klipper firmware, which leverages the fact that the Raspberry Pi is many times more powerful than your average 3D printer control board. With the Pi handling the math and providing the microcontroller instructions, Klipper allows for faster and more accurate printing than the microcontroller alone could accomplish.

As for the stepper drivers themselves, [Tobius] has decided to go with the Trinamic TMC2041-LA-T. This chip is notable as it puts dual drivers in one 48-QFN package, which is great if you’re looking to save space on your board. Some might complain that the 3+Pi doesn’t allow for easily swapping out the stepper drivers if you manage to cook one like on the Arduino CNC shield, but realistically you could say the same about many purpose-built stepper control boards.

[Tobius] is tackling this project by himself currently, but does mention that he’s open to teaming up with anyone who’s got an interest in this sort of thing. There have been previous attempts at creating Linux-powered 3D printer controllers in the past, but we think this approach holds particular promise if for no other reason than the Raspberry Pi’s popularity.

Coasty The Coaster Toaster

Whether or not you feel the need to laser cut custom drink coasters, you have to be impressed by the amount of thought that went into Coasty.

They say that justice is blind, and while we can’t promise you anything at your next court date, we can at least say with confidence that we’re not the kind of people who will turn down a good hack just because it’s held together with rubber bands and positive vibes. If it works it works, and it doesn’t matter what it looks like. Having said that, we’re blown away by how incredibly finished this particular project is.

Coasty, designed and built by [Bart Dring] is one of those projects that elevate a hack into something that looks like it could be a commercial product. It takes in a common pulpboard coaster and laser cuts any design you want. It’s just the right size, with just the right components because this is Coasty’s purpose. It has a slot to feed in the coaster, and uses this as one of the axes during the laser cutting process, with the laser’s left to right movement as the other. This method makes for a smaller overall footprint and means you never need to open the protective enclosure for normal operation.

One of the most striking elements of Coasty is how much of the hardware is 3D printed. If it isn’t a motor, smooth rod, or other mechanical component, it’s printed. We’re used to seeing 3D printed parts as brackets or mounts, but rarely do you see an entire chassis printed like this. Not only does it take a serious amount of forethought and design, but the print time itself can be quite prohibitive.

But by designing and printing the majority of Coasty, it really gives it a professional look that would have been harder to achieve if it was a bundle of aluminum extrusions.

The back of Coasty features an exposed PCB “motherboard” with a dizzying array of plug-in boards. Hardware like the stepper drivers, Bluetooth radio, and laser power supply are separate modules for ease of maintenance and development. There’s a few neat hardware features integrated into the motherboard as well, like the IR sensor for detecting the edge of the coaster.

The printed filter is an especially nice touch. Containing a scrap of commercially available carbon cloth intended for home air filters, Coasty is able to cut down on the smoke that is invariably produced when blasting cardboard with a 3W 450nm laser.

It turns out that custom drink coasters are serious business for some hackers out there. This isn’t the first time somebody has gone all out to make their mark while simultaneously preventing marks.

Continue reading “Coasty The Coaster Toaster”

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”

Hackaday Prize Entry: The Green Machine

For Hackers, rapid prototyping is made easier using basic building blocks such as the Raspberry Pi, Arduino and the huge variety of add on shields for home brew projects. But we don’t see too many real world Industrial applications or machines built using these off-the-shelf electronics. [SlyScience] built The Green Machine – an industrial grade, automated spray painting device to help coat polycarbonate tubes consistently.

The Green Machine is essentially a linear drive that can move a spray gun across a spinning clear tube and coat it evenly with the desired color. These tubes are used as color filters – they slide over standard T5, T8 or T12 fluorescent lamps – and are used in advertising, special effects, films and similar applications. For almost 10 years prior to this machine, the task was done manually. The HPLV (high pressure, low volume) spray gun used for this process needed skilled hands to get consistent results. It was easy to ruin a tube and cleaning them was not possible. [SlyScience] figured things out on the go – teaching himself and figuring out all of the software and hardware pieces of the puzzle. The welded steel frame is about the only “custom” part in this build. Everything else is COTS. Check out the video of The Green Machine in action below, and if you have any tips to help improve the build, chime in with your comments.

Continue reading “Hackaday Prize Entry: The Green Machine”

A Recycled Robot Arm For All!

It’s mind boggling how much e-waste we throw out. Perfectly good components, mass produced for pennies. And at the end of their life, going straight to a landfill or some poor country to be melted down. Don’t you wish you could help?

Stepper motors are a dime a dozen when it comes to e-waste, and there’s tons of cool projects you can do with a stepper motor — [Madivak] is just starting on a robot arm design over at Hackaday.io that makes use of recycled components.

It’s fairly early in development, but that means it’s a great time to start following it on the project site. The robotic arm is being designed for his final year project in his undergrad degree. Besides the steppers, he’s using his school’s Utilimaker 3D printer to manufacture all of the other mechanical components with control coming from DRV8825 stepper drivers and the Freescale Freedom KL25Z dev kit. Check out the clips after the break to see current state of the build.

Continue reading “A Recycled Robot Arm For All!”