Print bookPrint book

Arduino Robots

Site: StemAcademy: Projects & Resources - Maker Space - Coding & Robotics
Course: StemAcademy: Projects & Resources - Maker Space - Coding & Robotics
Book: Arduino Robots
Printed by:
Date: Wednesday, 19 June 2019, 1:20 PM

1. Arduino Programming Setup

This module covers using plain open source Arduino hardware and the Arduino IDE for programming.  To program you will need to either:

  1. Make an online Arduino Create account OR
  2. Install Arduino IDE and NewPing Library & I2C LCD Library either by unzipping it to your "Arduino libraries" or use the library manager.

2. Hardware Setup

Hardware refers to the physical and electrical components as opposed to the software which is code.

This module refers to two Arduino based robots:  Little Bot & Big Bot

Little Bot:  All 3D printed chassis- small two wheel drive with rear omni wheel, single IR line sensor and two ultrasonic sensors.  The two motors are brushed DC motors with an L9110 motor driver IC

Big Bot:  Large aluminium 6 wheeler or 4WD - brushed DC motors on each side are driven by a single 20Amp ESC (Electronic Speed Controller).  Large 3D printed bumper houses IR Line Sensor and 2 x ultrasonic sensors.

3. Test Robot Sensors (Inputs)

We need to test the Robot's sensors (outputs).  To do this we need to upload a program that will display the IR line sensor and ultrasonic sensor values to the Arduino Serial Monitor and the LCD screen if you have that plugged into the robot.

Little Bot:

You can open Little_Bot_Read_Sensors in Arduino IDE or open the code at then you can upload to your Little Bot.  Please note typical sensor values over different surfaces and distances.

Bit Bot:

You can open Big_Bot_Read_Sensors in Arduino IDE or open the code at then you can upload to your Big Bot.  Please note typical sensor values over different surfaces and distances.

4. Test Robot Motors (Outputs)

The motors need to be tested.  Do they work at all?  Do they rotate the desired direction for forwards/backwards?  Is Left/Right correct?

Upload the following code to your robot and run with the power on.  The LHS motor should rotate forwards then backwards then stop, followed by same for RHS.

Little Bot:

For Arduino IDE use Little_Bot_Motor_Test or use this code with

Big Bot:

For Arduino IDE use Big_Bot_Motor_Test or use this code with

5. Obstacle Avoidance

Lets program the robot to avoid obstacles with a single ultrasonic sensor. 

Little Bot:

Upload and test Little_Bot_Obstacle_Avoid for Arduino IDE or use code

Test, modify and improve code.

Big Bot:

Upload and test Big_Bot_Obstacle_Avoid for Arduino IDE or use code

6. Stay in Ring (Back Off Edge)

We can use the IR (InfraRed) Line Sensor to detect black/white and see the edge of the Sumo ring. Staying on a table top using the IR line sensor is the same as staying in the Sumo Ring

Upload Stay_In_Ring_LIttle_Bot using Arduino IDE or use

Big Bot:

Upload Stay_In_Ring_Big_Bot using Arduino IDE or use