An automated biomedical laboratory platform engineered on Raspberry Pi for motorized multi-dish specimen positioning, high-precision camera autofocusing, 7×7 tile mosaic imaging, and closed-loop incubator thermal profiling.
| Attribute | Details |
|---|---|
| Engineer | Engr. Hanif Khan |
| Title | Hardware & Embedded Systems Engineer |
| Institution | Centre of Intelligent Systems & Network Research (CISNR), UET Peshawar |
| WhatsApp / Phone | +92 315 9915537 |
| Engr. Hanif Khan Profile | |
| Hanifullahshams@gmail.com |
This hardware testing suite provides automated motion control and computer-vision-driven diagnostics for a multi-dish incubator imaging unit:
- 3-Axis Motor Control: Stepper motors and high-current H-bridges (BTS7960) manage X, Y, and Z axes for tray positioning and optical focusing.
- Limit Switch Homing: Optical and mechanical limit switches ensure repeatable zeroing and safe motion boundaries.
- Automated 10-Petri Dish Tray Management: Organized in a 2-row × 5-column motorized tray configuration with individual dish coordinate offsets.
- 7×7 Grid Mosaic Imaging: High-resolution microscopic tile capture with automated sub-dish step travel and seamless mosaic stitching.
-
Incubation Temperature Regulation: Closed-loop thermal regulation (
$20^\circ\text{C}$ to$55^\circ\text{C}$ ) supporting up to 50 configurable study cycles. - Diagnostic Master GUI: Interactive dark-themed Tkinter workstation for manual calibration, live camera feed inspection, and automated batch runs.
| Component / Function | BCM GPIO | Type | Description |
|---|---|---|---|
| Motor 1 Direction (M1_CW) | GPIO 17 | Output | X-Axis Stepper direction |
| Motor 1 Clock (M1_CLK) | GPIO 18 | Output | X-Axis Stepper pulse |
| Motor 2 Direction (M2_CW) | GPIO 27 | Output | Y-Axis Stepper direction |
| Motor 2 Clock (M2_CLK) | GPIO 22 | Output | Y-Axis Stepper pulse |
| Motor 3 Direction (M3_CW) | GPIO 23 | Output | Z-Focus Stepper direction |
| Motor 3 Clock (M3_CLK) | GPIO 24 | Output | Z-Focus Stepper pulse |
| Heater / Fan Relay | GPIO 25 | Output | Incubator heating element control |
| BTS7960 Driver 1 (RPWM) | GPIO 26 | PWM Output | High-power DC actuator drive |
| BTS7960 Driver 2 (RPWM) | GPIO 19 | PWM Output | High-power DC actuator drive |
| Limit Switch 1 (M1 Limit) | GPIO 8 | Input (Pull-up) | X-Axis home limit detection |
| Limit Switch 2 (M2 Limit) | GPIO 6 | Input (Pull-up) | Y-Axis home limit detection |
| Limit Switch 3 (M3 Limit) | GPIO 13 | Input (Pull-up) | Z-Axis / Focus limit detection |
automatic_imagery_unit_hardware_testing_tool/
├── automatic_imagery_unit_hardware_testing_tool.py # Diagnostic Master GUI & hardware test harness
├── device_config.py # Grid steps, tray offsets, and incubation constants
├── imaging.py # 7x7 tile capture, image preprocessing & stitching
├── camera_module.py # Camera feed initialization & streaming
├── camera_focus_test.py # Optical autofocus calibration routines
├── petri_dishes.py # 10-dish tray geometry and coordinate math
├── incubation_module.py # Closed-loop thermal PID/relay control logic
├── incubation_gui.py # Incubation cycle monitoring dashboard
├── workflow_steps.py # Automated multi-step study runner
├── relays.py / relay_control.py # GPIO relay switching interfaces
├── motor1.py / motor2.py / motor3.py # Dedicated single-axis diagnostic scripts
└── temp.py / temp1.py # Thermal sensor calibration
Ensure your Raspberry Pi is running Raspberry Pi OS with camera and GPIO enabled:
sudo apt-get update
sudo apt-get install -y python3-pip python3-tk python3-opencv
pip3 install RPi.GPIO pillowpython3 automatic_imagery_unit_hardware_testing_tool.pypython3 workflow_steps.pyFor hardware engineering inquiries, circuit design, or embedded software development:
- Engr. Hanif Khan — +92 315 9915537
- Email: Hanifullahshams@gmail.com