Go Down

Topic: Stepper Motors/ Sensors (Read 418 times) previous topic - next topic

esal

Hi all,

I am still very new to this arduino stuff,

I am doing a project for Uni, where I need to run two unipolar stepper motors at the same time, but with different speeds and different  no. of steps.

How do I code them to do this?

Also how to I power these motors, do I need a different power supply to each one?

Another issue I am facing is that I have built two infra red sensors, were when the beam is crossed an LED lights up. I have wired the LEd to the Arduino to be able to detect this, however every time I wire them and turn the arduino on the sensors don't work properly, a jitter occurs in the LED light, when the beam is crossed rather than staying on continuosly. I think there is a leak of current going back to the LED from the Arduino?

How do I fix this..

Thanks alot guys

Ed


esal

Thanks alot,

Just with the code, as I said I am still new to this, but is that one for only one motor?

I need one that runs two motors, which I have attempted and I can get them to work the one after the other, not together at te same time.

I have connected them to individual pins, one to 8 and 9 and the other to 6 and 7. So I can make them do different things, but when i write the command one comes after the other and therefore they dont move at the same time??

Is there a command that allows them to start and stop at the same time e.g start with previous....?

thanks

Grumpy_Mike

Quote
I think there is a leak of current going back to the LED from the Arduino?


Make sure the Arduino is configured to be an input, also wire not directly to the LED as this is not enough of a signal to register as a logic 1 but to the resistor feeding the LED. Finally make sure there is a common ground between the detector circuit and the Arduino.

Quote
So I can make them do different things, but when i write the command one comes after the other and therefore they dont move at the same time


Its a matter of your code, you will find that is what you are telling it to do. It's not so much the command but how it is structured in your code.
So set one motor going with a digital write 8 & 9 then the other to 6 & 7 and they will both go at the same time.

Go Up