1
\$\begingroup\$

I'm new to ECE and as a beginner project I've taken apart an RC car and attached an Arduino to the DC motors with an L298N module for control. The goal is for the car to drive a certain path with pre-programmed instructions. Everything is working, but I've noticed a constant drop in current (measured with a multimeter) as the motors run. This results in a lot of variance in the path the car takes. I'm powering the L298N with 8 double A batteries and powering the Arduino with a separate power supply.

Is there a way I can ensure that both motors receive steady current? If there is a better way to have the RC car consistently follow a set path or just tips you have for a beginner I'm open to any suggestions.

Thanks in advanced!

\$\endgroup\$
6
  • 2
    \$\begingroup\$ Feedback is the secret to success when it comes to controlling anything. Never assume that your instructions are going to do the same thing every time; have some way of measuring what they do instead. Instead of saying "run for five seconds", say "run until the wheels have turned thirty-eight times" or, even better, "run until you reach this location", where you use some form of sensor to determine when you've reached the location. \$\endgroup\$
    – Hearth
    Jan 17, 2019 at 17:06
  • \$\begingroup\$ Additionally, AAs are simply not going to cut it for driving motors. There's a reason motorized toys (at least in the 90s and 00s) use C and D cells: they can provide a lot more current for a longer period of time. \$\endgroup\$
    – Hearth
    Jan 17, 2019 at 17:08
  • \$\begingroup\$ Could you edit your question to describe your mechanical arrangement a bit better? I take it that the car uses skid steering (i.e., there's a right motor and a left motor, and you turn by driving the motors at different rates) -- is this correct? Include a picture of the car if it'll make things more clear. \$\endgroup\$
    – TimWescott
    Jan 17, 2019 at 17:09
  • \$\begingroup\$ @TimWescott There are two 5v DC motors, each connected to the L298N module. The front motor controls the steering from the module by alternating positive/negative flow. The same things applies to the rear motor which controls forward and backward movement. \$\endgroup\$
    – Short Tail
    Jan 17, 2019 at 17:33
  • \$\begingroup\$ @Hearth The motors are small 5v DC motors. With the 8 batteries providing 12v would that not be enough to power them? Or would switching to a C or D cell be beneficial anyway in order to maintain current? \$\endgroup\$
    – Short Tail
    Jan 17, 2019 at 17:35

1 Answer 1

1
\$\begingroup\$

You really need to provide a lot more information to be able to get any kind of a reasonable answer. From what little information that you did provide it is a pretty good bet that the batteries (8 x AA) are not up to the job of driving the motors. Eight batteries at ~1.5V in series produce about 12VDC. In all likelihood the voltage of the eight batteries is sagging down to the point that the motors run slower and slower.

Your possible fixes for this could be one of:

  1. Provide for a more capable battery back that will not sag in voltage during the duration of your test run.
  2. Use a switching voltage regulator so that the voltage delivered to the LM298N stays constant instead of varying. You could use a step-up type to increase a battery pack voltage up to the 12V needed. If you created a higher voltage battery pack such as 18V or 24V then you could use a buck regulator to reduce the voltage to 12V needed.
  3. You could install some type of sensor (rotary encoder) to the wheel shafts of the vehicle to detect how far each has turned. From this you could compute that you have traveled the required distance despite the speed that the motors are running. This would replace the open ended design you have now where the operating speed of the motors is critical.
\$\endgroup\$
3
  • \$\begingroup\$ Says exactly what I was saying in the comments, in a more complete and well-explained form. +1. \$\endgroup\$
    – Hearth
    Jan 17, 2019 at 17:08
  • \$\begingroup\$ Thank you for the suggestions. I'm sorry that my information was not enough. The motors are small 5v DC motors and at the start, they both run very well. I've measured both the voltage and current as the motors run and the voltage seems to stay the same (a little under 12v) but the current decreases. I'd be happy to provide any other information if you're willing to help me. Again this is a learning experience as I'm brand new to circuits. \$\endgroup\$
    – Short Tail
    Jan 17, 2019 at 17:30
  • 1
    \$\begingroup\$ @ShortTail - I already gave you the primary advice that you need. Now it is up to you to dig in and learn how to apply those ideas to your project. If on the way you encounter additional questions then by all means do come back to this site and post an another question. Note that trying to run a motor designed to run at 5V on 12V is ill advised. If anything it greatly increases the current that the motor will draw and the resulting higher speed is likely to wear out the motor much sooner than the manufacturer specification. \$\endgroup\$ Jan 17, 2019 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.