Introduction: Arduino Lego Car

Picture of Arduino Lego Car

In this instructable i want to explain how I build a Lego car with Arduino that will avoid obstacles.

Step 1: What Do You Need

Picture of What Do You Need
  • 4 motors and wheel
  • Distance sensor (HC-SR04)
  • Servor motor (Micro Servo 9g SG90)
  • Motor driver (L298N Dual H-Bridge)
  • Arduino one
  • Lego and some materials to construct you're car
  • 1 or 2 power supplies (powerbank)
  • Breadboard and wires

Step 2: Build a Car

Picture of Build a Car

I used Lego to build the car, to connect the motors to the lego I used some metal screw-threaded rod.

Step 3: Wire It Together

Picture of Wire It Together

See the diagram for the correct wiring of the Arduino. Make sure the Led's are set the right way, I wire everything to a breadboard and then to the different ports on the Arduino but you could connect them directly of course.

I used a separate power supply for the Arduino and the motors, you can use one power source if you just have one.

Step 4: Start Coding

I attached a example program to use with you're Arduino. Its not perfect but it should work. At the top you can change to ports to you're own configuration if you need.

Comments

ROBO HUB (author)2017-02-02

good...can u try to make drawbot

DIY Hacks and How Tos (author)2017-01-29

I love it. Lego and Arduinos are two of my favorite building toys/tools.

About This Instructable

3,342views

30favorites

License:

More by Aansteekblokje:Arduino UselessLegoBoxArduino Lego Car
Add instructable to: