

ChocoBox
Repository of the cocoa fermenter developed for the Biomicrosystems group at Universidad de los Andes. Developed by Juan Sebastián Ortega and Nicolás Correal.
- Size
- 101.6 × 61.5 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 27
- Nets
- 35
- Pads
- 100
- Tracks, vias
- 104, 0
- Pours
- 1
- Routed
- Yes
- KiCad
- KiCad 7 (file 20221018)
- Created
- 3 May 2023
- Updated
- 28 Aug 2023
Overview
ChocoBox is an open-source printed circuit board by tadzio8425, from the tadzio8425/ChocoBox repository on GitHub. It is a 2-layer board of 101.6 × 61.5 mm with 27 parts on 35 nets, routed with 104 tracks and 0 vias.
It is built around the DS18B20B-MS and DS3231S#. Its parts include 22 connectors, 2 resistors, 2 ICs and 1 switch. It belongs with the ESP32 boards of this library.
Main components
2README
README.md
ChocoBox
Environment replicator for cocoa fermentation:
- Electronic system that replicates a real life environment. Includes:
- Continous environmental humidity and temperature measurement
- Real-time control of both humidity and temperature
- Spline generation to emulate environmental changes
- Intuitive set-up and data collection via .txt files
- Backend developed using the Arduino Framework and an ESP32 development board.
- Frontend mobile app developed using the Expo Framework and React-Native.
- Developed in the Universidad de Los Andes for the Biomicrosystems research group.
Developed by:
- Juan Sebastián Ortega (https://github.com/tadzio8425)
- Nicolás Correal (https://github.com/Correaln47)
Quickstart
1. Setting-up the files...
i. Creating the files
The ChocoBox system uses three .txt files inside a MicroSD Card in order to function, these files are environment.txt, spline.txt and datalog.txt. Altough these files have the .txt format, their content is designed to be read as a .csv. For the proper functioning of the system, it is obligatory for the files to be named exactly like this. If it is your first time using ChocoBox, or if you are resetting the system, please delete all previous files from the SD Card and create three empty .txt files.
a. Contents of the MicroSD Card
ii. Setting-up the environment
The environment to be replicated can be easily set in the environment.txt file. In order to to this, simply write the csv headers in the first row. These headers should be hour, temperature, humidity. Then, following the header order, write the desired values for specific hours in each new line. For example, this file replicates an environment for 96 hours, setting new desired values each 24 hours. There is no inverval restriction, neither there is a necessity for an interval, just make sure that the next hour is always greater than the previous one! Please make sure that there are no extra new lines or blank spaces!
b. Example of an environment.txt file
iii. Joining the dots
In order to replicate how these variables behave smoothly in nature, a cubic spline algorithm is used in order to fill the gaps between the dots set in environment.txt. The results of this algorithm are saved by the microcontroller in spline.txt, so this file must not be modified in any way by the user. If the reference values shown by the system are not logical, please check the spline.txt file. A spline.txt with Nan values or other errors indicates that environment.txt was wrongly formated!
c. Example of a correctly generated spline.txt file
iv. Step by step
A fundamental part of the spline algorithm is the step, this value determines the interval for intermediate points to be calculated and also for data capture. For example, a step of 30 minutes will make the system update its reference values and save its environmental data each, well, 30 minutes. The smaller the step, the more data will be captured and the smoother the system will be. Beware of using extremely small steps, as they may lead to a memory overflow in the ESP32! The step can be modified by the user, this will be explained in a further section.
v. Getting the data
All environmental data captured by the sensors is saved in datalog.txt, which is automatically updated by the microcontroller. This file includes the sensed information of each individual humidity and temperature sensor, captured each step. This file follows the order of the following headers: time(min), tempA(degC), tempB(degC), tempC(degC), tempD(degC), humidLeft(%), humidRight(%)
The presence of Nan values in this file may indicate a sensor malfunction!
d. Example of a correctly generated datalog.txt file
2. PCB Connections
Handling the PCB should be avoided at all costs. However, in the case that something has gone wrong or a new interface/sensor needs to be added, the following connection diagram should be strictly followed. All cables are marked with their respective signal.
| PCB Overview |
|---|
| DS18B20 (Temp) | DHT22 (Hum) | MicroSD |
|---|---|---|
| I2C (LCD Screen and Clock) | Humidifier and Heater Relay | 12V and WaterLevel |
|---|---|---|
3. Cable management
ChocoBox uses an electric extension to power itself, the extension input should be conected directly to the power socket. This extesion has 3 available output sockets, of which only 2 are actually used. One of the sockets must me connected to the resistor cable, which handles the power given to the heating resistors. The second socket must be connected to a 12V-2A power supply that powers the electronics. The output of the power supply is a jack connector which goes directly into the PCB box. Remember that you may find the extension sockets on the floor, behind the resistor wooden holder. Please make sure that all major cables are correctly pluged-in before performing any test, also do not handle cables under any circumstance unless the resistors are totally cold.
- To completely TURN-OFF the system, you only need to unplug the extension input from the power socket.
4. Operating the system
Once everything is pluged-in, the system should start to work autonomously. This means that the desired values from environment.txt will be replicated inside the box, following the intermidiate points generated in spline.txt and the actual sensed values will be saved each step in datalog.txt.
i. Monitoring 01: LCD Screen
The most straigth-forward method to monitor the system is by looking at its 20x4 LCD Screen. This screen depicts the following data, line by line:
- Humidity: Displays the current humidity average inside the box in (%).
- Temperature: Displays the current temperature average inside the box in (°C).
- Ref: Displays the reference values that the system should be trying to achieve in that specific moment.
- Time: Displays how much time has the system been on a specific fermentation cycle. This timer DOES NOT reset when the system is disconnected, as it is programmed to retake fermentation despite a possible temporal failure. However, it can be reset manually.
| LCD Screen |
|---|
ii. Connecting to the ESP32 via WiFi
The ESP32 is set in AP mode, which means that it acts as an Access Point (A.K.A. its own WiFi network). In order to connect, simply search for the network called ChocoBox and establish a connection using the secret password. It is important that this password is only given to authorized staff, otherwise, a fermentation cycle could be jeopardized.
- Once connected to the ChocoBox network, the ESP32 can be accessed using its IP Address which will always be:
- 192.168.1.1
| The ChocoBox Network |
|---|
iii. Monitoring 02: Rest API
| Root: / |
|---|
Accessing the root of the rest API via any browser (192.168.1.1/) displays the current state of its variables. Thus, ChocoBox can be monitored in real time without the need of an external app.
| Request | Path | Description |
|---|---|---|
| GET | /datalog | Downloads the dataLog up to the latest measurement. |
| POST | /environment | Uploads an environment.txt to the system. When the system is reset, the uploaded file will set a new curve to follow. The included python script displays its POST format. |
| POST | /step | Updates the step of the spline algorithm. Its content must be a number that represents a certain number of hours (at least 0.05). |
iv. Monitoring 03: App
An app was developed using the Expo Framework in order to unify all the API Requests in an intuitive and user friendly interface.
| Init Page | Main Page | Data Module |
|---|---|---|
Parts
27| Qty | Value | Footprint | References |
|---|---|---|---|
| 5 | Conn_01x01 | Connector_PinSocket_2.54mm:PinSocket_1x01_P2.54mm_Vertical | J11, J15, J16, J17, J18 |
| 2 | I2C | Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_Vertical | J12, J13 |
| 1 | 10K | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R1 |
| 1 | 4.7K | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R3 |
| 1 | BTN1 | Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_Vertical | SW1 |
| 1 | Calentador | Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_Vertical | J9 |
| 1 | DCDC_StepDown_LM2596 | Custom:YAAJ_DCDC_StepDown_LM2596 | U2 |
| 1 | DS18B20-A | Connector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_Vertical | J19 |
| 1 | DS18B20-B | Connector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_Vertical | J20 |
| 1 | DS18B20-C | Connector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_Vertical | J21 |
| 1 | DS18B20-D | Connector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_Vertical | J22 |
| 1 | DS3231 | Connector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_Vertical | J3 |
| 1 | DTH22_01 | Connector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_Vertical | J1 |
| 1 | ESP32-DEVKIT-V1 | Custom:MODULE_ESP32_DEVKIT_V1 | U1 |
| 1 | Humidificador | Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_Vertical | J6 |
| 1 | LCD2004A | Connector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_Vertical | J4 |
| 1 | R | Connector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_Vertical | J2 |
| 1 | Vin | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_Horizontal | J8 |
| 1 | Vout-12V | Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_Vertical | J10 |
| 1 | Vout-5V-Humidificador | Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_Vertical | J14 |
| 1 | WaterLevel | Connector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_Vertical | J7 |
| 1 | microSD | Connector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_Vertical | J5 |
Similar boards
- 4 layers68.6 × 53.3 mm

- 2 layers398.2 × 398.2 mm

LargeWordClock LargeKickstarter
PCBench/PCBench
resolution = [0.5, 0.5] pcbfolder = '../PCBs/' pcbnames = ["1Bitsy1bitsy"] iters = 30 env = PCBRoutingEnv(resolution=resolution, pcbfolder=pcbfolder, pcbnames=pcbnames) obs, info = env.reset() for in range(iters): act =…
1,591 parts21MIT - 2 layers147.3 × 95.3 mm

Nixie proj conflict-20171112-163801
dm2lct/tlnixie
PCB files for the Turmlabor nixie clock 2.0
117 parts11GPL-3.0 - 2 layers167 × 52 mm

In-2-nixie
mistic100/Nixie-Clock-IN2
Check out my other projects: - Nixie Clock IN14 - Nixie Clock IN12 - IV-27 VFD Clock
34 parts10 - 2 layers200 × 66 mm

- 2 layers100 × 100 mm

MK2090 PERI order
ptravnik/Retro_CALC
A powerful RPN calculator, programmable in BASIC
50 parts8GPL-3.0 - 2 layers83.5 × 45 mm

Arducon
OpenARDF/Arducon
A transmitter controller for Amateur Radio Direction Finding (ARDF). Based on the Arduino Pro Mini.
114 parts7MIT - 2 layers32.5 × 24 mm

Questions
How big is the ChocoBox PCB?
It measures 101.6 × 61.5 mm and has 2 copper layers, 1.6 mm thick.
What parts does the ChocoBox use?
27 parts, built around the DS18B20B-MS and DS3231S#. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the ChocoBox KiCad files?
From the tadzio8425/ChocoBox repository on GitHub, at the commit this page was made from: the board is PCB/ChocoBox/ChocoBox.kicad_pcb and its schematic PCB/ChocoBox/ChocoBox.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the ChocoBox design in my own project?
Its repository states no licence, so its author keeps all rights: ask tadzio8425 before reusing the design.