EFAS Mini Motion Sensor - Serial Commands

Created by Finn Franssen, Modified on Fri, 9 Oct at 11:41 AM by Finn Franssen

Integration reference for the serial command interface of the EFAS Mini motion sensor (Detection V3). The original document is attached as a PDF.

Connection: USB serial (virtual COM port) — 115200 baud, 8 data bits, no parity, 1 stop bit. Each command is a single line terminated with a newline character (\n). Commands are case-sensitive.

Commands you can send to the sensor

CommandExampleWhat it doesReply
getThresholdgetThresholdReads the current motion sensitivity threshold.success: threshold is 0.20
setThreshold <value>setThreshold 0.35Sets the motion threshold in m/s². Saved permanently (survives power loss). Lower value = more sensitive.success: threshold was set to 0.35
success: threshold was saved to EEPROM
resetThresholdresetThresholdRestores the factory default threshold of 0.20 m/s². Saved permanently.success: threshold was reset to 0.2
success: threshold was saved to EEPROM
setDelay <seconds>setDelay 30Stores a backlight delay value that the sensor reports to the display on the next power cycle.delay was set to 30 seconds, this will be executed after a power cycle
setDebug <0|1>setDebug 1Turns live sensor logging on (1) or off (0). Diagnostics only — leave off in normal operation.success: debug mode is enabled
getAccelerometerRange—Reports the accelerometer measuring range.success: accelerometer range is 2G
getGyroRange—Reports the gyroscope range.success: gyro range is 500
getFilterBandwidth—Reports the sensor's filter bandwidth in Hz.success: filter bandwidth is 21

Messages the sensor sends on its own

MessageMeaning
forceUserDetection 1Motion detected. This is the main output — the display should wake and register a user. Also sent 20 times at startup as a boot handshake.
setBacklightDelay <value>Sent once after boot if a delay was configured with setDelay. The stored value is then cleared, so it is sent only once per setDelay.
ThresholdUp / ThresholdDownA physical button on the unit was pressed.

Notes for tuning

  • Threshold is the deviation from the running average acceleration, in m/s². Default is 0.2. The valid range is above 0 and below 10 — values outside that are ignored at the next boot and fall back to 0.2.
    • Too many false triggers → increase the value (e.g. 0.3, 0.4).
    • Motion is being missed → decrease the value (e.g. 0.15).
  • After each detection the sensor ignores motion for roughly one second to avoid repeat triggers.
  • The onboard LED lights while motion is above the threshold, and flashes 4 times to confirm a setting was saved (once for a query). This is a quick way to check a command landed without a serial monitor.
  • Debug mode (setDebug 1) prints one raw reading per second in the form Accel m/s^2 x,y,z: ... | vec: .... Switch it off with setDebug 0 when finished — it adds serial traffic.

Two points to be aware of when integrating

  • Commands are matched as substrings, so any line containing a command name (for example setThreshold) will trigger it. Make sure the host system does not echo command names back over the same link.
  • setDelay is one-shot: the stored value is consumed and cleared on the next boot, so it must be re-sent for each subsequent power cycle.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article