Download PDF Parts List View on YouTube

The following is the first of a three-part article.


A rite of passage for most Arduino experimenters is putting together a small robot car.  It’s a great project that will teach you a lot of useful skills while also impressing your friends.

A number of robot car bases are available for just such a project. These inexpensive bases are generally made of acrylic and come complete with a set of small DC motors. If you’ve been following the DroneBot Workshop website or YouTube channel then you’ve seen me use a few of these before.  They are an excellent way for a seasoned experimenter to put together a small robot car without needing to worry about the mechanical parts.

But for a beginner a robot car can still seem to be a daunting project to undertake. While the robot base can make it a bit simpler you still need to contend with mounting the parts (which may involve some drilling), wiring everything up (and that could require soldering) and finally programming your creation to do something amazing.

Elegoo Arduino Smart Robot Car

There is another solution – build a kit.  This has the advantage of having all of the components in one place and, assuming the kit is of reasonable quality, being reasonably assured that your efforts will be rewarded with a working robot car.

In this article, and in the ones that follow it. I’m going to take you through the construction and programming of a high-quality robot car kit. It’s from Elegoo and it’s called the “Elegoo Smart Robot Car Version 3.0”.

Elegoo Smart Robot Car

The Elegoo Smart Robot Car boasts a pretty impressive set of features:

  • 4-wheel design
  • IR Remote Control
  • Bluetooth Remote Control
  • Ultrasonic Collision Avoidance
  • Line Following
  • Rechargeable LiPo Batteries (a charger is included in the kit)
  • No soldering or special tools required

Combine that with an excellent set of instructions and some prewritten Arduino code and you have a kit that is perfect for Arduino experimenters of all ages and skill levels.

Elegoo Smart Robot Car Unboxing

The Elegoo Smart Robot Car kit is packaged in a sturdy reusable orange carrying case, Internally the case has two sections and several compartments used to hold the robot car components. A diagram on the inside lid of the case has an illustration of all the components included in the kit.

Elegoo Smart Robot Car Kit Parts

The contents of the kit are as follows:

  • Elegoo Arduino Uno R3
  • Top and bottom Base Plates
  • DC Motors (4)
  • Tires (4)
  • Custom Arduino Shield (includes IR Receiver)
  • L298N Motor Controller
  • 3-element Line Sensor module
  • SG90 Servo Motor
  • HCSR04 Ultrasonic Distance Sensor
  • Bluetooth Module
  • 18650 LiPo Batteries (2)
  • Battery Holder
  • Battery Charger
  • Connection Cables (4)
  • USB cable for Arduino
  • IR Remote Control
  • Servo & Ultrasonic Sensor mounting brackets
  • All hardware required for assembly
  • Three screwdrivers
  • Vinal Electrical Tape
  • Code and manual on CD ROM

One very nice thing about this kit is that the hardware required to assemble everything is packaged in several individual labeled plastic bags. This makes assembly very simple.

So now that you’ve seen the contents of the Elegoo Smart Robot Car kit it’s time to put it all together!

Smart Robot Car Assembly

Assembly of the Elegoo Smart Robot Car is made easy thanks to the excellent instruction manuals provided in PDF form. These manuals (and several code samples) are available on the included CD ROM and can also be downloaded from the Elegoo website.

I downloaded the manuals and code to ensure that I had the latest version.

The kit includes a couple of small Phillips screwdrivers and a 2.5 mm hex key, which are really all the tools you’ll need to build the kit. I added a couple of pairs of pliers to make things a bit easier but they are not completely necessary.

Elegoo has simplified the assembly by packaging the mounting hardware into individual plastic bags, each one labeled clearly with the section that it is intended to be used for.

Motor Mounts & Motors to chassis

The first step is to install the aluminum mounting blocks onto the four DC motors. These are mounted using a couple of long screws that pass through the motors. Make sure to install the blocks on the side of the motors that the connecting cable protrudes from. The blocks themselves can be installed in either direction as the threaded mounting holes used to secure the motors to the chassis are on both sides of the blocks.

After the blocks are mounted on the motors you can attach the motors to the bottom base plate.

Before you work with the base plate you will need to peel off the protective coating from both sides. Make note of the side labeled with an “A”, this is the top side.

Install Motors

The four motors are fastened to the base plate using the blocks you just installed. Pass some screws through the base plate into the threaded holes in the aluminum blocks and tighten them. You’ll want to make sure that the motors are aligned flush with the edge of the base plate before you fasten them permanently.

Keep the base plate handy as it’s used in the next step.

L298N Mount

