IO-7 Button to ground with a pull-down, or button to power with a pull-up¶
| Severity | Status | Implementation |
|---|---|---|
| error | runs in better_erc | easy, depends on NET-5 |
Data it needs: graph, part classes, rails, values. Folds in: IO-8.
Looks at. Switch parts, resistors to rails.
What it catches. A switch whose closed state pulls the net to the same level the resistor already holds it at.
Why it matters. The button does nothing: pressed and released read the same. It is a copy error (a pull-up footprint wired to GND) that the ERC never sees, because every pin is connected.
Example. SW1 between BTN and GND, R12 10 kΩ from BTN to GND as well: the input reads low forever.
How to check. For each switch, the rail on its far side (NET-5) must differ from the rail of every pull on the input side.
Fix. Pull towards the other rail.
References. Wikipedia, Pull-up resistor; Wikipedia, Switch (contact bounce).
Test schematics¶
Each schematic below is in test_schematics/sources. The block under it is what berc check --only IO-7 reports on it.
io-7_button_pulls¶
error IO-7 #3a6 SW1 pulls /BTN_A to GND and R1 pulls it there too: the button does nothing (also IO-8)
net /BTN_A, part SW1
fix: pull towards the other level
error IO-7 #s6q SW2 pulls /BTN_B to +3V3 and R2 pulls it there too: the button does nothing (also IO-8)
net /BTN_B, part SW2
fix: pull towards the other level