Skip to content

Commit

Permalink
Merge pull request #203 from srobo/leds
Browse files Browse the repository at this point in the history
Update LED meanings for current firmware
  • Loading branch information
WillB97 authored Apr 4, 2024
2 parents c7307c5 + ec14ea8 commit 3bce2b9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
10 changes: 6 additions & 4 deletions docs/kit/hardware/motor-board.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

The boards pictured above is an early prototype and may differ from the current boards, it is only used to display the locations of the LEDs.

The motor board contains an isolation barrier to avoid ground loops. This means power must be provided to the 12V input and USB. The USB only powers up the USB-serial adapter and not the microcontroller, as such without 12V power, the USB port will appear but will not respond to any communication.

## Motor Board LEDs

- A (DS1/DS6 - green/red)
Expand All @@ -19,13 +21,13 @@
- green is lit when there is 12V present in the correct polarity on 12V input
- red is lit when the 12V input has incorrect polarity
- C (DS2 - red)
- toggled by the ADC interrupt, this should be fast enough that the LED is not visibly while the firmware is running normally.
- lit when the motor 1 driver has detected a fault. This is probably short-to-VCC or short-to-GND.
- D (DS3 - blue)
- currently unused, inaccessible over USB.
- lit when the motor 1 is drawing over 5 amps (50% load)
- E (DS4 - red)
- currently unused, inaccessible over USB.
- lit when the motor 2 driver has detected a fault. This is probably short-to-VCC or short-to-GND.
- F (DS5 - blue)
- currently unused, inaccessible over USB.
- lit when the motor 2 is drawing over 5 amps (50% load)
- G/H (DS9 - red/blue)
- blue is lit when motor 1 is set to move forward
- red is lit when motor 1 is set to move backward
Expand Down
4 changes: 3 additions & 1 deletion docs/kit/hardware/power-board.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@

The boards pictured above is an early prototype and may differ from the current boards, it is only used to display the locations of the LEDs.

The fan on the power board is temperature controlled so will not spin until the board is detected to be above 40°C.

## Power Board LEDs

- DS1 - red/green
- green is lit when the board is powered on and not in undervoltage-lockout (9.6V falling threshold, 11.1V rising threshold), this is connected to the 3.3V regulator so shows it is functional.
- red is flashed when the battery reaches a soft undervoltage-lockout (10.2V).
- DS2 - green
- lit when the 5V output is enabled and functional, this is connected to the 5V regulator output. The 5V is enabled whenever the board is powered on and not in any undervoltage-lockout or overcurrent situation. The 5V rail current is not currently monitored so this light going off without the whole board turning of means the regulator has been overloaded (4.2A typical).
- lit when the 5V output is enabled and functional, this is connected to the 5V regulator output.
- DS3-8 - red/green
- green is lit when an output is enabled, this is connected to the rail so shows the actual state of the output.
- red is lit when the port exceeds its current limit, which is latching.
Expand Down
22 changes: 8 additions & 14 deletions docs/kit/hardware/servo-board.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,22 @@

The boards pictured above is an early prototype and may differ from the current boards, it is only used to display the locations of the LEDs.

The servo board contains an isolation barrier to avoid ground loops. This means power must be provided to the 12V input (J4) and USB. The USB powers up the microcontroller so the board can be connected to without 12V present. The 12V then drives an isolated output expander that controls the servos and a high current regulator that provides 5V for the servo power. This will only power servos 1-8.

To use servos 9-12 power is applied to the AUX header. This power is applied to the servos directly so **do not apply 12V to the AUX header when using 5V servos**.

## Servo Board LEDs

- DS1 - green
- lit when 5V is present from either the USB or UART header, this is connected to the 3.3V regulator output so shows it is functional as well.
- DS2-9 - blue
- currently unused, inaccessible over USB.
- lit when the corresponding servo is enabled. Setting the servo to any position will enable them. These will light even when the 12V power is not present.
- DS10 - red/blue
- blue is lit as soon as the firmware finishes initialisation.
- red is lit while the I2C interrupt routine to set the servo outputs is running.
- red is lit while I2C communications are failing. This occurs while 12V is not present.
- DS11-14 - blue
- currently unused, inaccessible over USB.
- lit when the corresponding servo is enabled. Setting the servo to any position will enable them. These will light even when the aux power is not present.
- DS15 - green
- lit when 12V is present and the correct polarity, this is connected to the 5.5V SMPS output so shows it is functional as well. If the 12V input is wired backward this will not light.
- DS16 - green
- lit when either an input is provided to the auxiliary header or the 5V regulator is linked to the power output for the top 4 servos. __NOTE__ The firmware is hard-coded to enable this link, __do not attach a power source to the auxiliary header__.

## Pink LED of Death "PLOD" Bug

When the 12V input is removed, the I2C interrupt routine will hang indefinitely, even after the input is restored.

In this situation, both the red and blue components of DS10 will turn on, which appears as a pink colour (despite actually being separate red and blue). The USB will also lock up, manifesting as `Pipe Error` in Python stack traces if the code tries to access the board.

This situation will occur after every run of code on the robot as the 12V outputs on the power board are disabled when code exits. If the pink colour appears before their code has completed then there is an issue with the 12V input.

There is a workaround in the kit software that attempts to mitigate the impacts of this bug, called [Servohack](../../software/#servohack).
- lit when an input is provided to the auxiliary header.

0 comments on commit 3bce2b9

Please sign in to comment.