The L298N is an H-Bridge driver capable of driving two DC motors.  The board used in this kit has been modified to have two connectors for each motor output as the motors on each side of the robot car are wired in parallel. The board also has connectors on it for the data and power cables it will need to function.

The board is oriented with the heatsink facing the back of the chassis.

The board mounts onto the bottom base plate using four M3x14 screws and four small spacers. Pass the screws through the mounting holes on the L298N first, followed by the spacers and then pass these through the holes in the base plate.  Finally, use four M3 nuts to secure the screws.

L298N and Motors

After you have mounted the L298N you can connect the four motors to their respective connectors. The connectors are keyed so they can’t be installed backwards.

Line Follow Sensor mount

The next component to install on the bottom base plate is the line follow sensor array.  This mounts underneath the chassis using four threaded spacers, four M3x7 screws and four M3 nuts.

Installing Line Follow Sensor

When mounting the line follow sensor array make sure to orient it so that the sensitivity trimpot is facing the front of the robot car.  This will position the connector on the sensor array near the large hole in the chassis which is used to pass a cable through.

Arduino to top chassis & shield

It is now time to move on to the top chassis plate. As with the bottom plate it is supplied with a protective covering which must be removed.

Make note of the label on the covering first, it indicates the side that is facing up.  Unlike the bottom plate it is imperative that you get this right or you’ll need to unmount the components and start again, which I’m sure is not what you want to do!

Arduino Uno Mounted

The first component that we will mount on the top chassis plate is the Arduino Uno. You will use three M3x14 screws and three spacers to mount the Arduino as one of the mounting holes on the Uno is not used. The screws are held in place with three M3 nuts.

Mounting Arduino Shield

After mounting the Arduino Uno board you will install the custom interface shield onto it. As with any Arduino shield you need to be careful to line up the connection pins.

Arduino Shield

Battery compartment

The battery compartment is the next component to add to our Smart Robot Car. You’ll be using four M3x10 screws to mount the holder. Note that these screws have a Phillips head so you’ll need to use an appropriate screwdriver on them, a couple of small Phillips screwdrivers are included in the kit.

You’ll need to take the top off of the battery compartment to get access to the holes for the screws. And of course it needs to be off so that you can install the batteries!

Battery Compartment

Align the holder so that it is flush with the edges of the top plate and then insert the screws. These are held in place with four M3 nuts.

After you get the holder mounted and secured install the two 18650 LiPo batteries (these come from the factory already charged, although you may want to top them up with the supplied battery charger). Make sure that you orient the batteries correctly, the battery compartment has an illustration inside it showing the correct direction to install the batteries.

Once you get the batteries into the holder you can close the cover.

The final step with the battery holder is to connect it to the power connection on the shield. Before you do this make certain that the power switch is in the “off” position, as we don’t want to apply power to the shield and Arduino right now.

Servo Motor

The Servo Motor is mounted next. This motor will hold the Ultrasonic sensor assembly.

The servo is mounted onto a separate base plate that you will find in the same package as the holder for the Ultrasonic sensor.  Attach the servo motor to the plate using two small M2x10 screws and secure it with two M2 nuts. Note that the screws are passed from the bottom of the plate.  See the manual for the correct orientation of the motor.

Once the motor is installed on the plate you can mount it to the top chassis plate using three M3x10 screws and M3 nuts.

Servo Motor

When you have the servo in place you can pass the servo cable through the hole in the top plate and attach it to the connector on the shield. Make sure you connect it in the right direction, the shield is labeled with the Ground connection which is the brown wire on the SG90 servo.

Ultrasonic Sensor

The next step is to install the Ultrasonic sensor onto its mounting bracket. This is accomplished using four very tiny M1.6×8 screws, note that these screws are Phillips head and require the very tiny screwdriver supplied with the kit.

Once the Ultrasonic sensor is secured to its mounting plate you can place the assembly onto the shaft of the servo motor. You will want to align the assembly so that the sensor is facing forward, it might not be exactly flush with the front of the car as it needs to mesh with the gear on the shaft.

Ultrasonic Sensor

After you have the sensor mounted you can use the cable provided to connect it to the shield.  It’s the only 4-conductor cable in the kit so it’s pretty easy to distinguish it, and as with all of the cables it is keyed so that it will only fit one way.

The small screw to hold the bracket to the motor shaft is packaged with the SG90 servo. The package also includes a number of screws and arms that are not used in this kit, keep them for future projects.

Cable & wiring

Our robot care is beginning to take shape!  Now it’s time to wire it up.

