1

I mada a 4wd car with ultrasonic sensors and servo. I use 4 AA 1.5 volt batteries for power. But the motor does not move. What is the problem?

image

Schematic

  • Schematic where? – Ignacio Vazquez-Abrams Mar 31 '18 at 22:41
  • I just added the above – Riski Mar 31 '18 at 22:47
  • you have to run a program – jsotola Mar 31 '18 at 23:30
  • 1
    The L298 is a horrible chip, if you want to use that you'll probably have to add two cells to the battery pack just to account for its losses. Note that you seem to be following a guide that recommends 6 cells, while you have only used 4. – Chris Stratton Apr 1 '18 at 0:18
  • 1
    If Aamir's answer helped you please vote it up and/or accept it, so people know that was the issue. – Nick Gammon Apr 1 '18 at 21:43
2

In the future, please detail your attempts at solving the problem so far so we can help you better.

Approach the issue as methodically as possible. I don't know how familiar you are with electronics, so please excuse me if you think some of these questions are basic:

  1. Ensure that the servo motor works first without any other motors or sensors connected to the Arduino Sensor Shield (have you used this servo motor before?)
  2. Ensure that your GVS wiring is in the correct order. Servos come with a 3 way socket that plug straight onto the Sensor Shield: G goes to the Brown or Black wire, V goes to the (middle) Red wire, S goes to the Orange wire. The good news is as the +5V is in the middle, things will not blow up if you put the 3-pin plug on the wrong way. The servo just will not work until you plug it in correctly.
  3. Is the Arduino Sensor shield working correctly. Does the LED pin work? Do other signals sent from the board work?
  4. Remember that servo motors work differently to normal DC motors. You need to use Pulse Width Modulation to set the position. If you have never done this before, you will find the Arduino Servo Motors page useful. Also, you will get some excellent understanding and code from this Adafruit page. It is for a different Arduino shield, but the principles are the same.
  • 1
    The question seems more likely to be about the drive motors than the servo. – Chris Stratton Apr 1 '18 at 0:19
  • Ah. I hope my effort isn't wasted then. I guess it happens sometime. I've asked the author to clarify. Thanks for your detailed, helpful contributions to StackExchange Arduino. I just read some of your posts, and they are very helpful. – MechtEngineer Apr 1 '18 at 5:20
  • Thank you everyone. I have replaced the battery with 18650 (3.7 v). And it worked – Riski Apr 1 '18 at 9:17
  • @Riski, if you found any of the answers helpful, feel free to show your appreciation by selecting the answer and upvoting helpful answers. This is how the StackExchange system works: stackoverflow.com/help/privileges/vote-up – MechtEngineer Apr 1 '18 at 11:54
0

Use a LiPo battery I.e 2S(7.4V)

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