Skip to content

Commit 94caaa8

Browse files
added mainboard-pins.md, wire connection for servo, advanced tutorials date venue
1 parent 2b8c306 commit 94caaa8

19 files changed

+174
-14
lines changed

README.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ Here is a brief overview of our schedule:
1010

1111
<figure><img src="images/2024-schedule.png" alt=""><figcaption><p>2024 schedule</p></figcaption></figure>
1212

13+
## New Update!!!
14+
15+
Advanced Tutorial details for Trainees who could join the next phase:
16+
(if you submitted most of the stuff and attended all tutorials, you are likely to join the next phase)
17+
18+
Advanced Tutorial 1: Image Processing
19+
- 19 Oct 2024 (Sat) 14:00 - 17:00 Room 2302(Lift 17/18) (Remarks: 1 hour after COMP 2012 midterm)
20+
- 21 Oct 2024 (Mon) 19:00 - 22:00 Room 2303(Lift 17/18)
21+
22+
Advanced Tutorial 2: CAN and RM Motor Control
23+
- 23 Oct 2024 (Wed) 19:00 - 22:00 Room 2405(Lift 17/18)
24+
- 24 Oct 2024 (Thur) 19:00 - 22:00 Room 5619(Lift 31/32)
25+
---
26+
1327
[Homework arrangement](homework-demo-arrangements.md)
1428

1529
* [Tutorial 0: self-learning basic C](tutorial-0-self-learn-basic-c/README.md)
@@ -20,6 +34,6 @@ Here is a brief overview of our schedule:
2034

2135
[Lists of Links](SUMMARY.md)
2236

23-
Advanced tutorials will be held later in the next phase and their dates are still TBD. There are also advanced notes for your own reading. Feel free to reach out to any team members if you have any questions about anything related to the tutorials or the team in general.
37+
Advanced tutorials will be held later in the next phase. There are also advanced notes for your own reading. Feel free to reach out to any team members if you have any questions about anything related to the tutorials or the team in general.
2438

2539
Please also make sure to join our [Discord](https://discord.gg/PNnQdjzt58) server for more important announcements.

SUMMARY.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,10 @@
5757

5858
## [TUTORIAL 3: Advanced IO](tutorial-3-advanced-io/README.md)
5959

60-
* [01) PWM and Servo motor](tutorial-3-advanced-io/01-pwm-and-servo.md)
61-
* [02) Classwork](tutorial-3-advanced-io/02-classwork.md)
62-
* [03) Homework](tutorial-3-advanced-io/03-homework.md)
60+
* [01) Mainboard Pins](01-mainboard-pins.md)
61+
* [02) PWM and Servo motor](tutorial-3-advanced-io/02-pwm-and-servo.md)
62+
* [03) Classwork](tutorial-3-advanced-io/03-classwork.md)
63+
* [04) Homework](tutorial-3-advanced-io/04-homework.md)
6364

6465
## [TUTORIAL 4: UART](tutorial-4-uart/README.md)
6566

