I started this project as educational bluetooth rc robot, but in progress i decided to do it as R2D2 look like robot toy.
Robot building is still in progress.
- Robot legs with motors and wheels
- Robot body
- Simple bluetooth steering (Forward, Back, Left, Right and Horn) works with Bluetooth RC Controller on android
- Buzzer as a horn
- DFPlayer with R2D2 mp3 sounds on SD card instead of buzzer E18-D80NK sensor to avoid obstacle colision
- RGB LED installation as an robot eye
I have a plan to implement one more option FOLLOWER - when this option is on robot will follow the operator. The problem is that I have only overall idea. I plan to use band with IR SMD LED mounted on the operators leg and few IR phototransistors with Sharp distance sensor, but its only concept if someone have any other idea PLEASE write it in a comments.
Step 1: Parts and Tools
Electric and electronic parts:
- RedBot MainBoard -1 pc.
- HC-05 Bluetooth Module - 1 pc.
- DFPlayer Mini - MP3 Pleyer - 1 pc.
- speakers 3W - 2pcs.
- DAGU motor with gear 48:1 - 2 pcs.
- E18-D80NK - Adjustable sensor - 1 pc.
- RGB LED - 1pc.
- 4 AA Battery holder with plug - 1 pc.
- Plastic trash bin - 1pc.
- A5 greyboard 1mm thic - 6pcs.
- DAGU Wheel - 2pcs.
- Metal blocks
- Glue gun
- Soldring iron
Step 2: Building Robot Body
As you already know the main body of a robot is made of a trash bin. Legs are made of 1mm thin cardboard cut and glued with a glue gun in shape like on a picture. There are two DAGU motors installed with using of metal blocks on two longer legs. On the third short leg is ball caster also mounted on magnetic blocks. On the trash bin are stickers cut on a plotter.
Probably in future cardboard legs will be changed to a PCV.
Step 3: Electronics
Main part of a robot is Sparkfun RedBot mainboard. It has motor drivers installed, so i connected only HC-05 bluetooth module: RX, TX to pins A0 and A1, VCC to 5V, and GND to GND. Xbee switch i set to SOFTWARE SERIAL. There is also buzzer connected between digital pin 9 and GND.
System is powered by 4 AA batteries mounted in a battery holder and plugged directly to RedBot mainboard.
In the nearest future im going to mount electronics inside the body and add DFplayer, RGB LED, and obstacle sensor.
Step 4: Programming
Program to control robot is really simple. Car Bluetooth RC app by buncalocsends single char which depends on pressed button: F for forward, B for back, L for left, R for right, V or v for horn (it works like on/off button). When there is no pressed button application sends S char. To control robot you need to read char from BT and make some if / else - if condition to run motors or horn.
Step 5: New Mainboard
Because of lack of digital pins in RedBot I decided to use Arduino NANO instead of it.
I used EAGLE to make new PCB.
New mainboard has:
- Arduino NANO
- Pololu 2511 Motor driver
- HC-05 Bluetooth module pinout
- DFPlayer - MP3 player
- Step - Down transformer - to use 11.1 Li-Pol battery
- MAG3310 I2C Magnetometer (not implemented yet)
- RGB LED pinout with resistors
- Digital pinout for E18-D80NK infrared sensor
As you can see I made some mitakes:
- Width of ARDUINO NANO -as you can see I used cables on one side of controller
- I switched RX and TX pin for HC-05
- I forget that it is NOT SMD PCB and caption is mirror reflected
- I projected 5V power supply for MAG3110 instead of 3V3
I will attach EAGLE PCB project when everything will be OK.
New ARDUINO program for R2D2 is still in progress and will be available later.
Participated in the