Skip to content

About

Electronic magnifier for people with low vision. A Raspberry Pi 3B, a camera and four large buttons show the magnified page on a monitor. Includes 3D-printable parts (STL, STEP) and a setup guide.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

DIY Reading Aid for the Visually Impaired: a Raspberry Pi Electronic Magnifier (Lesehilfe)

This is a do-it-yourself video magnifier for low vision. A Raspberry Pi 3B and a Raspberry Pi Camera Module 3 show the page under the camera, enlarged, on an external monitor. The device boots straight into the live image. It needs no login, no desktop, no keyboard and no mouse. Four large metal buttons control zoom, brightness and contrast. You move the reading material by hand under the fixed camera that looks down.

The repository holds the Python program, the 3D-printable parts (STL and STEP), the wiring plan and a step-by-step setup guide. The device works offline.

grafik

This was built for an elderly relative who is not comfortable with computers. The goal was an appliance that works like a TV: plug in the power, and the image appears.

Hardware list

Component Description
Raspberry Pi 3 Model B, 1 GB RAM Main computer
Raspberry Pi Camera Module 3 Fixed, facing straight down
Dell 2001fp monitor 4:3, 1600x1200 native, mounted rotated by 90° (portrait). The camera is mounted rotated the same way, so no rotation is needed in software. Powers the Pi via its built-in USB port. No separate Pi power supply used
Micro-USB cable Power: Dell 2001fp USB port to Pi micro-USB power input
DVI-to-HDMI cable Video: Pi HDMI output to Dell 2001fp DVI input
4x large metal push buttons Zoom in, zoom out, brightness/contrast up, brightness/contrast down. Large buttons chosen for accessibility
Micro-SD card (16 GB+) Boot / storage
3D printed camera mount and button enclosure Printed on a Bambu Lab A1, see 3D printed parts
Hookup wire Buttons to GPIO header

No internet connection is used or required. The device is fully offline.

3D printed parts

All enclosure and mount parts were designed with SE Student Edition for and printed on a Bambu Lab A1. STL files are in 3D-Print-STL, the full model as STEP in 3D-CAD.stp.

Renderings of the 3D printed parts: camera mount, monitor mount, cover, camera guard, Raspberry Pi model and an alternative monitor mount

Wiring and GPIO pinout

Each button is a simple momentary switch between a GPIO pin and Ground (GND). The Pi uses its internal pull-up resistors, and gpiozero.Button handles them. You need no external resistors.

Function GPIO (BCM) Physical pin
Zoom in GPIO 17 11
Zoom out GPIO 27 13
Brightness/contrast up GPIO 22 15
Brightness/contrast down GPIO 23 16
Ground Any GND pin 9

Each button: one leg to its GPIO pin, the other leg to any GND pin.

Video: Pi Camera Module 3 to CSI camera port via ribbon cable.

Pi HDMI out to DVI-to-HDMI cable to Dell 2001fp DVI-in.

Power: Dell 2001fp USB port to micro-USB cable to Pi power input.

The Pi receives power only when the monitor is powered. There is no separate power switch for the Pi itself. Every time the monitor is switched off, the Pi loses power immediately without a clean shutdown. See Protect the SD card, this is essential for this setup.

How it works

The display powers the pi directly, so all can be turned on by the push of the monitor on button.

The camera feed is rendered directly to the screen via the DRM/KMS subsystem of the Linux kernel. No desktop environment or window manager is involved.

The camera reads the full sensor resolution, so the digital zoom keeps as much detail as possible. The main output stream is scaled down to the native resolution of the display. This keeps the power draw low.

Focus is fixed because the camera-to-paper distance never changes. Autofocus is not used because it tends to hunt or lock onto the wrong distance at close range.

The four buttons are read via gpiozero. Holding a button down allows for repeated zoom or brightness steps instead of requiring many individual presses.

The program runs as a systemd service and restarts itself automatically if it crashes.

The picture below simulates what the zoom buttons do (a test page, not a camera photo): the program crops a smaller centred area of the sensor (ZOOM_MIN = 0.15 up to 1.0 in steps of 0.05) and shows it full screen. The last frame also raises the contrast.

Simulation of the digital zoom steps of the reading aid on a test page

