Skip to content

Assembly and set up

Tim Rudge edited this page Oct 6, 2017 · 27 revisions

Building the FluoPi does not require any special abilities; just access to a 3D printer and a laser cutter. Here we describe all the steps for assembling your own FluoPi device, acquiring images and performing some analysis of the resulting data.

Construction and set up of FluoPi

  1. Getting the code on your computer and Raspberry Pi
  2. Buy all the materials and follow assembly instructions
  3. Set up the Raspberry Pi and RPI camera
  4. Test LEDs

After this, the equipment should be ready to take images (e.g. to see electrophoresis gels). You can find an example in the User guide.

1. Getting the code

Clone the repository from github into your computer by pressing the green button in the upper-right corner or using git. The repo contains the design files and specifications, as well as the Python analysis module fluopi with example Jupyter notebooks, and the hardware control code.

The folder Hardware_control contain all the files to control the equipment (e.g. to run timelapses). You should copy this folder (via USB stick or network) to the Raspberry Pi.

All the other code (e.g. fluopi module, jupyter notebooks, etc) is not needed on the RPi. You will transfer the images to a personal computer to perform the analysis using the fluopi module.

2. Hardware assembly

Getting the materials and pieces

  • Get all the materials necessary to assemble the equipment, which are listed in the file Assembly Instructions.pdf (last page - “Bill of materials” table). As a reference, you can see the cost breakdown for Chile

  • Cut black, transparent, amber and blue acrylics using these files:

    • Black Ac - 2 - 3mm - 800x500 mm.dxf
    • Black Ac - 3mm - 800x500 mm.dxf
    • Transp Ac - 3mm - 300x300 mm.dxf
    • Amber Ac - 3mm - 300x300 mm.dxf
    • Blue Ac - 3mm - 300x300 mm.dxf
  • Cut diffuser paper (tracing paper) using the file:

    • paper Diffuser - 300x300 mm.dxf
  • Print the 3D pieces from the file "Hardware_design_files\3D\Readytoprint\Fluopi - All 3D print parts.stl". This is a ready to print file.

  • Fabricate the PCB from files located at PCB folder and assemble/solder electronic components following steps from docubricks

Assemble the device

Construct the device following assembly steps from Assembly Instructions.pdf or follow step-by-step guidelines at docubricks

3. Set up the Raspberry Pi and camera

  • Get a raspberry pi

    • If you didn't buy a SD card with noobs operating system pre-installed, download and install it following the instructions here
  • Enable the camera

    • turn on the raspberry pi by plugging it
    • go to init/interfaces/ and turn “Enable camera” Enable Rapberry camera
  • Turn off the raspberry pi and connect the camera (always TURN OFF before you connect or disconnect the camera!) proper camera connection

  • Perform a camera test:
    open a terminal and write raspistill -t 0. This will start a preview.
    To stop it you have to press ctrl+c in the keyboard.

Using the camera

There are a lot of options to control the camera:

  • You can manage the camera directly in the command-line with raspistill. Here is complete documentation of camera instructions and commands to set the image capture.

  • To use the camera on python scripts (e.g. timelapse programming) there is a python interface library to manage the camera. We use that library to built our codes and you can develop your own codes based on the library too.

  • Also, there are special modules to control the camera. Here is one of the most popular.

4. Test the illumination system

As you have the hardware and software ready you should be able to manage the LEDs manually (i.e. with the switch) and digitally (i.e. with the code):

Manual

It simply consists of pressing the switch to turn on and off the LEDs. It is useful to perform camera tests or to take an isolated image. Never leave the LEDs on for long times because they heat the equipment, which apart of be non-eco-friendly, affects the biological samples and could be dangerous.

Digital

To use the code you have to turn the manual switch off. Then you have to proceed this way: open a terminal and use cd to go to the folder where you have the ‘hardware control’ codes and execute them by writing in the terminal python turnON.py (LEDs should turn on) and python turnOFF.py

Note: Make sure you have the cables connected in the correct pin (i.e. negative -black- cable on position 30 and positive -red- cable on position 29) GPIO RP3

FluoPi control scripts

We also developed some simple code for hardware control and image acquisition which are in the repo github.

turnON.py → turn ON the LEDs
turnOFF.py → turn OFF the LEDs
timelapse.py → perform timelapses image capture

To use them you have to copy the Hardware_control files in your raspberry pi, here is and example screenshot of how it should look:

fluopi raspberry folder

Here is an screenshot of a typical imaging step with FluoPi :

typical fluopi session

troubleshooting:

  • When the camera is connected the raspberry doesn’t init: probably the camera is broken you need a new one. Make sure you are using the proper cable.
  • The preview doesn’t work: make sure camera is “Enable” on interfaces
  • Timelapse.py doesn’t work: make sure you have installed or actualized the camera python library