Close
0%
0%

Flypi - cheap microscope/experimental setup

Pi + Picamera + M12 lens + Arduino microscope/experimental setup for diagnostics and scientific experiments!

Similar projects worth following
Our plan with this project is to develop a complete opensource and cheap device for scientific experiments (data collection and analysis) and diagnostics (if they are "microscopy based").
So far we were able to perform some proof of principle experiments in life sciences (Fluorescence and calcium imaging, opto and thermo genetics essays) and to perform diagnostics of the following parasites: Loa loa, Brugia Malayi, Wuchereria bankrofti, Schistosoma eggs, Mansonella perstans

The setup is quite simple:

A raspberry pi 2 (or 3) (running Raspian) + picamera with mounted lens (M12 standard) + some python3 code (for custom GUI + saving of data) do most of the lifting and an Arduino + custom PCB + electronic bits take care of timing, light stimulation, heating, temperature sensing and any other physical interaction necessary.

For more details, please check: https://openlabwaredotnet.files.wordpress.com/2015/11/main-v4.pdf

FlyPi_v29.scad

Scad file containing all parts that need to be 3D printed

x-openscad - 46.73 kB - 10/05/2016 at 22:07

Download

electronics_draft.pdf

Diagram of PCB layout

x-download - 16.33 kB - 10/04/2016 at 20:55

Preview Download

gerber.zip

Necessary files to create the PCB

x-zip-compressed - 205.15 kB - 10/04/2016 at 20:00

Download

BOM.pdf

Bill of materials pdf 04.10.2016

x-download - 48.20 kB - 10/04/2016 at 18:30

Preview Download

BOM.ods

Bill of materials ods 04.10.2016

spreadsheet - 23.42 kB - 10/04/2016 at 18:30

Download

BOM.xlsx

Bill of materials xlsx 04.10.2016

sheet - 11.37 kB - 10/04/2016 at 18:30

Download

156907-da-01-en-SPG_REGL_TS2596CM550_RN_TSC_TO263.pdf

Datasheet for TS2596 switching voltage regulator

octet-stream - 323.49 kB - 01/24/2016 at 21:27

Preview Download

956datasheet.pdf

Datasheet for the 8X8 Blue led matrix from Adafruit

Adobe Portable Document Format - 360.74 kB - 01/14/2016 at 16:44

Preview Download

STM.pdf

Datasheet for TDA8139 voltage regulator

Adobe Portable Document Format - 84.01 kB - 01/14/2016 at 14:43

Preview Download

CD00000240.pdf

Datasheet for L298N H-Bridge

Adobe Portable Document Format - 599.36 kB - 01/14/2016 at 14:36

Preview Download

View all 11 files

  • 1 × Raspberry Pi 2
  • 1 × 16 GB mini SD card card is installed with raspian
  • 1 × HDMI to VGA adapter
  • 1 × Monitor
  • 1 × Mouse (USB)
  • 1 × Keyboard (USB) Development Kits, Boards and Systems / Development Kits and Boards
  • 1 × Arduino nano ATmega328 Controls all periohericals except camera
  • 1 × Custom printed circuit board (PCB) makes the connection between Arduino and periphericals easier
  • 1 × 3D printed parts Mainframe and holders for camera, led ring and etc.
  • 1 × Adjustable focus RPi Camera http://www.wvshare.com/product/RPi-Camera-B.htm

