Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited
Resolved Resolved by Rich!

Do Pins Question

I read Rich's tutorial regarding the l298 h bridge which is prompting this question. There was a spin off link that Rich directed me too that actually showed a bit of code to control a stepper motor. I need to set up something like that, and so what I would like to do is set D1 on and off rapidly creating an actual pulse. PWM will not work in this situation. Anyways my controller is looking for 5vdc to fire a optoisolator (led). I am powering my ezb4 via 12vdc. The output of the D0 ports is 12vdc Correct? What voltage would come out of the white wire, if any? My stepper controller is a bit different than the l2d8 requiring only a pulse on one input and a on/off voltage for direction. The controller can work on 12vdc but requires the addition of 820ohm resistors on these inputs. Thanks for the help.

AI Support Bot
Related Content
Synthiam
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
#6  
okay, well that makes sense.when you explain it that way my idea will not work. Thanks for the clarity.
PRO
Synthiam
#7  
@kamaroman68 sounds like you chose the wrong stepper motor controller:) Sorry, there are a few thousand stepper motors that operate without parental supervision (i.e. some pulsing) and only one that requires pulsing. You seem to have selected the one that requires pulsing.

However, maybe that pulsing is the speed that the stepper motor will move? Perhaps the PWM tells the controller how fast to move the stepper? If that is the case then you can use the PWM.

But since this stepper motor is undocumented and foreign to the robot world, it will take some time to get it working
#8  
Thanks everyone for the replies, its not so much that I chose the wrong controller, its just the one I had laying around. I used to use these in sputtering machines where the conveyors were used with stepper motors and microstepping to provide ultra precise movement . Yes DJ you are correct the speed of the incoming pulses dictates how fast the stepper moves or in my case "climbs". I am actually using a linear stepping motor. (screw through the center of the stepper motor) I will figure this out. Thanks for the help.
#9  
Maybe someone can recommend me a stepper motor that will work in my application? Thanks Chris
#10  
Just a quick google produced all of the same results. It seems all these controllers require a 5 vdc pulse to step. Suggestions? Chris
#11  
The l298n(2.5A motor controller) in the shop has a stepper motor port. Could this work? It takes 12v I believe.
#12  
It would work but requires the code example Rich provided I believe. This code will be bad for comms and other functions of the ezb4. Thanks Chris
United Kingdom
#14  
Have a look at 555 timer circuits which pulse an output, if you wired one of these along with the TIP122 based transistor switching circuit to enable the circuit you could have the hard work done by the 555 timer and as far as comms are concerned it would be a sinle On or Off command to the port to enable/disable it.

Something like this may do it;

User-inserted image
#16  
Very interesting. Looks like it will work, only thing I don't particularly like is the 2 different voltage sources. 5 volts for the logic and xxx voltage for the motors. I may look into this further though. Thank you very much. Chris
#17  
It's very common to have two voltages feeding motor controllers. Most of them have this unless it has a on board voltage regulator.
United Kingdom
#18  
Most logic is 3.3v or 5v, the absolute maximum voltages for logic on many ICs is around this range, I haven't seen anything that uses as much as 12v or 24v for logic. I am a little green in this area since I haven't had much experience with controllers etc. though.
#19  
To clarify my earlier statement regarding the dual voltages.... I do not like the fact that I will likely have to use a power robbing voltage regulator to drop my 12 volt sla battery down to 5vdc. These regulators in my experience waste power in the form of heat. Hopefully I will be able to add a relay circuit to turn on and off that regulator so it is not constantly draining. I have called tech support at parallax regarding the device. Awaiting a call back. Thanks again

Chris
#20  
So this question remains open unfortunately. After speaking with the tech at parallax it was stated that the above mentioned controller would only work with unipolar stepper motors. Dang it , I really thought we were on to something. Thanks Chris
#21  
I think I am going to try and run my current stepper motor controller with the ezb controller. I realize it will eat comms but it will be used very infrequently. If it does prove too much for ezb I will try the 555 timer method
#23  
Thanks robot-doc I looked at that one also. If you use the magnifying glass and hover over the image you will notice that it too requires, a step pulse, an enable, and direction. Im starting to think something like this does not exist. Thanks for keeping an eye out for me! Chris
United Kingdom
#24  
I really would advise against using scripts to produce the pulse. It's not just the comms which will become saturated (causing latency in all other controls) but the PC will become very bogged down and unresponsive also. It is certainly not a long term solution.
#25  
So I'm going to mark this post as resolved. After getting this to work last night using the code that Rich presented, than modified by myself it has been deemed too slow. It seemed to take 30 minutes to move an inch. I removed both of the sleep commands basically turning D11 on and off as fast as it could and it was still just to slow. So this morning I ordered a simple 12vdc linear actuator from servo city with 10 inches of travel and a no load spped of 1/2 inch per second. Seeing I like the serial control commands I will purchase a third robo claw controller 2x 15 to control it, and use the built in potentiometer to the ezb 4 controller for position feedback. Unfortunately this will force some redesign, but in the end a much simpler alternative. Thanks to everyone that has helped with this project. Chris