Fatigue Sensor

Syrus can communicate with fatigue sensor 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 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

Movon MDSM-7 Option A - via Ethernet (Includes video clips)

Movon MDSM-7 Option AMovon MDSM-7 Option A

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 Option B - via CAN bus

Movon MDSM-7 Option BMovon MDSM-7 Option B

Movon MDSM-7 Option B

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


Caredrive MR688B

Caredrive Fatigue SensorCaredrive Fatigue Sensor

Caredrive Fatigue Sensor


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 & KOA Speer MOS1CT528R121J


Accessory Comparison

DescriptionMovon MDSM-7Caredrive MR688BCipia-FS10
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🚫
Driver disappeared🚫🚫
Driver changed🚫🚫
Driver identified🚫🚫
Unknown driver🚫🚫
Camera blocked🚫🚫
Zero speed detected🚫🚫
Tamper alert🚫

✅ - Available and supported
🔲 - Available and not yet supported
🚫 - Not available


Guide: Cipia-FS10

The Cipia-FS10 will communicate via Wifi with Syrus 4. In order to get started make sure you download the latest apex OS version.

What you'll need:

  • 1 Syrus 4 device
  • 1 Cipia-FS10 device with installation kit
  • 1 Android phone for installing (Android v8 or newer)
  • 1 Micro SD card

Credentials you'll need

  • Cipia EyeSightInstaller mobile application
    • Email, Password, Server URL
  • Cipia-FS10 unit
    • Device password

Cipia Setup

Step 1

The first step is to prepare the Syrus 4 with the proper configuration in order to configure the Cipia. For this step we'll enable the Syrus 4 hotspot which means that we'll lose connectivity over wifi, it may be beneficial to do this over USB or remotely via Syrus Cloud if you have mobile connectivity.

To enable the hotspot you can do it from the management tool under Hotspot, the default settings are
SSID: Syrus4G-LTE, password: syrus1234. It's recommended to change these default settings.

Step 2

Next, add the camera with type cipia using the apx-video system tool.

# Enable the Cipia fatigue sensor
$ sudo apx-video add_camera --type=cipia --host_address=127.0.0.1

Warning

Sending this apx-video add_camera command will automatically bring up the Syrus 4 hotspot with the credentials previously entered. Thus you will lose wifi connectivity.

You can verify that the Cipia was added on the Syrus 4 with the following command:

# View the syrus 4 video configuration file to make sure cipia params are saved
$ cat /data/users/syrus4g/video/video.conf.json

{
   "destination": "internal",
   "reserved_space": 300,
   "cameras": [
     {
       "type": "cipia",
       "name": "cipia",
       "hotspot": true,
       "encrypted": false,
       "host_address": "127.0.0.1"
     }
   ]
 }

Use the ifconfig wlan1 command to obtain the IP address you'll use later on.

# Obtain the ip address of the hotspot, 'inet addr', example: 192.168.2.1
$ ifconfig wlan1

Step 3

Download and install the Cipia EyeSightInstaller Mobile application Android APK.

Note that this application requires Android 8 or above

Login with the provided Installer Email, Password, and Server URL.

Step 4

Follow the screen prompts and unscrew the side compartment and insert the micro SD card.

Step 5

Use your phone's Wifi to connect to the Cipia's access point. Look for FS-WiFi-XXXXXX

Click on the I'm connected button to confirm that you're connected to the Cipia unit.

Once connected enter the device password, this will be supplied along with the installation app's credentials, and click on Install a new device

Step 6

Follow the instructions and enter your vehicle's information along with the Ver0.26-WiFi configuration file.

Step 7

Select the Communication channel Wifi, and using the settings from the first 2 steps enter the Wi-Fi settings.

Wi-Fi settings

fielddescriptionsample
Wifi SSIDSyrus 4 hotspot SSIDSyrus4G-LTE
Wifi passwordSyrus 4 hotspot passwordsyrus1234
Server address/IPSyrus 4 hotspot ip address (inet addr)192.168.2.1
PortDefault port for Syrus 4 Cipia integration1883

Change any of the device settings if desired.

Step 8

Device Test, Calibration, and Driver Enrollment

The calibration of the Cipia is done by attaching the provided Checkerboard square to the headrest of the car seat, and moving the seat back and forth slowly. You can download a sample checkerboard square from the following link.

Keep following the onscreen prompts to test the device, and register a driver.

Note that the driver registration is required if you want to trigger the events for driver detection.

Step 9

At this point the installation is complete and you can use the Syruslang fatigue sensor section to start detecting events.


Guide: Movon via Ethernet

The first option for installing the Movon MDSM-7 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/), see the PC Calibration section of the manufacturer's installation guide for more information.

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

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


Step 2

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

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:


Step 4

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


Step 5

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


Step 6

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

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


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.


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 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 via CAN Bus

The second option installing the Movon MDSM-7 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/), see the PC Calibration section of the manufacturer's installation guide for more information.

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

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.


Step 2

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


Step 3

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

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

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 configuration file from the ECU monitor.

You can load this configuration file remotely via Syruscloud.

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 IDDescription
630_1.1_movonDrowsiness
630_1.2_movonDistraction
630_1.3_movonYawning
630_1.4_movonPhone
630_1.5_movonSmoking
630_1.6_movonDriver absence
630_1.7_movonCamera blocked
630_1.8_movonCamera error

Guide: Caredrive MR688B

Manufacturer's installation guide

To install the Caredrive MR688B, 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


Did this page help you?