Skip to content

Commit 485151a

Browse files
vldxndrBirsan Alexandru-VladBirsan Alexandru-Vlad
authored
Project/alexandru.birsan02 (#1334)
* Add project folder and index.md * new svg file * update date * fix diagram image name * rename Diagram.svg to diagram.svg * final * fix sch * fix schematic sizing * finalised documentation --------- Co-authored-by: Birsan Alexandru-Vlad <vlad@Birsans-MacBook-Air.local> Co-authored-by: Birsan Alexandru-Vlad <vlad@lector.local>
1 parent ead3f22 commit 485151a

1 file changed

Lines changed: 29 additions & 17 deletions

File tree

  • website/versioned_docs/version-acs_cc/project/2026/alexandru.birsan02

website/versioned_docs/version-acs_cc/project/2026/alexandru.birsan02/index.md

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The idea came to me because I have previously studied architecture and have alwa
2525
![Diagram](./images/diagram.svg)
2626
![Schematic](./images/schematic.svg)
2727

28+
2829
## Log
2930

3031
### Week 27 - 30 April
@@ -33,52 +34,63 @@ Wrote initial documentation and made the first diagram while ordering the parts.
3334

3435
### Week 12 - 18 May
3536

37+
Received all hardware components. Assembled the physical frame using a 60x80cm wooden board and mounted the two NEMA 17 stepper motors at 51.8cm apart. Wired the A4988 drivers directly to the STM32 Nucleo using dupont wires and a breadboard. Successfully tested basic stepper motor movement using Embassy async Rust firmware.
38+
3639
### Week 19 - 25 May
3740

41+
Implemented full polargraph kinematics (inverse kinematics using polar-to-cartesian conversion). Added G-Code parser over UART (USART1 at 115200 baud) using BufferedUart. Implemented line interpolation with 1mm segments for smooth curves. Added SG90 servo pen lift control (M3/M5 commands). Successfully tested drawing a square using a Python script to stream G-Code from a .ngc file.
42+
3843
## Hardware
3944

40-
The Polargraph is powered by an external 12V DC source to ensure constant torque for the stepper motors. For development purposes, the STM32 Nucleo is tethered via USB for real-time G-Code streaming and debugging
45+
The Polargraph is powered by an external 12V DC source to ensure constant torque for the stepper motors. For development purposes, the STM32 Nucleo is tethered via USB for real-time G-Code streaming and debugging. I also used a buck converter to give a steady current to the servo motor directly from the outlet converted to 3v3 because the connection on the stm 3v3 did not give suffiecient current. 3D printed a gondola that houses the servo motor(pen lifter) and the pen itself that is held up by the belts with
46+
2 anchor points. Built a frame for the panel to stay upright and the electronic equipment to be held onto the back of it.
4147

4248
### Schematics
4349

50+
![Schematic](./images/schematic.svg)
51+
4452

4553
### Bill of Materials
4654

4755
| Device | Usage | Price |
4856
| :--- | :--- | :--- |
49-
| [STM32 Nucleo-U545](https://www.st.com/en/microcontrollers-microprocessors/stm32u545.html) | Main Controller (Brain of the project) | [Owned] |
57+
| [STM32 Nucleo-U545](https://www.st.com/en/microcontrollers-microprocessors/stm32u545.html) | Main Controller (Brain of the project) | Owned |
5058
| [NEMA 17 Stepper Motor (1.7A)](https://www.optimusdigital.ro/ro/motoare-pas-cu-pas/106-motor-pas-cu-pas-nema-17-40mm-17a.html) | Axis movement (2 pieces required) | [130 RON](https://www.optimusdigital.ro) |
51-
| [TMC2208 Stepper Driver](https://www.optimusdigital.ro/ro/drivere-motoare-pas-cu-pas/2753-driver-motor-pas-cu-pas-tmc2208.html) | Silent motor control (2 pieces required) | [90 RON](https://www.optimusdigital.ro) |
59+
| [A4988 Stepper Driver](https://sigmanortec.ro/) | Motor control (2 pieces required) | [20 RON](https://sigmanortec.ro) |
60+
| [A4988 Expansion Board](https://sigmanortec.ro/) | Driver carrier with DIP microstepping and terminal block | [10 RON](https://sigmanortec.ro) |
5261
| [SG90 Micro Servo](https://www.optimusdigital.ro/ro/servomotoare/9-servomotor-sg90.html) | Pen lift mechanism | [15 RON](https://www.optimusdigital.ro) |
5362
| [12V 5A Power Supply](https://www.optimusdigital.ro/ro/surse-de-alimentare/123-sursa-de-alimentare-12v-5a.html) | External power for stepper motors | [55 RON](https://www.optimusdigital.ro) |
5463
| [GT2 Pulleys & Belt Kit](https://www.optimusdigital.ro/ro/curele-si-fulii/145-fulie-gt2-20-dinti-5mm.html) | Mechanical transmission system | [40 RON](https://www.optimusdigital.ro) |
5564
| [Breadboard MB-102](https://www.optimusdigital.ro/ro/prototipare/10-breadboard-830-puncte.html) | Prototyping and circuit connections | [15 RON](https://www.optimusdigital.ro) |
5665
| [Jumper Wires M-M / F-M](https://www.optimusdigital.ro/ro/fire-conectori-si-socluri/894-set-fire-tata-tata-65-buc.html) | Connecting components to Nucleo | [15 RON](https://www.optimusdigital.ro) |
57-
| [DC Jack Adapter](https://www.optimusdigital.ro/ro/fire-conectori-si-socluri/124-mufa-dc-mama-cu-terminal-block.html) | Connecting the 12V supply to breadboard | [5 RON](https://www.optimusdigital.ro) |
58-
| [Capacitor Kit (100uF)](https://www.optimusdigital.ro/ro/componente-pasive/220-condensator-electrolitic-100uf-35v.html) | Power spike protection for drivers | [5 RON](https://www.optimusdigital.ro) |
66+
| [DC Jack Adapter](https://www.optimusdigital.ro/ro/fire-conectori-si-socluri/124-mufa-dc-mama-cu-terminal-block.html) | Connecting the 12V supply | [5 RON](https://www.optimusdigital.ro) |
67+
| [Capacitor 100uF](https://www.optimusdigital.ro/ro/componente-pasive/220-condensator-electrolitic-100uf-35v.html) | Power spike protection for drivers | [5 RON](https://www.optimusdigital.ro) |
68+
5969

6070

6171
## Software
6272

6373
| Library | Description | Usage |
6474
| :--- | :--- | :--- |
65-
| [stm32u5xx-hal](https://github.com/stm32-rs/stm32u5xx-hal) | Hardware Abstraction Layer | Managing GPIO for motor control, UART for G-Code streaming, and Timers for pulse generation. |
66-
| [embedded-hal](https://github.com/rust-embedded/embedded-hal) | Embedded Abstraction Traits | Provides a standard interface for peripheral drivers, ensuring modular and testable code. |
67-
| [micromath](https://github.com/tarkentat/micromath) | Fast Math Library | Used for efficient fixed-point and floating-point square root calculations in the Inverse Kinematics engine. |
68-
| [cortex-m-rt](https://github.com/rust-embedded/cortex-m-rt) | Startup and Runtime | Handles the entry point and reset handler for the ARM Cortex-M33 processor. |
69-
| [panic-halt](https://github.com/rust-embedded/panic-halt) | Panic Handler | Provides a simple panic strategy that halts the processor in case of critical software errors. |
70-
75+
| [embassy-stm32](https://github.com/embassy-rs/embassy) | Async HAL for STM32 | GPIO for motor control, BufferedUart for G-Code streaming, PWM for servo |
76+
| [embassy-executor](https://github.com/embassy-rs/embassy) | Async executor for embedded | Entry point and task runner |
77+
| [embassy-time](https://github.com/embassy-rs/embassy) | Async timers | Precise delays for step pulses |
78+
| [defmt](https://github.com/knurling-rs/defmt) | Logging framework | Debug logging via RTT |
79+
| [panic-probe](https://github.com/knurling-rs/defmt) | Panic handler | Sends panic info through probe-rs |
80+
| [libm](https://github.com/rust-lang/libm) | Math library for no_std | sqrtf and ceilf for inverse kinematics |
81+
| [embedded-io-async](https://github.com/rust-embedded/embedded-hal) | Async IO traits | Read/Write on BufferedUart |
7182

7283
#### Host Software & Toolchain
7384

7485
To transform digital images into physical drawings, the project uses a multi-step toolchain:
7586

76-
1. **Vectorization/G-Code Generation**: I use DrawingBotV3 (or Inkscape with G-Code extensions). These tools allow me to convert standard images (JPG/PNG) into paths using algorithms like *Squiggle*, *TSP (Travelling Salesman Problem)*, or *Stippling*.
77-
2. **Path Optimization**: The software generates a list of G-Code commands (`G0`, `G1`) which represent coordinates in a Cartesian system.
87+
1. **G-Code Generation**: Inkscape with G-Code extensions convert images (JPG/PNG) into paths using algorithms to give out the .ngc file that is required the polargraph to know where it should go.
88+
2. **G-Code Streaming**: A Python script streams the generated `.ngc` file over USB serial (USART1 at 115200 baud) to the STM32, waiting for `ok\r\n` acknowledgement after each command before sending the next.
7889

7990
## Links
8091

81-
1. [DrawingBotV3](https://drawingbotv3.com/) - The primary software for G-Code generation.
82-
2. [Polargraph Physics](https://github.com/euphy/polargraph/wiki/Polargraph-physics) - Detailed explanation of the inverse kinematics involved.
83-
3. [TMC2208 Datasheet](https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC220x_TMC2224_datasheet_Rev1.09.pdf) - Technical specifications for the motor drivers.
84-
4. [Example](https://www.youtube.com/watch?v=aiw3hkDvp-M) - Working example
92+
1. [Inkscape](https://inkscape.org/) - Vector graphics editor used for G-Code generation.
93+
2. [Inkscape G-Code Extension](https://github.com/martymcguire/inkscape-unicorn) - Extension for exporting paths as G-Code (.ngc) files.
94+
3. [Polargraph Physics](https://github.com/euphy/polargraph/wiki/Polargraph-physics) - Detailed explanation of the inverse kinematics involved.
95+
4. [A4988 Datasheet](https://www.pololu.com/file/0J450/a4988_DMOS_microstepping_driver_with_translator.pdf) - Technical specifications for the motor drivers.
96+
5. [Example](https://www.youtube.com/watch?v=aiw3hkDvp-M) - Working example

0 commit comments

Comments
 (0)