Raspberry Pi Controlled Car : turn

Hello readers,

I managed to make my RPC (Raspberry Pi Controlled) Car turn.  But the result was not what I expected.  I had this great idea to let the front wheels turn in opposite direction for a fraction of a second.  Well how do I say.  The result was not what I hoped it to be.  The car turned but it turned in such a way that the Raspberry Pi and powerbank were literally thrown off the car and almost all cables were disconnected from the connectors.  What happened was that the turn was so violent that the car did a spin of 360°.  Not exactly what I wanted.  Even only turning 1 wheel without the other turning in opposite direction did not solve the issue.  I saw that the speed of the DC Motor was too violent in case the car is turning.  So I started reading and googling around and finally found that the L298N controller is able to control the speed of the dc motors.  What needs to be done is connect the enable inputs to an PWM (Pulse Width Modulation) cabable output from the Raspberry Pi.  For more information see the following link : PWM L298N.  I have understood that this is possible on Raspberry Pi and PI4J makes pwm available on all GPIO pins.  But as a former colleague of me always said : “The proof of the pudding is in the eating”.  I will go into detail on this and modify my program and make it support pwm.  I am curious.  I will let you know more as soon as I have done my first tests.  Maybe than will be a good time to package my code for the car and put it on GitHub.

Jan

One thought on “Raspberry Pi Controlled Car : turn

  1. Alojamiento says:

    very interesting example and exactly what I was looking for to build, would it be possible to share documentation on how the raspberry got connected with the rc car?

Leave a Reply