SENSBLUE ATLAS/Datasheet: Difference between revisions
Appearance
No edit summary |
|||
| Line 2,057: | Line 2,057: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== 35. Included Software Stack === | === 35. Buzzer Actor === | ||
==== 35.1 Overview ==== | |||
The '''Buzzer Actor''' is responsible for controlling the onboard buzzer through MQTT commands. It receives runtime commands on an MQTT input topic, validates the requested buzzer operation, drives the buzzerthrough GPIO using '''libgpiod''', and publishes status/final responses on an MQTT output topic. | |||
The actor currently controls '''GPIO line 25''' on '''/dev/gpiochip0''', with '''ACTIVE_LOW = False'''. It creates a | |||
'''GpiodBuzzerDriver''' instance and routes incoming MQTT actions to runtime handlers. | |||
The supported runtime actions are: | |||
{| class="wikitable" | |||
|'''Action''' | |||
|'''Description''' | |||
|- | |||
|BEEP | |||
|Plays a finite beep sequence, an infinite beep sequence, or a continuous tone | |||
|- | |||
|STOP | |||
|Stops the currently active buzzer playback | |||
|} | |||
==== 35.2 MQTT Topics ==== | |||
{| class="wikitable" | |||
|'''Topic''' | |||
|'''Direction''' | |||
|'''Description''' | |||
|- | |||
|buzzer/runtime/in | |||
|Input | |||
|Receives buzzer commands | |||
|- | |||
|buzzer/runtime/out | |||
|Output | |||
|Publishes status messages and final command responses | |||
|} | |||
The actor subscribes to '''buzzer/runtime/in''' and publishes all status/final replies to '''buzzer/runtime/out'''. | |||
==== 35.3 Hardware and Datasheet Notes ==== | |||
The buzzer used is the '''MLT-8530 electro-magnetic SMD buzzer.''' | |||
According to the datasheet: | |||
{| class="wikitable" | |||
|'''Parameter''' | |||
|'''Value''' | |||
|- | |||
|Rated voltage | |||
|3.6 Vo-p | |||
|- | |||
|Operating voltage | |||
|2.5 ~ 4.5 Vo-p | |||
|- | |||
|Rated current | |||
|Max. 95 mA | |||
|- | |||
|Rated test frequency | |||
|2700 Hz | |||
|- | |||
|Duty cycle | |||
|50% square wave | |||
|- | |||
|Sound output | |||
|Min. 80 dB at 10 cm | |||
|- | |||
|Coil resistance | |||
|16 ± 3 Ω | |||
|- | |||
|Resonant frequency | |||
|2700 Hz | |||
|} | |||
==== 35.4 Supported Actions ==== | |||
===== 35.4.1 BEEP ===== | |||
The BEEP action supports two modes: | |||
{| class="wikitable" | |||
|'''Mode''' | |||
|'''Description''' | |||
|- | |||
|sequence | |||
|Plays one or more beeps with gaps between them | |||
|- | |||
|continuous | |||
|Plays one continuous tone until '''STOP''' is received | |||
|} | |||
If no mode is provided, the default mode is: '''sequence''' | |||
All messages should be sent to the topic '''buzzer/runtime/in''' | |||
====== '''35.4.1.1 Default Datasheet-Aligned Beep''' ====== | |||
<syntaxhighlight lang="json"> | |||
{ | |||
"id": <TIMESTAMP>, | |||
"origin": "APP", | |||
"task": { | |||
"action": "BEEP" | |||
} | |||
} | |||
</syntaxhighlight> | |||
====== 35.4.1.2 N Beeps ====== | |||
Play '''<BEEPS_QUANTITY>''' beeps at '''<FREQUENCY>''' Hz. Each beep lasts '''<BEEP_DURATION>''' seconds, with | |||
'''<GAP_BETWEEN_BEEPS>''' seconds of silence between beeps.<syntaxhighlight lang="json">{ | |||
"id": <TIMESTAMP>, | |||
"origin": "APP", | |||
"task": { | |||
"action": "BEEP", | |||
"params": { | |||
"frequency_hz": <FREQUENCY>, | |||
"duration_s": <BEEP_DURATION>, | |||
"count": <BEEPS_QUANTITY>, | |||
"gap_s": <GAP_BETWEEN_BEEPS> | |||
} | |||
} | |||
}</syntaxhighlight>If you want to play repeated beeps forever until a '''STOP''' command arrives then you only need to pass the '''count: 0''' | |||
====== 35.4.1.3 Continuous Tone ====== | |||
Play one continuous <FREQUENCY> Hz tone until '''STOP'''.<syntaxhighlight lang="json"> | |||
{ | |||
"id": <TIMESTAMP>, | |||
"origin": "APP", | |||
"task": { | |||
"action": "BEEP", | |||
"params": { | |||
"mode": "continuous", | |||
"frequency_hz": <FREQUENCY> | |||
} | |||
} | |||
} | |||
</syntaxhighlight>If '''frequency_hz''' is omitted, the handler uses the configured default frequency. | |||
====== 35.4.1.4 Stop Buzzer ====== | |||
If you want to stop the beep sequence, just send this payload to the '''buzzer/runtime/in'''<syntaxhighlight lang="json"> | |||
{ | |||
"id": <TIMESTAMP>, | |||
"origin": "APP", | |||
"task": { | |||
"action": "STOP", | |||
} | |||
} | |||
</syntaxhighlight> | |||
====== 35.4.1.5 Buzzer payload parameters table ====== | |||
{| class="wikitable" | |||
|Field | |||
|Required | |||
|Type | |||
|Default | |||
|Applies to | |||
|Description | |||
|- | |||
|task | |||
|Yes | |||
|object | |||
| - | |||
|All requests | |||
| | |||
|- | |||
|task.action | |||
|Yes | |||
|string | |||
| - | |||
|All requests | |||
| | |||
|- | |||
|task.params | |||
|No | |||
|object | |||
|{} | |||
|BEEP | |||
| | |||
|- | |||
|task.params.mode | |||
|No | |||
|string | |||
|"sequence" | |||
|BEEP | |||
| | |||
|- | |||
|task.params.frequency_hz | |||
|No | |||
|number | |||
|2700.0 | |||
|BEEP | |||
| | |||
|- | |||
|task.params.duration_s | |||
|No | |||
|number | |||
|0.2 | |||
|BEEP with | |||
mode="sequence" | |||
| | |||
|- | |||
|task.params.count | |||
|No | |||
|integer | |||
|1 | |||
|BEEP with | |||
mode="sequence" | |||
| | |||
|- | |||
|task.params.gap_s | |||
|No | |||
|number | |||
|0.15 | |||
|BEEP with | |||
mode="sequence" | |||
| | |||
|- | |||
|task.params.mode ="continuous" | |||
|No | |||
|string | |||
| - | |||
|BEEP | |||
| | |||
|} | |||
=== 36. Included Software Stack === | |||
[[File:AtlasCode.svg|center|frameless|583x583px]] | [[File:AtlasCode.svg|center|frameless|583x583px]] | ||
=== | === 37. Hardware Libraries === | ||
[IMAGE PLACEHOLDER] | [IMAGE PLACEHOLDER] | ||
=== | === 38. Related Products === | ||
{| class="wikitable" | {| class="wikitable" | ||
|'''PA''' | |'''PA''' | ||
| Line 2,078: | Line 2,298: | ||
{{SimilarProductsTable}} | {{SimilarProductsTable}} | ||
=== | === 39. Accessories === | ||
{| class="wikitable" | {| class="wikitable" | ||
|'''PA''' | |'''PA''' | ||
| Line 2,105: | Line 2,325: | ||
|} | |} | ||
=== | === 40. Document History === | ||
{| class="wikitable" | {| class="wikitable" | ||
|'''Version''' | |'''Version''' | ||
| Line 2,124: | Line 2,344: | ||
|} | |} | ||
=== | === 41. SENSBLUE ATLAS in-the-field === | ||
[IMAGE PLACEHOLDER] | [IMAGE PLACEHOLDER] | ||