Two microcontroller and a relay

I have this two microcontrollers SyncMos and Arduino controlling a relay.

And also two power sources - 12v DC (VCC 2 and VCC 1).

I wanna consult the diagram below if it was correct...

Hi,
D4 and D5 are connected the wrong way, you need the anodes to the 12V VCC.

I don't know about the SyncMOS, but with the Arduino you do not need R4 pull up resistor.
What model Arduino are you using?

Make sure the two controller have their gnds connected together as well as to the 12V supply gnd.

Tom.. :slight_smile:

The circuit looks good but to stop the smoke the grounds need to be connected together. Unless the 12V supplies turn off you can use either one and eliminate the diodes. If you want you can eliminate all of the diodes by using an avalanche rated MOSFET in place of the transistors such as a 2N7000 or equivalent. With the pull up resistors the unit will turn on when either JPx is disconnected. If you use a MOSFET you can change the gate resistor to something in the 500 Ohm range to protect the processor and add a pull down resistor in the 10K range in the gate circuit. The pull down resistor will cause it to turn off in unplugged. To help the pin conversion to a N-MOSFET C=D, B=G, S=E. Just as a hint a 4001 diode will work inplace of the 4007 as it will only see about 12V reverse.
Good Luck,
Have Fun,
Gil