Week 16: System integration¶
Portrait-drawing robot system plan¶
System diagram for the serial-servo version of my portrait drawing robot
This week, on 6 May 2026, I documented the system integration plan for my final project. The final presentation is on 8 to 12 June 2026, so I needed to simplify the project into a version that can realistically be finished, tested, and presented.
My final project is a small portrait-drawing robot. The intended user flow is:
Power on
-> camera preview on TFT LCD
-> press button to freeze one frame
-> convert the image into symbolic portrait strokes
-> convert strokes into 5-bar SCARA movement
-> draw the portrait with serial servos
-> return to camera preview
My target is a recognizable, charming line drawing made from face edges plus symbolic details such as spiral eyes.
Assignment¶
Individual assignment:
- Design and document the system integration for your final project
Main integration decision¶
Until now, I had several parts working separately: camera capture, web interface experiments, stepper motor tests, servo tests, and portrait path generation. For the final version, I decided to move the main development path to MicroPython on the XIAO ESP32S3 Sense.
I made this decision because I can understand, modify, and debug the MicroPython version more directly. The earlier ESP-IDF/C++ prototype was powerful, but it had many generated files and was harder for me to control quickly.
The integrated system will use:
- XIAO ESP32S3 Sense as the main controller
- original OV3660 camera for image capture
- ST7735S TFT for local camera preview
- GPIO2 button for freeze/capture
- MicroPython portrait pipeline for image-to-stroke conversion
- 5-bar SCARA mechanism for drawing
- FeeTech SCS0009 serial bus servos for the two shoulders and pen lift
I also changed the mechanical/electronics direction. My first idea used NEMA 17 stepper motors, but that made the robot too large for the small desktop object I want to make. The serial-servo version is more compact.
Earlier stepper-motor direction, which became too large and complicate as asystem for my target size
Packaging and appearance¶
Current 3D model direction for the compact portrait robot
The robot needs to combine a small camera/display interface with a drawing mechanism. I want it to feel like a finished small product, not only a breadboard test.
My packaging plan is:
- Keep the camera close to the XIAO board, because replacement long camera cables did not work reliably.
- Place the TFT on the front so the user can see the live preview.
- Place the button near the display as the main interaction.
- Keep the drawing mechanism in front of or below the electronics.
- Use the URT-1 serial servo board first, before attempting a smaller custom board.
- Keep the SD card optional, because using TFT and SD together on shared SPI was unstable.
The product experience should be simple: look at the display, press the button, and watch the robot draw.
Current system status¶
Working¶
- Custom MicroPython firmware runs on the XIAO ESP32S3 Sense.
- The original OV3660 camera works.
- RGB565 image capture works.
- The TFT works in landscape mode.
- The freeze button on GPIO2 works with internal pull-up.
- The current portrait pipeline can convert a captured frame into simplified drawing strokes.
- The stroke output can be converted into a 65 mm drawing path and simulated with a 5-bar mechanism.
Not yet finished¶
- JPEG capture is not working, so I will continue with RGB565.
- A longer replacement camera cable/module did not work reliably.
- SD card works in a separate test, but not reliably together with the TFT in the full runtime.
- Face/eye landmarks are still the next improvement; the current spiral-eye positions are placeholders.
- Servo command mapping still needs calibration on the physical mechanism.
This makes the critical path clearer. SD storage, JPEG capture, and a custom servo board are useful, but they are not required for the first complete drawing robot.
Software flow¶
The current MicroPython pipeline is:
camera preview
-> button freeze
-> RGB565 image
-> grayscale
-> edge extraction
-> face-area mask
-> stroke tracing and simplification
-> symbolic eye strokes
-> drawing path
This already gives a recognizable stylized portrait in testing. The important design lesson is that raw edge detection alone is not enough. A better portrait comes from combining:
edge-derived strokes
+ symbolic face parts from landmarks
For now, spiral eyes are placed as symbolic placeholder parts. The next step is to use detected eye landmarks so the spiral eyes are accurately positioned on each face.
Drawing mechanism plan¶
The current simulated drawing size is 65 mm x 65 mm. In simulation, this size works with the current 5-bar geometry and produces no unreachable points in the tested portrait path.
The first actuator tests will use FeeTech SCS0009 serial bus servos:
- ID1 = left shoulder
- ID2 = right shoulder
- ID3 = pen up/down
The first hardware setup will use the URT-1 board:
XIAO TX/RX -> URT-1 RX/TX
XIAO GND -> URT-1 GND / common ground
External 5V -> servo power
The servos must use an external 5 V supply, and the XIAO and servo power supply must share ground.
Remaining work before 8 June¶
The next work sequence is:
- Replace placeholder eye positions with face/eye landmark detection.
- Use the detected face area to make the portrait crop more robust.
- Test SCS0009 serial communication from the XIAO.
- Test pen up/down with the third servo.
- Calibrate 5-bar geometry angles to real servo positions.
- Assemble and tune the physical drawing mechanism.
- Record the one-minute video and prepare the final presentation.
Reflection¶
This week helped me reduce the final project to its essential system:
camera + TFT + button
-> MicroPython portrait pipeline
-> 65 mm fivebar path
-> serial servos
-> drawing on paper
That is the version I will focus on first. A web interface, SD storage, and custom servo board can be added later if there is time, but the priority is to make the robot draw a portrait reliably.
Checklist¶
- [x] Made a plan for system integration for my final project.
- [x] Documented the plan with CAD and system diagrams.
- [x] Implemented a packaging method by choosing a compact camera/TFT/button layout and serial-servo architecture.
- [x] Designed the final project to look like a finished small desktop portrait robot.
- [x] Documented the system integration of my final project.
- [x] Linked to this system integration documentation from my final project page.