Circuit working in breadboard but not perfboard

arduinobreadboardpower electronicsprototypingsoldering

I am making a circuit to unlock my car doors. The central locking in my car works with 2 wires one at 12V, the other at 0V. When the 12V line is pulled low, the door locks. When the 0V line is pulled high, the door unlocks.

I breadboarded a circuit to let me do this ( testing circuit uses push buttons – will be replaced with remote arduino commands in future), and that works fine. I soldered up the same circuit, but when connected the doors continually lock and unlock – even when the gates on the transistors have no voltage applied. I've included a photo of the soldered perfboard (please excuse the shitty soldering) in case there is something there.

My first thought was that I had cooked the transistors, so I took another piece of perfboard and redid the whole circuit (wires were wrapped together), but I still had the same problem of it continually unlocking and locking.

This is my first time using perfboard so I am not sure whether this is an issue related to that, or something else. Any help would be much appreciated.

Best Answer

You connection seems to be like this:

schematic

simulate this circuit – Schematic created using CircuitLab

The central locking in my car works with 2 wires one at 12V, the other at 0V. When the 12V line is pulled low, the door locks. When the 0V line is pulled high, the door unlocks.

I'm not very clear on this. Do you mean that the 12v and 0v lines you describe are similar to weak pull-up and pull-down lines? Can you connect the 12v to GND without getting a short and that is also the case when you connect the 0v wire to 12v?

Lets go to your circuit.

M2 section
M2 operates as a low side switch and is able to pull down the 12v line (ground it) when the 5v is applied to the mosfet gate. Assuming that this is what you want to do, it will work fine.

M1 section
The first problem is that in order to use a N-mosfet as a high side switch you have to apply to the gate a voltage higher than the voltage of the drain, so unless the 5v is from an isolated supply (not coming from the car supply) you'll need to apply to the gate more than 12V (about 15V or more).
The second problem is that according to your description you are trying to apply 12v to the 0v line , but what you do is connect the weak 12v to the weak 0v, how can this work?
You can replace the N-mosfet with a P-mosfet and a transistor to control it, but I can't help much without understanding the characteristics of the 12v and 0v lines you describe.


I think it would be safer to just use optocouplers between the car lines and Arduino. Also a P-mosfet for the high side switch and the N-mosfet for the low side switch.

schematic

simulate this circuit