This is an illustration of what my circuit looks like:
On testing the PCBs, I noticed that most of them work fine, but some of them don't. No problem, probably a soldering thing.
However, those faulty ones did manage to destroy two Arduino digital pins!
On one, I get a constant voltage of 5 V, and the other one outputs 0.2 V when I send a HIGH signal to it, and 0.5 V when I send a LOW signal. Strange stuff.
So I guess the faulty circuits somehow caused (some of) the 16 V to flow through the Arduino, destroying them.
How do I protect the Arduino in this scenario from too high current?
I know about zener diodes, but I have no idea how to place them to protect the inputs.