Newbie Project Advice. Is this even possible

Hi everyone.

I usually try not to make a first post looking for help but I can't find the answer to the question I have. It may be because I don't really understand what to ask.

I have never played with anything like this before, I'm much more of a mechanically minded person and although I have a good understanding of electronics I know nothing at all about programming or the capabilities of the Arduino.

What I would like to achieve is a way to monitor a relay position to check to see if it has stuck.

Eg. If terminal 86 has a voltage applied terminal 87 should also have voltage present.
When terminal 86 has no voltage terminal 87 should no longer output a voltage.
In the event that the relay sticks in either position for a time period of greater than 1 second an LED should be illuminated and an isolator relay (powered by the Arduino) should turn the circuit off until a reset button is pressed.

I would like to use this on a car so operating voltages would be in the region of 11v-15v. I understand I would have to use a voltage divider circuit to monitor the voltages at each point.

Would someone please advise me would this be possible with the Arduino, what other items would I need? If it is possible could you please recommend where I should start my research and learning the programming to make this work.

Kind Regards,

Yeah - that sounds pretty straightforward - you pretty much just need an arduino (I'd recommend an Uno for a newbie), an assortment of resistors (eBay), some wire, and that relay you're planning to add.

That said, my approach would be to find out why the relay sticks and fix it, rather than building a watchdog to work around it.

Hi DrAzzy,

There is currently no problem with the relay but I am trying to design a fail safe in case it does ever happen.
In the case of a malfunction, if the circuit was allowed to continue to run there is a potential for it to cause a fair ammount of damage both mechanically and electrically.

With regard to the programming.
If I were to set up a voltage divider circuit to measure the voltage at both terminals 86 and 87.
Would it be as simple as to ask the Arduino to, let's say, look for both to be the same within 1 second and if they don't match to execute a command.

What terms describe this type of code, would I be looking to use an IF statement for example?

Kind Regards,

Would it be as simple as to ask the Arduino to, let's say, look for both to be the same within 1 second and if they don't match to execute a command.

It could check 1000 times per second without breaking into a sweat.

The code could be as simple as this

pin86Val = digitalRead(relay86pin);
pin87Val = digitalRead(relay87pin);
if (pin86Val != pin87Val) {
   // do stuff

However I think it would take a careful and complex risk analysis to decide whether this extra complexity is the best way to reduce the risk you are trying to deal with.