Pages: [1]   Go Down
Author Topic: Strange behavior of Adafruit motor shield (not original one) and DC motor  (Read 778 times)
0 Members and 1 Guest are viewing this topic.
Oulu, Finland
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I face somewhat strange behavior of motor shield (which I bought from dx.com) and DC geared motor.

http://imgur.com/pyZFcY2

I use following code to run motor:

Code:
int pwm;
void setup()
{
  pwm = map(speed, 0,100, 0,255);
  mLeft.setSpeed(pwm);  
  mLeft.run(FORWARD);
}

And my power source is 5xAA.

When I connect motor with 0.68uF capacitor, motor twitches and stops. When I connect motor with 0.1uF, motor runs for about minute (or 10sec, or 3mins) and stops. Bizzare thing is when I touch shield's motor terminals with multimeter, motor runs without problems for at least 5 mins.

I am a bit stuck here. I know that shield is not original and I found out that C7 and C8 are differens - they're 100uF 16v instead of 47uF 25V.  Dunno if it has something to do with this issue.

Oh yeah, I have tried also separate power source for arduino and motors with same effect.

Also, arduino does not seem to reset or "freeze" - I have led blinking all the time without interruption.

Can someone explain me what is going on and point me out to the direction of troubleshooting?
« Last Edit: March 03, 2013, 05:07:19 pm by stipa » Logged

Offline Offline
Edison Member
*
Karma: 57
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It is an Adafruit Motor Shield.
You could have bought if from Adafruit, or a clone from Ebay for 5 euros or 6 dollars.
http://www.ebay.com/sch/i.html?LH_BIN=1&_sop=15&_sacat=0&_nkw=arduino+motor+shield+-sensor&LH_PrefLoc=2

Can you check every solder point with a magnifier. Perhaps the terminals do not make contact very well.
Logged

Oulu, Finland
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, those shields look same as mine.

I'll check soldering once again, however I am far from being expert and to my eyes in looks ok. In fact, I got same reply about checking contacts on stackexchange.

However, the fact that 0.1uF capacitor makes it run much longer than 0.68uF still makes me think that problem might be not in contacts. I don't have enough knowledge in electronics and cannot explaint what is going on there. Also, motor works fine if I touch motor terminals with multimeter, which probably (probably) rules out version about bad contacts.

Do you think it might have something to do with noice generated by motor and soldering +2 0.1uF capacitors to the motor might help?

 
Logged

Offline Offline
Edison Member
*
Karma: 57
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You are right, noise by the motors seems the problem.
What kind of motors are they ?
Some motors behave very bad, causing a lot of noise.
Some cheap motors cause even shortcut spikes if they run at a lower speed.

How is the Arduino and motor shield powered. Not just by the USB cable I hope ?
What kind of power supplies are you using ?

You could solder 100nF over the motors, but I would prefer a spark suppressor of 47 ohm and 100nF in series.
Logged

Oulu, Finland
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Motors are from DFRobot 2WD platform - http://www.dfrobot.com/index.php?route=product/product&product_id=65#.UTRZGzBbrL8 I have no info about it except that data, hope this is enought.

I power motor shield with 5xAA batteries, arduino with 9V battery.

Could you provide more info about spark supressor (maybe link to schematics) ?

« Last Edit: March 04, 2013, 03:45:00 am by stipa » Logged

Offline Offline
Edison Member
*
Karma: 57
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

5 AA batteries in series for 5*1.5 = 9.5 V ?    <-- wrong calculated, see post below.
And the motors are for 6V ?
Allthough the motor have a stall current of only 450mA, I doubt if the batteries supply enough current. I think a peak current will drop the voltage too much causing the motors to stop.
Could you try adding a capacitor of at least 1000uF to the batteries ?
Could you try with a normal power supply ?

There is a link to the motors, and comments by users.
Perhaps the information on the website is not right. The motors could perhaps be for 3V to 12V and perhaps the stall current is a lot higher.

That 'spark suppressor' is called a 'snubber circuit' I think.
But reading more about it, perhaps they are not needed.
Most circuits rely on the flyback diode inside the L293D, and don't use any noise suppression.

Here is some explanation, http://www.ofcom.org.uk/static/archive/ra/topics/research/RAwebPages/Radiocomms/pages/mittech/design/suparcs.htm
The switch could be the motor, making the sparks and shortcuts.
« Last Edit: March 04, 2013, 08:10:48 am by Erdin » Logged

Oulu, Finland
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You've probably meant 7.5V?

I didn't think before about too much current draw since that power scheme was taken from the "Make an Arduino-controlled robot" book.

Regarding capacitor - I shall add it across batterys terminals, right?

Power supply - I have 9V DC adapter, I could try it out - plug it in arduino and make shield use arduino's power source.



Logged

Oulu, Finland
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Also, do you have any ideas why touching motor terminals / shield connector with multimeter (which measures voltage) seems to fix the problem? Does it somehow remove noise which is probably the cause?
Logged

Oulu, Finland
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just in case of someone will face similar issue - I've managed to fix it by:

1) Replacing C7 and C8 with correct capacitance - 47uF instead of 100.
2) Bridging grounds of L293D leads.

Don't know which one of those fixed the problem - or maybe both of them. Anyway, now I managed to run 2 motors for 10 mins (until I powered them off).
Logged

Pages: [1]   Go Up
Jump to: