Short-bus / pilomar

RaspberryPi based miniature observatory

Home Page:https://shortbus.blog/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve handling of USB & GPIO connections to microcontroller at the same time.

Short-bus opened this issue · comments

Normally the RPi -> Microcontroller connection is entirely via the GPIO header. Both POWER and UART comms are handled through that.
When updating the software on the Microcontroller a USB connection is required.
There is an electrical risk that having both GPIO and USB connected at the same time provides two conflicting power sources to the microcontroller. This may cause problems/damage.
The microcontroller board can be protected with an appropriate diode on the GPIO power circuit, but for additional safety it's possible to recognise that the USB connection exists and prevent the RPi enabling the power signal pin in the GPIO header too.

Testing new version of pilomardisc.py and pilomar.py. When it searches USB for potential memory stick it now also recognises any CIRCUITPY labelled device and disables the GPIO Power (aka 'reset') pin so that power ONLY comes from the USB connection.

Summer2023 update includes this functionality.