A small robot which works by monitoring the tilt of hands and moves as you want it to. It has applications in controlling quadcopters the same way as UGVs for security and surveillance purposes, along with medical applications which involves easy control and handling of wheelchairs.
A short documentation for this can be found in the Electronic Wings Website. It was built for a competition conducted by Electroni Wings along with Mouser Electronics in the month of December, 2021.
This project works in 3 main parts:
- Hand Module: Retrieves and records the data of the tilt of the hand.
- Communication Module: Transmits data from the hand module and receives it on the 2WD module.
- 2WD Module: Interprets the received data from the hand module and acts on it to change the speed and direction of the 2 wheeler robot.
**MPU6050** --------------I2C Comm--------------> **Arduino1 (Hand module)** --------------SPI Comm--------------> **NodeMCU1 (Hand module)** --------------Wi-Fi--------------> **NodeMCU2 (2WD module)** --------------I2C Comm --------------> **Arduino2 (2WD module)** --------------> **L298N H-bridge motor driver**`
Before starting on this project, make sure to go through this checklist:
Component | Amount | Utility |
---|---|---|
Arduino Uno | x2 | Microcontroller |
MPU6050 Accelerometer & Gyroscope | x1 | Tilt sensing |
NodeMCU ESP8266 Board | x2 | WiFi Module |
L298N Dual H-Bridge Motor Driver | x1 | Controlling 2 motors |
DC Motors (9V/12V) | x2 | For driving 2 rear wheels |
Lithium Polymer Battery 11.1V | x1 | Power supply with desired current output |
- MPU6050: Used for measure angle (tilt of hand)
- Arduino Uno (1): Acts as in intermediate to fetch and process the values of angles and sends them to the NodeMCU Wi-Fi module via SPI Communication Protocol
- NodeMCU (1): Receives the angle values
Connect the MPU6050 to Arduino as shown for I2C communication. I2C is the serial communication protocol done using only 2 wires.
Connect the NodeMCU to Arduino as shown for SPI communication. SPI is the Serial communication protocol done using 4 wires. Arduino is assigned as the Slave and NodeMCU as the Master.
- NodeMCU (1): This is the server NodedMCU. Transmits the angle values over Wi-Fi.
- NodeMCU (2): This is the client NodeMCU. It receives the angle values.
- NodeMCU (2): Sends the received angle values to the Arduino via I2C protocol.
- Arduino (2): Processes the values obtained and it is programmed such that:
- When the tilt is forward the car speeds ahead
- With backward tilt, it slows down
- With left tilt, the car turns left
- With right tilt, the car turns right
- Motor driver: It is used to control and vary the speeds of the 2 motors in the robot by following the data received from the Arduino.
Connect the NodeMCU to Arduino as shown for I2C Communication. I2C protocol was used to send data from the NodeMCU to the Arduino. The NodeMCU was assigned as the Master and Arduino as the Slave.
Connect the motor driver to the Arduino as shown.
The codes for Arduino and NodeMCU for the hand module are given here.
The codes for Arduino and NodeMCU for the 2 Wheeler Robot Car are given here.