User Tools

Site Tools


project:maerklin:system_control:start

This is an old revision of the document!


System Control

The System Control device, the main component, utilizes an ESP32 S3 Mini and a LCD display (128×64). The main purpose was to control the LEDs for the day/night cycle.

Introduction

The main microcontroller is an ESP32 S3 Mini. Its form factor is ideal for a small enclosure, and its processing power is sufficient for all tasks the control center requires. To enable user input, I created a custom PCB that holds the ESP32. This board features six tactile buttons, which are configured as a D-Pad (four directions), a select button, and a back button. The LCD displays a custom user interface via a dedicated library built on top of u8g2.

Extensibility

This system is built to be highly extensible. For this purpose, I designed a wireless system for indoor use based on Bluetooth LE. This decision was primarily driven by two factors: firstly, my desire to gain experience with BLE in a new project, and secondly (and more importantly), the aim to ensure independence from any specific MCU. Currently, I'm using an ESP32, which supports both Wi-Fi and BLE. However, I also plan to test other microcontrollers, such as those from the STM32 family (for instance, the STM32WB-Series, which offers strong BLE capabilities), to maintain this flexibility.

Technical Details

In order to fully utilize the capabilities of the Bluetooth Low Energy standard, I have moved away from my original approach, which involved a custom configuration format transmitted via JSON. I will now adhere to the official BLE protocol, structuring the data using its defined services, characteristics, and descriptors and using minimal custom data.

The main MCU is a ESP32-S3, in particular a Lolin S3 Mini. It is capable of WiFi and BLE and has a small footprint. I'm planning to create a new revision with a ESP32-C6 in the future, so I could use Zigbee, if needed. At first I thought, I need the full power of the ESP32-S3, but now I'm not sure, that I even need a dual core.

The complete definition of the BLE protocol adapted to my system can be found in the Bluetooth Low Energy section.

Clients

The current list of the clients, which can be connected to the system:

Repository

You can find the source code and other in the git repository.

Software

TBD

Hardware

The hardware part was created within KiCad and it will be also in the git repository.

The schematics is very simple.

These are the latest PCBs, which I created in KiCad. The manufacturing is done by PCBWay, but it's an empty PCB, so I need to add the components to it later.

Mechanical

After creating the PCB, I needing a housing. So I started OnShape and imported the STEP file from KiCad. Some hours later and I got something useful.

But this was not the final result. I did some iterations and ended up with a really good housing. You can see the transparent render from OnShape, which are excellent.

I will not release the project files (because it's for my personal project), but maybe I recreate it someday in the future within FreeCAD and then I release it in the repository.

project/maerklin/system_control/start.1757882375.txt.gz · Last modified: by Peter Siegmund