Printed PCB not working right with an arduino project.

Thread Starter

Ping pong

Joined Feb 13, 2022
91
Hey, I have been working on this super simple Arduino project that involves using the car door triggers (when the door is opened) as well as the Lock and Unlock Triggers to initiate a task.

There are three wires that I'm tapping into, door, lock and unlock. The car uses a ground signal as a trigger to let the ECU know that the door is opened or unlocked/locked, otherwise each of the three wires remain at 5.5v or 2v depending on whether the cars ECU is in its sleep mode or not (has to do some with the CAN bus system). Below is the factory wiring diagram for how the door trigger works. same for lock and unlock...
View attachment 1727644459765.png
To use this ground trigger with the Arduino Nano, I connected it all up in the following manner:
1705856163803 (1).png
To test it out, I first used a perf board and soldered everything up accordingly. And then used an external 12v battery to kinda simulate the ground triggers and test everything out before plugging it in the car and well, it worked perfectly. Wired it all up in the car and Success!!

But didn't stop there, wanted to make it a bit more permeant, and so I designed a PCB using the exact same Diagram and connections and got it printed from Elecrow. But that is where the problem started.

When I tested the PCB using the external 12v battery, everything worked as it should. However, wiring it up to the car didn't give similar results. The Arduino does not seem to pick up the ground signal from either the door, lock or unlock trigger wires. The weird thing is, my car has an aftermarket car alarm which also sends out ground triggers to lock and unlock the car when the key fob is used. wiring the PCB to its wires made it work as it should, meaning the Arduino could recognize the ground triggers normally from the car alarm. (Using serial monitor to know if triggers are active or not)

I'm kinda stuck now as I'm not sure what the problem might be.

I do have my doubts on two things however but not really sure if those are the culprit here...
First, while designing the pcb using Fritzing, I checked on the Ground Fill option which means all the empty part of pcb where there are no traces will be filled with copper and connected to ground. Maybe that is somehow affecting the triggers from being interpreted correctly by the arduino and messing up the signal? then again, it works perfectly when tested with a 12v battery or when hooked up to the car alarm.
Secondly, I have my doubts on the ardunino nano I'm using as well. While desoldering it from the perfboard and soldering it on the pcb, i think i messed up something because now IDE is not able to upload code to it on its first try. i have to keep pressing the reset button on the nano while the IDE tries to upload code and eventually, after a minute or two and a few failed attempts, it uploads the code. Do note, the nano otherwise works perfectly. Serial monitor, other test codes for turning on and off relays etc..

Im at your mercy now to help me through this project. Feel free to ask any questions that you might have to further understand what I'm working with.
 

panic mode

Joined Oct 10, 2011
4,864
why would you have Arduino nano soldered to a pcb? header pins and sockets are dirt cheap and allow you to easily disconnect things. that can be handy specially while product is still in development stage.

also why is the input connected to 1.5V? i would like to have some safety margin to ensure proper sensing.

the way see it input current is low (few mA), 1N4007 have Vf of about 0.5-0.6V at low currents. the optocoupler diode has Vf of about 1V. so to activate it, input voltage need to be higher than 1.5-1.6V. and we did not get to resistor yet... that means your 1.5V inputs voltage is insufficient for reliable operation. this would work much better if the input voltage would be guaranteed to be at least 2V. . i don't see why not use 3.3 or 5V. if you intend to keep the input voltage that low, at least consider to replace that diode for a Schottky or connect 1N4007 differently so that it still protects the optocoupler but it's Vf is not a limiting factor any more:
1727668550994.png
 
Last edited:

Thread Starter

Ping pong

Joined Feb 13, 2022
91
. i don't see why not use 3.3 or 5V.
View attachment 332704
The diagram provided is a bit old, the voltage that I found optimal for this case was like 1.8v.
I wasn't willing to raise it any more than 2v tho considering the trigger wires hold voltage of around 2v when the car is in its sleep state and wouldn't want voltage to run through the power supply (the 1.5v shown in diagram) into the cars trigger wires. When set at 2v+, the trigger wire maintains that voltage even during the cars sleep state which I think is bound to break something. Again, don't know much about the CAN bus system.
As for the headers, yeah I am definitely soldering those on next. Didn't thing I would be running into any issues with the PCB hence why ended up soldering it straight on.
 
Top