+134
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# Mainboard PINS
2+
[Back to Main](README.md) |
3+
4+
> Let's plug the wires ourselves
5+
6+
<details>
7+
8+
<summary>Authors</summary>
9+
10+
Dicaprio Cheung
11+
12+
</details>
13+
14+
# Mainboard pins
15+
16+
This is a summary of all different pins of our mainboard.
17+
18+
There is a 24V power input for us to connect to the battery. If your laptop is not strong enough to power the servo motor/other stuff, you need to connect to the battery.
19+
20+
There is also a fuse to prevent burning. (although i never see the fuse on the mainboard burn before... it is always the mainboard burn first...)
21+
22+
![](images/mainboard_full.png)
23+
24+
## SWD
25+
26+
This is the port where we used to flash code
27+
28+
![](images/SWD_pins.png)
29+
30+
You can connect the SWD to the corresponding pins of ST Link.
31+
32+
> keep in mind that there are 2 layers of pins in ST Link. Please plug in the correct layer
33+
34+
![](images/stlink-v2.png)
35+
36+
## 5V GPIO pins
37+
38+
This is a normal 5V GPIO pin.
39+
40+
![](images/GPIO_pins.png)
41+
42+
We usually plug
43+
- limit switches
44+
- line following sensor
45+
- small servo motor
46+
- IR sensor
47+
- Ultrasonic sensor
48+
- etc.
49+
50+
in these ports
51+
52+
## 24V GPIO pins
53+
54+
This is a special GPIO pin that outputs 24V when connected to the 24 V battery
55+
56+
![](images/Pneumatic_pins.png)
57+
58+
We usually plug 24V Pneumatic Solenoid Valve to it. (Then, the pneumatic valve connect to the pneumatic cylinder we demo-ed in Tutorial 2)
59+
60+
![A picture of Pneumatic Valve](../tutorial-2-basic-io/image/Festo_Pneumatic_valve.png)
61+
62+
> There are some old mainboard (Green, Reset button NOT next to other buttons) that uses 12V battery instead. So, they can only connect 12V Pneumatic Solenoid Valve
63+
64+
65+
## UART pins
66+
67+
> will be taught in Tutorial 4
68+
69+
This is a UART pin.
70+
71+
![](images/UART_pins.png)
72+
73+
We usually plug
74+
- Bluetooth
75+
- TTL
76+
- TOF sensor
77+
- etc.
78+
79+
in these ports
80+
81+
## CAN pins
82+
83+
> will be taught in Advanced Tutorial 2
84+
85+
This is a CAN port.
86+
87+
![](images/CAN_pins.png)
88+
89+
We usually plug
90+
- ESC(Electronic Speed Controller) of Motors
91+
- Other CAN ports of other boards
92+
- etc.
93+
94+
in these ports
95+
96+
# Different connector heads of ports
97+
98+
Since Hardware department is experimenting with new connectors of the ports, there are many different connector heads
99+
100+
## Molex Connector
101+
102+
Molex Connector is the traditional one that we used in the previous years. It is black in color and we solder it on all SWD ports.
103+
104+
The most common one is the 4 pin one but there are 2, 3, 5, 6 pin versions of them.
105+
106+
![](images/molex.png)
107+
108+
## XA Connector
109+
110+
XA Connector is the rarest one because it is only soldered on the boards made in Spring 2024. It is in brownish-white color or we call it rice color in chinese.
111+
112+
The most common one is the 4 pin one but there are 2, 3, 5, 6 pin versions of them.
113+
114+
![](images/XA1.jpg)
115+
![](images/XA2.jpeg)
116+
117+
118+
## XH Connector
119+
120+
XH Connector is the newest one and is soldered on most of the new mainboards you are using. It is white in color and is soldered on all ports except SWD.
121+
122+
The most common one is the 4 pin one but there are 2, 3, 5, 6 pin versions of them.
123+
124+
![](images/XH.jpg)
125+
126+
## Rainbow wires
127+
128+
When we are lazy, we will just use rainbow wires to connect things. You can tear a few wires out to use it when you need.
129+
130+
> DO NOT CONNECT VOLTAGE AND GROUND TOGETHER OR YOU WILL BURN YOUR BOARD!!!
131+
132+
![](images/rainbow-wires.jpg)
133+
134+
[Continue to next page](./02-pwm-and-servo.md)

