View on GitHub

ASA After School Activities

Programming and robotics at AISVN

Download this project as a .zip file Download this project as a tar.gz file

ASA Robotics, IoT and Programming

GitHub release MIT license

This is an ASA After School Activity at the AISVN from fall 2019. It includes Robotics, IoT and Programming.

4wheel

Hardware

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.

Building steps

Software iOS

Software Android

Software general

Pin assignment bluetooth

The motorshield uses the pins 10 and 12 for motor 1 and 11 and 13 for motor 2. Digital pins: 12 and 13. Analog pins: 10 and 11. Well, that’s PWM.

pin general used for pin general used for
0 RX   A0    
1 TX   A1    
2   ultrasonic trigger A2    
3~   ultrasonic echo A3    
4   buzzer A4    
5~     A5    
6~          
7          
8   bluetooth receive      
9~   servo      
10~   E1      
11~   E2      
12   M1      
13 LED M2      

As for PWM: Leonardo offers 3, 5, 6, 9, 10, 11 and 13 as PWM pins. A total of 7. For speed control we need only 2.

4wheel

Pin assignment PS2 controller

The motorshield uses the pins 10 and 12 for motor 1 and 11 and 13 for motor 2. Digital pins: 12 and 13. Analog pins: 10 and 11. Well, that’s PWM.

The original PS2 (wireless) controller used the same pins and have to be redifined to avoid collision. Here is the new pin assignment.

pin general used for pin general used for
0 RX Bluetooth RX A0    
1 TX Bluetooth TX A1    
2     A2    
3~     A3    
4     A4    
5~     A5    
6~   PS2 Clock (7)      
7   PS2 Attention (6)      
8   PS2 Command (2)      
9~   PS2 Data (1)      
10~   E1      
11~   E2      
12   M1      
13 LED M2      

As for PWM: Leonardo offers 3, 5, 6, 9, 10, 11 and 13 as PWM pins. A total of 7. For speed control we need only 2.

New pins:

6, 7, 8, 9 for PS2 remote control 10, 11 PWM for motor 1 and 2 12, 13 enable for motor 1 and 2

Inspiration

This is the old T100 robot car that served as inspiratin for the new 4 wheel robot with Bluetooth BLE control and the new motorshield and the PS2 wireless analog controller.

Robot

Schedule 2019

Im September 2019 we started our ten sessions of ASA with 10 students. By the end 6 of the project robots were driving and could be controlled remotely. Here the schedule:

The prerelease of the software v0.1 was published on November 14. On November 11th started ASA Session 2 with 4 students.