Final Project

Tasks

SystemTasksProcess
Focus Mechanism
It will responsible for focusing the lenses on the sample and will be controlled from a web interface.
lenses holder and rack and pinionLearn more about microscopy from MicroscopyU
Design and print the mechanism
  • Computer-aided Design
  • 3D Printing
  • Laser Cutting(Computer Controlled Cutting)
Design and fabricate a test mount of the test pattern to discover to test the focus mechanism and discover the height needed for the glass plate.
Stepper motor and driver:
Actuate the focus mechanism
Test current stepper board and modify if needed
  • Electronics Design and Production
  • Embedded Programming
Define stepping needed (rack and pinion and stepping code)
Install Raspbian Jessie Lite and RPi-Cam-Web-Interface for testing
  • Networking and Communication
Test with FTDI and Wi-Fi
Finalize stepper board and mechanism
Web interface
or manual control and feedback
Modify the web interface and test it with FTDI.
  • Interface and Application Programming
Test RaspberryPi Serial communication
Deploy the web interface to the RaspberryPi and test using its GPIO for RS232 communication.
X-Y Mechanism
Will shift the camera into a snake-like grid for sequential images capturing.
Shafts holders and stepper mountsDesign and print the mounts, cut the base and test the mechanism manually.
  • Mechanical Design
  • 3D design and Printing
  • CNC Router (Computer Controlled Machining)
Carriage
Will hold the lenses and focus mechanism from the top and the Raspberry pi from the bottom
Design and print the carriage
Machine ControlCreate a virtual machine in pyGestalt and test for the least stepping possible.
  • Machine Design
Port virtual machine to the RaspberryPi and figure out how to use RS-485 from it. If failed use the cable.
Modify the web interface to control the machine
  • Interface and Application Programming
Enclosure
Allows the building of another system on the top and the directional light source.
Enclosure for the mechanism in the baseDesign and Fabricate the enclosure
  • Computer-aided Design
  • CNC Router (Computer-controlled Machining)
Glass base for the specimen dish/slide with silicon pads to minimize shakingDesign a mould for the pads and cast them in silicon rubber
  • Molding and Casting
Customizable height control for the light source/height of accessory system
Web interface
Will be used by the user to interact with the device from the internet
Web serverRedesign and finalize the user interface
  • Interface and Application Programming
Program the backend for the images stitching and data logging

The Idea

The idea here is to create an open-source, cheap and fabbable digital microscope using common components that can be found at most Fab Labs.

The work here is based on the paper titled "A portable low-cost long-term live-cell imaging platform for biomedical research and education" . And is a part of a new paper by Mira A. Okasha titled "An Open-source low-cost Digital Microscope for Monitoring Biological Specimens".

The original paper uses a motorized platform to capture sequential images which are then stitched together to create a high-resolution image that can be viewed at anytime.

The last state of the project was that the machine was finished and was made out of laster-cutted plywood chassis, mechanism was actuated by GRBL shield and image capture and control was done by a RaspberryPi.

Then using a script I was able to capture images and crop them.

And in ImageJ, stitched the cropped images to create a high resolution image.

I tried to fabricate a board "fabGRBL" which include an Atmega and sockets for the drivers but failed to do so as the locally sourced copper sheets weren't FR-1 and traces broke off many times along with the many end-mills.

Raspberry Pi

Installation of Raspbian Lite

I chose to install Raspbian Jessie Lite, the Lite version is the same as the normal version except it isn't loaded with a lot of packages including the default GUI. This is useful to make use of the limited resources of the pi in other operations.

First, Choosing a microSD card. Not all microSD cards; this page on eLinux wiki lists compatible and incompatible cards tested by the RaspberryPi community. I chose to buy the SanDisk SDSDQM-016G-B35 MICROSDHC 16GB as it was available in the local RadioShack and somehow guaranteed as there are a lot of counterfeit SD cards and its family is marked as working in eLinux. Also, 16GB should be enough for data logging.

Then I downloaded a Raspbian Jessi Lite the image form the downloads page. I downloaded the"April 2017" release.

Then to install, I proceeded to follow the instructions for Linux W.

After burning the image to the microSD card and booting the Raspberry Pi, I got greeted with the request of login credentials.

I then entered the default credentials:
Username: pi
Password: raspberry

Setting up Ethernet and SSH

To be able to work with the Raspberry Pi directly, I wanted to connect to it through the Laptop's Ethernet. I started by connecting the Raspberry Pi's Ethernet port to the Laptop's and from Ubuntu's network manager, I edited the Ethernet Connection "Auto Ethernet"and from "IPv4 Settings" I changed the "Method"to "Shared to other computers" and hit OK.

I then followed the instructions in this Stack Overflow post about setting a static IP address for the Pi which I can use to access the Pi from the laptop.

SSH is disabled by default in Raspbian; So, to enable it I entered

$ sudo raspi-config
then 5. Interfacing Options then SSH then Yes

I then was able to access the SSH by entering

$ ssh pi@10.42.0.63
where 10.42.0.63 is the new static IP I assigned.

In order to access the pi faster I added the following line to the /etc/hosts file.

10.42.0.63	faboscope
which enabled me to access the pi by calling this hostname.
$ ssh pi@faboscope

Enabling the camera and installing RPi-Cam-Web-Interface

In order to be able to test out the optics and maybe stream the camera feed to the web interface. I went on to install RPi-Cam-Web-Interface by following the instruction in their page.

I was prompted if I want it to start, I chose yes and then on my laptop I browsed to http://faboscope/html

X-Y Mechanism

Using the MTM inventory , I designed the XY mechanism in inventor and exported the STL files to be printed and the G-code of the base be cut on the CNC router.

I then designed the gantry and carriage for the sensor using the same parts and a laser-cut plywood with various mounting point to determine the proper place for the components to be mounted on.

pyGestalt Virtual Machine

I cloned the pyGestalt repo and used the xy_plotter.py as a starting point.

Then connected the boards to the motors and to each other and then to the PC using a Fabnet adapter that uses 499 Ohm resistor instead of 600 ohm mentioned in the tutorial .

I edited the moves list to make a rectangular movement to test the motion and tested the speed "velocity" of the movement.

The platform

The platform will be used to hold a glass piece where the specimen will be placed. To minimize shaking.

In molding and casting week, I molded a mold of the pad and casted it in rubber silicon.

I then created a linear pattern of another three pieces and casted rubber silicon.

Bill of Materials

ComponentVendorURLImageItem PriceCountPriceNotes
Mechanical Elements
AQS Nema 17 stepper motor with in-built lead screw (4 starts-2mm pitch 8mm dia)AQS
Alternative
MTM BOM$28.392$56.78- Exists in the lab's MTM kit
- Will drive the X-Y mechanism
Gestalt BoardsN/AMTM BOM$15.22$30.4
USB to RS485 Cable 5.90' (1.80m) UnshieldedDigi-KeyLink$301$30
Light Duty Dry-Running Sleeve Bearing, 1/16" Flange Thickness, Nylon, for 3/8" Diameter, 1/2" OD, 3/8" LengthMcMaster-CarrLink$0.598$4.72
Highly Corrosion-Resistant 6063 Aluminum, Anodized Tube, 3/8" OD, 0.070" Wall Thickness, 6 Feet LongMcMaster-CarrLink$9.564$38.24
Optics
12.5x Magnification Eyepiece LensPZOLink$9.011$9.01Salvaged from an old microscope
10x Objective LensPZOLink$491$49
Raspberry Pi 2 Camera ModuleRaspberry PiLink$20.641$20.64
5V Unipolar Stepper MotorLocal MarketLink$4.951$4.95Will control the focus mechanism of the lenses
Control
Raspberry Pi 2 Model BRaspberry PiLink$351$35- Will control the X-Y and focus mechanisms
- Capture and stitch imaged
- Operate the web-interface and data logging
SanDisk SDSDQM-016G-B35 MICROSDHC 16GBSandDiskLink
Link
$71$7
Power
24 Volt Power Supply - 1.1 Amp Single OutputCircuit SpecialistsLink$13.401$20.64
Power Barrel Connector Plug 0.70mm ID (0.028"), 2.35mm OD (0.093") EIAJ-1 Free Hanging (In-Line)Digi-KeyLink$11$1
2.50mm (0.094", 3/32", Sub Mini, Miniature) - Headphone Phone Jack Stereo Connector SolderDigi-KeyLink$1.131$1.13

Files