tutorial-3-advanced-io/02-classwork.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Find 3 possible combinations of prescaler value and auto-reload values for contr
1111
1212
> Hint: *** Remember they are `uint16_t` . So, they can only be 0 to 65535***
1313
14-
[Back to notes](01-pwm-and-servo.md#timer)
14+
[Back to notes](02-pwm-and-servo.md#timer)
1515

1616
## Classwork 2
1717

@@ -21,7 +21,7 @@ Calculate the CCR value for moving the servo to -90, 0, and 90 degree. (1 ms, 1.
2121

2222
> Yes, this is another MATH question.
2323
24-
[Back to notes](01-pwm-and-servo.md#channel)
24+
[Back to notes](02-pwm-and-servo.md#channel)
2525

2626
## Classwork 3
2727

@@ -33,4 +33,4 @@ Try to control servo motor to turn to -90 degrees-> 0 degrees -> 90 degrees (wit
3333
3434
> Note: We are using TIM5 and channel 1
3535
36-
[Back to notes](01-pwm-and-servo.md#start-coding!!!)
36+
[Back to notes](02-pwm-and-servo.md#start-coding!!!)

tutorial-3-advanced-io/01-pwm-and-servo.md renamed to tutorial-3-advanced-io/04-pwm-and-servo.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# PWM and Servo motor
2-
[Back to Main](README.md)
2+
[Back to Main](README.md) | [Previous Page](01-mainboard-pins.md)
33

44
> the tutorial with the most math
55
@@ -76,7 +76,7 @@ We will connect the timer to the servo motor. So, the Timer frequency = your des
7676

7777
### Classwork 1
7878

79-
> [Classwork 1](02-classwork.md#classwork-1)
79+
> [Classwork 1](03-classwork.md#classwork-1)
8080
8181

8282
## Channel
@@ -106,7 +106,7 @@ The ARR (auto reload register) from the previous paragraph is used as a downscal
106106

107107
### Classwork 2
108108

109-
> [Classwork 2](02-classwork.md#classwork-2)
109+
> [Classwork 2](03-classwork.md#classwork-2)
110110
111111
### Deep thinking: How to choose PSC and ARR?
112112

@@ -139,6 +139,14 @@ There are 4 steps in setting up the PWM output channel and the pin to use.
139139

140140
![](https://i.imgur.com/MzvaMDI.png)
141141

142+
5. Connect the servo motor to the correct pins of your mainboard
143+
144+
- Orange PWM wire of servo connect to the pin you chose (PC7(TIM3\_CH2) for the example above)
145+
- Red 5V wire of servo connect to Vcc(Voltage) of GPIO port
146+
- Brown GND wire of servo connect to GND(Ground) of GPIO port
147+
148+
![](images/Servo-wires.png)![](images/GPIO_pins.png)
149+
142150
### Start Coding!!!
143151

144152
There are 4 steps in coding:
@@ -213,4 +221,4 @@ while (1) {
213221
214222
### Classwork 3
215223
216-
> [Classwork 3](02-classwork.md#classwork-3)
224+
> [Classwork 3](03-classwork.md#classwork-3)

tutorial-3-advanced-io/README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Homeworks: show your working mainboard + servo to our seniors in Hall 9 Lab afte
1414
|Venue|Room 6580 (Lift 27/28)|Room 4582 (Lift 27/28)|Room 6580 (Lift 27/28)|
1515
|Tutorial 3 Homework Deadline|14 Oct(Mon) 18:00|16 Oct(Wed) 18:00|17 Oct(Thur) 18:00|
1616

17+
> Unlike other homework, we will NOT accept late Tutorial 3 Homework. We will NOT accept any classworks after Tutorial 4
18+
1719
### Tutorial 3 targets
1820

1921
* configure a PWM signal for a servo
@@ -22,6 +24,7 @@ Homeworks: show your working mainboard + servo to our seniors in Hall 9 Lab afte
2224

2325
## Tutorial 3 Links
2426

25-
* [PWM and Servo motor](01-pwm-and-servo.md)
26-
* [Classwork](02-classwork.md)
27-
* [Homework](03-homework.md)
27+
* [Mainboard Pins](01-mainboard-pins.md)
28+
* [PWM and Servo motor](02-pwm-and-servo.md)
29+
* [Classwork](03-classwork.md)
30+
* [Homework](04-homework.md)
50.3 KB
Loading
49.5 KB
Loading
36.5 KB
Loading
53.9 KB
Loading
135 KB
Loading
49.6 KB
Loading

tutorial-3-advanced-io/images/XA1.jpg

20.1 KB
Loading
34.8 KB
Loading

tutorial-3-advanced-io/images/XH.jpg

219 KB
Loading
2.11 MB
Loading
389 KB
Loading
59.1 KB
Loading
1.13 MB
Loading

0 commit comments

Comments
 (0)