Hey everyone! I'm a hobbyist trying to learn about working with DC motors. I've been experimenting with them and am hitting a few roadblocks, especially regarding inductive kickback. Here are my questions:
1. How much of a transient voltage spike is typically acceptable on a microcontroller?
2. I'm working with a 12V DC motor and I'm seeing transient spikes at the 5V input signals that exceed 10V peak-to-peak. Is that normal?
3. Despite using flyback diodes on the motor terminals and TVS diodes on the inputs, the spikes seem too high. Is there something I'm missing?
4. Should I throw in the towel and just use an optocoupler instead?
5. How does everyone else deal with inductive kickback? Is it possible to eliminate it without using an optocoupler?
2 Answers
Welcome to the world of electrical challenges! It sounds like you're dealing with some frustrating interference issues. If you have a schematic of your microcontroller to motor setup, it could help. Sometimes the placement of ground or flyback diodes can worsen spikes. Is your motor a brushed type with just two terminals? Also, have you installed a quality capacitor (~10nF to 100nF) directly across the motor terminals? Twisting your motor wires together or using shielded coaxial wiring might also help reduce noise.
You've got several options to explore, so let's break it down:
- You might want to switch to faster flyback diodes, like Schottky or ultrafast types, as regular 1N4007 diodes may not cut it.
- Have you looked into snubber circuits? These combine a capacitor, resistor, and diode to effectively dampen spikes better than a diode alone.
- Consider using separate power supplies for the motor and your Arduino to prevent spikes from affecting your microcontroller. Usually, it's best to dedicate different rails for digital, analog, and high-power components. That helps manage power cleanly and avoids these kinds of issues!

Thanks for the advice! The separate power rails sound like a solid plan. I’ve currently got a 5V rail for the Arduino and a 12V rail for the motor, using a MOSFET for control. But I see kickback on the 5V side behind the MOSFET. Just to clarify, you mean using IC regulators for that setup, right? Not the larger buck/boost boards?