User Tools

Site Tools


project:maerklin:system_control:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
project:maerklin:system_control:start [2025/05/29 15:03] mars3142project:maerklin:system_control:start [2025/09/23 17:05] (current) – [Hardware] mars3142
Line 1: Line 1:
 ====== System Control ====== ====== System Control ======
  
-There is a main component, which is the system control device. It's powered by an ESP32 S3 Mini (LOLIN) and a LCD display (128x64). The main purpose was to control the LEDs for the day/night cycle.+{{youtube>KcwmSME05C0? }} 
 + 
 +The System Control device, the main component, utilizes an [[https://www.wemos.cc/en/latest/s3/s3_mini.html|ESP32 S3 Mini]] and a LCD display (128x64). The main purpose was to control the LEDs for the day/night cycle.
  
 ===== Introduction ===== ===== Introduction =====
  
-The main component is currently a ESP32 S3 Mini. It'form factor is ideal for a small box and the power is enough for every task, we need in the control center. Because we needed some user input, I created a custom PCB, which holds the ESP32. On the board are 6 tacticle buttons. They are used for a D-Pad and select, back buttons. The LCD does show a custom UI library on top of [[https://github.com/olikraus/u8g2|u8g2]].+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 requiresTo 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),select buttonand a back button. The LCD displays a custom user interface via a dedicated library built on top of [[https://github.com/olikraus/u8g2|u8g2]].
  
 ===== Extensibility ===== ===== Extensibility =====
  
-This system is build to be very extendableSo I designed a wireless system for indoor usage based on Bluetooth LE. This decision was mainly of two reasons. FirstI wanted to use BLE within a new project and  the second, the most important one, was to be independent of the MCU. Currently I use ESP32, which can handle WiFi and BLE, but I also want to test STM32 (which only include BLE - e.g. the [[https://www.st.com/en/microcontrollers-microprocessors/stm32wb-series.html|STM32WB-Series]]).+This system is built to be highly extensibleFor this purpose, I designed a wireless system for indoor use based on Bluetooth LE. This decision was primarily driven by two factors: firstlymy desire to gain experience with BLE in a new projectand secondly (and more importantly), the aim to ensure independence from any specific MCU. 
 +CurrentlyI'm using an [[hardware:esp32:start|ESP32]], which supports both Wi-Fi and BLE. However, I also plan to test other microcontrollers, such as those from the [[hardware:stm32:start|STM32]] family (for instance, the [[https://www.st.com/en/microcontrollers-microprocessors/stm32wb-series.html|STM32WB-Series]], which offers strong BLE capabilities), to maintain this flexibility.
  
 ===== Technical Details ===== ===== Technical Details =====
  
-Every client advertised specific serviceThe System Control scans all BLE devices and filters for this UUIDWithin this service is a capabilities characteristicwhich send the capabilities after the System Control activate notify on thisThis way the System Control can build the UI accordingly to the transmitted data.+In order to fully utilize the capabilities of the [[https://en.wikipedia.org/wiki/Bluetooth_Low_Energy|Bluetooth Low Energy]] standard, I have moved away from my original approach, which involved custom configuration format transmitted via [[https://en.wikipedia.org/wiki/JSON|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 [[hardware:esp32:s3:start|]]in particular a [[https://www.wemos.cc/en/latest/s3/s3_mini.html|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 [[hardware:esp32:c6:start|]] 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 [[.:ble:start|]] section. 
 + 
 +===== Clients ===== 
 + 
 +The current list of the clients, which can be connected to the system: 
 + 
 +  * [[..:warnemuende:lighthouse:start|]] 
 +  * [[..:warnemuende:miniature_town:start|]]  
 + 
 +===== Repository ===== 
 + 
 +You can find the source code and other in the [[https://git.mars3142.dev/model-railway/system-control|git repository]]. 
 + 
 +==== Software ==== 
 + 
 +TBD 
 + 
 +==== Hardware ==== 
 + 
 +The hardware part was created within [[software:kicad:start|]] and it will be also in the git repository. 
 + 
 +The schematics is very simple. 
 +{{ :project:maerklin:system_control:maerklin_system_control.svg?600 |}} 
 + 
 +These are the latest PCBs, which I created. The manufacturing is done by the sponsor [[https://pcbway.com|PCBWay]], but it's an empty PCB, so I need to add the components to it later. 
 + 
 +{{:project:maerklin:system_control:pcb_front.png?330 |}} 
 +{{ :project:maerklin:system_control:pcb_back.png?330|}} 
 + 
 +==== Mechanical ==== 
 + 
 +{{:project:maerklin:system_control:3d_drawing.png?400 |}}
  
-More indepth information will be followingafter finished the MVP.+After creating the PCB, I needing a housing. So I started [[software:onshape:start|]] and imported the STEP file from [[software:kicad:start|]]. Some hours later and I got something useful
  
-===== Source Code =====+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 [[software:onshape:start|]], which are excellent. 
  
-[[https://github.com/mars3142/system_control|Github]] Action: {{https://github.com/mars3142/system_control/actions/workflows/esp32_build.yml/badge.svg?nocache&.png}}+I will not release the project files (because it's for my personal project), but maybe I recreate it someday in the future within [[software:freecad:start|]] and then I release it in the repository.
  
-===== Clients ==?==+{{:project:maerklin:system_control:housing_front_transparent.png?320|}} {{:project:maerklin:system_control:housing_back_transparent.png?320|}}
  
-The list of the clients, which can be connected to the system is: 
  
-- [[..:warnemuende:miniature_town:start|]]  
project/maerklin/system_control/start.1748530999.txt.gz · Last modified: by mars3142