# Fatigue Sensors

Syrus can communicate with fatigue sensor (opens new window) accessories which help monitor driver's fatigue. Fatigue sensors work by analyzing a driver's facial features and their environment to generate audible alerts as well as capture a photo or video when the driver starts to doze off or feel drowsy. Together with Syrus you can get notified whenever one of these fatigue alerts are triggered and view the captured photo/video clip associated with each fatigue event.

General Overview

  • The way it works is that you connect one of the compatible fatigue sensors (opens new window) to the Syrus
  • Depending on which fatigue sensor you connected you will either configure Syrus to use the serial (rs232), can bus, or ethernet interfaces to obtain the fatigue sensor's data
  • Once connected and configured using the appropriate tool look at the fatigue sensor and simulate drowsiness
  • For the serial rs232 interface use the serial tab or the apx-serial tool to view data
  • For the ecu interface look at the ECU tab or the apx-ecu tool to list_parameters that start with the CAN_ID of the accessory (ex: 600_4.1_1)
  • For the ethernet interface look at the video tab or the apx-video tool to get the video status

# Installation / Wiring Diagrams

Syrus 4 Datasheet with Pinout (opens new window)

# Movon MDSM-7 (opens new window) Option A - via Ethernet (Includes video clips)

Movon MDSM-7 Option A

The video clips recording requires a firmware version for Movon's hardware of at least 0.3.04 or newer


# Movon MDSM-7 (opens new window) Option B - via CAN bus

Movon MDSM-7 Option B

Read note below on installing a terminating resistor for CAN Bus accessories


Caredrive MR688B (opens new window)


# Installing a Terminating Resistor

Note that the impedance of the CAN bus must be 60 Ohms. To measure the impedance turn off the vehicle and make sure the multimeter is set to measure resistance (20Ω scale), and finally place the red and black probes on the CAN bus, it should be around 60Ω.

When connecting a single Movon device to the CAN bus the impedance of the bus changes to 120Ω, in order to drop it to the required 60Ω value a 120Ω resistor must be placed in parallel at the terminating end of the CAN bus wires of the Syrus 4G CAN High/CAN Low wires.

Any value lower than 60 Ohm indicates that there are probably more than two 120 Ohm bus termination resistors present. A value bigger than 60 Ohm typically indicates that there is at least one bus termination resistor missing or the bus terminators have a wrong resistance value.

Note: If you connect multiple accessories with terminating resistors, for example 2 Movon sensors, the impedance will measure out to be 60 Ohms, meaning you DO NOT have to add a resistor in this case.

The recommended resistances wattage depends on the type of vehicle, for 12V use at least a wattage of 0.5W, and for 24V use a wattage of at least 1W

Here are some sample resistances you can purchase online; EDGELEC EFR-W1D00-A:MF (opens new window) & KOA Speer MOS1CT528R121J (opens new window)


Comparison of Features and Accessory

Description Movon MDSM-7 Caredrive MR688B
Captures photos of incidents
Captures videos of incidents 🚫
Configure parameters like sensitivity and speaker volume remotely 🚫
Driver fatigue warning/yawning
Driver fatigue alarm/drowsy
Driver distracted
Driver absent/not detected
Driver on phone 🚫
Driver smoking 🚫
Camera blocked 🚫
Zero speed detected 🚫
Tamper alert 🚫

# Guide: Movon Option A (Ethernet)

The first option for installing the Movon MDSM-7 (opens new window) will use the Ethernet cable, this option is generally cleaner and less hassle as there's a more direct connection with the Movon and all the events can be generated as well as video clips received.

# Movon Setup

We need to access the Movon's Calibration Interface in order to setup the video capturing capability and enable communication with Syrus.

