T300 robot 3.0 at AISVN

MIT license GitHub release Build Status

This is the third iteration of our robots at AISVN as described in the history further down. It used the Arduino Leonardo and incorporates:

This is our third iteration of student created robots. It includes:

Materials

We ordered the following materials for all students among others at CỬA HÀNG IC ĐÂY RỒI. This gives a common ground for further experiments both in software and hardware:

nr name amount unit price price link
1 Arduino Leonardo 1 125.000 VND 125.000 VND link icdayroi.com
2 Robot base 4 wheels 1 140.000 VND 140.000 VND link icdayroi.com
3 Motor Shield L298 1 120.000 VND 120.000 VND link icdayroi.com
4 Bluetooth AT-09 1 75.000 VND 75.000 VND link icdayroi.com
5 Battery 18650 3.7V 2 35.000 VND 70.000 VND link icdayroi.com
6 Battery holder 2C 18650 1 7.000 VND 7.000 VND link icdayroi.com
7 Power switch MTS 102 1 4.000 VND 4.000 VND link icdayroi.com
8 Battery voltage display 1 22.000 VND 22.000 VND link icdayroi.com
9 Servo SG90 5 29.000 VND 145.000 VND link icdayroi.com
10 Ultrasonic module HC-SR04 1 20.000 VND 20.000 VND link icdayroi.com
11 Robot 4DOF kit 1 246.000 VND 246.000 VND link lazada.vn
12 Wires DuPont MF and FF 20 300 VND 6.000 VND link thegioiic.com
13 Voltmeter for Battery 1 21.000 VND 21.000 VND link thegioiic.com
14 Display 1602 3.3V white on blue 1 32.000 VND 32.000 VND link thegioiic.com
15 I2C serial to parallel adapter 1 13.500 VND 13.500 VND link thegioiic.com
1.046.500 VND

Apart from these materials for 1.046.500 VND or 45 USD we need some time to assemble all parts - and then to program the robot car! Over the months of development several changes and standardizations took place. We ended up with a standard as platform at AISVN, to be found in the respective github project.

Building steps

Remote

how to control with 10 keys

Key Character Mode 1 Mode 2 Mode 3 Mode 4
F forward forward    
B backward backward    
L left left left  
R right right right  
Select M Menu+ Menu+ Menu+ Menu+
Start S Start Return toggle sound start autonomous
T turbo up    
C faster open    
X X Stop down   Stop
Q slower close    

Pin assignment

pin general used for note
0 RX Bluetooth RX  
1 TX Bluetooth TX has voltage divider 1kΩ/2kΩ for 3.3V
2 SDA I2C Display 1602 and
3~ SCL I2C MPU 6050 gyroscope
4   buzzer acoustic feedback
5~   PS2X CS Chip Select (SPI SS)
6~   PS2X CLK Clock (SPI SCLK)
7   Ultrasonic trigger  
8   Ultrasonic echo  
9~   Servo ultrasonic  
10~   E1 enable Moter 1 (PWM)
11~   E2 enable Motor 2 (PWM)
12   M1 forward/backward
13 LED M2 forward/backward
A0   Servo left-right Robotarm 5-175
A1   Servo up-down Robotarm 45-120
A2   Servo forward-back Robotarm 65-140
A3   Servo open-close Robotarm 90-125
A4   PS2X DAT Data (SPI MISO)
A5   PS2X CMD Command (SPI MOSI)

Issues

After some time of use almost all of the boards no longer support PWM for pin 11 on the motor shield. Any value below 255 is interpreted as a low and the motor is shut off. Not very usefull for a motor project. Same is true for pin 1. Even though a voltage divider with 1kΩ/2kΩ is reducing the output voltage of the Arduino to 3.3 V several boards don’t submit any signal. The bluetooth module can therefore only receive information, but not send them back.

1602 display over I2C

For optic feedback on the selected mode and current status we added a display with 16 characters in 2 rows. Instead of using 8 digital lines from the Arduino we utilized the I2C bus and needed only 2 wires - and potential 225 further I2C devices to connect. On November 24th, 2019 we got the successful feedback:

Display 1602

History

Materials 2019 - has been updated

We ordered the following materials at CỬA HÀNG IC ĐÂY RỒI for all students to have a common ground for further experiments both in software and hardware:

  1. Arduino Leonardo (because of the Micro-USB interface) 125.000₫
  2. Khung xe robot 4 bánh (4 wheels - stable driving) 140.000₫
  3. Arduino Motor Shield L298 120.000₫
  4. Module thu phát bluetooth HC-05 80.000₫
  5. Pin Cell 18650 4200mAh 3.7V (4 AA batteries are not enough for motor and bluetooth, and not rechargable) 35.000₫
  6. Hộp đế pin 18650 loại 2 cell battery holder for two 18650 batteries 7.000₫
  7. Công tắc gạt MTS-103 3 trạng thái power switch for the robot 5.500₫
  8. Đồng hồ đo Vôn (Volt) 3.5-30V Voltage display to check the charge level of the battery 22.000₫
  9. Four 10 cm cable 0.25 mm² to connect the motors to the shield ₫
  10. Three female-male jumper wire to connect the bluetooth module to the Arduino (+3.3V, GND, RX)
  11. So in general: some jumper wires 19.000₫
  12. Maybe a breadboard to connect 5.000₫

All in all some 550.000₫ are already spend on these simple materials. Further steps include the collaborative project of a self driving robot (Khung xe robot omni đa hướng 2.250.000₫), controlled by an Raspberry Pi 1.580.000 VND with Camera 305.000 VND for object detection and obstacle avoidance.

Future updates

The above program consumes 91% of the available RAM of the Arduino Leonardo. For future projects we need more. Some contenstants:

Model RAM instructions RAM data Flash Clock Pins
Arduino Leonardo 2.5 KB - 32 KB 16 MHz 20
ESP8266 (NodeMCU) 32 KB 80 KB 4000 KB 160 MHz 12
ESP32 (WROVER-32) 520 KB 4000 KB 4000 KB 240 MHz 20
Raspberry Pi 1 512,000 KB - 16,000,000 KB 700 MHz 26
Raspberry Pi 4 4,000,000 KB - 64,000,000 KB 1500 MHz 40
Nvidia Jetson Nano 4,000,000 KB 473 GFLOP 16,000,000 KB 918 MHz 40

Remote

how to control with 10 keys

Pin assignment

pin general used for note
0 RX Bluetooth RX  
1 TX Bluetooth TX 5V level, not 3.3!
2   Ultrasonic trigger  
3~   Ultrasonic echo  
4   buzzer acoustic feedback
5~      
6~      
7      
8      
9~   Servo ultrasonic  
10~   E1 enable Moter 1 (PWM)
11~   E2 enable Motor 2 (PWM)
12   M1 forward/backward
13 LED M2 forward/backward
A0   Servo left-right Robotarm 5-175
A1   Servo up-down Robotarm 45-120
A2   Servo forward-back Robotarm 65-140
A3   Servo open-close Robotarm 90-125
A4      
A5      
SDA I2C Display 1602 optic feedback
SCL I2C MPU6050 gyroscope orientation

Remote control software

  1. General driving
  2. Ultrasonic distance with acoustic feedback
  3. Autonomuous driving (start triangle, stop x)
  4. Control robot arm

T500

2020-04-04

T500

T400

2020-02-02

T400

T300

2019-11-18

T300

asa

2019-11-04

asa

T200

2019-04-08

T200

T80

2019-03-26

T80

T110

2018-10-25

T110

T100

2018-10-09

T100