Go Down

Topic: Arduino resetting when running 2WD platform, why? (Read 3 times) previous topic - next topic

dc42


Hi

I have purchased the same 2WD arduino chassis. I am facing a problem which i was hoping you guys could help me with.

I am using 6.5V 2700mAh rechargeable batteries. The datasheet for the motors says that at 3V the maximum speed is 90rpm. I use a linear regulator to step down my battery voltage from 6.5V to 3V. When i apply the 3V to the motor from the regulator output the motor spins well.

From the same battery pack i am powering the microcontroller. Another regulator steps down the voltage to 5V.

I am using an L239E motor driver which is capable of supplying 1A to the motor. When i connect up my entire circuit, the motor does not spin at the rated speed. It spins very slowly.

I believe the motors are not getting enough of current.

What do you think could be the problem?

Best Regards,
Yuveer


1. I can't find a datasheet for L239E motor driver. Can you provide a link? or did you mean L239D?

2. The specification of the motor says that the locked rotor current is 1.5A at 3v. The L239D has an absolute maximum peak current of 1.2A. So you risk burning out the L239D if the motor stalls.

3. The L239D data sheet says it drops typically 2.7v at 0.6A (source output saturation voltage + sink output saturation voltage). So you need to supply it with about 3 + 2.7 = 5.7v to get 3v at the motor.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

cr0sh



Hi

I have purchased the same 2WD arduino chassis. I am facing a problem which i was hoping you guys could help me with.

I am using 6.5V 2700mAh rechargeable batteries. The datasheet for the motors says that at 3V the maximum speed is 90rpm. I use a linear regulator to step down my battery voltage from 6.5V to 3V. When i apply the 3V to the motor from the regulator output the motor spins well.

From the same battery pack i am powering the microcontroller. Another regulator steps down the voltage to 5V.

I am using an L239E motor driver which is capable of supplying 1A to the motor. When i connect up my entire circuit, the motor does not spin at the rated speed. It spins very slowly.

I believe the motors are not getting enough of current.

What do you think could be the problem?

Best Regards,
Yuveer


1. I can't find a datasheet for L239E motor driver. Can you provide a link? or did you mean L239D?

2. The specification of the motor says that the locked rotor current is 1.5A at 3v. The L239D has an absolute maximum peak current of 1.2A. So you risk burning out the L239D if the motor stalls.

3. The L239D data sheet says it drops typically 2.7v at 0.6A (source output saturation voltage + sink output saturation voltage). So you need to supply it with about 3 + 2.7 = 5.7v to get 3v at the motor.


It's not "L239"; the motor driver is an "L293".

Something you could try (I've heard it works) is to piggyback a second L293 on the first (if they are DIP ICs) - soldering the legs together.

Better would be to use an L298 h-bridge (which can supply up to 2A per channel - or 4A in bridged-mode to a single motor, if needed). If you do decide to use an L298 - make sure to add a heatsink if one isn't included with the driver board (ie, if you are homebrewing an L298 driver)...
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

dc42

cr0sh, thanks for that. If it's a L293E then it drops typically 2.6v at 1A. So yuveer needs to supply it with about 5.6v to get 3v at the motor.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

yuveer

Hi dc42, thanks for your prompt reply. It appears that the sink output saturation voltage was the problem. I am using the L293E motor driver and not the L298, but anyway, I simply increased the voltage to 4.2V (the L293E datasheet says that it drops typically 1.2V) and i manage to get 3V at the output of my motors. The speed looks good and i am satisfied.

Now i have a few questions with regard to this particular set of motors and chassis:

1) If i am measuring a DC voltage of 3V at the motor terminals can i assume it is running at 90rpm as the datasheet explains? Also, at this voltage am i supposed to read a current of 60mA (no load current at 3v as per datasheet). I need to robot to travel slowly such that it will not spill a cup of coffee, thus i wanted to use PWM to drop the speed to about 30rpm.

2) My goal is to make the robot travel as "straight" as possible. Like in a straight line, without line following software and hardware. It merely needs to go straight, but for like 12 meters. Now it appears that 90% of enthusiasts on the net seem to suggest using wheel encoders together with a PID controller. I have purchased a set of wheel encoders designed for this particular chassis. I found a good tutorial and some code on how to implement a PID controller: http://letsmakerobots.com/node/865#comment-72386 . My question is whether this is the most suitable method?

3) Once i get the robot to go "straight" i would like it to turn 90 degrees (it can stop, turn on the spot, then go on). I know that the robot uses differential drive so its a matter of spinning the wheels in opposite directions. But i am having trouble estimating how much to turn the wheels. This one is a bit tricky. Any ideas?

Best Regards,
Yuveer

dc42

#14
Aug 31, 2011, 07:36 pm Last Edit: Aug 31, 2011, 07:43 pm by dc42 Reason: 1

1) If i am measuring a DC voltage of 3V at the motor terminals can i assume it is running at 90rpm as the datasheet explains?


If the motor is under no load and the bearings are good then the rpm should be close to the 90rpm specified. Speed will drop under load.


2) My goal is to make the robot travel as "straight" as possible. Like in a straight line, without line following software and hardware. It merely needs to go straight, but for like 12 meters. Now it appears that 90% of enthusiasts on the net seem to suggest using wheel encoders together with a PID controller. I have purchased a set of wheel encoders designed for this particular chassis. I found a good tutorial and some code on how to implement a PID controller: http://letsmakerobots.com/node/865#comment-72386 . My question is whether this is the most suitable method?


I don't have any direct experience of this, but you will certainly need wheel encoders to make the motors run at precisely the same speed, and PID controllers (= Proportional Integral Differential) are fairly standard for servos. Also, PID controllers will enable you to maintain 30rpm with variable load (e.g. slope). So I would say yes.

There is another solution based on measuring the back EMF of the motor while compensating for its resistance, but it will only give you the speed, and is difficult to use with PWM. Wheel encoders will give you the number of rotations as well, which enable you to measure distance travelled more accurately (assuming the wheels don't slip).


3) Once i get the robot to go "straight" i would like it to turn 90 degrees (it can stop, turn on the spot, then go on). I know that the robot uses differential drive so its a matter of spinning the wheels in opposite directions. But i am having trouble estimating how much to turn the wheels. This one is a bit tricky. Any ideas?


That's down to simple geometry, if you can assume that the wheels don't slip. The radius of turn will be half the distance D between the wheels, so to turn 90 degrees each wheel must move distance pi * D / 4. If the radius of the tyres is R then each wheel needs to rotate N turns, where N = D / (8 * R).
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up