Grumpy_Mike:
So eventually it is going to burn out the internal protection diodes.
Probably not, they are good for about 1mA which is much less than you are giving them. Personally I don't like relying on them, but I don't have any solid reason. If it were me I would have used a transistor into the input pin, but you should be fine.
So I want to understand this correctly then, With the FET off, I have 16v on the wire, and 5v on pin 11 (set to HIGH in the code).
So I have 16 - 5 = 11 volts shunting to ground through the internal protection diodes. There is 5K and I believe the internal resistors are 20k? or is that just the pullups? plus nominal resistance from the LED. So that is roughly 11v/25000 =0.00044 amps flowing through the protection diodes.
With the FET on, everything is grounded and all is good.
Is that right?
Thanks
Final layout I may add external protection.