Skip to content

Commit d75f640

Browse files
mihailinuxMihai Temiac
andauthored
Project/mihai.temiac Final Push, new photos (#1439)
* added documentation * hardware and schematics * final pull request --------- Co-authored-by: Mihai Temiac <mihaitemiac@Mitzis-MacBook-Air.local>
1 parent 9b3469d commit d75f640

6 files changed

Lines changed: 100 additions & 5 deletions

File tree

31 KB
Loading

website/versioned_docs/version-fils_en/project/2026/mihai.temiac/index.md

Lines changed: 100 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,48 @@ As such, I chose this project due to its nature and complexity, as I strongly be
4848
- First 3D renders, there is plenty of room for improvement, but have been getting more comfortable with Fusion
4949

5050
### Week 9
51-
Working on the documentation.
51+
- Working on the documentation.
52+
53+
### Week 10
54+
- Got the prints, this is tough. Broke a pin already, the tolerances were not a joke. Will use the universal repair tool, superglue.
55+
56+
### Week 11
57+
- Still working at the build; it feels like a battle, and I am losing.
58+
59+
<center>
60+
![Hand build](hand.webp)
61+
</center>
62+
63+
### Week 12
64+
The assembly has been completed, could say that the superglue was *handy*. You would think that a large hardware store would have all the tools you need, but sometimes you have to improvise (this time, I had to improvise a tad too much).
65+
66+
Down below is my fully functional, high precision, low cost, hand drill (could not find a smaller electric drill, and I was not gonna spend the big buck on professional ones, hope I will not be working in construction anytime soon), as the tendon channels needed redrilling.
67+
68+
<center>
69+
![Micunealta](micunealta_secreta.webp)
70+
</center>
71+
72+
Learnt what an *elephant foot* means in 3D printing; pairing grit paper with my ultra precision tool meant the job was (supposed to) be easy enough. 4 days later, I was still sanding down finger joints, else the servos would snap at the first tug.
73+
74+
<center>
75+
![Sanding](sanding.webp)
76+
</center>
77+
78+
Also tested the code without the assembly, everything was looking good. Sample sensor, analyze, classify and respond with the correct motors.
79+
80+
<center>
81+
![Prototype](prototype.webp)
82+
</center>
83+
84+
### Week 13
85+
Final push: the hand was complete, the assembly looked good, the mechanics ran smooth.
86+
87+
<center>
88+
![Palm](palm.webp)
89+
</center>
90+
91+
For the future students taking this class, please do **demo videos**. You never know when things might go wrong. Installed an I2C module for the servo control, things ran great until they did not. Functional code, got a video of the servos moving, after which we got smoke coming out of the module. Safe to say, I was toast. Document your progress, stuff happens.
92+
5293

5394
### Week 10
5495
Got the prints, this is tough. Broke a pin already, the tolerances were not a joke. Will use the universal repair tool, superglue.
@@ -64,7 +105,15 @@ The system uses **AD8232** EKG sensors, repurposed for EMG due to the high cost
64105

65106
Everything is processed by an **STM32U545 Nucleo** microcontroller. **MG90S** servos will be used in the finger pulley system, as I need enough torque to counteract the force pulling the finger back in its neutral position.
66107

67-
Generic string and elastic materials will be used for the tendons, such as fishing line for the flexors and springs for the extensors.
108+
<center>
109+
![Final Assembly](final_assembly.webp)
110+
</center>
111+
112+
Two tendons per finger, both via braided fishing line (strongest I could find in store was 24kg, no way the servos snap it). The extensor motion was achieved by tying orthodontic elastics (braces elastics) to a pin mounted in the servo bay, which pulled the finger to its neutral position after the tension was released; almost like a saw tooth.
113+
114+
<center>
115+
![Rock On](rockon.webp)
116+
</center>
68117

69118
<center>
70119
![Prototype](prototype.webp)
@@ -80,6 +129,8 @@ Generic string and elastic materials will be used for the tendons, such as fishi
80129
![Schematic](kicad.svg)
81130
</center>
82131

132+
The **PCA9685** has been left out, as the project can run with or without it, via the **PWM** pins on the **STM**. If we were to install it, we would wire up the `SDA` and `SCL` pins, with power coming from the external power supply, (logic 3.3V comes from the STM). The servos are plug and play, provided you do not mess up their orientation.
133+
83134
### Bill of Materials
84135

85136
<!-- Fill out this table with all the hardware components that you might need.
@@ -98,18 +149,62 @@ The format is
98149
| [AD8232 EKG sensor](https://www.analog.com/media/en/technical-documentation/data-sheets/ad8232.pdf) | EMG signal acquisition (repurposed EKG module) | [35 RON x 3](https://www.optimusdigital.ro/ro/senzori-altele/1347-modul-senzor-ecg-ad8232.html?srsltid=AfmBOooAX5b3QDFkBnnuSQi5Ejg6U0BX_VEz3xrKOzaeQP8Z8HV6hnwI)|
99150
| [MG90S Servo Motor](https://www.tinytronics.nl/product_files/000263_Data%20Sheet%20of%20MG90S%20Analog%20Servo%20Motor.pdf) | Finger actuation | [20RON x 3](https://sigmanortec.ro/en/servo-motor-mg90s-metal-gears) |
100151
| Gel electrodes | Skin-signal interface | [30 RON](https://www.aviafarm.ro/cumpara/set-100-electrozi-adezivi-ecg-ovali-f9089-cu-gel-solid-si-senzor-ag-953?utm_source=portal&utm_medium=web&utm_campaign=google_xml&gad_source=1&gad_campaignid=22826372328&gbraid=0AAAAADQMw-p4DXuVPfSpT3SlDTUKEi_cz&gclid=CjwKCAjwqazPBhALEiwAOuXqdCRNGu_i0Rv1CSS49kxbpT8zRxvhcMcm2q3GkeL3nzO_ce6pKp12-xoCPNoQAvD_BwE) |
101-
| Elastic bands / springs | Extensor tendon system | owned |
152+
| Elastic bands | Extensor tendon system | owned |
102153
| Fishing line | Flexor tendon system | owned |
103154

104155
## Software
156+
### Signal Acquisition
157+
158+
Each **AD8232** connects to the **STM's** `ADC1` peripheral. Before reading, the leads-off pins (`LO+` and `LO-`) are checked; if contact is lost, the read is skipped. This is done so we do not process floating inputs, which would trigger unwanted movement.
159+
160+
The signal is centered at around 8000 counts at rest, with 3.3V from Vcc, over the 14bit ADC.
161+
```
162+
midpoint = (1.65V / 3.3V) × 16383 ≈ 8000 counts
163+
```
164+
165+
During contraction, the signal swings above and below that, with 10 samples taken, over 50ms. This deviation is checked against a threshold (trial and error), and the course of action is decided.
166+
167+
### Actuation
168+
169+
Detected contractions are mapped to three groups, reflecting forearm anatomy. The thumb and index have dedicated flexors, so each get their own sensor. The remaining three share the same muscle, as such, they share one sensor.
170+
171+
Servo commands are only sent on state changes (edge activated), one for flexing, one for closing. A 500ms debounce was also implemented, as to prevent servo chatter from the noisy EMG signal (please avoid these sensors).
172+
173+
The **PCA9685**, the **I2C** peripheral, drives all five servos, generating 50Hz PWM , independently from the MCU. The PWM frequency is set via a prescaler.
174+
```
175+
prescaler = (25 000 000 / (4096 × 50)) − 1 = 121 (0x79)
176+
```
177+
178+
Each servo channel has four registers, `ON_LOW`, `ON_HIGH`, `OFF_LOW`, `OFF_HIGH`, encoding when the pulse starts and ends within the set cycle. The pulse always starts at 0, we only adjust the OFF value. By trial and error, we got to the following:
179+
180+
| Position | Counts |
181+
|----------|--------|
182+
| Finger open | 100 |
183+
| Finger closed | 550 |
184+
185+
### Sensor Placement
186+
187+
The three sensors cover three anatomical regions of the forearm. The initial plan was to assign them based on known physiology, but as the sensors were too noisy, fine tuning was necessary. Anyhow, the muscles we sampled were the **Flexor Pollicis Longus** (for the thumb) and **Flexor Digitorum Profundus** (for the fingers).
188+
189+
I would insert a really nice photo here, but copyright laws forbid me from, and I do not intend on performing anatomy on myself. These can be easily seen via an internet search.
190+
191+
### Known Limitations
192+
193+
The **AD8232** is an ECG sensor, with a bandpass filter optimised for **0.5-40Hz**. Surface EMG, ideally, goes across **20-500Hz**. That means that we only capture the low-frequency, leading to forceful contractions. A dedicated module would improve sensitivity significantly, but the cost difference is substantial.
194+
195+
The threshold, of 3500 counts, was, as previously stated, determined via trial and error. Ideally, we would calibrate it at startup, per individual user.
196+
197+
The **PCA9685** was damaged during the final assembly due to a short on the power servo rail. Servo control was working fine prior to this, so a replacement module should restore full operation.
198+
199+
### Crates
105200

106201
| Library | Description | Usage |
107202
|---------|-------------|-------|
108203
| [embassy-stm32](https://github.com/embassy-rs/embassy) | STM32 async runtime | Hardware control, ADC, PWM |
109204
| [embassy-executor](https://github.com/embassy-rs/embassy) | Task scheduler | Real-time control loop execution |
110-
| [embedded-hal](https://github.com/rust-embedded/embedded-hal) | Hardware abstraction | GPIO, ADC, PWM interfacing |
111205
| [defmt](https://github.com/knurling-rs/defmt) | Embedded logging | Debugging and signal monitoring |
112-
| [micromath](https://github.com/NeoBirth/micromath) | Lightweight math | Signal filtering and smoothing |
206+
| [embassy-time](https://github.com/embassy-rs/embassy) | Async timers | Debounce, sampling delays |
207+
| [panic-probe](https://github.com/knurling-rs/defmt) | Panic handler | Halt and report on crash |
113208

114209
## Links
115210

56.8 KB
Loading
42.9 KB
Loading
30.5 KB
Loading
50.6 KB
Loading

0 commit comments

Comments
 (0)