Introduction: Bi-directional Communication Robot
Most of the robot work on uni-directional commands like Bluetooth, joystick etc. But what if you want some data back to your transmitter ? This project creates a bi-directional system, that is data is send and received continuously.
Do watch the video first. I have tried to explain all the steps in detail.
Step 1: Basic Model & Components Required
So we will be making a remote to control the robot and the robot will have multiple sensors which will transmit the sensor reading back to the remote and display it on the LCD of the remote.
For the robot you can use any chassis you want. Just make the power supply is suitable.
See the block diagram to get the basic idea. The communication will take place using RF module - HC12.
2 x Arduino UNO
1 x Joystick module
2 x HC-12 RF module
1 x LCD (20x4)
3 x Pushbuttons
1 x Infrared Sensor
1 x Temp & Humidity Sensor
1 x L293D IC motor diver
1 x 103 potentiometer
3 x 10K ohm resistors
3 x LED
4 or 2 DC motors (as per your chassis)
Step 2: Remote
Make the connections as shown in the schematic diagram. All the modules are powered by the arduino only.
There are 3 pushbuttons:
Start - Initially a handshake will take place which makes sure the connection is established and synchronous communication takes place. When both system are switched on, press start, if the lcd starts to show the readings it means connection is established.
Stop - This is connected to interrupt pin and would stop the robot in case of emergency. After pressing stop the robot needs to restart(press button on arduino).
Lights - Toggle the headlights for robot. (For night vision)
Step 3: Robot
See the schematic diagram for connections.
I have powered the arduino and motors using 12V lead acid battery. Do NOT give arduino an input voltage of greater than 12 V.
Step 4: Code
Both the code files are attached.
The code consist of user defined protocols. For example when start button is pressed the command 'st' is send to the robot and in response it sends back 'st'. Hence communication established.
After this the remote send the joystick position and in response the robot sends the sensor values in a string format. When this cycle runs fast you can see smooth movement of the robot. If there is a delay or code has glitches then the movement would stumble a bit.
When the remote sends the joystick value it goes into waiting, for data to be received. Similarly robot waits for next value from remote after sending its sensor values.
Step 5: Testing
Start by pressing the start pushbutton. If the LCD starts showing the sensor value then handshake was successful. Control the robot using the joystick and see if the readings on the LCD changes.
If you like this instructable please vote for it in the contests :)