Before you start connecting everything up you will want to install the six copper spacers that hold the bottom plate to the top plate. I mounted them onto the bottom plate using six M3x10 screws, six more screws will be used to mount the top plate later.

The cables that come with the kit are all unique so you shouldn’t have any problem figuring out which one is which, but if you do just take a look at the illustrations in the manual for guidance.

Begin with the Line Follower sensor. Connect one end of its interface cable to the sensor board and then pass it through the hole in the base plate. Don’t connect the other end just yet.

Now move on to the L298N motor driver. It requires two cables, a power cable and an interface cable. Again these are unique cables so you’ll be able to determine which ones to use pretty easily.  Once again you’ll leave the other ends unconnected for now.

Top and Bottom

Now take all of the cables you’ve just connected to the base plate components and pass them up through the hole on the top base.

You may now use the six M3x10 screws to fasten the top plate to the six copper spacers.

Finally, hook the cables to their respective connectors on the shield.

Bluetooth module

The installation of the Bluetooth module is very simple. The module has a connector that plugs into a mating socket on the shield. Simply snap it onto this connector and you’re done!

One thing to note is that when it comes time to program the Arduino board you’ll need to remove the Bluetooth module as it shares the same serial data line as the Arduino USB connector.


The final step in assembling the Elegoo Smart Robot Car is to install the four tires onto the motor shafts. The shafts are keyed to mate with the mounting holes in the tires.

Press the tires onto the motor shafts and then secure them with the long M2x25 screws. These are Phillips screws so you’ll need to use the correct screwdriver.

Finished Elegoo Smart Robot Car

The robot car is now assembled!

Smart Robot Car – Basic Testing

The robot car has a lot of features but today we will simply make sure it is working. In part two and three of this series I’ll show you how to use the Bluetooth, IR Remote, Line Following and Collision Avoidance features.

Elegoo has provided some sample code on the CD-ROM included with the car, you may also download the latest version of the code from their website.  The sample code is divided into “lessons” and lesson number one is “make the car go”. Looks like a great place to start!

Lesson one consists of the following code samples:

  • forward_back,ino – Makes the car move forward and then backward.
  • left_wheel_rotation.ino – Moves the left wheel.
  • right_wheel_rotation.ino – Moves the right wheel.
  • speed_control.ino – Accelerates the car and then stops.
  • AUTO_GO.ino – Moves the car in all directions.

Each sketch essentially shows you how to drive the L298N motor controller to move the car.  If you are not familiar with the L298N H-Bridge motor controller please see the article and video covering this device.

We will examine the AUTO_GO sketch and then use it to control our Elegoo Smart Robot Car.


In order to understand the operation of this sketch (and all of the other ones mentioned here) you will need to know how the L298N is connected to the Arduino on the car. The connections are as follows:

  • ENA – Enable A, connected to Arduino pin 5.
  • ENB – Enable B, connected to Arduino pin 6.
  • IN1 – Input 1, connected to Arduino pin 7.
  • IN2 – Input 2, connected to Arduino pin 8.
  • IN3 – Input 3, connected to Arduino pin 9.
  • IN4 – Input 1, connected to Arduino pin 11.

Note that the two Enable lines are connected to Arduino pins that are capable of PWM (Pulse Width Modulation). This allows us to control the speed of the motors.  The motors on each side of the car are connected in parallel.

The AUTO_GO sketch starts by defining the Arduino pins used to control the L298N. These are all set as outputs in the Setup routine.

There are four functions defined, one for every direction that the car can travel.  Each function also prints to the serial monitor, which is optional.

Finally in the loop we just call each of the direction functions, followed by a one-second pause.

The result is that the car moves forward for a second and then reverses for a second. It then turns left for a second and then right for a second. After that the loop repeats itself.

One important note – before you connect the robot car to your computer you’ll need to remove the Bluetooth module. This is true every time you program the car as the Bluetooth module uses the same transmit and receive lines that the USB connector uses and the two will conflict with each other.


The Elegoo Smart Robot Car is a well designed and high-quality kit. The parts all fit together perfectly and the instruction manuals are excellent. I think anyone would find this very easy to assemble.

This kit would be perfect for educating students of all ages who are new to the Arduino and it’s a very good value – in fact it would be very hard to get all of these components together for a lower price. I highly recommend it.

In fact, if you are reading this article before December 6th 2018 you can get the Elegoo Smart Robot Car Kit from Amazon at a discount price. It is normally priced at a very reasonable $69.99 but it is currently priced at 59.99 and there is a 7 dollar coupon you can apply making the grand total $52.99.

