Skip to content

nerocide/jhe42b_buzzer_firmware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JHE42B and JHE42B_S open firmware

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.

Features

(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 (default 30s)
  • BEEPS on signal pin request
  • LIGHT flashs for every beeps (built-in)

Board testing matrix

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

User manual

  1. 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.
  2. Alarm:
    • The buzzer will beep every 30 seconds after power is lost.
  3. 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.
  4. Rearming:
    • After disarming, the buzzer needs to be power cycled to be rearmed.

How to Build/Flash

Requirements

PlatformIO setup

  • 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

Unlock chip

Every chip has to be unlocked once. (from experience)

cd .platformio\packages\tool-stm8tools
stm8flash -c stlinkv2 -u -p stm8s003?3

STMLinker connection

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:

+

Compatible Boards

Model Controller Chip Mark Pictures
JHE42B STM8S003F3 TSSOP20 STM8S003F3P6
JHE42B_S STM8S003F3 UFQFPN20 S033PHVG822Y

Commercial shot

Reverse Engineering Process

(checked if working)

  • power supply detection
  • blink onboard red LED
  • blink onboard white LED
  • bip on buzzer
  • button press

Resources

ST STM8S003F3 DataSheet ST STM8 debug

About

firmware for autonomous buzzer JHE42B

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages