Approach A · DIY Camera Build
Sweet Potato
Build Guide
1. Project Overview
The Tender Camera is a sustainable, modular digital camera built from a single-board computer and open-source software. The name "Sweet Potato" refers to the SBC used: the Libre Computer AML-S905X-CC-V2, whose community nickname is "Sweet Potato."
Goals
- Build a fully functional digital camera from modular, off-the-shelf components
- Design a touch-based UI that embodies permacomputing aesthetics
- Implement advanced features (face detection, metadata control, custom capture modes)
- Document the entire process as a replicable, educational resource
2. Hardware
SBC — Libre Computer Sweet Potato (AML-S905X-CC-V2)
| Specification | Value |
|---|---|
| SoC | Amlogic S905X |
| CPU | Quad-Core ARM Cortex-A53 @ 1.5GHz |
| RAM | 2GB DDR3 |
| GPU | Mali-450 MP5 |
| USB Ports | 4× USB 2.0 (Type A) |
| Video Output | 1× HDMI 2.0 |
| Storage | MicroSD slot |
| Network | 1× 100Mbps Ethernet (RJ45) |
| Power | 5V/2A via USB-C |
| GPIO | 40-pin header (Raspberry Pi compatible layout) |
| Dimensions | 85mm × 56mm |
USB Port Allocation (as of 2026-01-31)
| Port | Device | USB ID |
|---|---|---|
| USB 1 | Genesys Logic Hub (internal) | 05e3:0610 |
| USB 2 | Sony IMX179 Camera | 0bda:5805 |
| USB 3 | Waveshare Touch Controller | 0eef:0005 |
| USB 4 | Trust Keyboard (dev only) | 145f:02c9 |
Display — Waveshare 4.3inch HDMI LCD (B)
| Specification | Value |
|---|---|
| Size | 4.3 inches |
| Resolution | 800×480 (landscape native) |
| Planned orientation | Portrait (480×800 after rotation) |
| Panel | IPS, 160° viewing angle |
| Touch type | Capacitive, 5-point multitouch |
| Touch interface | USB — appears as /dev/input/event0 |
| Display interface | HDMI |
libgpiod.Camera — Sony IMX179 USB Module
| Specification | Value |
|---|---|
| Model | DSJ-3879-HE |
| Sensor | Sony IMX179 |
| Sensor size | 1/3.2" |
| Resolution | 8 Megapixels (3264×2448) |
| Interface | USB 2.0 |
| Protocol | UVC — driver-free on Linux |
| Lens mount | M12 (interchangeable) |
| USB ID | 0bda:5805 |
Supported Resolutions (MJPG — recommended)
| Resolution | FPS | Megapixels | Use case |
|---|---|---|---|
| 3264×2448 | 15 | 8.0 MP | Maximum quality stills |
| 1920×1080 | 30 | 2.1 MP | Full HD video / viewfinder |
| 1280×720 | 30 | 0.9 MP | HD video |
| 640×480 | 30 | 0.3 MP | Fast preview |
Connection Diagram
┌──────────────────────┐
│ Sweet Potato SBC │
│ (AML-S905X-CC-V2) │
│ │
Ethernet ───────┤ RJ45 │
│ HDMI ────────────────┼──── Waveshare Display
│ USB1 ────────────────┼──── IMX179 Camera
│ USB2 ────────────────┼──── Waveshare Touch (USB)
│ USB3 ────────────────┼──── Trust Keyboard (dev only)
│ USB4 ────────────────┼──── [Future: WiFi Adapter]
│ USB-C (power) ───────┼──── 5V/3A PSU
│ MicroSD: 128GB │
└──────────────────────┘
3. Software Stack
Operating System
| Property | Value |
|---|---|
| Distribution | Armbian 25.11.2 noble |
| Base | Ubuntu 24.04 LTS |
| Kernel | 6.12.58-current-meson64 |
| Architecture | aarch64 |
| Package manager | apt |
| Hostname | sweet-potato |
| User | mycamera |
pacman. The system now runs Armbian (Ubuntu-based). All pacman commands in older notes should be replaced with apt equivalents.Packages to Install
sudo apt update
# Camera capture
sudo apt install fswebcam
# Input device debugging
sudo apt install evtest
# Framebuffer image viewer
sudo apt install fbi
# UI framework (Phase 2)
sudo apt install python3-kivy
# Computer vision (Phase 4)
sudo apt install python3-opencv
# WiFi driver compilation (when needed)
sudo apt install linux-headers-$(uname -r)
Already present in Armbian (no install needed):
v4l-utils— camera querying tools (v4l2-ctl)uvcvideo— kernel driver for USB camerasgcc,make,git— build toolsevtest— input device testing
Key Package Explanations
uvcvideo (kernel built-in)
The USB Video Class driver. Any UVC-compliant camera is supported automatically. The Sony IMX179 appeared as /dev/video1 immediately on boot with no configuration.
v4l-utils
Video4Linux utilities. v4l2-ctl lists detected cameras, queries supported resolutions and formats, and sets camera parameters from the terminal.
fswebcam
Minimal command-line tool for capturing stills from a V4L2 camera. Handles format negotiation and JPEG saving in one command — ideal for the MVP phase.
evtest
Reads raw Linux input events from /dev/input/event*. Used to verify the touchscreen is sending correct coordinates (ABS_X, ABS_Y) and touch events (BTN_TOUCH).
fbi
Framebuffer image viewer. Displays images directly on screen without a desktop environment — essential for a headless kiosk device.
python3-kivy
Touch-native Python UI framework. Renders directly to the framebuffer without X11. Layouts are written in declarative .kv files, separating design from logic.
4. Camera Setup
Device Mapping
| Device | Description | Use? |
|---|---|---|
/dev/video0 | Amlogic hardware video decoder (SoC built-in) | ❌ NOT the camera |
/dev/video1 | Sony IMX179 camera (uvcvideo) | ✅ USE THIS |
/dev/video2 | Camera metadata stream | Rarely needed |
/dev/video1. The SoC's hardware video decoder creates a /dev/video0 device — it is not the camera.Verified Working Commands
# List all video devices
v4l2-ctl --list-devices
# Check supported formats and resolutions
v4l2-ctl -d /dev/video1 --list-formats-ext
# Capture a full 8MP still
fswebcam -d /dev/video1 -r 3264x2448 --no-banner photo.jpg
# Capture with timestamp filename
fswebcam -d /dev/video1 -r 1920x1080 --no-banner "photo_$(date +%Y-%m-%d_%H-%M-%S).jpg"
# View image on the display
sudo fbi -T 1 -a photo.jpg # press q to quit
5. Touchscreen Setup
Device Mapping
| Device | Name | Use? |
|---|---|---|
/dev/input/event0 | WaveShare WS170120 | ✅ Touchscreen |
/dev/input/event1–3 | SIGMACHIP Trust Keyboard | Development only |
/dev/input/event4 | meson-ir (IR receiver) | Not used |
Testing Touch Input
# List input devices
sudo evtest
# Select device 0 (WaveShare WS170120)
# Touch the screen — you should see ABS_X, ABS_Y, and BTN_TOUCH events
# Press Ctrl+C to stop
6. Network Notes (FHNW University Network)
ICMP (ping) is blocked by the university firewall. Do not use ping to test internet connectivity. Use these instead:
sudo apt update # Confirms DNS + HTTP — best test
resolvectl query google.com # Tests DNS only
curl -I https://google.com # Tests HTTP only
7. UI/UX Plan
Feature Phases
| Phase | Features |
|---|---|
| Phase 1 — MVP | Touch capture button, status indicators, kiosk boot, CLI escape hatch |
| Phase 2 | Live viewfinder, photo gallery, delete controls |
| Phase 3 | Video mode, timelapse, settings panel |
| Phase 4 | Face detection, object recognition, custom metadata, filters |
UI Framework Decision
After evaluating PyGame, GTK4, Qt/QML, and a web kiosk approach, Python + Kivy was selected:
- Native touch support, designed for embedded interfaces
- Renders directly to framebuffer — no X11 or desktop environment needed
.kvlayout files allow UI design without touching Python code- Integrates well with OpenCV for Phase 4 features
Screen Layout (portrait 480×800)
Screens to design: Capture (main), Gallery, Photo View, Settings, Boot/Splash. Touch targets must be at least 44×44px. Aesthetic: permacomputing-inspired — minimal, functional, deliberate.
8. Design Decisions
| Decision | Choice | Reasoning |
|---|---|---|
| Screen orientation | Portrait (480×800) | Distinctive camera feel |
| Photo storage | Internal SD card | 111GB available; USB ports needed for peripherals |
| File naming | Timestamp (YYYY-MM-DD_HH-MM-SS.jpg) | Sortable, no conflicts |
| Photo directory | /home/mycamera/photos/ | Simple, within user home |
| UI framework | Python + Kivy | Touch-native, low resources, framebuffer mode |
| Boot mode | Kiosk (direct to app) | Feels like a dedicated camera |
| Debug access | Keyboard at boot → CLI | Keeps the device hackable |
9. Known Issues
| Issue | Status |
|---|---|
| WiFi adapter not yet installed | Pending — needs linux-headers + driver compilation |
| No UI yet | In planning — framework confirmed, spec written |
ping blocked on FHNW network | Resolved — use apt update instead |