Go Down

Topic: MOTOR DIRECTION CONTROL (Read 573 times) previous topic - next topic

SHAGGYR

Hey all, pretty new to all this and am working on a project, so far so good......

Until now.....

My set up is an arduino mega2560 connected to 4 ardumoto drive shields, and a stepper motor, and various buttons 8 off to be precise.
What I am trying to do is run the motors in a set sequence for a set period of time, I can operate pairs of motors in either direction just fine, when I come to operate motors that run on independent drive shields the motor will only ever run in reverse  :smiley-eek: I have tried numerous things and changing the pins from high to low and vice versa and all it does it effectivley turn the motor off, like I say I am new and been doing this for 3 days and have got no further, can someone tell me what I am doing wrong??

MORE INFO,

The drive sheilds source power from a 12V 5A dc power supply, the mega is taking power from the usb right now.
Each switch has a 10K resistor on it connected to ground.
Each pair of motors (ie drive1 motors a & b) run just fine backwards or forwards
Problem occurs when introducing a motor from an independant board, in a sequence of three motors one will only work in reverse or "off".
The timings are perfect and the stepper behaves as expected
Changing (dir_e, LOW) makes the motor not run
Changing (pwm_e, LOW) makes the motor not run

The code I am posting is where I am so far

Thanks in advance.

kf2qd

Are your drives all set for step & direction? or are some of them configured with a forward and reverse pins?

SHAGGYR

Hi ya,

New to all this, I'm not sure what you mean, I understood that the pins are set from the mega, not from the drive board :S

SHAGGYR

So.....I have been doing some reading and research mainly about the ardumoto drive shield.

As I understand it on the sparkfun page the instruction is to supply the logic from the +5V and the motor power from Vin,

I am using an external 12V power source for the Vin, what I want to be sure is, If I connect the +5V from the ardumoto to the mega2560 (the power supply for the mega is USB currently) that it wont fry either one.

So to re-itterate am I correct in thinking that without the +5V conection to the ardumoto that the drive shield will not function correctly??

I am reluctant to just give it a go, as I dont want to fry either the ardumto drive shields or the arduino mega, as I have already killed 2 boards experimenting!!!

Thanks again

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy