OK, I know it's generally a no-no to connect motors straight to an Arduino, but the stepper motor I'm driving is minute. It's tiny. Open frame, just two coils and a little magnetic rotor.
I dug a stepper motor out of an autofocus lens, soldered four little wires to it and stuffed them in the Arduino outputs. I've got spare Atmega chips if I blow this one, but the motor seems to run fine on 5 volts; the current draw is a little under 10mA per coil.
If I was connecting anything else coil-based (like a relay) to an Arduino, I'd stick a diode across the coil facing the other way, so when the coil's power goes off and the magnetic field collapses, any voltage it generates can dissipate through the diode rather than zapping my Arduino. That approach won't work with my stepper, as the voltage across the coil could be in either direction depending on which step the motor's at.
But then I was wondering - those little zener diodes - if you try putting a voltage the wrong way across them they won't conduct unless the voltage goes above their reverse breakdown voltage, at which point they conduct. So could I do this...
...? (I've only marked them as 6.8v as that's what I have sitting in the parts box at home - I'm guessing I just need something larger than 5 and less than whatever the Arduino's maximum GPIO pin voltage is allowed to be).
I think I've seen this two-diodes-facing-each-other thing before, but didn't really understand it. Here, it looks like it could theoretically protect my Arduino against any nasty voltage spikes without interfering with the normal motor operation. And without me having to build a whole H-bridge thingy... ick.
Does this seem sensible? Any tips?