View all 47 components

  • AVI conversion, Protocols

    Andre Maia Chagas12/05/2016 at 15:12 0 comments

    Not much to disclose here other than we updated the code and the following things were updated/created:

    "TO AVI" button created --> This allows the user to convert the videos recorded by the PiCamera into AVI format, which is preferred over the default h264 as it can be opened by different analysis software, as ImageJ

    The camera horizontal and vertical offset now default to the middle of the image when a zoom bigger than 1 is used

    The protocol class has been updated. Users can now create their own protocols and have the FlyPi recording data for (hopefully) any amount of time.

  • Overall schematics

    Andre Maia Chagas10/05/2016 at 09:03 0 comments

    To clarify a couple of things, such as the PCB arrangement, how the Pi and the Arduino communicate, where timing is done, below are a couple of schematics.

    Overall schematics: How the Pi, camera, Arduino and PCB are connected to each other and what each part is doing.

    Overall view - How Pi, camera, Arduino and PCB are connected and their roles

    PCB schematic, how components are distributed on the PCB according to location and functional module

    PCB Layout by region/functional unitsPython software schematic: How the different independent classes relate to each other


  • Some UI demos and tests

    Andre Maia Chagas07/11/2016 at 05:55 0 comments

    Here is a small collection of videos demonstrating the new user interface and some of the functionalities implemented for each component:



    And a screenshot of the soon to be finished "Protocol class", which can be used to automatize tasks:

  • FlyPi distribution licenses

    Andre Maia Chagas07/11/2016 at 05:36 0 comments

    Although this project is already open to everyone, we have never explicitly stated which license we are using for it's distribution

    To keep adherent to the open source philosophy, make this tool as useful and widespread as possible and to hopefully contribute to bringing citizen science and academic science closer together, the FlyPi is distributed as (CC BY-SA 4.0) or the creative commons Attribution-ShareAlike 4.0 International license. Meaning that anyone is allowed to use, distribute, remix, and even commercialize this project, as long as proper reference is made to the creators and the new variants are distributed under the same license.

  • PCB design with KiCad

    Andre Maia Chagas07/08/2016 at 07:04 0 comments

    We started the PCB design for this project in Fritzing. Since the project started small and simple, it was a satisfactory solution. As the project grew and became more complex, using Fritzing became too cumbersome. A reported bug had tracks disappearing, which made getting the board correct a freakin' mess. We then decided to migrate to KiCad. If the folks over the CERN use and develop it, how bad could it be?! Turns out it was quite easy to learn it (make sure to install the latest version!) and develop the new board, see the image of the schematics and pcb layout:

  • Overview video

    Andre Maia Chagas06/05/2016 at 19:24 0 comments

    Here is a small video with an overview of the Flypi. Some user interface shots (although this version is a bit outdated), some shots of the device in action

  • HackadayPrize2016 entry log

    Andre Maia Chagas05/31/2016 at 19:11 0 comments

    Scientists need to have the proper tools to perform experiments and test their ideas. These tools are expensive, because they normally use cutting edge technology and are produced in "small" quantities by only a handful of companies. This ends up restricting who and where research is being done, which aggravates the situation in a lot of places where simple research could bring a lot of improvement to society.

    Our project aims are:

    -Development of a cheap (so far a complete set is ~100-150 US$) open source microscopy system capable of

    --- Recording photos (time lapse and single snaps) and videos

    --- Analysis of recorded data (motion tracking, time series of the time lapses)

    --- using cutting edge tools in neuroscience to both stimulate and record activity from neuronal tissue

    --- portable enough so it can be taken to the remote areas/fit in the DIY biolab garage

    --- Diagnostics - imaging of prepared samples of human tissue that might or not be infected with parasites (so far tested with parasites from the digestive system)

    --- Being used as am educational tool. An intro into the basics of microcontrollers, electronic circuits, 3D printing and programming

    --- Last but not least, it is also modular. If one is only interested in microscopy, them only the Rasperry pi, the PiCamera and the main frame will suffice. If special lighting is necessary, them LEDs of all sorts can be added, If positioning is important, up to three cheap 3-axis micromanipulators (manually or servo adjusted) can be attached to the main frame. And since all programming is done in python classes, adding new features should be fairly straight forward

  • Unified power supply

    Andre Maia Chagas05/29/2016 at 15:40 0 comments

    So far the way we were supplying power to our system was only "quick and dirty". The Pi would be powered by a phone charger. All other things would be powered by usb cables cut open and connected to an usb hub. Cables everywhere and very little control over max current and so on...

    After playing around and learning about linear/switching voltage regulators, we came up with a system that seems to do the job just right. It consists of a 12V 5A power brick (the ones used for laptops) and switching voltage regulators that power all parts of our system. The power circuit is integrated into the PCB.


  • Peltier, it finally works...

    Andre Maia Chagas01/12/2016 at 16:23 0 comments

    Finally the Peltier system is up and running. The solution with the L298N works quite well.. Here some images of temperature curves we logged with it... (it still needs some fine tuning, but it works!)

    The images - Room temp to 15 °C. Cycles of 35 to 25 °C and room temp to 35 °C

    Here after some more tuning:

    5 min periods for each temp. 5min for settling into room temp (after 35°C) than switching between 35°C and 15°C (4X) and one period at 19°C and more 5min with peltier off (the bump comes from heat dissipating from the bottom side of the peltier to the top side, where temperature is measured).

  • Optogenetics, fuorescence and calcium imaging with the Flypi

    Andre Maia Chagas11/30/2015 at 19:01 0 comments

    Optogenetic activation of Chrimson in Adult fruit fly

    Zebrafish expressing green fluorescent protein in heart tissue

    Calcium imaging in the Drosophila larva


