# CrowBot: An Educational Robotic System for Growing Food
## 4 Hardware and Software Architecture
Due to the widespread use and familiarity of the micro:bit among school children, it was chosen as one of the programming interface options for the GrowBot. Indeed, in Denmark, all 4 th grade  
Figure 3: **Left**: Top view of the GrowBot, and **Right**: side view of the GrowBot upper layer with the electronics. school classes (children aged around 10 years of age) were given micro:bits over the last year, and have become familiar with its graphical programming interface and functionality. \begin{table}
\begin{tabular}{l l} \hline \hline
**Description** & **Specification** \\ \hline Processor & Raspberry Pi 4 Model B 2 GB \\ \hline I/O interface processor & 16 Mhz Arduino NANO V3.0 Atmega328 UNO IO Shield \\ \hline Wireless communication & Raspberry Pi 4G/LTE with base HAT and antenna on the Quectel EC25 Mini PCIe 4G/LTE Module \\ \hline Display & 5\({}^{\prime\prime}\) Raspberry Pi LCD touchscreen with 800 \(\times\) 480 resolution and 108 \(\times\) 64.8 mm display area (SKU DFR0550) \\ \hline Power & 12 V Power supply and a 3.3 V linear regulator (ADP3338) \\ \hline PWM controller & PCA9685 PW PWM Controller \\ \hline Air circulation fans & 405 FH DC Axial fans 9 m\({}^{3}\)/h \\ \hline LED drivers & LDH45 LED driver \\ \hline Full spectrum light & LM301B white LEDs \\ \hline IR light & XLamp XP-E2 IR 730 nm \\ \hline UV light & XLamp XP-E UV 458 nm \\ \hline Heater & Ceramic (PTC) air heating element \\ \hline PWM Controller & PCA9685 PW, PWM Controller \\ \hline Pumps & DC 12 V Air Diaphrag Pump 1.5–2 L/Min \\ \hline Aeration & Oxygen disk \\ \hline Humidity and temperature sensor & DHT 22 relative humidity and temperature sensor \\ \hline CO\({}_{2}\) sensor & MHZ16 infrared CO\({}_{2}\) sensor \\ \hline Water level sensor & DFROBOT SEN0193 capacity soil moisture sensor \\ \hline Camera & Raspberry Pi 4 camera 150 degree wide angle 5 megapixels (OV5647 sensor) \\ \hline micro:bit & BBC micro:bit board \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Main components. \begin{table}
\begin{tabular}{l l l} \hline \hline
**Sensor** & **Value** & **Meaning** \\ \hline Humidity & 0.0–100.0 & Relative humidity (in percentage) inside the \\  & & GrowBot chamber \\ \hline CO\({}_{2}\) & 0–5000 & CO\({}_{2}\) level in ppm inside the GrowBot chamber \\ \hline Temperature & \(-\)40.0–80.0 & The temperature in C inside the GrowBot chamber \\ \hline Water level & 0.0–100.0 & Percentage of how much the water tray is filled \\ \hline IsMicroBit & 0–1 & Is the micro:bit connected (1) or not (0) \\ \hline MicroBit Button A & 0–1 & Is button A on the micro:bit pressed (1) or not (0) \\ \hline MicroBit Button B & 0–1 & Is button B on the micro:bit pressed (1) or not (0) \\ \hline Clock & 00:00–23:59 & Timestamp in the format hh:mm \\ \hline Camera & & Colour photo from above every 8 h (Set by default to 8 h intervals. It can be programmed to other time intervals) \\ \hline \end{tabular}
\end{table} 
Table 2: GrowBot sensors. Figure 5 presents the overview of the GrowBot architecture, and how it allows for a seamless interchangeability of different programming and interaction modalities. In the GrowBot, sensors and actuators are connected to the Arduino, which also holds a slot connector (for a microbit). There is a 2-way serial port to the Raspberry Pi, to which a touch display and a 4G LTE module is connected. The dotted lines indicate external interaction with the GrowBot provided (1) by inserting a microbit, (2) by webserver communication, or (3) by touch on the local display, see Figure 5.  
If there is no external interaction, the GrowBot will run with the Raspberry Pi containing a default low level control software, which controls the Arduino access to sensors and actuators of the GrowBot. The architecture ensures that data can always flow on the solid lines and optionally on the dotted lines. As an example, sensor data can always flow to the display, whereas it optionally flows to the webserver and microbit, dependent on whether these are connected or not.