EIE3105 / EIE3106 Robot Car Info (2024 Jan - Apr) - Integrated Project

 

PolyU EIE3105 / EIE3106 - Note (Robot Car) - Integrated Project 2024 (Jan to Apr 2024)

 

PolyU EIE3105 / EIE3106 Info (EEE)

2023/2024 S2 - Integrated Project - Some Note & Info * (30 Jan 2024)


 

(Click the photo to enlarge it)



----- ----- * Important Note * ----- -----

1) Please note that each robot car is with a unique number assigned. Please do not exchange the car with your classmates, without approval.

2) Please note that the electric current or the power output of the I/O (Output pin) of microcontroller  unit (MCU) STM32F103 is limited. Over electric-current driving will damage the circuit and the I/O pins of the MCU. So please make sure to have resistors to limit or protect the I/O pins of the MCU ("+" pin, driven by the output of MCU).

(from https://www.eleccircuit.com/current-limiting-resistor/)
  • Some students connect the LEDs and the output pin of the MCU, to drive the LEDs without any resistors to limit the electric current. Some students reported that the I/O pins of their MCU boards were damaged and burnt, because of such forgetting to adding resistors (and running for a certain enough duration of time).
  • Above shows a circuit with a typical 200 ohm to 1k ohm resistor to limit the electric current passing through the LED from two batteries. In your project, the LED should be driven from the I/O pins (outputs) of the MCU.

3) Please remove the battery when it runs out of power (or of low power). It is found that many batteries were damaged because some students kept the batteries discharging or running even though the batteries were of low power -- this is a well-known mistake that it will damage the batteries permanently!!!

4) Please follow the guideline to assemble your robot car and troubleshoot as instructed.

 (Note that the new line-tracker module is with the resistors of 10k ohm, replaced by 5100 ohm, i.e. "103" >>> "512")

Below is another USB dongle with auto-recover-fuse protection: (note: 3.3V TTL should be chosen)

  
* The red USB-UART dongle doesn't have fuse protection, while the golden one (chip CH340G driver) has. (Click here to google drive downloads; another more simple version file)
The red one can burn your USB port of the PC and burn your Robot Car when you accidentally make some wrong connections. So please use the golden one instead (with the new connection cable).

** Please note that the old red USB-UART dongle should not be used especially if you experienced MCU burnt. The red USB dongle will be phased out as it doesn't have protection!!!

We are distributing the new golden-color USB-UART dongle (serial adaptor) (which has short-circuit auto-recover / resettable fuse protection) (more than 100 sets purchased).

Technical support (by Samson, Patrick, and Nick) will be probably provided in the lab CF005 on (every, except holidays) Wednesdays (15.30 to 18:30). The IoT electronic lab (CF005) will be usually open until 18:30.

A photo of an assembled set of robot car:

(Click the photo to enlarge it)







Software List
----- ----- -----
1) Keil uVision v5.28
2) Atmel Studio
3) STM32 ST-Link Utility


Tools List


Note to the wirings of the robot car as shown below:




Procedures

Part 1: Assemble the lower car plate.
Part 2: Assemble the upper car plate.
Part 3: Assemble the remote control
Part 4: Connect different modules with cables.
Part 5: Test different modules of the robot car.
Part 6: Test different modules of the remote control.

Appendix: Module Information

a) Ultrasound Module (more info: click to Google Drive downloads)

b) Bluetooth Modules HC-05 / HC-06
Bluetooth protocol: Bluetooth Specification v4.0+EDR 
Frequency: 2.4GHz ISM band
Operating voltage: 3.3~6V
Transmission speed:
Asynchronous mode: 2.1Mbps (Max) / 160 kbps
Synchronous mode: 1Mbps/1Mbps

HC05 / HC06 Pin connections:
VCC: Connect to 5V (+)
GND: Connect to GND (-)
RXD: Connect to PA2 (HC-05 -> STM32)
TXD: Connect to PA3 (HC-05 -> STM32)
RXD: Connect to D0 (HC-06 -> Arduino UNO)


c) Servo Motor SG90
Voltage: 4.8 - 6V DC
Required Pulse: 3.3 – 5V Peak to Peak Square Wave
RED pin: Connect to 5V
BROWN pin: Connect to GND
ORANGE pin: Connect to PC7 (of STM32 MCU board)


d) Line Tracker Module HW-871
Working voltage: DC3.3V or 5.0V
Output signal: digital signal
Detection distance: 10mm~15mm
Signal status: detect the black line and output low level, detect the white line and output high level, and output low level if it exceeds the detection range
LED status: detect black line LED off, detect white line LED on
Pin connection:
(1) GND: Connect to GND
(2) 5V: Connect to 5V 
(3) OUT1: Connect to PB0 (STM32)
(4) OUT2: Connect to PA4 (STM32)
(5) OUT3: Connect to PA5 (STM32)
(6) OUT4: Connect to PA6 (STM32)
(7) OUT5: Connect to PA7 (STM32)

(Line tracker module circuit diagram above - click it to enlarge) 
  • Please note that the resistors R2, R4, R6, R8, R10 of the new module should use 5100 ohms (mark "512"), instead of 10K ohm (marked "103" on resistor) for a measuring distance of about 1 to 1.5 cm. We have some other line tracking modules with variable resistors. E.g. TCRT5000
Above diagram shows a basic mechanism of the module. The left one is with a white surface that reflects the light emitted from the IR LED, while the right one does not reflect the light with a black surface.
     
In the above picture, we are using two IR sensor modules namely the left sensor and the right sensor. When both left and right sensor are sensing white, the robot can move forward.
If the left sensor comes on a black line, the robot can turn the left side, so as to keep the robot car to follow the black line. When both left and right sensor are sensing white, the robot can move forward.
    
As in the above picture, in case the right sensor is sensing a black line, the robot can then turn right, until both sensors come to the white surface. When they both come to white surface, the robot can start moving on forward again.
 

When IR light is reflected and received from the sensors, the LEDs will turn ON to indicate that the IR receiving is detected. The corresponding Tera Term output should be “11111”.

When IR light is NOT reflected (or not received) from the sensors, the LEDs will turn OFF to indicate that no IR light is detected. You can also take the robot car, far away from the white surface so that no IR light (reflected) is received (so that the LEDs are off). The corresponding Tera Term output should be “00000”.



e) Speed Counter Module HC-020K
HC-020K speed measuring sensor is a wide voltage, high resolution, short response time, and the switch output speed measurement module.
Module Working Voltage: 4.5-5.5V
Resolution: 0.01mm
Measurement frequency: 100KHz
Encoder resolution: 20 lines
Most HC-020K modules operate with 5V and produce a digital output within the range of 0V to 5V. It will provide a 5V output when the beam is blocked, and a 0V output when the beam is unblocked. You can read the pulse train to determine how far the motor has travelled at what velocity. 
Pin connection: 
5V: Connect to 5V
GND: Connect to GND
OUT: Connect to PB3 (left wheel) or PB6 (right wheel) (STM32)

f) Motor Shield L298 Module (from OpenJumper)
Schematics:


g) Sensor Shield Module (from OpenJumper)
Schematics:


h) Joystick Shield Module
Schematics:

i) Nucleo STM32F103-RB Development Board Pinouts - 
Arduino Left Header Top-Left: CN6 and CN8

Arduino Right Header Top-Right: CN5 and CN9

Morpho Headers - These headers give access to all STM32 pins.



Note: Some students reported that they got problems with the bluetooth module using the UART2. Because the ST-Link also uses UART2 (i.e. the pins PA2 and PA3, as indicated in the assembly guide in Jan 2024), which is not disconnected and UART allows only one to one communications, sharing the UART2 might encounter some errors or problems. It is advised to use e.g. UART3 to communicate with the bluetooth module, instead.


Downloads

留言

這個網誌中的熱門文章

PolyU EIE3105 / EIE3106 (2022-2023) EIE JoyPad & MCU Control PCBs - Important Note (Robot Car) - Integrated Project

PID Speed Control