I came across dual coil stepper based instruments out of a car that i want to use to display stuff on arduino. Coil impedance is 200 Ohms. However i can't afford an H Bridge or a Motor drive shield, even though they're only like 5 bucks. (don't ask.)
I want to look into other ways to drive these small instruments. So if i understood this right to make the pointer move you have to drive the coils in reverse polarity, so one is powered + / - and the other - / + and reverse to make it go the other way. Is this assumption correct? Driving both at the same time should take 5 Volts / 100 Ohms = 0.05Amps.
So yeah, i'm pretty much looking for an easy makeshift way to make use of those gauges. I got some Loglevel Mosfets (IRL540N, i know, overkill, but it might just work) lying around that would probably be suitable. Yeah i can't fully wrap my head around this yet, some advice would be great.
Thanks
Sooner or later i'll get that drive shield but for now it's improvising and learning time.
By the way, if an PWM output pin is 0/Off, is it pulled to GND? And if not, if i used a resistor to pull it to GND could i maybe do that reverse polarity thing somehow?
5V and 200ohms per winding(*) is within the capabilities of Arduino pins to drive - but you
will need protection diodes to bolster the on-chip ones (preferrably schottky diodes).
So for bipolar motor you need 4 pins, each with protection diode to ground and Vcc, and
then its a question of software. In effect each pair of pins is an H-bridge.
(*) 5V / 200 = 25mA, whereas pin absolute maximum is 40mA. You will lose some voltage,
perhaps you'll get about 4V drive between two pins due to the losses in the output
transistors.
thanks for the answers so by connecting a single coil ( i havent heard the term winding, is that referring to the coils or the single windings per coil?) to two pwm pins and alternating them beween 255 and 0 would produce alternating current to drive the stepper with?
milp:
thanks for the answers so by connecting a single coil ( i havent heard the term winding, is that referring to the coils or the single windings per coil?) to two pwm pins and alternating them beween 255 and 0 would produce alternating current to drive the stepper with?
the one on the left side resembles it best, theyre almost exactly like that.
In my experience "winding" is universally used for motors and transformers (although "primary" and "secondary" are common for
transformers), "coil" usually means a single inductor. It refers the all the copper between one terminal on the
device and another. A single turn is called that, a "turn".
You don't need PWM, think standard H-bridge. Try googling "stepper motor sequencing" or "full-wave half-steps" or some such
for descriptions of how to sequence a stepper motor. PWM would only be wanted for microstepping and that's probably overkill
here.
Thanks for the info. I've been messing around with this tutorial to get it to work:
And it sort of works.
stepper.step(-1); Moves the pointer, but it's very unsteady and jittery. Sometimes the direction of movement changes.
stepper.step(1); Moves it in the same way and direction as -1
Stuff like
stepper.step(630);
Does nothing at all.
I've adapted the code example and tried it out, using the same values for speed and STEPS.
Where could my error be? Is it possible that i connected them in the wrong order? They don't say anything about connection order in the tutorial, do i have to pay attention to that?
Connection order has to be correct - each H-bridge equivalent drives one winding of the motor.
Their circuit assumes pins 8 and 9 go to one winding, 10 and 11 to the other.
And you must use flyback diodes (8 in total) or you risk frying the Arduino (the Arduino's protection
diode cannot handle more than about 1mA). So that tutorial is pretty poor.