Page 1 of 1

Motor Shield MD 10 runs only one direction proper

PostPosted: Sat Sep 09, 2017 5:11 pm
by DC_trouble
Hello everybody

I have a big issue with my md10 motor shield.
It it connected to an arduino uno. The goal is to power a 24V DC-motor (4A).
If i use the test buttons, the motor works fine. But as soon as I use software to control it, the trouble begins:
During the setup stage, the motor runs slowly and unsteady in one direction. After that stage, I can control it in one direction properly. But as soon as I stop it (pwm output 0), it again runs slowly and unsteady, like at the beginning.
When i change the direction, it hardly reacts to my input. High speed is unreachable. The onboard LEDs then both flicker.

This also occures when I use the example code (provided by Cytron). One direction is ok, the other not at all.

Further information:
I am a mechanical engineer student, currently working on my master thesis. The hardware is new (arduino one and motor shield). The motor is new as well, powered by SPS power supplies.

I am desperately hoping for some help. Thanks in advance.
Kind regards

Re: Motor Shield MD 10 runs only one direction proper

PostPosted: Mon Sep 11, 2017 6:21 pm
by Idris
Hi DC_trouble,

Since the test button is working fine, it seems like the trouble might be from the program. Could you share a few clear photos of your hardware setup and also the Arduino coding (the first one, before using example code)?

Re: Motor Shield MD 10 runs only one direction proper

PostPosted: Tue Sep 12, 2017 4:08 pm
by DC_trouble
Hi Idis

I did some more testing this morning:
When i set the direction to "LOW", everything works perfectly fine. The other direction "HIGH" does not work at all (no slow movement, no unsteady movement. just no movement at all).
I checked, if the arduino direction pin really sends a signal if set high. I connected a LED to the direction output pin, it works.
The motor shield test buttons both work (both directions ok!).

The Code:

int dirpin=2;
int motorpin=3;

void setup() {
pinMode(dirpin, OUTPUT);
pinMode(motorpin, OUTPUT);
}

void loop() {

analogWrite(motorpin, 50); //works fine
digitalWrite(dirpin, LOW);
delay(2000);

analogWrite(motorpin,0); // works fine
delay(2000);

analogWrite(motorpin, 50); //does not work at all, no movement!
digitalWrite(dirpin, HIGH);
delay(2000);

analogWrite(motorpin,0); // works (no movement)
delay(2000);

}

The jumper positions don't have an influence. I tried all possibilities and changed the wiring respectively. The Arduino signal is ok (LED test). And since the test buttons both work, I expect the power supply to be ok.

One more comment: The picture "Shield_heat" shows an area, which heats up as soon as i connetct the 24V DC to the shield, but without even using the motor. Is this normal?

I'm looking forward for your reply.

Regards, DC_trouble

Re: Motor Shield MD 10 runs only one direction proper

PostPosted: Tue Sep 12, 2017 9:46 pm
by DC_trouble
Hello everyone and especially Idris

Problem solved.
I didn't stack the shield on the arduino because i need to separate the control unit (Notebook, arduino) and the power unit (motor shield, motor, machine). But of course i should've connected the 5V power and the ground between arduino and motor shield. Now it is connected and everything works fine.

Thanks for the help anyways.
Regards, DC_trouble

Re: Motor Shield MD 10 runs only one direction proper

PostPosted: Wed Sep 13, 2017 4:43 pm
by Idris
Hi DC_trouble,

Glad to hear that you've found the root cause. Keep explore! :)