Driving A Motor With An Audio Amp Chip

[InazumaDenki] wanted to answer the question: can you drive a motor with an audio amplifier chip? The answer, of course, is yes. The TDA7052 has a single input, and a bridge output meant to drive a speaker differentially. It should work if the motor doesn’t present more of a load than a speaker.

The plan was to use a resistive divider to provide several discrete voltages to the input. At precisely the half-way mark, there should be no voltage across the load. Altering the input to go higher than halfway should make the motor turn one way, and making it go lower should turn the motor the other way. As you can see in the video below, it does work, although it may not be ideal for this application.

Continue reading “Driving A Motor With An Audio Amp Chip”

Arduino Takes Control Of Dead Business Card Cutter

It’s a common enough situation, that when an older piece of equipment dies, and nobody wants to spend the money to repair it. Why fix the old one, when the newer version with all the latest bells and whistles isn’t much more expensive? We all understand the decision from a business standpoint, but as hackers, it always feels a bit wrong.

Which is exactly why [tommycoolman] decided to rebuild the office’s recently deceased Duplo CC-330 heavy duty business card cutter. It sounds like nobody really knows what happened to the machine in the first place, but since the majority of the internals were cooked, some kind of power surge seems likely. Whatever the reason, almost none of the original electronics were reused. From the buttons on the front panel to the motor drivers, everything has been implemented from scratch.

An Arduino Mega 2560 clone is used to control four TB6600 stepper motor drivers, with a common OLED display module installed where the original display went. The keypad next to the screen has been replaced with 10 arcade-style buttons soldered to a scrap of perfboard, though in the end [tommycoolman] covers them with a very professional looking printed vinyl sheet. There’s also a 24 V power supply onboard, with the expected assortment of step up and step down converters necessary to feed the various electronics their intended voltages.

In the end, [tommycoolman] estimates it took about $200 and 30 hours of work to get the card cutter up and running again. The argument could be made that the value of his time needs to be factored into the repair bill as well, but even still, it sounds like a bargain to us; these machines have a four-figure price tag on them when new.

Stories like this one are important reminders of the all wondrous things you can find hiding in the trash. Any time a machine like this can be rescued from the junkyard, it’s an accomplishment worthy of praise in our book.

Robotics Controller For The Pi Boasts An Impressive Feature List

[Michael Horne] recently shared his thoughts on the RedBoard+, a motor controller board for the Raspberry Pi aimed at robotic applications. His short version for busy people is: if you’re at all into robotics, get one because it’s fantastic.

At heart the RedBoard+ is a motor controller, but it’s packed with I/O and features that set it above the usual fare. It can drive two DC motors and up to twelve servos, but what is extra useful is the wide input range of 7-24 V and its ability to power and control the underlying Raspberry Pi. A user-programmable button defaults to either doing a reboot or safe shutdown, depending on how long the button is held. Another neat feature is the ability to blink out the IP address of the Pi using the onboard RGB LED, which is always handy in a pinch.

The RedBoard+ has a GitHub repository which provides a variety of test scripts and an easy to use library, as well as a variety of hookup guides and quickstart guides. There’s even a pre-configured SD image for those who prefer to simply dive in.

A brief demo video showing the board in operation is embedded below. If you’re interested in one, Creator [Neil] of RedRobotics has made it available for sale on Tindie.

Continue reading “Robotics Controller For The Pi Boasts An Impressive Feature List”

Arduino Drives Seventeen Stepper Motors, Carefully

It’s fair to say that building electronic gadgets is easier now than it ever has been in the past. With low-cost modular components, there’s often just a couple dozen lines of code and a few jumper wires standing between your idea and a functioning prototype. Driving stepper motors is a perfect example: you can grab a cheap controller board, hook it up to a microcontroller, and the rest is essentially just software. But recently [mechatronicsguy] wondered if even that was more hardware than was technically necessary to get the job done.

It’s not that he was intentionally looking to make things more complicated for himself, of course. His rationale was entirely economic; if you’re looking to drive a dozen or more stepper motors, even the “cheap” controllers can add up. So he started to wonder if he could skip the controller entirely and connect the stepper motor directly to the digital pins of an Arduino. Generally speaking this is a bad idea, but if you’re careful and are willing to take the risk, [mechatronicsguy] is living proof it’s possible

So what’s the trick to running a whopping seventeen individual stepper motors directly from the digital pins of an Arduino Mega? Well, to start with you’re not going to be running the beefy NEMA 17 motors like you might find in a 3D printer. [mechatronicsguy] is using the diminutive (and dirt cheap) 28BYJ-48, a light duty stepper used in many consumer products. Even with this relatively tiny motor, you need to crack open the case and cut a trace on the PCB to switch it from unipolar to bipolar.

Beyond that, you need to be careful. [mechatronicsguy] reports he’s had success running as many as ten of them at once, but realistically the fewer operating simultaneously the better. This is actually made easier due to the relatively poor specs of the 28BYJ-48 motor; its huge eleven degree step size means its not really susceptible to the same kind of slippage you’d get on a NEMA 17 when powered down. This means you can cut power to all but the actively moving motor and be fairly sure they’ll all stay where you left them.

With as popular as the 28BYJ-48 stepper is, there are several projects this “quick and dirty” method of interfacing could potentially work with. This small “barn door” star tracker is an obvious example, but we’ve also seen some very nice robotic arms built with these low-cost motors which could benefit from the technique.

New Part Day: ST’s New 3D Printer Motor Driver

ST has released a new evaluation board for a stepper motor driver. It’ll plug right into your 3D printer, and if you’re looking for a chip to build a cheap 3D printer controller board around, this might be the one.

We’ve come a long way in the field of stepper motor drivers in just a few short years. The first popular driver for RepRap electronics was ‘the Pololu’, a stepper motor carrier board using Allegro’s A4988 driver. If you had a big heat sink, this driver could deliver 2 A per coil, operated between 8 and 35 V, and had microstep resolution down to 1/16th. Was it the best stepper driver around? No, but it was cheap, it was everywhere, and RAMPS, the popular RepRap control electronics picked up on its pinout and accidentally created a standard. The DRV8825 motor driver from TI followed next, with microstepping down to 1/32nd, a little more current per coil, and arguably a better thermal design.

Then the wave of Trinamic drivers happened. The Trinamic TMC2100 was a silent stepper motor driver when running a motor at medium or low speeds. With this driver, you could run a motor more efficiently, which means the motor doesn’t get as hot. There are diagnostics via SPI. Tom liked it, and now in every Prusa i3, you’ll find a bunch of Trinamic drivers.

ST’s new offering, the STSPIN820, doesn’t have the fancy-schmancy features the Trinamic driver does, but the chip itself is fantastically cheap, at about 1/5th the price of a Trinamic driver. As far as feature set, you should probably look at this new chip as an upgrade to the A4988, with much higher microstepping and slightly higher current handling.

If you’d like to experiment with the evaluation module, you can grab one from an ST distributor; at the time of this writing, there were seventeen of these modules available worldwide. If you’d just like to play with the STSPIN820 motor driver chip, ten thousand are available between Mouser and Digikey, starting at $2.97 in quantity one. If someone could tell electronics manufacturers to build more than a dozen evaluation boards at a time, that would be great.

Raspberry Pi Zero Stepper Driver, First Of Many Modules

The Raspberry Pi in general (and the Zero W model in particular) are wonderful pieces of hardware, but they’re not entirely plug-and-play when it comes to embedded applications. The user is on the hook for things like providing a regulated power source, an OS, and being mindful of proper shutdown and ESD precautions. Still, the capabilities make it worth considering and [Alpha le ciel] has a project to make implementation easier with the Raspberry Pi Zero W Stepper Motor Module, which is itself part of a larger project plan to make the Pi Zero W into a robust building block for robotic and CNC applications.

[Alpha le ciel] is building this stepper motor module as the first of many Raspberry Pi hats meant to provide the Raspi with the hardware for robotics applications. This module, in particular, features two A4988 stepper motor drivers, a connector for a power supply or battery providing 7-20V, and a buck converter to bring that power down to the 5V needed by the Pi itself. All the relevant pins are broken out onto the Pi’s GPIO header, making this module the simplest way possible to add a pair of motors to a Pi. What does that mean? Printers or self-balancing robots, really whatever you want.

A stepper driver that conforms to the footprint of the Pi Zero is a good start, and the larger concept of creating additional modules is a worthy entry to the Hackaday Prize.

Optocouplers: Defending Your Microcontroller, MIDI, And A Hot Tip For Speed

Deep in the heart of your latest project lies a little silicon brain. Much like the brain inside your own bone-plated noggin, your microcontroller needs protection from the outside world from time to time. When it comes to isolating your microcontroller’s sensitive little pins from high voltages, ground loops, or general noise, nothing beats an optocoupler. And while simple on-off control of a device through an optocoupler can be as simple as hooking up an LED, they are not perfect digital devices.

But first a step back. What is an optocoupler anyway? The prototype is an LED and a light-sensitive transistor stuck together in a lightproof case. But there are many choices for the receiver side: photodiodes, BJT phototransistors, MOSFETs, photo-triacs, photo-Darlingtons, and more.

So while implementation details vary, the crux is that your microcontroller turns on an LED, and it’s the light from that LED that activates the other side of the circuit. The only connection between the LED side and the transistor side is non-electrical — light across a small gap — and that provides the rock-solid, one-way isolation.

Continue reading “Optocouplers: Defending Your Microcontroller, MIDI, And A Hot Tip For Speed”