PPDB labs, projects, and wiring diagrams??? (L293D chip use)
eiplanner
Posts: 112
I've gotten away, for quite a while, from learning & experimenting with my Professional Development Board and can't recall all the resources I used to use.
I'm trying to test a 4 wire stepper motor and can't find a wiring diagram for how to set up the PPDB to use the L293D circuit. I keep finding lots of references to the L293D data sheet and so on but I need the circuit setup for the PPDB. I remember using this once before and I could have sworn I did it from a Parallax Lab or something. (I'm simply not knowledgeable enough with it to have figured it out on my own - There had to have been a step by step procedure I followed when I worked with it before) I don't see a lab for it in my Prop Edu Kit. I've browsed tons of forum entries and am coming up short.
Can someone point me to a specific project or other resource that explains the use of the L293D circuit as it is laid out on the PPDB?
Thanks
I'm trying to test a 4 wire stepper motor and can't find a wiring diagram for how to set up the PPDB to use the L293D circuit. I keep finding lots of references to the L293D data sheet and so on but I need the circuit setup for the PPDB. I remember using this once before and I could have sworn I did it from a Parallax Lab or something. (I'm simply not knowledgeable enough with it to have figured it out on my own - There had to have been a step by step procedure I followed when I worked with it before) I don't see a lab for it in my Prop Edu Kit. I've browsed tons of forum entries and am coming up short.
Can someone point me to a specific project or other resource that explains the use of the L293D circuit as it is laid out on the PPDB?
Thanks
Comments
Repeat
outa[4] := 1 '
outa[6] := 1
waitcnt(clkfreq*4 + cnt)
outa[4] := 0
outa[6] := 0
waitcnt(clkfreq/16 + cnt)
outa[4] := 1
outa[7] := 1
waitcnt(clkfreq*4 + cnt)
outa[4] := 0
outa[7] := 0
waitcnt(clkfreq/16 + cnt)
outa[5] := 1
outa[7] := 1
waitcnt(clkfreq*4 + cnt)
outa[5] := 0
outa[7] := 0
waitcnt(clkfreq/16 + cnt)
outa[5] := 1
outa[6] := 1
waitcnt(clkfreq/*4 + cnt)
outa[5] := 0
outa[6] := 0
waitcnt(clkfreq/16 + cnt)
Believe it or not, it worked. I then went in to shorten the time delays between sequences to make the motor spin faster. It worked. I continued reducing the delays by half and about the fourth time. It quit working. The motor just started taking a step forward then a step backward (stepper still ohms out good). My L293 chip was very hot to the touch. Not sure if I've burned it up or not (don't know how to test). Even putting the time delays back to the original values, I never could get it to spin again. Just step forward and backward. The L293 gets very hot within about 10 seconds so I turn it off.
I don't pretend for a second to know what I am doing with this motor driver circuit, I just wanted to try it. Not being sure what connections are internal on the PPDB, it was rather difficult for me to follow the datasheet for the L293. These are my concerns:
- Where does the external motor supply voltage connect on the PPDB?
- What voltage or signals is supposed to connect to the L293 'enable' pins?
- Is there anything wrong with using the simple 'outa' commands from the prop to supply input voltages to the L293 inputs?
The diagram is of the exact physical connections I have made on the PPDB. I have no pull-ups, pull-downs, filters or anything else in the circuit except whats on the diagram. I was hoping maybe showing what I did would explain what I am trying to do better than just my explanation. I'm hoping someone can help me get this right.
I'm not stepper motor expert but I've played around with the PPDB and a stepper myself.
It looks like you've figured this out. Your diagram has it correct.
I'm pretty sure either 5V or 3.3V will work. I know in my test I controlled the enable pin from a Prop I/O pin so it was being controlled with 3.3V. The L293 logic power is hard wired to the PPDB's 5V line but the chip seems to work fine with either 3.3V logic or 5V logic.
I don't think there's anything wrong with this approach. I'm pretty sure that way it was intended to be used.
When I experimented with a stepper I used a bit pattern that I rotated left or right to drive the stepper.
I had to use a "p" instead of a percent sign since the forum software eats percent signs.
After assigning this "_InitialPattern" to a variable "stepPattern", I'd use outa to drive all four pins at once.
"pinD" and "pinA" where the end pins of a group of four.
I thought using a rotating pattern made it easier to control the stepper.
You might have less of a heat problem if you use a lower voltage to drive your stepper? Adding a heat sink to the chip would probably help keep it cooler.