# Use a ULN2803 to run a Stepper Motor

Of couse you can also use the 10A current range of a DMM to measure the coil current.

Of couse you can also use the 10A current range of a DMM to measure the coil current.

Do you mean just running the setup with the ULN2803s and putting a mutlimeter in series between the supply and ICs?

electricviolin: Do you mean just running the setup with the ULN2803s and putting a mutlimeter in series between the supply and ICs?

That won't work because the voltage won't be constant. You could connect a constant voltage to a coil then use the multimeter in series to measure current, but it's quicker and easier to just measure the coil resistance. I=V/R isn't that hard to get your head around. ;)

I meant ignore the ULN2803 just energize 0NE of the stepper motor coils with the DMM in series. You don't have to actually TURN the shaft if all you want to know is how much current the coil draws. Just connect the motor common to your motor power and use the DMM in series in current mode to ground one of the coils to measure the current. It's really that simple. Keep in mind that when actually running the motor, the coils are not all on at the same time so calculating the current is not as simple as multiplying the current draw of one coil by 4. If you want to know that put the meter in series with your motor power and motor common and then drive the ULN2803 to turn the shaft and measure the average current through the common.

You could connect a constant voltage to a coil then use the multimeter in series to measure current, but it's quicker and easier to just measure the coil resistance.

Ok, so I get the coil resistance. How do I get the current/voltage? You said not to use a multimeter in series to measure current or voltage. Do you mean that I could use any voltage I desire and just use the resistance as a method of finding the current draw? I have a feeling that is not what you mean considering that not everything runs at whatever voltage you shove into it.

calculating the current is not as simple as multiplying the current draw of one coil by 4

So if I were to multiply by 4, I would certainly know the max this motor would draw no load, right? I just want to run it to see if it can handle a certain load, but a load would increase the current, making this more difficult :confused:

At this point, I really just care that I am running it at the correct voltage. It seems as though OldSteve's method is the simplest (once I fully understand it). I am not too concerned with the current so long as it is below what my test circuitry can handle.

so I get the coil resistance. How do I get the current/voltage? You said not to use a multimeter in series to measure current or voltage.

I certainly did not say that. I specifically said to put the meter in series with the motor common and the power source or to simply bypass the chip and energize a single coil with the meter in series with that coil. The first method will tell you the average current while driving the motor with the chip and the second method will tell the current draw of a single coil. Reread what I said in my last post.

Yes you can use a stepping motor at any voltage within reason, from say 2V to 200V. It is just a coil, the more voltage you give it the more current it takes.

Do you mean that I could use any voltage I desire and just use the resistance as a method of finding the current draw?

I have a feeling that is not what you mean considering that not everything runs at whatever voltage you shove into it.

No, with the little experience that you have with electronics (based on the above comment), it would be wiser (and safer ) to put the meter in series and power it with a low voltage like 5V (NOT FROM THE ARDUINO) and measure the current through the common from the power source. If you do not know how to measure current (meaning you have NEVER done before in your life) then maybe you should postpone doing that until it is clear to you.

FYI, yes almost everything does work with whatever voltage you shove into it. The question is HOW LONG ? (uS , seconds, minutes, hours, days, months etc etc.)
What’s missing here is a basic understanding of how things are done with electronics.
You start with finding the specifications for the device you want to use. You got the motor from somewhere. Where did you get it from ?
If you can’t find a link to the vendor , have you thought of posting a photo of the motor ?
Granted there is a chance none of us will recognize it but there is NO chance we will if you don’t post a photo of it, is there ?
Have you looked closely at the motor to see if it has any identifying markings ?
In your original post you said this :

This IC can handle 500 mA per channel, with 8 channels. I want to turn it into an h-bridge, which doesn’t seem to hard, but getting a higher current (1A) out of them does seem hard. The datasheet suggests connecting the transistors in parallel if a higher current is needed, but then what happens with the resistor situation? I am not sure were to put the resistors and what values to use.

which indicates you are not aware of the function of the resistors about which you inquire and how their value relates to the amount of current drawn by the transistor. A more appropriate question in your original post would have been:

What the heck are these resistors for and why do they have those values ?
What does that value have to do with the motor current ?
Where do I find this information ?

You mention a datasheet so you obviously know what that is. Did you try looking up the datasheet for the TIP120 transistors and looking up the hfe (dc current gain) ?
Do you know what that is ?
Do you know how to calculate the base resistor based on Ice ?
Considering that you had no intention of using TIP120 transistors , “what happens with the resistor situation” is that it ceases to exist because you don’t need them for the ULN2803. It still wouldn’t be a bad idea to learn what hfe is and how to use it. (I mean if you ever plan to use a transistor some day, not that you would want to do that but sometimes it can’t be helped.)

I reckon that if he either measures the resistance and calculates the current for the voltage that he’s using, (I=V/R), then ‘pretends’ that all 4 coils will be energised and uses a H-bridge driver that can handle that current, he’ll be fine. Although all coils will never be energised, that allows a nice amount of overhead.
I was intentionally trying to steer clear of direct current measurement with the meter. Too easy to stuff up.
@electricviolin, the ‘safe’ way to measure current is to place a small value resistor, (say 0.1 ohms), in series with a coil, power it up then measure the voltage developed across that resistor. Then, once you do the reading that I suggest below, you can calculate the coil resistance or the current through the coil at various voltages.

It seems as though OldSteve’s method is the simplest (once I fully understand it).

From the sound of this, though, even a resistance measurement of a single coil is beyond ‘electricviolin’ at the moment.

@electricviolin, I think that you need to do a little studying up on basic electronics before going any further. If you don’t understand V=IR, R=V/I, I=V/R, (Ohm’s Law), and power calculation P=VI or I2R, then learning a bit more about it and a few other things is essential. Stuff like series circuits, parallel circuits, series-parallel circuits, what resistance, current and voltage actually are, and anything else you come across. Otherwise, stick with pre-built modules and stop trying to use stuff you know nothing about.

Keep in mind that when actually running the motor, the coils are not all on at the same time so calculating the current is not as simple as multiplying the current draw of one coil by 4. If you want to know that put the meter in series with your motor power and motor common and then drive the ULN2803 to turn the shaft and measure the average current through the common.

@raschemmel, in general, the problem with this method is there’s a risk of killing the chip in the process, if he leaves it powered too long and the current is well over 0.5A

I guess if measuring the current of a single coil ( bypassing the chip) is too challenging then maybe it's time to ABORT MISSION/ RTB .

raschemmel: I guess if measuring the current of a single coil ( bypassing the chip) is too challenging then maybe it's time to ABORT MISSION/ RTB .

Yep. A little study first, I reckon. Far too many people here want to start at the top, without learning even the most basic points about electronics (or programming, for that matter). What ever happened to the "Hello World" approach?

There's an epidemic of " SKIPPING STEPS"...

I posted another sub question on this thread because it was related to using the ULN2803 with a stepper, however it is a 6 wire unipolar stepper this time.

I think the confusion resulting indicates why you should have started a new thread.

I do have an understanding of electronics. In fact, I have designed a number of circuits for other circuits in the past. This is, however, the first time I am working with steppers, which is why I sound so clueless.

Also, please look at the date on the posts. This is an old thread and I am no longer trying to make an H-bridge using the ULN2803. I have learned a lot of electronic between now and when I first made this thread. If I could, I would tell my old self that you can't make an H-bridge without involving some P-channel and N-channel MOSFETS in the mix.

Anyway, upon further inspection of the motor, the wires seem to be going to 2 "layers" of the motor, similar to the way a dual gang potentiometer (I just thought of that based on the physical stacking, but I know it is not really related). See image

For some reason, if you can't see the images, here it the link

Get you one of these http://www.taydaelectronics.com/breakout-boards/easy-driver-stepper-motor-controller.html Then you can spend time writing code for your stepper. Or try this out.

I just used that schematic with multiple ULN2803s and it worked! There was no detectable heat produced by the chips, so I take it that I am good to go for now!

I really can't tell you that but if I was you I'd set my meter for amps and see what it's using it's easy to do set it like been said on the 10 amp scale and see. I'll post you a picture if you like.

See it's like this you have five guys working for the city and only one is doing all the work or most of it. The only way to see is to find out who's doing all the work is to watch and see. So you need to see how much is being used I bet you'll be amazed your stepper is not using as much as you think.

I think learning how to use a meter to measure current is more important than his stepper project.