Introduction: Arduino System for Biomonstaaar Bioreactor

This project is the setup for the Arduino Sensor/motor hub for the Biomonstaaar bioreactor. The finished product is used to interface with the sensors and other parts of the reactor in order to allow data collection or automated reactor control.

Step 1: Materials

You'll need an Arduno Mega 2560, as well as the its power supply and a USB cable to interface with it. The sensor kits and peristaltic pumps are used to read from and control the rest of the reactor.

Step 2: Initial Setup

This picture is when I was developing the code. Final wiring board pictuure and diagram can be found in Biomonstaaar project documentation. In any case the wiring should be about the same (pinout specified in the next step)

First you will want to connect the Arduino to your PC using the USB peripheral cable without all the wiring. Windows may take some time to install the USB-to-serial port driver. Launch the Windows 7 device manager, expand the "Ports (COM & LPT)" node to confirm the comm port is installed properly (it may be different per install result, not always COM5 as shown here)

Step 3: Software Setup

Arduino IDE 1.0.5:

Launch the IDE after download and installation. Open the "Tools" menu, and select "Arduino Mega 2560". Open "Serial port" menu, and select the available COM port. If you are new to Arduino, you might want to try some example code from the "File-Examples" menu.

Step 4: Wiring

Now wire up the sensors based on the table. The Rx and Tx pins should go to the specified digital I/O pin on the Arduino.

Water level Analog pin A15 with 560 ohm resister, see eTape data sheet for details

Step 5: Running the Code

Download "Sensor_hub.ino" on

Open it with the IDE and hit Ctrl+u, the code shall be compiled and then loaded to the Arduino Mega. Hit Ctrl+shift+m to open the Serial Monitor.

Sensors and motors are interfaced with the following acronyms:

PH, ph pH sensor
OR, or ORP sensor
EC, ec Conductivity sensor
DO, do Dissolved Oxygen Sensor
CL, cl Color sensor
ET, et Water level sensor
MC, mc Motor control

To interface with a sensor or motor, type its acronym and the command you want to send it. Commands for sensors can be found at the Atlas scientific website (go to and look for the datasheets). Commands for motors follow the form mc. The commands are h, m, l, and x, which tell the motor to run at high speed , medium speed, low speed, and stop respectively.

By default, some sensor circuits will continuously read and print values. If you see, for example, "PH, 7.00" continously printing, type "phe" to end the continuous print mode.

Here are some example commands and the results:

clr read color

etr read water level

phx reset ph circuit to factory setting

phL1 enable ph circuit debug LED

mc1h turn on motor 1 to high speed (h=high, m=middle, l=low)

mc4x turn off motor 4

Step 6: ​Driving the Sensor-Hub in Python (optional)

If you got this far, you may wonder if the terminal commands can be automated based on sensor readings. Yes, take a look at The "" file will allow a computer or other device connected to the Arduino to interface with it using CSV files, allowing the writing of control loops.