All 3d Print files are available, additionally there was a aluminum 25x25mm square pipe used.

grafik

Software setup

1. Flash Raspberry Pi OS

Use Raspberry Pi OS Lite (64-bit). This avoids login-screen complexity, boots faster, and has fewer background services.

Download and open Raspberry Pi Imager. Choose OS: Raspberry Pi OS (other) then Raspberry Pi OS Lite (64-bit).

Click the advanced options and set:

Hostname: lesehilfe Enable SSH Username and password: lesehilfe Wi-Fi: optional, only needed temporarily for setup

Write the image, insert the SD card into the Pi, and power it up.

2. First boot and update

Log into your Pi via PowerShell:

ssh lesehilfe@lesehilfe.local

After logging in, update using these commands:

ssh lesehilfe@lesehilfe.local
sudo apt update
sudo apt full-upgrade -y
sudo reboot

3. Install camera libraries

sudo apt install -y python3-picamera2 python3-gpiozero --no-install-recommends

Verify the camera is detected:

rpicam-hello --list-cameras

Expected output includes the imx708 sensor:

0 : imx708 [4608x2592 10-bit RGGB] (/base/soc/i2c0mux/i2c@1/imx708@1a)

Note: older Raspberry Pi OS versions used libcamera-hello instead of rpicam-hello. If rpicam-hello is not found, try libcamera-hello, or install the tools explicitly with sudo apt install -y rpicam-apps.

4. Copy the program to the Pi

If you know how to use scp from your computer:

scp lesehilfe.py lesehilfe@lesehilfe.local:/home/lesehilfe/

Alternatively, SSH into the Pi and create the file directly:

sudo nano /home/lesehilfe/lesehilfe.py

Paste the full contents of lesehilfe.py from this repository, save, and exit.

5. Set display resolution and focus

Open the file and check these constants match your hardware:

DISPLAY_WIDTH = 1600
DISPLAY_HEIGHT = 1200

This MUST match your monitor actual native resolution. To check:

sudo apt install -y libdrm-tests
modetest -M vc4 -c

Look for the connected connector and the mode marked preferred.

Focus is fixed and manual. Measure the real distance between the camera lens and the surface the newspaper lies on, then set the following variable:

FESTER_FOKUS_DIOPTRIEN = 1 / 0.20

The 0.20 is the camera-to-paper distance in metres. Fine-tune in small steps after the first test run until text is sharp.

6. Manual test run

If the systemd service is already running, stop it first. Only one process can use the camera at a time:

sudo systemctl stop lesehilfe.service
sudo python3 /home/lesehilfe/lesehilfe.py

The camera feed should appear on the monitor. Test all four buttons. Stop with Ctrl+C.

7. Disable the login console

Raspberry Pi OS Lite runs a text login prompt on tty1 by default. This holds onto the display output and conflicts with the camera preview. You will see an error like ValueError: drmModeAddFB2 failed: Invalid argument.

Disable it permanently:

sudo systemctl stop getty@tty1
sudo systemctl disable getty@tty1

8. Hide the boot screen

This prevents the Pi from showing boot text before the camera feed starts.

sudo nano /boot/firmware/cmdline.txt

Append this to the end of the single line, separated by a space:

quiet splash loglevel=0 logo.nologo vt.global_cursor_default=0 systemd.show_status=0

sudo nano /boot/firmware/config.txt

Append at the end:

disable_splash=1

9. Autostart via systemd

Create the service file on the Pi:

sudo nano /etc/systemd/system/lesehilfe.service
[Unit]
Description=Lesehilfe Kamera Feed
After=local-fs.target

[Service]
ExecStart=/usr/bin/python3 /home/lesehilfe/lesehilfe.py
Restart=always
RestartSec=2
User=root

[Install]
WantedBy=multi-user.target

Save, exit, then:

sudo systemctl daemon-reload
sudo systemctl enable lesehilfe.service

10. Reboot test

sudo reboot

After reboot the monitor should show the live camera feed directly. Reconnect via SSH to verify:

systemctl status lesehilfe.service

It should show active (running).

11. Power-saving settings

Power comes only from the monitor USB port. Keeping power draw low reduces the risk of under-voltage brownouts, which can cause crashes.

Disable unused hardware by adding to /boot/firmware/config.txt:

