Instructions PDF
Instructions PDF
Raspberry Pi Camera
LED
Arduino
driver
macro
photography water contact
angle
measurements
microscopy Tilt
(reflected or
transmitted light)
KEY FEATURES
• Raspberry Pi operation system Y X
• 8 MegaPixel CMOS camera (Full HD 30 fps video) Rotation
• Imaging features from several centimeters to several micrometers
without changing the lens
• 6 stepper motors (X, Y, tilt, rotation, magnification, and focus)
• Variable speed control using a joystick controller or a keyboard
• Uniform illumination for imaging reflective surfaces
• Modular design: stages and modules can be arranged in any
configuration depending on the application
4. Illumination
7. Final
2. Camera assembly
module
3. Rotary
stage
5. Tilt
mechanism 8. Software BOM
IBM Research - Zurich Images © 2020 Yuksel Temiz
Linear actuators
8x 2653
1x 3027
2x 2357
1x 3036
1x 3795
Super glue
Some parts need
to be glued for
better stability
1x 3020
2x 32028
IBM Research - Zurich Images © 2020 Yuksel Temiz
Linear actuators
MotorGear.stl
(3D printed) 1x 3020
Symmetrical
The motor can be positioned on either side of the rack. This would be useful to quickly change the movement direction of
the stages with respect to the joystick action (the direction can also be changed from the software).
X Y Z Camera
IBM Research - Zurich Images © 2020 Yuksel Temiz
Linear actuators – 4x (Photograph)
X Y Z Camera
IBM Research - Zurich Images © 2020 Yuksel Temiz
Camera module
Raspberry Pi camera v2
1x 99207
(Lens removed)
2x M2
Recommendation:
1x Linear actuator
(Camera)
8x 60581
1x 3027
Camera
cable
1x 21731
1x 3958
LensAdapter.stl
(3D printed)
Objective lens
⌀12mm
IBM Research - Zurich Images © 2020 Yuksel Temiz
Camera module
Smaller aperture
(when needed)
33291
Raspberry Pi 3 or 4
1x 89523
1x 92947
ShaftAdapter.stl
(3D printed)
1x 3020
RotationGear.stl
(3D printed)
1x 59900
1x 21462
1x 14918
1x 3029
1x 4282 2x 2465
2x 3710
1x 99207 2x 3023
2x 3710 4x 2357
1x 3023
1x 64799
1x 3034
2x 3700
1x 44237
1x 3034
2x 43093
1x 11010
Fixed to a
rigid base
Vertical
support
3x 92947 1x 3680
1x 3679
3x 3020
TiltGear.stl
(3D printed)
1x 92947
1x 92947
1x 3679
1x 3680
1x 3020
Vertical
support
Camera stage
Double sided
tape
Wooden base
(26 x 26 cm2)
LEDhousing.stl LEDfixture.stl
(3D printed) (3D printed)
43093
1x 57909
1x 4282
1x 92013
2x 2465
Vertical
support
Uniform illumination
43093 optional
Reflected light
Transmitted light
Note-1: Stepper motors and the illumination LED can be controlled from the controller (UART) or the Raspberry Pi (USB) or both
Note-2: Some high-power LED drivers may require more than 5V, then a DC-DC converter or a separate power supply can be used
IBM Research - Zurich Images © 2020 Yuksel Temiz
Electronics – Mainboard (Photograph)
C LED driver
EN
12V LED driver (RECOM RCD-24-0.70/PL/B)
R
LED EN
4x 92947
NeoPixel
T NeoPixel LED
status LED
EN 2pin JST-XH
(optional) Controller (Adafruit 1655)
connector
(LED) (UART)
IBM Research - Zurich Images © 2020 Yuksel Temiz
Electronics – Controller (Photograph)
Mainboard
128x32
OLED display Mainboard
OLED display
(UART, power)
Arduino microcontroller 10Kohm Potentiometer
I2C (Adafruit 3677) (Adafruit 4133)
SDA SCL 5V GND TX RX 5V GND
Arduino
Analog inputs
43mm
3x thumb joysticks
Thumb joysticks
(Sparkfun COM-09032)
This joystick controller is fun to use but it is optional, the microscope can also be controlled
directly from a keyboard connected to Raspberry Pi using the Python code.
3D printed
housing
Serial communication
Serial communication Status LED (UART) and power
with Raspberry Pi (optional)
and power
12V
(LED driver)
LED intensity
(0-100%)
Speed control
(3 levels)
IBM Research - Zurich Images © 2020 Yuksel Temiz
Final assembly
There are several different ways of assembling the microscope. Here is one. Modules can be placed differently
depending on the length of the cables, size of the object to be visualized and the microscopy technique.
Tilt
mechanism
3020
Linear
actuator (X)
IBM Research - Zurich Images © 2020 Yuksel Temiz
Final assembly
Linear
actuator (Y)
Rotary stage
Linear
actuator (Z)
3020
2x 60594
Camera
module
Illumination
Mainboard
Controller
HDMI
Display
Camera
Lens
Sample
z Y
Rotation
y X
z e.g. 5-10 cm
e.g. <1 cm
y
e.g. 5-10 cm
x e.g. <1 cm
Controller
Arduino IDE
Arduino IDE
Controller.ino
MainBoard.ino
Board: Adafruit ItsyBitsy 32u4 - 5V 16MHz Board: Adafruit ItsyBitsy 32u4 - 5V 16MHz
• AccelStepper (for the stepper motors) • Wire (for the OLED display)
• Adafruit NeoPixel (for the optional status LED) • Adafruit_GFX (for the OLED display)
• Adafruit_SSD1306 (for the OLED display)
• Modules used:
• sys
• easygui
• pySerial
• time
• Pynput
• In Raspberry Pi 4, GPU
memory increased to 144MB
from 128MB to achieve max.
camera resolution (simulated screenshot)
USB hub
Camera Camera
Power
Camera
3280 x 2464
3280 x 2464
Microscopy (reflected
or transmitted light)
1 cm1 mm 100 µm 100µm
HDMI display 50-150 Optional if an HDMI display is already available. The price varies depending on the size and the model.
• The total price varies
Arduino board x2 20 One for the mainboard, one for the controller. Any Arduino board with enough number of IO pins should work.
significantly depending on the
Stepper motor driver x6 30 Any other 5V compatible driver should work. Microstepping was not needed in this project. vendor and the model. For
Stepper motor x6 15 28BYJ-48, 5V, 1/64 gear ratio example, the type of the
JST-XH 5P 4S cables 7 A few of these cables are required the extend the default cable of the stepper motor (28BYJ-48) Raspberry Pi and the display
High-power LED 4 makes a big difference in the
High-power LED driver 14 price.
Light diffuser 3 An LED backlight module is modified by replacing the low-power LED by a high-power one
Potentiometer 1 LED intensity control using pulse-width modulation. • The cost of 3D-printed parts is
Thumb joysticks x3 12 Three joysticks for X, Y, Z, Camera, Tilt, and Rotation.
not included.
5V power supply 20 At least 3A is preferred. A more powerful supply may be needed if the display is also powered from the same supply.
• There are also a few other
DC-DC converter 3 In case the LED and its driver require more than 5V.
accessories needed, like USB
OLED display 3 Displays the LED intensity or any other information on the controller.
cables, an HDMI cable,
USB connector (type A) 0.5 Connection between the mainboard and the controller (mainboard side).
optionally a mouse and a
USB connector (micro) 0.5 Connection between the mainboard and the controller (controller side).
keyboard, an ON/OFF switch,
JST XH connector set 5 Connectors for the stepper motors and the LED screws and nuts, and printed
DC barrel connector 1 In case a separate DC input (e.g. 12V) is needed for the LED circuit boards (PCBs).
OVERALL TOTAL ~300
Design name Function/module Units needed Slicer settings – printing speed Remarks
1-RackGear.stl Linear stages 4 Super quality (0.12mm) – 20mm/s Requires support structures. Sides of the rack may require minor polishing
2-MotorGear.stl All stepper motors 6 Super quality (0.12mm) – 20mm/s
3-MotorHousing.stl All stepper motors 6 Low quality (0.28mm) – 50mm/s
4-CameraAdapter.stl Camera 1 Standard quality (0.2mm) – 50mm/s
5-LensAdapter.stl Camera 1 Standard quality (0.2mm) – 50mm/s Not needed if a commercial lens holder is used
6-ShaftAdapter.stl Rotary stage – option1 1 Super quality (0.12mm) – 20mm/s Not needed if the more precise stage (option 2) is used
7-RotationGear.stl Rotary stage – option2 1 Standard quality (0.2mm) – 50mm/s Not needed if the less precise stage (option 1) is used
8-TiltGear.stl Tilting mechanism 1 Standard quality (0.2mm) – 50mm/s
9-LEDhousing.stl Illumination 1 Low quality (0.28mm) – 50mm/s
10-LEDfixture.stl Illumination 1 Low quality (0.28mm) – 50mm/s A small piece to keep everything in place
• Parts were designed using FreeCAD (www.freecadweb.org/), sliced using Ultimaker Cura (ultimaker.com/software/ultimaker-cura), and printed using
Creality Ender 3 Pro printer with a metal extruder and a BLTouch auto bed-leveling sensor.
• 1.75mm white PLA filament (Purefil, Switzerland) was used (extruder Temperature: 200 °C, bed temperature: 60 °C).
• A good quality printing depends on many factors and parameters, especially a good bed leveling.
• Some parts, especially the holes fitting to the studs of LEGO bricks, may require soft grinding using a file or a sandpaper.
• Gears used in the illustrations and the first prototype had a larger pitch. The latest design files have a finer pitch for better precision. All designs have
been tested.
• LEGO bricks
• 3D printed parts
• Raspberry Pi + camera
• Arduino mainboard
• Arduino controller
• HDMI display
• Cables …
26cm
• XYZ stage: 3D printed linear actuators using stepper motors from CD-ROMs
• Camera focus/magnification: Moving the camera lens using a tiny stepper motor
• Electronics: Custom Arduino board using Attiny841 microcontroller (one board for each motor)
• Mechanical parts: Mostly 3D printed, only a few LEGO bricks
ISP programming
top side back side
Moving
Pi Camera v2 the lens
power and
1.8cm joystick
Issues:
• Custom-design components, not available off-the-shelf
• Limited travel distance and magnification range
• Linear movements not very smooth (18-degree per step)
• Difficult to protect the image sensor from stray light
• Assembly of the custom Arduino/motor driver board requires high
precision soldering
IBM Research - Zurich Images © 2020 Yuksel Temiz
Learning by failing – 2 (DC gear motors)
Issues:
• Custom-design components, not available off-the-shelf
• Smoother movements but cannot take much load at lower speeds
• Thread and guides bend when pushed too much, resulting in
wobbles during movement
Moving piece
Wheels
Gear
Rack
DC motor Issues:
• Difficult to assemble
Arduino + motor driver • Side-to-side and up-and-down movements
(custom designed)
• XYZ stage: Moving a LEGO piece using a gear + rack combination and LEGO sliding guides
• Camera focus/magnification: Fully enclosed housing with a dedicated lens (same as the latest design)
• Electronics: Custom Arduino board using Attiny841 microcontroller and driver with microstepping (one board for each motor)
• Mechanical parts: LEGO bricks and 3D printed parts
Electronics
Issues:
• Requires high precision 3D printing (expensive equipment)
3D printed • Stepper motor: expensive and not easily obtainable in popular
motor housing electronic stores
Stepper
motor
Pinion gear
1.5cm
www.zurich.ibm.com/st/precision_diagnostics