====== Mole Beacon ====== {{ :project:maerklin:warnemuende:lighthouse:mole_beacon_light.png?200|}} ===== Introduction ===== For our Warnemünde section, which includes a water area, we also need a lighthouse so that our ships can travel safely. Since Warnemünde has two [[https://de.wikipedia.org/wiki/Molenfeuer_Warnem%C3%BCnde|Mole Beacons]] (one green and one red), I decided to recreate the green beacon light. I did some research and found some good reference images for this project. ===== Source Code ===== Everything can be found in the [[https://git.mars3142.dev/model-railway/warnemuende-lighthouses|git repository]]. This device will have three services: **0x180A** (device information services), **0xA000** (light service) and **0xA999** (settings service). Within the services will be specific characteristics, but I don't will describe it here in detail. If you need more information about the BLE communication visit the [[..:..:system_control:ble:start|]] page. ===== Design ===== {{:project:maerklin:warnemuende:lighthouse:mole_beacon_light_cut_through.png?200 |}} First, I replicated the building in [[software:onshape:start|]]. This was not as easy as I initially thought, but in the end, I was successful. The more interesting part was the electronics. I used an [[hardware:esp32:h2:start|]] as the controller and decided to connect it to the [[..:..:system_control:start|]] with my [[..:..:system_control:ble:start|]] system. Then, I tested if I could replicate the beacon signal (2 seconds on and 2 seconds off). It was the first time I had used hardware timers and interrupts for the LEDs. The beacon's LED will illuminate transparent PLA, making the light visible. A more challenging part will be the outdoor lights, as the building has two of them. I will try to use 0402 3V LEDs and hope that I can print a miniature enclosure to mimic the real lamps. ===== KiCad ===== The custom PCBs are created within [[software:kicad:start|]]. This is the LED board, with is located a the top within the building. Is has connections to the WS2812B RGB LED and the two outdoor 0402 LEDs, which are within separate housings. {{:project:maerklin:warnemuende:lighthouse:light_board_front.png?300|}} {{:project:maerklin:warnemuende:lighthouse:light_board_back.png?300|}} {{:project:maerklin:warnemuende:lighthouse:light_board_schematics.png?600|}} But the LED board can't work without any controller. Here it is. {{:project:maerklin:warnemuende:lighthouse:mcu_board_front.png?300|}} {{:project:maerklin:warnemuende:lighthouse:mcu_board_back.png?300|}} {{:project:maerklin:warnemuende:lighthouse:mcu_board_schematics_01.png?600|}} {{:project:maerklin:warnemuende:lighthouse:mcu_board_schematics_02.png?600|}}