I have been working on a small project that adds the coming home feature in my car (turns the car headlights on for a set time when the car is unlocked).
The wire in my car that I am tapping into shows 5v constant normally but when the car is unlocked, it pulses with a ground or low signal before returning back to 5v. However, when the car is in its sleep state, the voltage in this wire drops down to about 2.5-3v. This is the wire I'm using as a trigger for the Arduino to turn on the headlights.
The problem that I'm facing is that when I connect this wire to Arduino using a pull-up resistor, the Arduino maintains the voltage of the unlock wire at 5v which isn't a problem but when the car enters its sleep state, this unlock wire isn't able to drop to 2.5v rather it draws power from the 5v source of the pull up resistor and hence remains at a constant 5v.
I probably cannot use diodes or relays since those wouldn't be effective in this case.
I haven't had a problem as of yet but I'm pretty sure that in the long run the result might not be in my favor. Either the battery is going to start going bad or worse some electrical fault is going to pop up in the car. Hence why I've decided to remove this from the car for now.
I have worked on similar projects on my car multiple times, but this is probably the first time I'm using a negative trigger hence why somewhat confused. will be attaching a small diagram below that will help explain everything in case I haven't been able to explain it properly above.
The wire in my car that I am tapping into shows 5v constant normally but when the car is unlocked, it pulses with a ground or low signal before returning back to 5v. However, when the car is in its sleep state, the voltage in this wire drops down to about 2.5-3v. This is the wire I'm using as a trigger for the Arduino to turn on the headlights.
The problem that I'm facing is that when I connect this wire to Arduino using a pull-up resistor, the Arduino maintains the voltage of the unlock wire at 5v which isn't a problem but when the car enters its sleep state, this unlock wire isn't able to drop to 2.5v rather it draws power from the 5v source of the pull up resistor and hence remains at a constant 5v.
I probably cannot use diodes or relays since those wouldn't be effective in this case.
I haven't had a problem as of yet but I'm pretty sure that in the long run the result might not be in my favor. Either the battery is going to start going bad or worse some electrical fault is going to pop up in the car. Hence why I've decided to remove this from the car for now.
I have worked on similar projects on my car multiple times, but this is probably the first time I'm using a negative trigger hence why somewhat confused. will be attaching a small diagram below that will help explain everything in case I haven't been able to explain it properly above.
Attachments
-
41.2 KB Views: 4