## 3 EvoBot Implementation
### Electronics  
Figure 6 shows a schematic view of the electronics of EvoBot and its different printed Circuit boards (PCBs). The core of the electronics is based on electronics used in the open-source 3D printer community. Specifically, we use the Arduino MEGA 2560 R3 with the shield RAMPS v1.4. This provides us with a mature and cheap electronics platform to build on, but more importantly allows us to build on existing software for open-source 3D printers.  
To use the minimum number of components, each module contains a small printed circuit board (PCB) with the electronics to control the actuators and sensors of the module. Currently, the three types of modules have the same PCB, which contains up to two stepper drivers with SPI communications  
Figure 6: Main electronic components. The dotted lines represent the developed PCBs, and the black rectangles represent the connectors of the sockets and the module boards. Two of the stepper drivers on the RAMPS board are used to control the head; the other three are available to control other devices such as peristaltic pumps. To reduce the number of lines between the Arduino and the head boards, there are expander ports with I2C communications to generate the Chip Select and reset lines for all the sockets.  
(L6470). In order to produce different boards for each type of module, we solder one or two stepper drivers on the PCB.  
The connection between the Arduino and the electronics on each module is done through two large PCBs on the head of the robot. These PCBs contain 17 spring connectors, one per socket on the head, that automatically create an electrical connection with the module PCB when a module is inserted into the head of the robot. These connectors provide power and an SPI bus with two chip select (CS) and a reset line. In order to reduce the number of lines between the Arduino and the head boards, there are two expander ports with I2C communications on each head PCB to generate the CS and reset lines for all the sockets. Using this approach, only a power cable and an 8-way ribbon cable with the I2C and SPI buses are necessary to manage the 22 motors of the 11 syringe modules, which can be placed on the head.  
Thus, the Arduino can detect if a socket is populated, the type of module, and it can control the module by sending SPI commands: If two stepper drivers are found, then the module is recognized as a syringe module. If there is only the first stepper driver, then the module is a dispensing module (or any other module built with the same vertical actuator). If only the second driver is there, then the module is a heavy payload module. It is important to note that the robot configures the drivers according to the type of module it finds. For example, the plunger drivers need a different configuration than the heavy payload module as they used different motors and mechanisms. Using the current electronics, it is not possible to recognize more than three types of modules, but we can extend the system by building new module boards with SPI communications.  
Compared to the previous version of EvoBot [14], we have added a standalone controller based on a Raspbeery Pi 3. This embedded computer was chosen due to its powerful Graphical Processing Unit (GPU), and a Camera Serial Interface Type 2 (CSI-2), which can be used to process video in real time (see Performance Characteristics). The standalone controller also allows us to provide all necessary software and thus eliminate the need for users to manage and update the software. Furthermore, the dedicated controller implements a web server that makes it possible to monitor experiments remotely, which is important for long running experiments.