Browse Source

document project

King Kévin 4 years ago
  1. 63


@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
This firmware template is designed for development boards based around [STM32 F1 series micro-controller](
This firmware is for the spark strober, using an [STM32 F1 series micro-controller](
@ -6,40 +6,63 @@ project @@ -6,40 +6,63 @@ project
*describe project purpose*
The spark strober switches mains electricity.
This allows to switch on a flood light or stroboscope for a short time to create a light pulse.
*described electronic details*
- [blue pill](i, based on a STM32F103C8T6: development board to control everything
- HLK-PM01 power module: 100-240V AC to 5V DC power supply to power the board and other peripherals (protected with a 0.25A glass fuse)
- VS1838b: 38 kHz infrared demodulator to receive the codes from a remote control (connected using a 3.5 mm TRS jack)
- G3MB-202P: compact 240V AC 2A solid state relay to switch mains electricity (protected with a 2A fuse)
- infrared remote control sending NEC codes (salvages from a multimedia player)
The current implementation uses a [core board](
The underlying template also supports following board:
Hi-Link HLK-PM01:
- [Maple Mini](, based on a STM32F103CBT6
- [System Board](, based on a STM32F103C8T6
- [blue pill](i, based on a STM32F103C8T6
- [core board](, based on a STM32F103C8T6
- AC: 100-240V AC mains
- +Vo: 5V
- -Vo: ground
**Which board is used is defined in the Makefile**.
This is required to map the user LED and button provided on the board
Omron G3MB-202P:
- 1: 100-240V AC mains line input
- 2: 100-240V AC mains line output
- 3: 5V with 330 Ohm resistor
- 4: blue pill, PB6
- 1, OUT: 3.5 mm TRS jack plug, ring
- 2, GND: ground
- 3, VCC: 5V (with 100 nF decoupling capacitor)
Connect the peripherals the following way (STM32F10X signal; STM32F10X pin; peripheral pin; peripheral signal; comment):
3.5 mm TRS jack socket:
- *list board to preipheral pin connections*
- tip: 5V
- ring: blue pill, PB8, TIM4_CH3
- sleeve: ground
All pins are configured using `define`s in the corresponding source code.
blue pill:
- PB8, TIM4_CH3: IR demodulator OUT
- PB6: SSR control
- 5V: 5V
- GND: ground
Have a look at the `application.c` *ir_action* to changes the AC on/off switch animations and corresponding remote control code.
@ -86,7 +109,3 @@ USB @@ -86,7 +109,3 @@ USB
The firmware offers serial communication over USART1 and USB (using the CDC ACM device class).
You can also reset the board by setting the serial width to 5 bits over USB.
To reset the board run `rake reset`.
This only works if provided USB CDC ACM is running correctly and the micro-controller isn't stuck.