Team:Aachen/Notebook/Engineering/WatsOn

From 2014.igem.org

(Difference between revisions)
(GUI(graphical user interface))
Line 48: Line 48:
{{Team:Aachen/BlockSeparator}}
{{Team:Aachen/BlockSeparator}}
 +
 +
= Hardware =
 +
<span class="anchor" id="watsonhardware"></span>
 +
 +
{{Team:Aachen/Figure|Aachen_Device_Hardware_Graphics.png|title=Hardware components||width=750px}}
 +
 +
* '''Raspberry Pi''' : The Raspberry Pi is a small single-board computer which runs a Linux operating system from an inserted SD-card. The steps which are required to setup a fully working system are described here[https://2014.igem.org/Team:Aachen/Notebook/Engineering/WatsOn#pisetup]. The main purpose of the Raspberry Pi is to run the software described above, control the attached camera and to show the GUI on the display. The big advantage of this board is that it is very powerful, cheap and therefore perfectly fits our needs.
 +
 +
* '''Raspberry Pi camera''': The camera is directly connected to the Raspberry Pi board and takes the images of the chips.
 +
 +
* '''Arduino''': The arduino board sets the power and thus controls the temperature of the Peltier heater. The power is set by evaluating the received values from the temperature sensors for the interior of the device and the aluminium block. Additionally the arduino receives commands from the Raspberry Pi to turn the excitation LEDs on and off.
 +
 +
* '''Relay''': The 2-channel relay works like two light switches which either are turned on or off. They control the 450nm and 480nm LEDs. The channels are connected and turned on and off by the arduino board.
 +
 +
* '''Peltier element''': A Peltier component transforms an applied power into a temperature gradient which leads to a hot surface on one side of the element and a cooler one on the other. The Peltier element connected to the aluminium block heats up the interior of the device to incubate the sensing cells at 37°C.
 +
 +
* '''USB WiFi stick''': The USB WiFi stick connects the Raspberry Pi to a local network.
 +
 +
* '''Display''': The 8-digit display is connected to the arduino board and shows the current interior temperature
 +
 +
{{Team:Aachen/FigureFloatRight|Aachen_Filter_010.png|title=010|subtitle=|width=70px}}
 +
{{Team:Aachen/FigureFloatRight|Aachen_Filter_505.png|title=505|subtitle=|width=70px}}
 +
 +
* '''Filter slides''': To block the light that is emitted from the LEDs a filter slide is placed in front of the camera. This step is taken to get a clear fluorescence signal from the chips. The characteristic of the filter slide is selected depending on the frequency of the LEDs which are either 450nm or 480nm ones. We used '505 Sally Green' for the 450nm and '010 Medium Yellow' for the 480nm LEDs.
 +
 +
{{Team:Aachen/BlockSeparator}}
 +
= Software =
= Software =
Line 82: Line 109:
{{Team:Aachen/BlockSeparator}}
{{Team:Aachen/BlockSeparator}}
-
 
-
= Hardware =
 
-
<span class="anchor" id="watsonhardware"></span>
 
-
 
-
{{Team:Aachen/Figure|Aachen_Device_Hardware_Graphics.png|title=Hardware components||width=750px}}
 
-
 
-
* '''Raspberry Pi''' : The Raspberry Pi is a small single-board computer which runs a Linux operating system from an inserted SD-card. The steps which are required to setup a fully working system are described here[https://2014.igem.org/Team:Aachen/Notebook/Engineering/WatsOn#pisetup]. The main purpose of the Raspberry Pi is to run the software described above, control the attached camera and to show the GUI on the display. The big advantage of this board is that it is very powerful, cheap and therefore perfectly fits our needs.
 
-
 
-
* '''Raspberry Pi camera''': The camera is directly connected to the Raspberry Pi board and takes the images of the chips.
 
-
 
-
* '''Arduino''': The arduino board sets the power and thus controls the temperature of the Peltier heater. The power is set by evaluating the received values from the temperature sensors for the interior of the device and the aluminium block. Additionally the arduino receives commands from the Raspberry Pi to turn the excitation LEDs on and off.
 
-
 
-
* '''Relay''': The 2-channel relay works like two light switches which either are turned on or off. They control the 450nm and 480nm LEDs. The channels are connected and turned on and off by the arduino board.
 
-
 
-
* '''Peltier element''': A Peltier component transforms an applied power into a temperature gradient which leads to a hot surface on one side of the element and a cooler one on the other. The Peltier element connected to the aluminium block heats up the interior of the device to incubate the sensing cells at 37°C.
 
-
 
-
* '''USB WiFi stick''': The USB WiFi stick connects the Raspberry Pi to a local network.
 
-
 
-
* '''Display''': The 8-digit display is connected to the arduino board and shows the current interior temperature
 
-
 
-
{{Team:Aachen/FigureFloatRight|Aachen_Filter_010.png|title=010|subtitle=|width=70px}}
 
-
{{Team:Aachen/FigureFloatRight|Aachen_Filter_505.png|title=505|subtitle=|width=70px}}
 
-
 
-
* '''Filter slides''': To block the light that is emitted from the LEDs a filter slide is placed in front of the camera. This step is taken to get a clear fluorescence signal from the chips. The characteristic of the filter slide is selected depending on the frequency of the LEDs which are either 450nm or 480nm ones. We used '505 Sally Green' for the 450nm and '010 Medium Yellow' for the 480nm LEDs.
 
-
 
-
{{Team:Aachen/BlockSeparator}}
 
-
 
[[File:Aachen_14-10-15_DIY_Cellocks_iNB.png|right|150px]]
[[File:Aachen_14-10-15_DIY_Cellocks_iNB.png|right|150px]]

Revision as of 20:16, 16 October 2014

WatsOn

This page contains technical details and construction manuals for our measurement device WatsOn. For more details, please click on the respective tile.

Hardware

Aachen Device Hardware Graphics.png
Hardware components
  • Raspberry Pi : The Raspberry Pi is a small single-board computer which runs a Linux operating system from an inserted SD-card. The steps which are required to setup a fully working system are described here[1]. The main purpose of the Raspberry Pi is to run the software described above, control the attached camera and to show the GUI on the display. The big advantage of this board is that it is very powerful, cheap and therefore perfectly fits our needs.
  • Raspberry Pi camera: The camera is directly connected to the Raspberry Pi board and takes the images of the chips.
  • Arduino: The arduino board sets the power and thus controls the temperature of the Peltier heater. The power is set by evaluating the received values from the temperature sensors for the interior of the device and the aluminium block. Additionally the arduino receives commands from the Raspberry Pi to turn the excitation LEDs on and off.
  • Relay: The 2-channel relay works like two light switches which either are turned on or off. They control the 450nm and 480nm LEDs. The channels are connected and turned on and off by the arduino board.
  • Peltier element: A Peltier component transforms an applied power into a temperature gradient which leads to a hot surface on one side of the element and a cooler one on the other. The Peltier element connected to the aluminium block heats up the interior of the device to incubate the sensing cells at 37°C.
  • USB WiFi stick: The USB WiFi stick connects the Raspberry Pi to a local network.
  • Display: The 8-digit display is connected to the arduino board and shows the current interior temperature
Aachen Filter 010.png
010
Aachen Filter 505.png
505
  • Filter slides: To block the light that is emitted from the LEDs a filter slide is placed in front of the camera. This step is taken to get a clear fluorescence signal from the chips. The characteristic of the filter slide is selected depending on the frequency of the LEDs which are either 450nm or 480nm ones. We used '505 Sally Green' for the 450nm and '010 Medium Yellow' for the 480nm LEDs.


Software


The software consists of several parts which provide a user interface and manage the connection to the hardware. The scheme below shows the different components of the software:

Aachen Device SoftwareBackend.png
Connection between GUI and backend

GUI(graphical user interface)

With the graphical interface, the user can take images and time lapses of the chips inside the device. The software is written in C++. It makes use of the [http://qt-project.org/ Qt-Library] to provide a clear interface and a comfortable way to manage various software aspects such as handling images and establishing network connections. An advantage resulting from the utilization of Qt-Library is the multi-platform support for Windows, MacOS and Linux. Additionally, Qt is available with an Open Source license which can be used for free. The software can be used locally on the Raspberry Pi or remotely from a device in the same network.

Features of the GUI include:

  • Change settings:
    • The user can specify the iso-value and the shutter speed of the camera.
    • Custom settings can be labeled and saved for future reference.
    • Existing settings can be updated or deleted unless they are default configurations.
    • The excitation wavelength of GFP (480 nm) and iLOV (450 nm) can be selected.
  • Take image/s:
    • The GUI offers two possibilities to take images:
      • Take a single image with the active camera settings.
      • Take time lapse shootings with the active camera settings and the specified interval. When activated, the images are saved automatically to a user defined directory with ascending filenames.
    • The last image which was taken by the camera is shown in the GUI, information containing the time stamp and used camera settings are displayed next to the image. Previous images can be selected with the arrow buttons.
  • Analyze image:
    • The image is analyzed by an image segmentation algorithm and shows whether the pathogen Pseudomonas aeruginosa is present on the chip or not

Backend

The backend is a software that runs on the Raspberry Pi and is responsible for the connection between the GUI and the hardware. If the user interface is executed on another device, e.g. a notebook, it has to be in the same network as the Raspberry Pi. The backend works like a web server that receives commands and acts according to the submitted parameters. It can take images and returns them to the GUI.


Before an image is taken, the backend turns on the specified LEDs by sending a command to the connected Arduino board. Afterwards, the LEDs are turned off using the same mechanism. These steps are repeated in the given interval for a time lapse shooting.

Aachen 14-10-15 DIY Cellocks iNB.png

DIY: How To Build Your Own WatsOn

If you want to create your own WatsOn first take a look at the following list of necessary components. All parts except the laser cutted acrylic glass only need to be bought.

All needed components, their quantities and prices for creating your own WatsOn

WatsOn 1€= $1.27 on 14/10/2014
Quantity Component Costs [€] Costs [$] Final [€] Final [$]
1 [http://www.prolighting.de/Zubehoer/Farbfilter/Lee-Filter_HT/Lee-Filters_Musterheft_Designer_Edition_i174_3965_0.htm filter slides] (medium yellow 010, sally green 505)1.572.001.572.00
1 [http://www.dx.com/p/uno-r3-development-board-microcontroller-mega328p-atmega16u2-compat-for-arduino-blue-black-215600 arduino UNO R3]9.1711.659.1711.65
1 [http://www.dx.com/p/arduino-2-channel-relay-shield-module-red-144140 2-channel relay shield]2.723.462.723.46
40jumper-wire cable2.352.992.352.99
1 [http://www.dx.com/p/2-54mm-1x40-pin-breakaway-straight-male-header-10-piece-pack-144191 40er male header (10-Piece Pack)]2.142.722.142.72
1 [http://www.dx.com/p/jtron-2-54mm-40-pin-single-row-seat-single-row-female-header-black-10-pcs-278953 40er female header (10-Piece Pack)]2.052.602.052.60
1 [http://www.dx.com/p/prototype-universal-printed-circuit-board-breadboard-brown-5-piece-pack-130926 circuit board]2.352.992.352.99
1 [http://www.newark.com/pro-signal/rp006/audio-video-cable-hdmi-1m-black/dp/96T7446 HDMI cable]1.471.871.471.87
1 [http://www.dx.com/p/hd-053-high-speed-usb-2-0-7-port-hub-black-174817 7 port USB hub]5.286.715.286.71
1[http://www.dx.com/p/dx-original-ultra-mini-usb-2-0-802-11n-b-g-150mbps-wi-fi-wlan-wireless-network-adapter-black-252716 USB WiFi stick]4.215.354.215.35
1USB mouse and keyboard9.8412.509.8412.50
1 [http://corporate.evonik.com/en/products/pages/default.aspx case acrylic glass XT 6mm~0.52]39.8850.6539.8850.65
1spray paint for acrylic glass5.156.545.156.54
1 [http://www.newark.com/raspberry-pi/raspberry-modb-512m/raspberry-pi-model-b-board/dp/68X0155 Raspberry Pi model B board]27.5635.0027.5635.00
1[http://www.newark.com/raspberry-pi/rpi-camera-board/add-on-brd-camera-module-raspberry/dp/69W0689 Raspberry Pi camera module]19.6925.0019.6925.00
1[http://www.pollin.de/shop/dt/NzUwOTc4OTk-/ 7” display]39.3549.9739.3549.97
1[http://www.dx.com/p/diy8-x-seven-segment-displays-module-for-arduino-595-driver-250813 8-segment display]3.043.863.043.86
2 [http://www.dx.com/p/arduino-dht11-digital-temperature-humidity-sensor-138531 digital temperature sensor DHT-22]5.917.5011.8215.00
1 aluminum block 100x100x15 mm11.2014.2311.2014.23
1 [http://www.dx.com/p/tec1-12706-semiconductor-thermoelectric-cooler-peltier-white-157283 Peltier heater 12V 60W]3.544.493.544.49
1power supply25.9032.8925.9032.89
6 [http://www.leds.de/Low-Mid-Power-LEDs/SuperFlux-LEDs/Nichia-Superflux-LED-blau-3lm-100-NSPBR70BSS.html superflux LED 480nm]0.991.265.947.54
16LED 450nm0.370.475.947.54
2 Resistor 40 Ohm0.120.150.240.30
4 Resistor 100 Ohm0.120.150.480.60
1cupboard button0.981.240.981.24
-total--243.88309.70

</center>


You can find more economical information for WatsOn and the project on our Economical View page.

Aachen Device Fritzing.png
Wiring of our device
Aachen Device 1.jpg Start building your own WatsOn by assembling the base plate, the sides and the interior wall.
350px] [File:Aachen_Device_.3jpg Fix the Peltier heater on the back of the aluminum block and place it in the hole of the interior wall.
Arrange the 4x4 450nm LEDs and the 2x3 480nm LEDs
Aachen Device 7.jpg Assemble the camera holder with the camera and the corresponding filter slide on the lower part. Over the camera you can place the temperature sensor for measuring the indoor temperature. Finally put the fan on the back of the camera holder.
Aachen Device 8.jpg Connect the electronic components on the outside and the inside according to the wiring diagramm.
Aachen Device 4.jpg Put together the drawer.
Aachen Device 9.jpg Position the front panel and insert the drawer.
Aachen Device 10.jpg Place the temperature sensor for the aluminium block temperature directly on the block and put the back panel in front of it.
Aachen Device 6.jpg Setup the power supply and connect all devices to either 5V or 12V.
Aachen Device 11.jpg Mount the device on top of the power supply casing. Add the display and apply some stickers to enjoy your custom-made WatsOn.

Raspberry Pi - Setup

In order to get a running linux system on the Raspberry Pi which includes all required components and configurations the following steps have to be considered:

  • The raspberry pi needs a SD-card where the operating system will be installed on. Go to the download page of the Raspberry Pi Foundation [http://www.raspberrypi.org/downloads/] and select an operating system of your choice - we used Raspbian - or just download the NOOBS package which offers all different operating systems during setup.
  • Follow the specific image installation guidelines to install the downloaded system onto your SD-card.
  • Once finished insert the SD-card in the slot on the Raspberry Pi board, connect a monitor over HDMI, plug in a usb mouse and keyboard and start the Pi by connecting the micro-USB power supply. Follow the installation instructions - these should be straightforward. After installation you will be shown the desktop of your new system.
  • To be able to use the Raspberry Pi Camera you need activate it over a terminal. Search for a desktop icon labeled "LxTerminal", double click it and a terminal will appear where you can enter commands which will be executed after you press return. Enter "raspi-config", press return and activate the camera with the displayed corresponding option.
  • Download the source files for the backend server and the graphical user interface (GUI). To be able to compile the GUI you need to install the Qt5-libraries. Follow this guide [http://qt-project.org/wiki/Native_Build_of_Qt5_on_a_Raspberry_Pi] on how to get the Qt source code, compile it and setup your environment correctly. Make sure that your Raspberry Pi is constantly running, since this process takes some time and must not be interrupted.
  • With the Qt-libraries installed open a terminal and change to the directory where you put the source for the GUI (command "cd [path to source]"). Call "qmake" followed by "make" and you will start compilation of the program. When finished you can launch the GUI with the command "./igem_GUI".
  • The backend - that will establish the connection between hardware and the user interface - requires you to install additional packages for python which is a high-level general-purpose programming language and interpreter that will ship with your system. Open the README in the "Backend" directory and follow the instructions.
  • You now should be able to launch the backend by calling "python takeimageserver.py &" from the terminal.
  • Now start the GUI. An input dialog will show up asking you to provide the IP address of the backend server respectively the Raspberry Pi. Since you are running the GUI and the backend on the same device, just press enter to select the default entry which is the IP of the localhost. After a few seconds when the connection to the backend server is established the user interface gets enabled and you can start to take images and time lapse shootings. For the full list of features confer to the Software section [link].

In case you want to run the GUI on a remote machine e.g. your notebook follow these additional steps:

  • Install the Qt-libraries and QtCreator on your system [http://qt-project.org/], this is just an installation - you don't have to compile it. Get the source code for the GUI and open the ".pro" file with QtCreator. After importing the project and selecting a build directory click the green arrow on the left side. Compilation is started and as soon as it is finished the GUI will start.
  • In order to be able to connect to the Raspberry Pi you need to be connected to the same network. Therefore make sure the Raspberry Pi usb wifi stick is working properly [see Troubleshooting & useful links] and you reside in the same network. Start the backend server on the Raspberry, it will print the IP address on startup which you must enter in the GUI on your device running the GUI. Now you should be able to use all the features as if running the GUI on the Raspberry Pi.

Troubleshooting & useful links

  • Display resolution: if your connected display is not working properly you may refer to
    • http://elinux.org/RPiconfig#Video
    • http://www.raspberrypi.org/forums/viewtopic.php?f=29&t=24679
  • Network configuration:
    • http://www.raspberrypi.org/documentation/configuration/wireless/README.md