10A Motor Shield Restart Problem

Talk about Arduino board, sheilds. Sharing Arduino projects, program, problems, solutions, suggestions..... many more, all are welcome.

10A Motor Shield Restart Problem

Postby germ » Sat Jul 22, 2017 4:22 pm

I have a 10A Motor Shield (SHIELD-MD10). I am using it to drive a windshield wiper motor. I've discovered that when changing speed from high to a low speed (or changing direction) dramatically, the board appears to power down and then restart. Is this normal? Is there something I can do to avoid this (like, for example, a feedback diode)?

Here is a sketch that can duplicate the problem with my motor.

CODE: SELECT_ALL_CODE
const static int MOTOR_DIR_PIN = 8;
const static int MOTOR_PWM_PIN = 9;

void setup() {
  Serial.begin(9600);
  pinMode(MOTOR_PWM_PIN, OUTPUT);
  pinMode(MOTOR_DIR_PIN, OUTPUT);
  digitalWrite(MOTOR_DIR_PIN, LOW);
}

void loop() {
  Serial.println("Setting motor high speed... This does not cause a restart of the board.");
  analogWrite(MOTOR_PWM_PIN, 255);
  delay(10000);
  Serial.println("Setting motor low speed... This causes a restart of the board.");
  analogWrite(MOTOR_PWM_PIN, 100);
  delay(5000);
}
germ
Freshie
 
Posts: 7
Joined: Sat Jul 22, 2017 4:11 pm

Re: 10A Motor Shield Restart Problem

Postby waiweng83 » Mon Jul 24, 2017 11:18 am

Are you using a power supply for the motor power?
When the motor is being slowed down, the motor will become a generator and generate some current.
Normally this current will flow back to the battery to charge the battery.
However, if the power source is a power supply, this current has nowhere to go and cause a voltage spike and consequently reset your board.

Please try it with a battery instead and see whether this still happen.
With the power of dream, nothing is impossible...
User avatar
waiweng83
Moderator
 
Posts: 205
Joined: Wed Apr 15, 2009 2:17 pm

Re: 10A Motor Shield Restart Problem

Postby germ » Fri Sep 08, 2017 2:19 pm

I actually don't have a battery for this. Is there some way to prevent the back flow with a power supply? I've seen suggestions that a diode can act as a bridge, but I'm not much for electronics myself so I'm not sure what sort of diode would be appropriate here.

Thanks!
germ
Freshie
 
Posts: 7
Joined: Sat Jul 22, 2017 4:11 pm

Re: 10A Motor Shield Restart Problem

Postby ober » Sat Sep 09, 2017 6:12 am

germ WROTE:I actually don't have a battery for this. Is there some way to prevent the back flow with a power supply? I've seen suggestions that a diode can act as a bridge, but I'm not much for electronics myself so I'm not sure what sort of diode would be appropriate here.

Thanks!

At least we know the reason now. Mind sharing some actual hardware photos?
Diode does not help in this case, as it will still require battery to work.
A few parallel huge electrolytic capacitor might help, but that is might :)
Show us some photos as it will help us to recommend how to make it.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: 10A Motor Shield Restart Problem

Postby germ » Mon Sep 11, 2017 4:56 am

ober WROTE:At least we know the reason now. Mind sharing some actual hardware photos?
Diode does not help in this case, as it will still require battery to work.
A few parallel huge electrolytic capacitor might help, but that is might :)
Show us some photos as it will help us to recommend how to make it.


Not sure what photos would be helpful. I'm using the 10A motor shield, on an Uno. The motor is a windshield wiper motor. The power supply I'm using is a 5A, 12V switching supply, which also seems to periodically switch itself off when this occurs.

I've written code to try and control the speed at which the motor spools down, but it doesn't seem to have much effect.
germ
Freshie
 
Posts: 7
Joined: Sat Jul 22, 2017 4:11 pm

Re: 10A Motor Shield Restart Problem

Postby ober » Tue Sep 12, 2017 10:39 am

Well, the advise is still to use battery.
Since there is no battery, you will need to use huge electrolytic capacitor and parallel with the power supply, with the hope the capacitor can adsorb the fly back voltage generated when the motor is slowing down.

And how is your UNO is being powered? Using the same power supply as the motor driver shield?
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: 10A Motor Shield Restart Problem

Postby germ » Tue Sep 12, 2017 1:27 pm

ober WROTE:Well, the advise is still to use battery.


Yeah unfortunately a battery just isn't going to work for me. If that's really the solution I can always try a different motor shield. That would be unfortunate.

ober WROTE:Since there is no battery, you will need to use huge electrolytic capacitor and parallel with the power supply, with the hope the capacitor can adsorb the fly back voltage generated when the motor is slowing down.


How big of a capacitor are we talking here? I'm just fine with math and such, but I'm not familiar with any sort of equations that would suggest how much flyback voltage is being generated, etc.

I guess I'm also still a little confused on why a flyback diode wouldn't work. In fact, since my motor will only ever turn in one direction, couldn't I use a number of diodes to ensure the current only goes into the motor in one direction, and then just let the motor dissipate that power in heat?

ober WROTE:And how is your UNO is being powered? Using the same power supply as the motor driver shield?


The Uno and the shield are being powered by a small USB power adapter. That is separate from the 12V, 5A power adapter that is also connected to the motor shield to drive the motor. Both are plugged into the same power bar, if that matters any.
germ
Freshie
 
Posts: 7
Joined: Sat Jul 22, 2017 4:11 pm

Re: 10A Motor Shield Restart Problem

Postby germ » Wed Sep 13, 2017 12:52 pm

So I went out and got myself a couple of B10100G diodes. I tried the flyback arrangement, like this:
Image

I additionally tried some more diodes:
Image

The second arrangement seemed to take longer for the motor to spin down, but both cases would only run a few cycles of starting and stopping before the board and Arduino would reset. With those diodes, I'm not exactly sure how feedback current could even cause the board to reset. Is it possible there is something wrong with my board (possibly as a result of something I've done)?
germ
Freshie
 
Posts: 7
Joined: Sat Jul 22, 2017 4:11 pm

Re: 10A Motor Shield Restart Problem

Postby Kryspin » Sat Feb 05, 2022 7:21 pm

waiweng83 WROTE:Are you using a power supply for the motor power?
When the motor is being slowed down, the motor will become a generator and generate some current.
Normally this current will flow back to the battery to charge the battery.
However, if the power source is a power supply, this current has nowhere to go and cause a voltage spike and consequently reset your board.


What happens, when the battery is for example Li-pol and charging needs some charging circuit, which is missing?
Kryspin
Greenhorn
 
Posts: 2
Joined: Wed Jan 26, 2022 5:46 pm


Return to Arduino Based

Who is online

Users browsing this forum: No registered users and 19 guests

cron