IO: Sensor Unit

IO: Sensor Unit #

view - Documentation

A module collecting data from sensors. Periodically sends the data to the network.

The unit consists of:

  • 1x - Nucleo F411RE
  • 3x - HC-SR04 module
  • 1x - KY-018 photoresistor module
  • 1x - MCP2515 CAN bus module

Schematic #

platform_schematic

Communication #

CAN bus

  • Protocol: qCAN 0.2.0, standard CAN frame
  • Address: 0x4

Serial

  • Speed: 115200 BPS

Data Message #

The unit sends a data message with sensor data every 100 ms.

  • Message Type: 0x1 (Data Message)

Message content:

FieldValue
MSG ID0x401
DATA0HC-SR04 Left: distance - 0..200 cm
DATA1HC-SR04 Center: distance - 0..200 cm
DATA2HC-SR04 Right: distance - 0..200 cm
DATA3KY-018: Light value - High 4 bits
DATA4KY-018: Light value - Low 8 bits