To do so we must connect via USB and enter the IP address and port of the Movon accessory on a browser (http://20.0.0.1:18087/ (opens new window)), see the PC Calibration section of the manufacturer's installation guide (opens new window) for more information.

Once connected to the Movon you'll be guided through the calibration process.

Movon Calibration Initial

Once you complete the calibration you'll be taken back to the main screen where you'll have the option to upgrade the firmware.

Start by downloading and extracting the following compressed file which contains a binary pkg in order to upgrade the Movon to the necessary firmware version (v0.3.04).

Step 1

Select Firmware update

Movon Camera Step 1


Step 2

Select the extracted file mdsm7_0.3.04.pkg from the compressed zip downloaded earlier.

Movon Camera Step 2

Wait a few minutes while the firmware is updated.


Step 3

Once the firmware is updated go back to the main menu and go through the Calibration again.

Go through the steps on screen to detect the speed (recommended CAN speed) and perform the Auto Camera Setting.

Once you get to the DVR Setup you can use the following settings:

Movon Camera Step 3


Step 4

The DSM Setup allows you to enable/disable specific signals.

Movon Camera Step 4


Step 5

The Auto Camera Setting handles the driver detection and ensure the whole face is captured.

Movon Camera Step 5


Step 6

Under the miscellaneous settings select Video clips and underneath which events you want to capture video clips with.

Movon Camera Step 6

Once the calibration is complete export your settings so you can copy them to other devices

Movon Export Settings


Step 7

Next from the Movon's main menu go to the Ethernet Settings

this opens up the Network settings, start by making sure DHCP is disabled in the first section.

The IP address of the first section is the IP address of the MDSM-7, be sure to select an IP address within the same subnet as the bottom section's IP address. The bottom section's IP address is the one we're going to configure on the Syrus in the nexts step.

Make sure to activate the TCP/IP FMS Activation and enter the IP address of the Syrus 4 ethernet interface, along with a port ranging from 49500 - 49550.

Once done, click on the right arrow to proceed and save the configuration.

Movon Camera Step 8


Step 8

Finally go into the Accessories -> Video section of the Syrus 4 Management UI and enter the general settings; where you'll save the location of the video storage and max allowed space.

Click on the top right button to add a new camera and select type MDSDM-7 and enter the same IP address and port from Step 7 above (be sure to enter the IP address of the bottom section of the Network configuration from Step 7)

Syrus 4 UI

# Syrus Configuration

Once you configure the video settings in the management tool of the previous step the contents of the configuration file video.conf.json are saved either locally on the syrus4g home folder /data/users/syrus4g/video/video.conf.json or in an external media mounted folder, like an SD card or USB: /media/MEDIA_NAME/video/video.conf.json.

You can view this file to make sure it's setup correctly

{
   "destination": "sd",
   "reserved_space": 500000,
   "cameras": [
     {
       "type": "mdsm7",
       "name": "mdsm7",
       "ip": "192.168.2.12",
       "port": 49500
     }
   ]
}

At this point it's done, you're ready view the messages published via redis or configure a Syruslang script to report fatigue events.

You can also manually configure the fatigue sensor on the Syrus using the apx-video tool.

Start by setting the destination and allocated size in MB and then adding the mdsm7 camera

# Set the destination of video recording to an SD card mounted on the Syrus4 with a max space of 2000MB
$ sudo apx-video set --destination=/media/sd_name --reserved_space=2000

# Add a Movon MDSM-7 fatigue sensor camera
$ sudo apx-video add_camera --type=mdsm7 --ip=192.168.2.12 --port=49500

with these two commands the video.conf.json would be created in the specified folder and you're ready to start using the fatigue sensor.

# Guide: Movon Option B (CAN Bus)

The second option installing the Movon MDSM-7 (opens new window) will use the ECU wires of the CAN bus, we recommend using Syrus' secondary interface for the connection.

CAN Bus Wiring Pinout (found in 14-pin molex)

MDAS-7 Wires Signal Description Syrus Signal Syrus Wires
White CAN High Pin 1 - CAN High cable from Movon, connect to Syrus cyan CAN 2 High cable. CAN2_H Cyan
Green CAN Low Pin2 - CAN Low cable from Movon, connect to Syrus white/light green CAN 2 Low cable. CAN2_L White Light-Green
Red PWR Power for the Fatigue sensor accessory, use the same power source as the Syrus +12-24V DC.
Black GND Fatigue sensor's ground, connect to the Syrus 4 electrical ground cable. GND Brown

Note be sure to maintain the cables for the ECU monitor twisted.

# Movon Setup

We need to access the Movon's Calibration Interface in order to setup the video capturing capability and enable communication with Syrus.

To do so we must connect via USB and enter the IP address and port of the Movon accessory on a browser (http://20.0.0.1:18087/ (opens new window)), see the PC Calibration section of the manufacturer's installation guide (opens new window) for more information.

Once connected to the Movon you'll be guided through the calibration process.

Movon Calibration Initial

Step 1

Go through the steps on screen to detect the speed (recommended CAN speed) and perform the Auto Camera Setting.

Once you get to the DSM Setup you can enable/disable specific audible events.

Movon Camera Step 4


Step 2

The Auto Camera Setting handles the driver detection and ensure the whole face is captured.

Movon Camera Step 5


Step 3

Under the miscellaneous settings select the Snapshot and underneath which events you want to capture photos with.

Movon Camera Step 6

Once the calibration is complete export your settings so you can copy them to other devices

Movon Export Settings

At this point connect the Movon to the vehicle's CAN bus interface following the manufacturer's instruction.


# Syrus Configuration

For the configuration of option B we'll use the Movon ecumonitor.conf (opens new window) configuration file from the ECU monitor.

You can load this configuration file remotely via Syruscloud.

Cloud profile

The configuration file with just the MDSM-7 information:

START_SECTION: CONFIGURATION
SECONDARY_CAN: ACCESSORIES_500KHZ
END_SECTION

START_SECTION: ACCESSORIES
# MDSM-7
PARAM_NAME: DROWSINESS, CAN_ID: 630, TRANSMISSION_RATE: 100MS, DLC: 8, LENGTH: 1_BIT, START_POSITION: 1.1, GROUP: EXTENDED_SIGNAL, MULTIPLIER: 1, SOURCE_INTERFACE: SECONDARY, ACCESSORY_TYPE: MOVON
PARAM_NAME: DISTRACTION, CAN_ID: 630, TRANSMISSION_RATE: 100MS, DLC: 8, LENGTH: 1_BIT, START_POSITION: 1.2, GROUP: EXTENDED_SIGNAL, MULTIPLIER: 1, SOURCE_INTERFACE: SECONDARY, ACCESSORY_TYPE: MOVON
PARAM_NAME: YAWNING, CAN_ID: 630, TRANSMISSION_RATE: 100MS, DLC: 8, LENGTH: 1_BIT, START_POSITION: 1.3, GROUP: EXTENDED_SIGNAL, MULTIPLIER: 1, SOURCE_INTERFACE: SECONDARY, ACCESSORY_TYPE: MOVON
PARAM_NAME: PHONE, CAN_ID: 630, TRANSMISSION_RATE: 100MS, DLC: 8, LENGTH: 1_BIT, START_POSITION: 1.4, GROUP: EXTENDED_SIGNAL, MULTIPLIER: 1, SOURCE_INTERFACE: SECONDARY, ACCESSORY_TYPE: MOVON
PARAM_NAME: SMOKING, CAN_ID: 630, TRANSMISSION_RATE: 100MS, DLC: 8, LENGTH: 1_BIT, START_POSITION: 1.5, GROUP: EXTENDED_SIGNAL, MULTIPLIER: 1, SOURCE_INTERFACE: SECONDARY, ACCESSORY_TYPE: MOVON
PARAM_NAME: DRIVER ABSENCE, CAN_ID: 630, TRANSMISSION_RATE: 100MS, DLC: 8, LENGTH: 1_BIT, START_POSITION: 1.6, GROUP: EXTENDED_SIGNAL, MULTIPLIER: 1, SOURCE_INTERFACE: SECONDARY, ACCESSORY_TYPE: MOVON
PARAM_NAME: CAMERA BLOCKED, CAN_ID: 630, TRANSMISSION_RATE: 100MS, DLC: 8, LENGTH: 1_BIT, START_POSITION: 1.7, GROUP: EXTENDED_SIGNAL, MULTIPLIER: 1, SOURCE_INTERFACE: SECONDARY, ACCESSORY_TYPE: MOVON
PARAM_NAME: CAMERA ERROR, CAN_ID: 630, TRANSMISSION_RATE: 100MS, DLC: 8, LENGTH: 1_BIT, START_POSITION: 1.8, GROUP: EXTENDED_SIGNAL, MULTIPLIER: 1, SOURCE_INTERFACE: SECONDARY, ACCESSORY_TYPE: MOVON
END_SECTION

Once the Syrus has this configuration file, and you install the Movon MDSM-7 you can trigger the fatigue sensor messages and trigger messages using Syruslang.

You can also use the apx-ecu tool to view the parameters.

# List ECU parameters, indicating a driver on the phone and yawning
$ sudo apx-ecu list_parameters
{
    "630_1.1_movon": 0,
    "630_1.2_movon": 0,
    "630_1.3_movon": 1
    "630_1.4_movon": 1,
    "630_1.5_movon": 0,
    "630_1.6_movon": 0,
    "630_1.7_movon": 0,
    "630_1.8_movon": 0,
}

The list of parameters and their respective unique CAN_ID are:

ECU Unique ID Description
630_1.1_movon Drowsiness
630_1.2_movon Distraction
630_1.3_movon Yawning
630_1.4_movon Phone
630_1.5_movon Smoking
630_1.6_movon Driver absence
630_1.7_movon Camera blocked
630_1.8_movon Camera error

# Guide: Caredrive MR688B

Manufacturer's installation guide (opens new window)

To install the Caredrive MR688B (opens new window), we'll use the Syrus serial RX/TX wires.

Serial Wiring Pinout (found in 14-pin molex)

Caredrive Wires Signal Description Syrus Signal Syrus Wires
Blue RX Caredrive RX (MR688B 232 data receiver), connect to the Syrus orange data transmitter cable. RS232_TX Orange
Green TX Caredrive TX (MR688B 232 data transmission), connect to the Syrus blue data receiver cable. RS232_RX Blue
Red PWR Power for the Caredrive accessory, use the same power source as the Syrus +12-24V DC.
Black GND Caredrive's ground, connect to the Syrus 4 electrical ground cable. GND Brown

# Syrus Configuration

Once you have the Caredrive fatigue sensor accessory connected to the Syrus you can configure the serial port to fatigue_sensor mode with the apx-serial tool.

$ sudo apx-serial mode fatigue_sensor

To test the communication with the accessory, you can use the capture command.

$ sudo apx-serial fatigue_sensor capture

a photo is captured and automatically uploaded to the default directory: /data/users/syrus4g/fatigue_sensor.

Before your first drive it's important to change the default settings, here's some recommended apx commands you can use to program the camera for 'normal' operation.

# Set sensitivity to 2.9 seconds
$ sudo apx-serial fatigue_sensor sensitivity 3

# Set minimum speed to 30kph
$ sudo apx-serial fatigue_sensor min_speed 30

# Set speeding alarm threshold to 135kph
$ sudo apx-serial fatigue_sensor speeding 135

# Set the speaker volume to low
$ sudo apx-serial fatigue_sensor speaker_volume 1

Ensure the changes are saved by turning the fatigue sensor off and back on.

Note that some fatigue sensors include dip switches on the back of the camera that override these settings. Follow the recommended settings in the manual of the fatigue sensor

Last Updated: 11/4/2021, 7:51:27 AM