Microcontroller#

Overview#

We currently use ESP32-microcontrollers for this project. These provide the necessary hardware (timers and two cores) and enough speed for most use-cases. We tested with ESP32-WROOM32 and ESP32 Firebeetle modules.

Firmware installation#

For installing the firmware on the ESP32 it is advised to use Visual Studio Code and the PlatformIO extension. This makes changing and uploading the firmware easier. The PlatformIO can be installed through the extension tab in VS code. In addition, the USB-driver for the ESP (CH210x) is needed.

Uploading of the firmware is done by switching in VS code to the firmware folder of the repository, then opening the PlatformIO tab and hitting upload. There are a few (more or less optional) settings to be made in the firmware. The options can be found in config.h in the src folder.

Firmware option descriptions.#

#define DEBUG true/false

Tells the controller to write debug messages to serial. Default false.

#define SERIAL_RATE 921600

Define the baud-rate, i.e. the communication speed between controller and interfacing software. Default 921600.

#define DEFAULT_RATE 10

Default rate for the command rate (number of commands per second). Can be changed via serial. Default 10

#define DEFAULT_SPMM 30

Default steps per mm of the table. Can be changed via Serial. Default 10

#define MOVEMENT_SPEED 50

Default movement speed of the table for positioning and centering. Default 50

#define CONFIG_HAS_BUTTONS true

Whether or not buttons are attached to the table. See hardware interface.

#define CONFIG_HAS_LIMITS true

Whether or not limit switches are attached to the table. See hardware interface.

#define CONFIG_USE_EEPROM false

Whether or not to use inbuilt EEPROM to save position data. CURRENTLY SOMEWHAT UNTESTED! Only supported on some ESP32 models.

#define PIN_XXX

Define digital PIN for the indicated functions (list can be found below).