dtoverlay=disable-wifi
dtoverlay=disable-bt
dtparam=act_led_trigger=none
dtparam=act_led_activelow=off
dtparam=pwr_led_trigger=none
dtparam=pwr_led_activelow=off

Disable unused services:

sudo systemctl disable bluetooth hciuart wpa_supplicant
sudo systemctl disable triggerhappy
sudo systemctl disable ModemManager

Reduce CPU and GPU clock by adding to /boot/firmware/config.txt:

arm_freq=800
core_freq=300
sdram_freq=400
over_voltage=0

Use the powersave CPU governor instead of the default ondemand governor:

echo "powersave" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

To make this persist across reboots, add it as a systemd service or append it to /etc/rc.local before the exit 0 line.

Check for under-voltage:

vcgencmd get_throttled
vcgencmd measure_temp

0x0 means no under-voltage has occurred since boot. Any other value means the Pi has been under-powered at some point.

12. Protect the SD card

The Pi loses power when the monitor is switched off. Repeated hard power-cuts can corrupt the SD card. Enable the overlay filesystem to make the root filesystem effectively read-only.

sudo raspi-config

Open Performance Options or Advanced Options, then Overlay File System. Enable it and confirm the reboot.

While the overlay is active, file changes do not persist. To make changes: disable the overlay, edit, test, and re-enable the overlay.

Known issues and fixes

Issue Fix
AttributeError: tuple object has no attribute width Some picamera2 versions return PixelArrayActiveAreas as a plain tuple instead of a Rectangle object. The script handles both cases with a hasattr check.
ValueError: drmModeAddFB2 failed: Invalid argument Caused by getty on tty1 holding the display, or under-voltage on the Pi.
Under-voltage detected Current draw spikes exceed what the monitor USB port can deliver. Mitigate with power-saving settings, a thick USB cable, or reducing camera output resolution.
RuntimeError: Failed to acquire camera: Device or resource busy Happens if you run the script manually while the systemd service is already running. Stop the service before manual testing.
Low effective zoom resolution or soft image Digital zoom crops from an already-reduced image. Fix by requesting an explicit raw stream at the full sensor resolution alongside the smaller main output stream.
Autofocus not focusing correctly at close range Continuous autofocus is unreliable at 10 to 20 cm distances. Switch to manual focus calibrated for the fixed distance.
Wrong username in default path If you chose a different username during imaging, paths like /home/lesehilfe/ must use your actual home directory.

Maintenance and making further changes

Because the overlay filesystem is enabled, any file change is temporary until you disable it.

sudo raspi-config

Disable the Overlay File System and reboot.

nano /home/lesehilfe/lesehilfe.py

Make your changes, then restart the service:

sudo systemctl restart lesehilfe.service
journalctl -u lesehilfe.service -f

Re-enable the Overlay File System via raspi-config and reboot.

Frequently asked questions

How do I build a cheap electronic reading aid for low vision?

Follow this guide. You need a Raspberry Pi 3B, a Camera Module 3 that points down at the paper, a monitor and four buttons. The device works like a TV: you plug it in, and the magnified image appears.

Does it need internet, a keyboard or a mouse?

No. It works offline. The four buttons (zoom in, zoom out, brightness and contrast up, brightness and contrast down) are the only controls.

Which Raspberry Pi and camera do I need?

You need a Raspberry Pi 3 Model B and a Raspberry Pi Camera Module 3. The focus is fixed, because autofocus is switched off. Other Pi models should work with the same software, but nobody has tested them.

Can I print the parts myself?

Yes. All STL files are in the repository. They were printed on a Bambu Lab A1.

How is the SD card protected from sudden power loss?

The monitor's USB port powers the Pi, so the Pi loses power when you switch off the monitor. See the section Protect the SD card above.

License

MIT License

Keywords: DIY reading aid, electronic magnifier, video magnifier, CCTV magnifier, low vision aid, visually impaired, Raspberry Pi 3B, Raspberry Pi Camera Module 3, picamera2, gpiozero, 3D printable, STL, accessibility, assistive technology, open source.

About

Electronic magnifier for people with low vision. A Raspberry Pi 3B, a camera and four large buttons show the magnified page on a monitor. Includes 3D-printable parts (STL, STEP) and a setup guide.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages