Maker Pro
Maker Pro

Help! Arduino based car not working when touching ground.

Hi Guys!

First of all I'm a noob in electronics but I have some knowledge of arduino and a good experience in programming, so please try to help me. So, as the title describes I'm working on an autonomous car which uses arduino. My car has a motor driver similar to that of adafruit motor shield. So the problem which I have is that my motor which is used for accelerating the car or drive it is acting weirdly when I place the car in the air motor works fine but when I place it on ground the car stops and the motor produces a beep..... sound which is very annoying and I have to turn it of. So, what's going on? I've tried to search for this problem but didn't got any results. So, anyone can please help me figure this problem out. I've been going through this problem from last 3 days.

Thanks, in advance!
 
Last edited by a moderator:

davenn

Moderator
hi, welcome

what do you mean ?
when I place the car in the air motor works fine but when I place it on ground the car stops and the motor produces a beep

motors don't beep ... is the beep coming from some other part of the circuit ?

putting that aside for a moment, it sound like the power supply cannot supply enough current to the motor
when it is under load .... so describe your power supply
lets see some circuits diagrams photos etc


Dave
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
either that or under load the motors put more noise on your power supply and disrupt the microcontroller. Do you have separate batteries for the motors and the arduino?

even with that you have to consider ground bounce. It is generally best for the digital ground to be connected to the motor ground in a single place. That place would typically be on the going connection of you motor driver board.
 
Thanks For the reply!

Firstly I would like to clear that when I'm holding the car in my hand it seems to work fine but when I place it on ground it doesn't works (the rear motor used for acceleration). When this happens I hear a long tone like beep... either from motor or somewhere else but from the car. For my motors and shield I use NiMH 4.8v Battery which came with the car, and I'm powering arduino using a 9v battery. For Motors and shield I also tried to use 4 AA 1.5v Battery but no success. I don't think car is under load because I've tried to give it more power by using batteries together and individually.

Sorry I can't provide circuit diagram right now but I'll provide it in my next reply! Can somebody tell me more about ground bounce I think I should try it.

I've noticed one thing more when I power the motor directly with battery it works fine on ground and in hand.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
In this particular instance, I'm suggesting that the current drawn by the motor might be producing a change in the potential of the ground with respect to the supply voltage. This may be coupling noise to the microcontroller sufficient to make it misbehave.
 

hevans1944

Hop - AC8NS
It sounds like your motor shield is not providing enough current to the motor when the car is on the ground. Are you using pulse-width modulation (PWM) to control the motor? That may be the source of the sound you hear as the motor stalls when you place the car on the ground.
Sorry, but I don't know how to make a circuit! But I can provide images of my project, and I'll try to explain it briefly.
A circuit diagram is worth a thousand pictures or words of explanation. Circuit diagrams are the universal language of electronics without national boundaries. Put forth the effort and learn how to draw circuit diagrams (also called schematics). They can be simple pencil sketches on notebook paper that you photograph and upload here, or you can use any of many free on-line downloadable programs for schematic capture (Google that) and upload "pretty prints" made by the program. It is really difficult to discuss circuits without a circuit diagram.
 
Well This is my circuit. I've missed arduino and my ping sensor from it because I couldn't get appropriate part for that.

Screenshot from 2015-11-17 16_04_45.png
 
Last edited by a moderator:
You don't show any connections to the Dir and PWM inputs of the shield. How are you controlling the motors?
 
So what I've done is I've attached the shield on the top of arduino and I'm using afmotor library by adafruit released for their motor shield to control motors (motor shield above is some what different then from that I've used which I've is adafruit one ) and just specifying my motor attached to the port. For reference you can take a look at my code, that I've uploaded. Motor Driver Image Link:http://www.adafruit.com/images/970x728/81-02.jpg . Also what I feel is PWM is not used in my case.

[moderator edit]: see here: 81-02.jpg
 

Attachments

  • test_2.ino
    857 bytes · Views: 140
Last edited by a moderator:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
So, are you using the adafruit motor driver board you linked to, or something else? Please link to the specs of the actual driver board you're using.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
ok, please answer the following questions:

1) When holding the car, and the motors are turning the wheels, how difficult is it to stop the wheels turning? Is a light touch sufficient?

2) what type of motor are you using? What is the current drawn when the motor is free running (I.e. Just turning the wheels while you're holding the car in the air)? What current is drawn when the motor is stalled?

3) what configuration are you using? H bridge?
 
@Alec_t .... not familiar with that chip ... can you even drive motors directly from it ?
or should they be driven via FET/BJT's ??
The linked shield uses L293D chips, which according to the datasheet can provide up to 600mA per motor and have in-built back-emf protection diodes.
 
Top