Raspberry Pi Remote Control Car Camera

Hardware components:
12994 02
Raspberry Pi 1 Model B+
× 1
DC motor (generic)
× 2
09670 01
SparkFun Dual H-Bridge motor drivers L298
× 1
Toy Car
× 1
WiFi Dongle (generic)
× 1
Power Bank (10A)
For the Raspberry Pi board
× 1
Battery
For the gear motors
× 1
Software apps and online services:
FFmpeg

raspberry pi remote control car camera

This project is about making a remote control car with a view through an attached camera.

Hardware side:

  • Toy car
  • Two gear motors
  • Raspberry B+
  • WiFi dongle
  • Power bank (10A) (for Raspberry board)
  • Battery (for gear motor)
  • H-bridge circuit (L298N)

Software side:

  • Install camera using FFmpeg (link)
  • Install Local web (Apache)
  • Make web page to control
  • Control through Internet (by port forwarding)

Step 1: Make a Car

Install a gear motor to the toy car. It will need your clever hand and some thinking to put all the things in right way. Also, put the H-bridge inside the car.

Brief introduction about H-bridge:

 introduction about H bridg

H-bridge is used to control motor direction: to make the motor run clockwise, A1 and A2 must be ON; and to run counter clockwise, B1 and B2 must be ON.

The below image is of a type of Mechanical H-bridge using a relay; this project will use H-bridge from IC L298N.

The H-bridge also has 4 inputs: A1, A2, B1 and B2 (indicated in PCB as IN1, IN2, IN3 and IN4) which will triggered by Raspberry GPIO.

Make connections from Raspberry to H-bridge

Connections are as follows:

  • GPIO0 – IN1
  • GPIO2 – IN4
  • GPIO3 – IN3
  • GPIO4 – IN2
  • GND Raspberry – GND H-bridge

For example, to make the car run forward ? 2 motors have to run clockwise ? IN2 & IN4 should be ON; IN1 & IN3 should OFF ? GPIO2 & GPIO4 should ON; GPIO0 & GPIO3 should OFF.

Step 2: Install camera

In the previous article, follow the instruction there to install FFmpeg into Raspberry. (Link here)

Step 3: Make a web page to control

Install Apache and PHP by following command:

sudo apt-get install apache2 php5 libapache2-mod-php5

After installation, input the Raspberry IP address (this case is 192.168.1.71) in a web browser to see if the local web working or not. If it is working, it will have the result as shown here:

Read More: Raspberry Pi Remote Control Car Camera


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top