Skip to the content
2 layers101.6 × 61.5 mmChocoBox, the printed circuit board in 3D

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

2

README

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 Relay12V 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:

  1. Humidity: Displays the current humidity average inside the box in (%).
  2. Temperature: Displays the current temperature average inside the box in (°C).
  3. Ref: Displays the reference values that the system should be trying to achieve in that specific moment.
  4. 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.

RequestPathDescription
GET/datalogDownloads the dataLog up to the latest measurement.
POST/environmentUploads 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/stepUpdates 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 PageMain PageData Module

Parts

27
QtyValueFootprintReferences
5Conn_01x01Connector_PinSocket_2.54mm:PinSocket_1x01_P2.54mm_VerticalJ11, J15, J16, J17, J18
2I2CConnector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalJ12, J13
110KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1
14.7KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR3
1BTN1Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalSW1
1CalentadorConnector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalJ9
1DCDC_StepDown_LM2596Custom:YAAJ_DCDC_StepDown_LM2596U2
1DS18B20-AConnector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalJ19
1DS18B20-BConnector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalJ20
1DS18B20-CConnector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalJ21
1DS18B20-DConnector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalJ22
1DS3231Connector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_VerticalJ3
1DTH22_01Connector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalJ1
1ESP32-DEVKIT-V1Custom:MODULE_ESP32_DEVKIT_V1U1
1HumidificadorConnector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalJ6
1LCD2004AConnector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_VerticalJ4
1RConnector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalJ2
1VinTerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_HorizontalJ8
1Vout-12VConnector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalJ10
1Vout-5V-HumidificadorConnector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalJ14
1WaterLevelConnector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalJ7
1microSDConnector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_VerticalJ5

Similar boards

  • 4 layers68.6 × 53.3 mmTapMatrix, the printed circuit board in 3D

    TapMatrix

    cbonsig/openclock

    Open Clock: an open source hardware touchscreen digital clock

    65 parts27
  • 2 layers398.2 × 398.2 mmLargeWordClock LargeKickstarter, the printed circuit board in 3D

    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 layers167 × 52 mmIn-2-nixie, the printed circuit board in 3D

    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 mmNixie control board, the printed circuit board in 3D

    Nixie control board

    shengwen-tw/nixie-clock

    IN-14 Russian nixie tube clock

    79 parts9MIT
  • 2 layers100 × 100 mmMK2090 PERI order, the printed circuit board in 3D

    MK2090 PERI order

    ptravnik/Retro_CALC

    A powerful RPN calculator, programmable in BASIC

    50 parts8GPL-3.0
  • 2 layers83.5 × 45 mmArducon, the printed circuit board in 3D

    Arducon

    OpenARDF/Arducon

    A transmitter controller for Amateur Radio Direction Finding (ARDF). Based on the Arduino Pro Mini.

    114 parts7MIT
  • 2 layers32.5 × 24 mmRpi rtc, the printed circuit board in 3D

    Rpi rtc

    skiselev/rpi_rtc_ds3231

    Maxim DS3231 Based RTC Module for Raspberry Pi

    7 parts7GPL-3.0

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.