Skip to content

Auto Shutdown #4

@dimembermatt

Description

@dimembermatt

In addition to the state of charge circuit #2, we also have a shutdown circuit in the PCB design for the new dancebot.
image

When the pushbutton on the robot is initially pressed, we connect the VREG ground to the common ground and connect the circuit. This turns the uC on. The uC initializes the gate of a MOSFET in parallel, which keeps the grounds connected after the pushbutton has been released.

In order to enable the shutdown, we simply set the pin controlling the MOSFET in parallel, IO9, LOW. What this will do is open the grounds and power is cut.

We need to write several routines in order to use this functionality:

  • on the driver side, this is relatively easy. We need to at startup set IO9 HIGH and then when we receive a shutdown command from the server simply call the shutdown routine. Robot state is expected to be lost. Additionally, we can have the same shutdown routine trigger when we notice that the robot has a critical SoC.
    • in this routine, prior to shutting off the power, we need to notify the server that the robot is leaving with /robotLeave.
  • we need to update /robotUpdate on the robot side to anticipate an optional shutdown argument.
  • on the server side we need to wire functionality to the UI to tell a robot to remotely shut down, as well as update the existing API to return a shut down argument for /robotUpdate calls.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions