I am controlling automotive SPST relay via arduino using 1k resistor and 2n2222. Because I have trust issues, I would love to have a way to verify that relay was actually actuated, and for that I have thought about using SPDT relay with NC connected to optocoupler for arduino to read status of.
In theory everything is simple. When relay is not actuated there is signal down NC and arduino reads input. When relay is active, NC is floating and NO is active.
Since this setup is to be used in automotive application, I am probably not aware of some things that might cause more problems. For example voltage spikes during vehicle start or jump start.
Edit:
If I am not mistaken, atmega have internal pull down resistors to ground so that pins aren't left floating, but to be safe I think I will need external pull down resistor (1k?) for the pin that will read from NC. Right? (I am no electrician)
First of all: the controller doesn't have pull down resistors.
It does have -sort of- pull up resistors which need to be enabled.
They still provide a way to prevent the inputs from floating, but your logic needs to inverted.
So an open pin would mean seeing a HIGH and to be able to see the switch activated you'd need the relay to pull it down.
If you can't use it that way, you need to use an external pull down resistor (rule of thumb: 10 K).
Then your trust issues:
If you have these, then why rely on a second contact to see that the relay is actuated.
You will not be able to see the first contact is made or not, you'd be assuming that.
It is possible for a relay to be activated, but the contact is failing (the chance of that happening increases if you are using (heavy duty) contacts closer to their specification).
Why not spy on the output and see what's actually happening at the relay contact, using that optocoupler ?
Voltage drops or spikes require decoupling.
So use well picked capacitors to handle this correctly.
If you put the relay switch on the low side of your load, you could use the same relay switch for both Sensing the relay position AND turning on the load.
Something like this. Actually even the pullup resistor could be redundant if you configured your input as INPUT_PULLUP