Picture of the Pi Master

The Omzlo Pi Master is a HAT (Hardware Attached on Top providing a gateway between the CAN bus network and a Raspberry Pi, which runs network managing software. The Pi Master will work on any Raspberry Pi with a 40 pin header, including the Pi Zero.

PiMaster on a Raspberry Pi

The Pi Master is built around an STM32F042 ARM Cortex M0+ running at 48Mhz. This MCU communicates with the Raspberry Pi through SPI and a few additional GPIOs. It performs three main functions:

  • It acts as a gateway to the CAN bus network.
  • It controls and monitors power delivered to the network (typically 12V or 24V).
  • It powers the Raspberry Pi from a voltage source from 6V to 28V.

A software application called nocand running on the Raspberry Pi uses this gateway to manage the network by performing the following tasks:

  • Powering up or down the network.
  • Monitoring voltage and current levels.
  • Registering nodes, attributing to each one a unique address.
  • Registering channels as part of the publish-subscribe protocol used in NoCAN.
  • Rebooting nodes, activating their bootloader,
  • Uploading or downloading firmware (hex files) to/from any node.

As a built-in safety, a smart switch controlled by the MCU will automatically switch off the power distributed to the network if there is too much current drawn (typically above 3A).

The PiMaster HAT integrates the following components:

  • The main MCU: an STM32F042.
  • A CAN bus interface IC (MCP2562)
  • A step-down switching regulator powering the Raspberry Pi (based on the TI TPS54202, providing up to 2A)
  • A smart mosfet switch controlling power distribution to the network (an Infineon BTS5030).
  • Three LEDs:
    • Red: HAT power status.
    • Green: Network power status.
    • Yellow: Power fault indicator.
  • A 4-pin pluggable 3.5mm header provides connection to the network and power (VIN, GND, CAN_L, CAN_H).
  • A power DC jack used to provide 6V to 28V to the HAT.
  • Debugging headers.
  • Various protection elements (TVS, Zener, ideal diode).
  • Various passives.