Pages: [1]   Go Down
Author Topic: Stepper Motors/ Sensors  (Read 399 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 430
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You probably need a motor shield http://www.adafruit.com/index.php?main_page=product_info&cPath=17&products_id=81

http://ladyada.net/make/mshield/

Example code is here http://ladyada.net/make/mshield/use.html

smiley
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34551
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: