A minimal demonstration of using an infrared breakbeam sensor to safely control pump operations with an ATtiny85.
When the beam is broken (or the stop button is pressed), the pump shuts off immediately.
In August 2022, I started working with equipment that leveraged infrared breakbeams and encoders to fully automate distillations. This project aimed to model the principle of operation for a site automation and technology fair in June 2023. It was demonstrated again at our site's Take Our Kids to Work Day in April 2025.
- Demonstrates pin-change interrupts on the ATtiny85
- Provides both manual (start/stop buttons) and automatic (infrared breakbeam) control
- Visual feedback via status LEDs
- Designed for a simple, low-power control unit
- ATtiny85 microcontroller
- Uxcell E3S-GS30E4 infrared fork sensor
- DRV8871 H-Bridge DC motor driver board
- 12V DC peristaltic pump
- MPM3610 5V 1.2A buck converter
- Latching power switch
- Momentary pushbuttons (x2)
- LEDs + current-limiting resistors (x3)
- Start button: Activates the pump and illuminates the run LED.
- Stop button or breakbeam trigger: Immediately stops the pump and turns off the run LED.
- All signals are active-low with internal pull-ups enabled.
- Pin change interrupts detect button presses or breakbeam events, minimizing CPU polling.
The firmware is written in plain AVR C using:
- Direct register manipulation
- Pin-change interrupts
- Minimal main loop that responds to events
This initial version had a single momentary switch with an outer LED ring that started and halted operation. The controls were housed in an ABS enclosure.
The controls were updated to include discrete controls and indicators. The housing was 3D printed in CF-PETG.