View all 13 project logs

  • 1

    Instructions overview:

    This build is pretty simple and consists of few steps:

    • Printing the necessary parts from the scad file
    • Soldering all necessary components to the PCB
    • Setting up the Operating System for the Raspberry Pi
    • Fixating components to the printed parts:
    1. Main body to Raspberry Pi + Peltier + camera
    2. Micromanipulator
    3. LED ring and light diffuser
    4. High Powered LEDs and fluorescence module
    • Setting up Arduino and Python code

  • 2

    Printing the necessary parts from the scad file

    Necessary parts:

    • OpenScad (free open source software, can be downloaded here).
    • The scad file containing the Flypi's 3D model, can be found on the project page, in files.

    Steps (images below):

    1. Use OpenScad and the flags in the script to render the parts necessary (see image below) - If you are only using the microscope module, the only necessary parts are the base, backplate, camera holder.
    2. Convert the rendered parts to .STL (example below using Cura)
    3. load it to your preferred printer. (15-25% percent infill should be more than enough).
    4. (Optional step): Print the base, one long arm and the camera holder. After printed, test if the parts slide properly into one another. If they are too loose or too tight, change the "tolerance" parameter on the SCAD file.
    5. Print away (the complete Flypi can be printed in about 30 hours with a printer running at 40-50 mm/sec and 0.25 layer height).

    OpenScad screenshot, showing bare minimum to be printed

    After being exported as STL, a slicing software is used to prepare parts for printing


  • 3

    Soldering all necessary components to the PCB

    Necessary parts:

    • Custom PCB (gerber files necessary to fabricate them are on the project page)
    • Electronic components for the modules you want to build.

    The PCB was designed to be modular. If the user only wants to use the peltier module and the LED ports, than only the components for those parts need to be soldered in. Also, we opted to stay with "through hole" architecture so people won't get stuck while learning how to solder and populating the PCB at the same time.

    The PCB is annotated (component number and value), so one can read which component goes where (R refers to resistors, C to capacitors, D to diodes, P to screwterminals, U to integrated circuits (ICs), L to inductors and Q to transistors - see image below).

    Steps (if building a complete set - images follow below):

    1. Start by placing and soldering the smallest components. Good place to start are resistors, transistors and capacitors - remember to check their polarity - (check the schematics below to have an idea of where on the board the modules are distributed). If you are building the Peltier module, leave the big resistor that sits in the back of the board as the very last thing to solder
    2. Move on to ICs, power modules and Peltier first, Arduino with female connectors last. On placing the arduino, it is a good idea to sit the board on female connectors first and then connect those to the PCB (see image below), this way there is less chance of overheating the board, it can be taken off for other projects or in case of damage, and makes alignment of the female connectors easier. Remember that the Arduino USB port should be facing away from the barrel connector
    3. Last, solder the screw terminals and barrel connector.


View all 9 instructions

Enjoy this project?

Share      

Discussions

robhobson wrote 01/26/2017 at 20:14 point

This is a great project, we built one of these in the lab to track some aquatic invertebrates and they are working great. One issue we are having is with the availability of the camera from waveshare. We have a great deal of difficulty buying the camera through our university. Do you know of any alternatives? Otherwise we will probably just try and but the camera components and lenses ourselves.

  Are you sure? yes | no

rwilsongr8 wrote 07/28/2016 at 01:46 point

this is awesome. I help run an electronics club at my school and this looks like an very interesting project. I hope you get it finished, good luck 

  Are you sure? yes | no

Andre Maia Chagas wrote 08/02/2016 at 22:06 point

Thanks! We are finishing some last things, but it is completely usable already! Send us a message later if you want more info or some help setting some up!

  Are you sure? yes | no

zakqwy wrote 04/01/2015 at 15:25 point

This is great! Make sure to check out the Backyard Brains guys--their Spiker Box (which uses cockroaches) is somewhat related to your project.

  Are you sure? yes | no

Andre Maia Chagas wrote 04/13/2015 at 20:16 point

Thanks for the tip! We know the work of those guys!
You also have some cool projects!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates