Software
Our incubator aims to create different environments, to conduct experiments more realistic, and to facilitate the experimentation. To do that, our incubator has two specificities: First it controls different modules, which have specific actions, automatically. Thanks to that, a researcher can program a temperature, a humidity, an agitation, several fluorescence measurements before launching his experiment, and then let the incubator perform the experiment. It is the reason why we call our device AMI: Automatic Measurement Incubator. The second specificity is that the human AMI interaction can be done remotely on any other device with an internet connection (computer, mobile phone, …). So a researcher can, on his own device, launch his experiment and follow its evolution in real time.
Our software system, which allows that, can be resumed in this diagram:
The main component used to drive our system is a Raspberry Pi. A Raspberry is a small computer, with less calculating power but enough for our system. In this Raspberry we implemented a web interface named: Pythie. With Pythie, we created a human-computer interface, which remotely commands AMI’s modules. It works as follows: it collects the researcher requests, makes decisions and commands the modules, collects and stocks all data in a database, and informs the users on its interface. Some of the AMI’s modules are not directly controlled by the Raspberry, but by Arduinos. An Arduino is a microcontroller executing a program to control an electrical circuit. To enable the harmonious communication between the Raspberry, and the Arduino microcontrollers, we created our own communication protocol named: HermAs. This protocol gives rules of communication for the devices, and the actions to do, according to the messages they have exchanged. Thus each module has its own hardware and software system. They are all independant, and coordinated by the Pythie web interface.
On this page we explain how we assembled these modules.
HermAs protocol
3 Arduinos control the 3 different modules: 1) environment module, 2) plate motion module and 3) fluorescence module. Also, the Raspberry operates the camera from the fluorescence module, taking and processing images.
Usually, an Arduino microcontroller downloads an algorithm to do a specific action. Yet downloads may be slow, and the Arduino loses all the information from previous algorithms. To prevent this, we developed our own communication protocol: HermAs (reference to the ancient greek god: Hermes). HermAs’ protocol allows different microcontrollers, in our case Arduino microcontrollers and a Raspberry, to communicate. The great advantage of creating HermAs is that it allows a more fluent and trustful communication. This means that the protocol allows a stable connection between the 2 components (here the Arduinos and the Raspberry). Thus HermAs is coded on 2 different sides: Raspberry side with HermAs.js (js for the javascript programming language), and Arduino side with HermAs.cpp (cpp for the c++ programming language).
First, the HermAs.js roles are to detect the USB connection with an Arduino, to get messages, interpret them, and send request messages to the Arduino microcontrollers.
Then, in the Arduino controller HermAs.cpp is connected to an operating class memorizing all the actions the Arduino can do (functions as: move a motor, light a led, ...), and all the settings parameters (arguments as: the motor position, the led color, ...). Thus HermAs.cpp reads a message, interprets it, executes an action and/or sends an information message according to the received message.
Thanks to this protocol, the Arduino keeps in memory these actions and these variables. In addition to this, the Arduino can execute one or several functions, and reply to an information request at the same time and quickly. On top of that, this protocol can be used for any Arduino application. Thus, for our system, each module has his own hardware, and his own software. Our system becomes modular.
We developed a communication protocol that sets up a master/slave communication: on the Raspberry side, it makes the decision, sends request messages to execute an action or ask an information, and coordinates it all. On the Arduino side, it executes the action, and replies to the request information.
This protocol is modular and can be used in other projects requesting a master/slave communication. To better understand this protocol and learn to use it, you can read our contribution page about HermAs protocol.
Pythie web interface
Now the different modules are connected and ready to be used. To be operated by a human, we developed a human/machine interface: Pythie.
Pythie is a web interface hosted in the Raspberry, which coordinates the actions and the decision to do. In addition to handling the communication with the Arduinos, it manages the pi-camera: to capture an image, and then to process the image for the fluorescence measurement. Pythie also maintains a database to store the informations about the experiments: its protocol, the evolutions of physical parameters (temperature, humidity, agitation speed), and the fluorescence measurements. To know more about how the data is organized in this database, click here. Thus the user can easily access his experiment’s protocol, check the well functioning of the incubator, and analyze the fluorescence measurements of the actual or previous experiments. Using Pythie, an user can program an experiment with his protocol and the fluorescence measurements to do.
A specificity of the Pythie interface is that it is a web interface, meaning that it is hosted in the Raspberry and that it is distributed by a web server. Thus the user can access the web interface by using his own device (his computer, tablet, mobile phone, …) as long as it has an internet connection. He can launch his experiment and follow it remotely. He only has to be on the same network as the incubator running Pythie, and log in with his personal account. Each user is identified, so we know who launched which experiment.
You can access a demo version of the Pythie interface here.
The most important functions of the interface are implemented to this day, the interface can launch an experiment, send requests and get back answers but we can’t yet see the results of the various measurements.