Just had a quick glance at the schematic in the pdf and some thoughts to help protect things a little.
I think adding a current limiting resistor between the 3v3 and the screw terminal could be worth it. I’m not a pico person, so need to look up the max GPIO input/sink current and work out the resistor size to keep things under that.
This will protect 2 key things.
- The pico 3.3V supply if a short happens somewhere.
- IF GPIO20/21 for some reason are put into output mode and set to “0/Low”.
Im happy if there is some protection already in the pico, but normally there is not.
i.e. A GPIO pin in input mode will/should be in high impedance, so no current should flow into the pico, it should just see if its High or Low.
When a GPIO is in output mode, when set to High it will output 3.3V, when set to Low its connected to ground to pull down the line, so without the current limiting resistor, you will be trying to sink the the 3.3V direct to ground (when the reed switch is closed).
I do note this is not how its operating, more a just in case.
On a 2nd point, you MAY get an issue with the signal at GPIO20/21 staying high after the read switch opens. This can be due to the power having no where to go. Adding a high value resister like 10K - 50K (or more) between the GPIO20 to ground and the same for 21.
So when the reed switch is closed, power will have a very slow sink to ground via these resistors and still present a V at the GPIO pin, then when the reed switch opens, any remaining power will drain to ground.
Need to do that math as the resistor on the 3.3v line and the sink resistors will create a voltage divider, so just need to make sure the V at the GPIO is still strong enough.
Some quick math (needs checking and finding the actual max current for the pico gpio)
3.3V 25mA
R = V/I = 3.3/0.025 = 123 ohms
Lets say a 20K sink resistor, that should give about 3.28V at the GPIO when High, so plenty.
Just a thought.