Darlington
Jonathan Allison
Posts: 96
Hello everyone
I'm having a tough time trying to get a stepping motor working off my stamp.
The motor works. I can use the power supply and make it "step"
The stamp works, I can light an LED with the pins I am using.
The wiring to the motor is ok, I tested the wire where its pushed in the breadboard, steps that way too.
As far as I know, and from all the information I can find the darlington is hooked up correctly.
I attached a picture, might help...
Any suggestions would be awesome
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Johnny
Post Edited (Jonathan Allison) : 2/25/2005 2:51:48 AM GMT
I'm having a tough time trying to get a stepping motor working off my stamp.
The motor works. I can use the power supply and make it "step"
The stamp works, I can light an LED with the pins I am using.
The wiring to the motor is ok, I tested the wire where its pushed in the breadboard, steps that way too.
As far as I know, and from all the information I can find the darlington is hooked up correctly.
I attached a picture, might help...
Any suggestions would be awesome
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Johnny
Post Edited (Jonathan Allison) : 2/25/2005 2:51:48 AM GMT
Comments
bugg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Geordi: "It's like the laws of physics went right out the window!"
Q: "And why shouldn't they, there so inconvinient!"
Geordi LaForge, Chief Engineer, USS Enterprise, NCC 1701-D
Q, Omnipotent Prankster
Anyway, please let me know if there is anything obviously wrong.
That wire that is not connected, must have come disconnected as I moved it around to take the pic, but just incase, I tried it again with it connected, still nothing :S
Forgot to mention, the wire furthest to the right, is a red wire off the stepper, and the stepper is a Mitsumi M35SP - 9T.
The code I am using to (try) to drive it is directly from parallax (Under Components - >Motors and Control -> Stepper Motor). The motor they feature is also a Mitsumi.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Johnny
Post Edited (Jonathan Allison) : 2/25/2005 2:54:39 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Johnny
··· It looks good except for possibly one thing (maybe). on your diagram you have pin 10 of the 2803 connected to ground? If thats the case then thats were your problem is that should be connected to + from you incomming voltage and pin 9 of the 2803 and Vss on the stamp should be connected to ground or -. he is a good nuts and volts article that may help you
http://www.parallax.com/dl/docs/cols/nv/vol1/col/nv6.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DTQ
Post Edited (kb2hap) : 2/25/2005 1:51:51 PM GMT
Its obvious I must have it hooked up wrong somewhere along the way.
The motor works, you can see this by connecting the wires of the power supply directly to the motor and watch it move.
the stamp works, and those paticular pins work. You can connect an LED to them and watch the flasing sequences as it runs the stepper motor code.
I'm not sure where to go from here!
"pin 9 of the 2803 and Vss on the stamp should be connected to ground or -."
Is this to say that, I should connect a wire from 10, To the negative of my stepper power supply to pins 9 and from pin 9 to VSS of the stamp?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Johnny
Post Edited (Jonathan Allison) : 2/25/2005 4:24:27 PM GMT
It may be time to show us a copy of your program so that we can take a look at what you have. While we're looking at it, you may want to add the following line to the beginning of your program, and try it again:
DEBUG "Starting"
If that line shows up only once, that's fine. If it shows up more than once during the execution of your program the Stamp is resetting and re-executing your program without really doing anything. If that's the case (multiple displays) we need to look for an over-current problem somewhere, probably in the wiring.
If that works okay, you may want to intersperse a number of DEBUG statements in your program to check the program flow, and hopefully "see" where the problem may be occuring.
Regards,
Bruce Bates
Phase VAR OUTB ' phase control outputs
idx VAR Byte ' loop counter
stpIdx VAR Nib ' step pointer
stpDelay VAR Byte ' delay for speed control
Steps DATA %0011, %0110, %1100, %1001
Setup:
DIRB = %1111 ' make P4..P7 outputs
stpDelay = 15 ' set step delay
Main:
DEBUG "hi", CR
FOR idx = 1 TO 48 ' one revolution
GOSUB Step_Fwd ' rotate clockwise
NEXT
PAUSE 500 ' wait 1/2 second
FOR idx = 1 TO 48 ' one revolution
GOSUB Step_Rev ' rotate counter-clockwise
NEXT
PAUSE 500 ' wait 1/2 second
GOTO Main
END
Step_Fwd:
stpIdx = stpIdx + 1 // 4 ' point to next step
GOTO Do_Step
Step_Rev:
stpIdx = stpIdx + 3 // 4 ' point to previous step
GOTO Do_Step
Do_Step:
READ (Steps + stpIdx), Phase ' output new phase data
HIGH Phase
PAUSE stpDelay ' pause between steps
LOW Phase
RETURN
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Johnny
Each wire that you energize should make the stepper shaft jump.
That is, if you even have any current flowing at all; getting the Darlington wired properly would be the first step.
It's pretty easy to discover the pattern that you need to make the shaft continue to jump in the same direction of rotation. You should find a pattern is needed like (where the letter means the stepper lead has current flowing)
AC
AD
BD
BC
AC
AD
...
Then you just program the stamp to produce that same pattern. Reversing the motor will need a different but similar pattern.
If you pass a lot of current through a coil (like a stepper winding) then disconnect it, inductance can generate a large voltage across the coil, like hundreds of volts, which can zap unprotected transistors. Do you have any protection diodes? Some Darlingtons come with these built in.
David
I found the pattern to excite the coils properly, it seems to be like the darlington is not outputting. I have four new ones, I tried two different ones but no luck.
Can somone confirm the schematics above are correct for the hookup of a ULN2803?
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Johnny
the 2808 does not output!
it will sink the current to ground
the stamp pins inface to the base off the transistor.
the 2803 pins that you call outputs are the collectors of the transistors
and the emitter of the transistor goes to ground
so that means that you want to wire the + side to the + side of your load
and on the - side of your load will go to each 2803 pin
when you active the base on the 2803 it opens the gate so your current can flow through you motor to the transistor and on off to ground.
also take a close look at the 2803 datasheet
test your stamp pins if your getting output on them at the neccessary time. the it is probably the way you have your 2803 wired
also pin 9 on the 2803 goes to ground
pin 10 goes to + whatever volts you use
hope it helps
seriously if you stamp works and you motor works then its probably the way you have the 2803 wired take a look at n&v its you friend. ha ha
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DTQ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester?
http://hometown.aol.com/newzed/index.html
·
Sorry about that.· The negative side of the power supply goes to ground, as does Pin 9 of the Darlington.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester?
http://hometown.aol.com/newzed/index.html
·
After you get the wiring straightened out, I fear you may have another problem. According to the documentation I was able to find on that stepper motor, it draws 517 mA per phase, and the ULN2803 will only handle 500 mA. Thus, you are exceeding the capacity of the ULN2803. I've no idea how it will react to those conditions, but I would submit it may be potentially dangerous to the Stamp. The documentation I found came from the Mitsumi web site.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester?
http://hometown.aol.com/newzed/index.html
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester?
http://hometown.aol.com/newzed/index.html
·
Looks like I've got some more research to do before I proceed.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Johnny
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Johnny
Post Edited (Jonathan Allison) : 2/26/2005 4:59:34 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Johnny
below is a simple representation of a 2803
1·18
2 17
3 16
4 15
5 14
6 13
7 12
8·11
9 10
- between 1 and 18 would be the half moon cut-away, indicated the top of the chip
- 1 through 9 are to be connected to bs2 pins.
- 9 goes to VSS on bs2
- 18 throw 10 are to be connected to power supply / device requiring higher power supply
- 10 goes to ground of power source
- The device gets powered with the + from power source (obviously)
- When one of the pins is activated (1 to 8) (set HIGH) it allows the power to sink through the pins (11 throw to 18)
- When that pin is set low the power stops.
If my understanding is correct, my wiring is correct, and I have no idea why the pins aren't sinking the current from the stepping motor.
Again, if anyone has any ideas at all I would be very interested in hearing them.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Johnny
Pin 10 goes to the positive side of your power source.
The positive side of your power goes to the positive side of the device.· The negative side of the device goes to Pins 11-20.
One device (or motor wining) per pin.
A high to the pin opposite 21-11 turns that channel on, a low turns it off.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester?
http://hometown.aol.com/newzed/index.html
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester?
http://hometown.aol.com/newzed/index.html
·
Question: Can I connect several pins of the ULN2803 together to handle more power?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester?
http://hometown.aol.com/newzed/index.html
·
I'd just like to get this working. I started off by following data sheets etc. The wiring appears correct acording to all sources, the code is ok too.
So instead of hooking the motor up etc and trying to make it run, I've taken a few steps backwards to just do some debugging / trouble shooting.
So I have my breadboard, darlington inserted in the middle, bs2 connected to darlington pins, 1, 2, 3, and 4. Pin 9 of the darlington is connected to the VSS on the bs2. Correct me if I am wrong, but that is all that needs to be done on the bs2 side.
On the other side, I had the motor wired, correctly to the best of my knowledge, power source ground to pin 10 darlington and positive to red wire on motor (its a mitsumi). The other motor wires connected to pins 18, 17, 16, 15 darlington. That didn't work. No movement in the motor what-so-ever, no indication of any power flowing through it. Its not hard to tell when power is running through a stepping motor, it holds its position. Now I have the motor disconnected (a few steps back). If i read with an ohm meter pin 9 and pin 1 I can clearly see the electrical pulses generated by the bs2. If I connect the ohm meter using pin 18 and 10 on the darlington, I get a reading - however, it is constant, and much weaker then the one from the bs2 side.
Has anyone heard of or encoutered this b4?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Johnny
Post Edited (Jonathan Allison) : 3/1/2005 4:35:32 AM GMT
One of the best resources for learning about stepper motors, how they operate, how to wire them, how they can be driven, and how to troubleshoot problems can be found here:
http://www.doc.ic.ac.uk/~ih/doc/stepper/
That is Ian Harries classic treatise on stepper motors and the place where many of us learned all the basics. There a loads of links, tutorials, and descriptions.
Going back to the very beginning, and identifying which leads represent which coils within the stepper motor, is probably the most important thing you can do at this juncture. From that you can then determine the correct wiring. "Ringing out the motor" which is what this is often called, is done using an ohmmeter with no power applied, and the motor disconnected from the entire circuit.
I'm not sure whether you're mis-using the term "ohm meter" or misunderstanding its use, but an ohmmeter should NEVER be used on a live circuit, if that's what you're doing. The internal diodes in the Darlington array may also be causing you to get unusual readings.
Since it appears there's a lot of on-the-fly re-wiring going on during troubleshooting, you may want to fuse the leads coming from the ULN2803 Darlington array at 500 ma. to gain some measure of over-current protection and to prevent any short circuits.
Regards,
Bruce Bates
Post Edited (Bruce Bates) : 3/1/2005 7:05:22 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester?
http://hometown.aol.com/newzed/index.html
·
Hey I'm editing the fact that you dont want to hook up your stamp to the 24v supply that your supply you motor with
also I just found this I'm not sure if you have already seen it its for a parallax stepper
http://www.parallax.com/dl/docs/prod/motors/27964.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DTQ
Post Edited (kb2hap) : 3/1/2005 2:04:38 PM GMT
bugg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Geordi: "It's like the laws of physics went right out the window!"
Q: "And why shouldn't they, they're so inconvenient!"
Geordi LaForge, Chief Engineer, USS Enterprise, NCC 1701-D
Q, Omnipotent Prankster
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester?
http://hometown.aol.com/newzed/index.html
·