The goal of this project is to replace the default firmware of the JHE42B and JHE42B_S buzzers, which use the STM8S003F3 chip, with a custom firmware that introduces common features found in other autonomous buzzers, especially the ability to disarm the buzzer without using the onboard button.
(checked if implemented)
- BEEPS every 30s after power loss (default)
- Turn ON/OFF onboard red LED depending on arming status (ON when armed)
- Disarm system when button is pressed
- Disarm if power supply is removed after
10-12s
if armed (usefull when button is not accesible) - Power saving by changing BEEPS frequency
10s
/30s
/60s
(default30s
) - BEEPS on signal pin request
- LIGHT flashs for every beeps (built-in)
Model | BEEPS on power loss | Arming Red LED | Button disarm | Power source trick disarm | Power saving | LED Flash | BEEPS on signal |
---|---|---|---|---|---|---|---|
JHE42B | ✔️ | ✔️ | ✔️ | ✔️ | ❌ | ✔️ | |
JHE42B_S | ❔ | ❔ | ❔ | ❔ | ❔ | ❔ |
❌ ko / ✔️ ok / ❔ todo or more testing required
Arming
the Buzzer:- Apply power to the buzzer to arm it. You will hear a 3-note arming sequence and see the red LED turn ON.
Alarm
:- The buzzer will beep every 30 seconds after power is lost.
Disarming
the Buzzer:- Long press the onboard button 3 times (you hear1-note when press is registered), or
- Apply power for
10 seconds
and then remove it. - You will hear a 3-note disarming tune, and the red LED will turn OFF.
Rearming
:- After disarming, the buzzer needs to be power cycled to be rearmed.
- vscode or any IDE supporting PlatformIO
- ST-link v2 (so you can write firmware onto the STM8 flash memory) how to connect it?
- Follow instruction of platfomio-ststl8
- clone the repo and open the project in vscode/pio
- PlatformIO should download and install all the toolchain/dependencies
- build
- upload/flash
Otherwise add board definition stm8s003f3.json in :
C:\Users<user>.platformio\platforms\ststm8\boards
Every chip has to be unlocked once. (from experience)
cd .platformio\packages\tool-stm8tools
stm8flash -c stlinkv2 -u -p stm8s003?3
Connect the wires to the linker as shown below.
Alternatively, if you don't want to solder on the board, you can use a setup like this:
+Model | Controller | Chip Mark | Pictures |
---|---|---|---|
JHE42B | STM8S003F3 TSSOP20 | STM8S003F3P6 | |
JHE42B_S | STM8S003F3 UFQFPN20 | S033PHVG822Y |
(checked if working)
- power supply detection
- blink onboard red LED
- blink onboard white LED
- bip on buzzer
- button press