This concludes the first part of the series on building and using the Elegoo Smart Robot Car kit. In the next installment I will show you how to use the Bluetooth and Infrared remote controls and then we will cover the line follower and collision avoidance in the final article and video.

Until then enjoy your kit and happy driving!


Parts List

Here are some components that you might need to complete the experiments in this article. Please note that some of these links may be affiliate links, and the DroneBot Workshop may receive a commission on your purchases. This does not increase the cost to you and is a method of supporting this ad-free website.




Elegoo Smart Robot Car – The sales page for the Elegoo Smart Robot Car

Elegoo Robot Car Software – The latest version of the instruction manual and the software for using the robot car.



Building the Elegoo Smart Robot Car Part 1 – Assemble an Arduino-Based Robot Car
Building the Elegoo Smart Robot Car Part 1 - Assemble an Arduino-Based Robot Car
Article Name
Building the Elegoo Smart Robot Car Part 1 - Assemble an Arduino-Based Robot Car
The Elegoo Smart Robot Car is an easy to assemble Arduino-based robot kit with several advanced features. In the first of a three-part article I will assemble the car and give it a quick test.
Publisher Name
DroneBot Workshop
Publisher Logo
Tagged on:
Notify of

Inline Feedbacks
View all comments
Steve Tripoli
5 years ago

Excellent video and tutorial. I do have a few questions. On the Elegoo website ,they say it has a battery protection circuit, but I didn’t hear you say anything about it or where it is. The reason I ask is I have run the 18650 batteries all the way down on projects I gave my grandkids and the battery charger won’t charge them so its a little bit of hassle to boost the battery voltage back up a bit so the charger will recognize the battery. Can you tell me if this has any battery protection for discharging the batteries… Read more »

hugh kenyon
5 years ago

Excellent video and article. Am new to Arduino and don’t have elegoo kit but using both article and video and code I think I can adapt what I have to make my car work.
Thank you very much and look forward to the next projects.

5 years ago


5 years ago

I have been experimenting with the pins on the arduino with respect to the L389N dc motor driver for two motors. As I understand it, two pins (eg 9 and 5) are required for PWM to control the speed of the two motors . The two other pins required for each motor do not have to be PWM capable but simple reverse the directions of the motors. But when I try this with one motor using pins 5 (PWM),4,2. this motor is not consistent with the other. In each of the sketches you show motor 1 uses pins 9 (PWM)… Read more »

Mark Day
5 years ago

Looks like a neat car kit! Too bad it doesn’t come with opto-interruptors so you can measure distance and speed. From the pictures it looks like you could mount some. Looks like you’d have to cut a couple of holes in the lower plate for the interruptor discs. What do you think? Room to mount that stuff? What about pins (you’d want to have 2 and 3 available for interrupts)?

5 years ago

where is part 2? there are supposed to be 3 parts!

5 years ago

I assembled a Smart Robot Car 3.0, but it wasn’t working with the auto_go sketch. I rechecked all my cables and found my battery was cabled incorrectly to the L298n board, which I swapped, but it still did not drive the wheels. I then removed the linetracking cable and the wheels worked somewhat. Then I removed ultrasonic and bluetooth cables and it worked much better. Not sure what to do next.

4 years ago

Hope can you use Auto Go.ino with Object Avoidance.ino?

4 years ago

Excellent video and tutorial, but where is the responses to the questions?

george wilson
3 years ago

This robot looks the same as mines but called lafvin. So can I use the same code for my robot..I need help.

Phillip Shufflebotham
3 years ago

Excellent tutorials/articles.
Clear and concise thank you

3 years ago

sir want the same robot .

John Paul Pineda
3 years ago

Thank You much! Sir Bill for this. I have finished watching all of your video tutorials (Part 1, 2 and 3) about Elegoo Smart Robo Car. Keep up the very good work! Your tutorials are helping a lot of people and we will be forever grateful to you 🙂

3 years ago

I have enjoyed your videos and tutorials for sometime. I just finished watching the one on Robot Car Remote. I think it was done extremely well. And it made my think. Would it not be great to see how you would Remote control, an Arduino Mega with twin BTS7960s using two 12v motors for a large Robot.

Ezequiel Vierma
2 years ago

What happens with the deprecated instructions for IR Remote, can they be upgraded to make this work?

2 years ago

Hey, thank you for your instruction. I have a question for the Elegoo smart cart kit. Does it have a wifi module? I can connect the car with my smartphone by the wifi. I am not sure if it’s connected by bluetooth or wifi.
Thank you so much

1 month ago

can I have the link for the obstacle avoidance thing?