Skip to main content

Safety Lights

The Safety Lights PCB is designed to drive two 12v LED light strips via commands sent over the canbus. The PCB also listens to the EStop line as an override for whenever the robot is estopped via hardware and not software.

Versions

Listed below are all versions of the PCB that have been physically ordered with links to the commit in Altium.

VersionNotes
1.0Initial Release

Connections

The Safety Lights PCB has six connectors

  • Molex: The Molex connection is the standard 6pin molex connection/layout that is shared between all PCBs. It will connect to the molex hub.
  • KK-254 x 2: The two KK-254 connections are used to actually connect the safety lights. Their order does matter, as the animation firmware is dependent on the physical led strip locations being accurate. This will be updated whenever the locations are determined.
  • 2pin JST: The 2pin JST connector is used for the EStop relay in the event that no other board is in charge of it. It has a 3.3v and ground, where the 3.3v will be driven high whenever the EStop line is driven high.
  • 4pin Header: There is a set of 4pins on the board directly above the MCU, these are used to program the chip.
  • 2pin Header: The 2pin header in the middle of the board is used for enabling the 120ohm terminating resistor on the canbus.

Indicators

The Safety Lights PCB has four leds

  • 12.0v: The 12.0v LED is lit whenever the board is receiving 12v power.
  • 5.0v: The 5.0v LED is lit whenever the 5.0v LDO is producing 5.0v.
  • 3.3v: The 5.0v LED is lit whenever the 3.3v LDO is producing 3.3v.
  • EStop: The EStop LED is lit whenever the EStop line is driven high and is passed through a buffer for protection.

Canbus Messages

The Canbus message format for the safety lights is as follows, this should always be up to date with what is specified in the Can Spec wiki page..


Field Type Scale Unit Bytes Notes
Mode uint8 1 N/A 0
Color uint8 1 RGB 1-3 RGB (each byte is R, G, and B respectively.
Speed uint16 1 ms 4-5 The speed of the animation/mode.

The Mode byte describes what the safety lights should be doing and valid options are listed as follows

  • [Loading] = 0 | The safety lights are doing a "loading" animation (e.g. there only a few rgbs are on, cycling the strip). This is the default behavior and indicates the system is still booting. The color is indicated by the color parameter, a full "cycle" happens in a time determined by speed.
  • [Solid] = 1 | The safety lights are a solid color indicated by the color parameter.
  • [Blinking] = 2 | The safety lights are blinking (turning on and off) at a rate specified by the speed parameter and are colored as specified by the color parameter.

Debugging

This board, as of Version 1.0, has no way to debug it other than maybe manually soldering wires to the debug pins on the STM32 chip. In a future version, a 2pin header may be added for debugging.

Firmware

The firmware for this board can be found on Github and is written using the STM32 software. A guide to how to use this software can be found here.

Schematic

The schematic for the board can be found below, as well as in the documentation booklet.