COM, NO and NC
Inside the switch is one moving blade and two contacts for it to rest on. At rest it touches NC, normally closed; pushed in, it touches NO, normally open. The board wires VCC to the blade and SIGNAL to NO, and leaves NC unconnected, so a hit reads HIGH.
Three legs, one blade
The switch has three legs, soldered in a row just below it on the board. Inside, one springy metal blade is joined to the leg called COM, for common. The blade always touches one of the other two:
- NC, normally closed: the contact the blade rests on when nothing pushes the lever.
- NO, normally open: the contact it moves to when the lever is pushed in far enough to click.
A switch like this is called a changeover switch. The "normally" means at rest: NC is closed until something happens, NO is open until something happens.
Which contacts the board uses
Seen from the front, the left leg is NC, the middle one NO and the right one COM. The board's copper does three things with them:
- COM goes to VCC. It is the only thing VCC reaches on the board.
- NO goes to SIGNAL, along with the pull-down and the LED's resistor.
- NC goes nowhere. Its pad is soldered, so the switch is held firmly, and no trace leaves it.
So at rest the blade connects VCC to a dead end, and SIGNAL has nothing but the pull-down: LOW. Pushed in, the blade connects VCC to SIGNAL: HIGH. Set the figure to NC, for comparison to see the board this is not: one that reads HIGH at rest and LOW on a hit.
Two different NCs
The header's third pin is also printed NC, and it means something else: not connected. Every TinkerBlock block has the same four-pin header, and on this one the third pin has no job. The switch's NC contact is not wired to it or to anything else. When a page about this block says "leave NC unconnected", it means the header pin; the switch's NC contact is already unconnected, and there is nothing to wire.
When it does not work
No. The header's NC means not connected: that pin is soldered to a pad no trace reaches. The switch's NC means normally closed: the contact its blade rests on. They share two letters and nothing else. Neither one is wired to anything on this board.
Not on this board: SIGNAL is soldered to the NO contact. If you want a sketch to treat a hit as true, test for HIGH, which is what the sketches here do. Flipping a reading is one character of code, not a change to the hardware.
For a switch that must fail safe. Wired through NC, the circuit is closed at rest, so a cut wire looks exactly like a hit and a machine stops. A toy robot rarely needs that, and wiring NO keeps the rule simple: HIGH is a hit.
That is COM and NC, the right-hand and left-hand legs seen from the front: the blade rests on NC. Push the lever and the connection moves to COM and the middle leg, NO. Measure with the block unpowered.
What holds SIGNAL LOW at rest, and the LED that shows a hit with no code running.
The pull-down and the light →Edit this page — content/books/collision-sensor/com-no-and-nc.mdx
Questions about this product
See what other owners have asked, and read their solutions.
Collision Sensor
Loading discussions…
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.