freaky1310
Posts: 2
Joined: Thu Jun 14, 2018 11:21 am

Pi controlled RC car

Thu Jun 14, 2018 11:30 am

I'm currently trying to make a Raspberry Pi controlled RC car work. The car is controlled by GPIO outputs. The circuit I'm using is the following:
Image
Is it correct? Is there something wrong?
The current seems to flow, but the L293D becomes very hot after a few seconds and, as the python script runs, nothing works.
What should I do?
If you need further information, I'll give them to you.

Thank you all.

pcmanbob
Posts: 3856
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Pi controlled RC car

Thu Jun 14, 2018 6:59 pm

Hi.

if you have actually wired it like this the only error I can see is on the ground at the top of the picture is not in the ground rail of the breadboard.

high lighted by the yellow circle.

Image

you might do better to post some pictures so we can actually check your wiring.

also what size are the motors as the L293D is only rated at 600mA per channel.
Please only ask questions in the forum I will not answer questions sent to me directly via PM
Remember we want information.......................no information no help
The use of crystal balls & mind reading is not supported

freaky1310
Posts: 2
Joined: Thu Jun 14, 2018 11:21 am

Re: Pi controlled RC car

Fri Jun 15, 2018 5:11 pm

Hi, thank you for the answer. About the wiring: since I'm a newbie to the breadboard wiring (and also a newbie to RasPi in general), can I ask you to explain in a very basic way what "ground rail of the breadboard" means?
About the photos: I just thought the were useless since they would be identical to the scheme. Anyway, later I'll take and post them.
Finally, about the motors: they're two DC motors, 4.5V. Don't really know what the precise model is, because there's nothing written on them. If it can help, they're just like the models in the picture, but with (respectively) a blue (front motor, left/right) and a white (rear motor, backward/forward) stripe, instead of the yellow one.

pcmanbob
Posts: 3856
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Pi controlled RC car

Fri Jun 15, 2018 5:50 pm

So this is an enlargement of your image .

Image

the top row of holes next to the blue line is connected to the pi ground and the battery neg so it becomes the ground rail of your bread board.

The line of holes next to the red line would be the positive rail if you connected it to the battery positive like you have on the other side of your breadboard.

So if you look at the wires I circled you can see your ground wire is not actually connected to the ground line of holes but is actually conneced to the positive line of holes.

one other thing you should check is that all the holes next to the blue line are actually connected, as the wide spaces between some holes might actually indicate a break between the holes.

if you are new to using a breadboard have a read of this web site https://learn.sparkfun.com/tutorials/ho ... breadboard
Please only ask questions in the forum I will not answer questions sent to me directly via PM
Remember we want information.......................no information no help
The use of crystal balls & mind reading is not supported

PiGraham
Posts: 3212
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Pi controlled RC car

Fri Jun 15, 2018 6:05 pm

freaky1310 wrote:
Fri Jun 15, 2018 5:11 pm
Hi, thank you for the answer. About the wiring: since I'm a newbie to the breadboard wiring (and also a newbie to RasPi in general), can I ask you to explain in a very basic way what "ground rail of the breadboard" means?
About the photos: I just thought the were useless since they would be identical to the scheme. Anyway, later I'll take and post them.
Finally, about the motors: they're two DC motors, 4.5V. Don't really know what the precise model is, because there's nothing written on them. If it can help, they're just like the models in the picture, but with (respectively) a blue (front motor, left/right) and a white (rear motor, backward/forward) stripe, instead of the yellow one.
The "ground rail", and the "power rail" are the line of holes / contacts that run along the edge of the breadboard. The holes next to the blue line in the diagram would normally be the "ground rail",/ 0 volts / GND or negative terminal of the battery. The row of holes next to the red line would normally be the 5V, / VCC / "power rail" / positive terminal of the battery. All the points in each row are connected together and are designed to make it easy to route the power supply around your circuit.

You can of course connect anything you like to those rails. Since there are two such rows together on one edge and two on the other edge you could connect 5V regulated supply to the pair on one side and raw battery voltage to the pair on the other side. Just be very careful not to get them mixed up or you are likely to damage something with wrong voltage or reversed polarity.

So, in the illustrartion with "wire in the wrong hole" there is a connection from battery negative to the end of the blue rail along the top edge but further along, in the yellow circle, there is a wire shown that probably should connect to ground but connects to the rail marked with a red line. There are no other connections to the red rail so that wire is not connected.


It is a good idea to show what you have actually built rather than just the diagram you think you built to because mistakes can occur in reading the diagram or placing the wires and components that will not show in the diagram.

PiGraham
Posts: 3212
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Pi controlled RC car

Fri Jun 15, 2018 6:15 pm

I suggest you do not connect the Pi 5V to the battery positive / motor terminals. Power the Pi from a separate power source such as USB power bank. That protects the Pi from fluctuations of low and high voltage due to battery discharge, motor load high voltages due to "back emf" that can occur when you try to turn off power to the motor or the motor is turned by force and acts as a generator.

As to the chip getting hot it may not be up to the job of driving the motors you have. You need to check what current the motors require.

Return to “Python”

Who is online

Users browsing this forum: No registered users and 21 guests