Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Shutdown #4

Open
3 tasks
dimembermatt opened this issue Sep 14, 2020 · 0 comments
Open
3 tasks

Auto Shutdown #4

dimembermatt opened this issue Sep 14, 2020 · 0 comments

Comments

@dimembermatt
Copy link
Contributor

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant