Help with circuit to manage new DRL's for my car

Discussion in 'Automotive Electronics' started by jplatt50, Jul 10, 2015.

  1. jplatt50

    Thread Starter New Member

    Jul 10, 2015
    10
    0
    Hello all. I'm new here and am looking for some assistance with designing a circuit for my new car. The car has DRL (daytime running lamps) that double function as the 'brights'. During daytime use when headlights are not on, the DRL circuit gets around 2vdc. When the headlights are on, this circuit goes to 0vdc. Whenever the brights are activated this circuit goes to 12vdc.

    I am adding LED's to the front of the car to also function as DRL's and am not yet decided upon two different scenarios so I will post both to get some input. The factory DRL circuit will be the trigger as to what the intended functionality is of my new LED DRL's. I will likely stick with scenario 1 as I am hesitant to cut the wire feeding the factory DRL lights since the car is a lease. The total draw of the new LED DRL's is 2amps @12vdc.

    SCENARIO 1)
    OFF-Whenever the DRL circuit is at 0vdc and the ignition circuit is at 0vdc, the LED DRL circuit should also be at 0vdc.

    ON-Whenever the DRL circuit is at 2vdc and the ignition circuit is at 12vdc, the LED DRL circuit should be at 12vdc. This is for daytime use.

    DIM- Whenever the DRL circuit is at 0vdc and the ignition circuit is at 12vdc, the LED DRL circuit should be at 2vdc (future adjustable to 12vdc if possible with potentiometer or other method). This is for night time use.

    BRIGHT- Only when the brights are manually flashed, the DRL circuit will be at 12vdc and the ignition circuit is at 12vdc, the LED DRL circuit should be at whatever is easiest. This is not a common occurrence.


    SCENARIO 2)
    OFF-Whenever the DRL circuit is at 0vdc and the ignition circuit is at 0vdc, the LED DRL circuit should also be at 0vdc. (SAME AS SCENARIO 1)

    ON-Whenever the DRL circuit is at 2vdc and the ignition circuit is at 12vdc, the LED DRL circuit should be at 12vdc and the factory DRL bulbs should be off (via a relay). This is for daytime use.

    DIM- Whenever the DRL circuit is at 0vdc and the ignition circuit is at 12vdc, the LED DRL circuit should be at 2vdc (adjustable to 12vdc if possible with potentiometer or other method). This is for night time use.

    BRIGHT- Only when the brights are manually flashed, the DRL circuit will be at 12vdc and the ignition circuit is at 12vdc, the LED DRL circuit should be at whatever is easiest. This is not a common occurrence.

    ------------------
    My personal experience is that I am extremely comfortable soldering and troubleshooting with a multi-meter but I have not designed a circuit from scratch. I am also not familiar with the different brands and nuances of certain electronic components but if given part numbers and a block diagram I can easily assemble it and test accordingly. A few years back I worked in a car stereo/alarm shop and my day to day tasks were installing elaborate stereo systems, alarms, remote starters, keyless entries and cruise controls (yes, cruise controls!). I am familiar with the necessity of properly fusing circuits, running wires safely in the engine compartment in spilt loom, and relays. Lots and lots of experience with typical 12vdc relays. I have spent the last 16 years in the home and commercial automation industry so I am also familiar with I/O's, RS232, IR, and control logic.

    Thank you in advance for your assistance!
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,524
    2,369
    By flash the brights manually are you refering to the Daytime light on full or the Hi-beam flash?
    Because auto's that have a head light Flash switch operate on the Hi-beams as a rule.
    There are a couple of methods that have been used for using the normal beams on DTRL, on my Olds, they switch the headlights in series when running DTRL mode.
    Another is to use a dropping resistor.
    Max.
     
  3. jplatt50

    Thread Starter New Member

    Jul 10, 2015
    10
    0
    By flash the lights manually, I mean that when you pull the lever toward you in the car to activate the hi-beam brights, it actually applies 12vdc to the same halogen bulb that is also used for DRL (at 2vdc) from the factory.
     
  4. alfacliff

    Well-Known Member

    Dec 13, 2013
    2,449
    428
    in europe its called a "light horn" gets peoples attention. my Alfa has it, also my ford pickup.
     
  5. jplatt50

    Thread Starter New Member

    Jul 10, 2015
    10
    0
    Anyone?
     
  6. Dr.killjoy

    Well-Known Member

    Apr 28, 2013
    1,190
    156
    What about using an arduinio with the analog pins....Not to burst you bubble but many people have tried to schematic the DRL and get no where with it .. My advice would to program a arduino to meet your needs or just install a simply switch and relay setup..
     
  7. jplatt50

    Thread Starter New Member

    Jul 10, 2015
    10
    0
    Thanks for the reply. Just received my arduino and relay board a couple days ago and now have the schematics for my vehicle BCU. Im very familiar with vbscript and the arduino language is straightforward. I've created a few test circuits and so far so good. I take your statement about "others not getting far" as more encouragement to make it happen and will post my code and schematic when done. I don't see a problem making this work as I planned above.
     
  8. jplatt50

    Thread Starter New Member

    Jul 10, 2015
    10
    0
    I think I'm going to add the wifi board to my arduino so that I can tweak the code after its installed in my car. One question I have yet to research is whether the arduino should be tied to the battery or to accessory in the car. Battery is most logical but I don't want it to drain the battery heavily. Will need to look up the current draw of it.
     
  9. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,007
    1,530
    Why not a simple window comparator? With 2V being the "window". Below 1v and above 3V would be off.
     
  10. jplatt50

    Thread Starter New Member

    Jul 10, 2015
    10
    0
    With all of the logic and conditions I have listed in scenario 2, I don't see how that would work.
     
  11. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,007
    1,530
    For scenario 2, the window comparator and a diode "or". Your going to need a relay or another type of switching device in this anyway, for the 2V supply.

    So in reality you want the add-on drl's to be on any time the ignition is on? And the original drl's to never be on, correct?
     
  12. jplatt50

    Thread Starter New Member

    Jul 10, 2015
    10
    0
    Close. The original DRL' also function as the high beam brights. So they only need to be on when I flash or activate the high beams with the stalk control.
     
  13. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,157
    If you got the schematic why not post it.
     
  14. jplatt50

    Thread Starter New Member

    Jul 10, 2015
    10
    0
    I haven't done a schematic yet. In fact I've never done a schematic before. Will hopefully get to it tomorrow since I have the day off.
     
  15. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    If you can't post the schematic then maybe you can draw a block diagram, that is to avoid guessing.
     
  16. jplatt50

    Thread Starter New Member

    Jul 10, 2015
    10
    0
    Here is a block diagram and a clearer scope description of how I want to use it. I realize that there are a lot of components missing but I wanted to get this posted in hopes that someone can help with a schematic. I have the Arduino and a breadboard setup at my desk and have been playing around with the test circuits. My knowledge of VB script is making it pretty easy to understand the examples but this circuit is a little above my head right now. Any help with the code is also appreciated!


    I will try to clarify my intent of use. The logic of the new LED DRL's will be determined by the state (voltage) of the factory DRL circuit. I feel that this is the easiest method since some logic is already present from the manufacturer. Note that the factory DRL halogen bulbs receive 2VDC during the day so that they are barely lit but when the high beams are activated, this SAME bulb gets 12VDC. I need to retain the use of the hi-beams but dont want them on during DRL use.

    During daytime, I want to break the circuit going to the factory DRL bulbs since they are ugly and I dont want them on. I will use the HI-BEAM relay for this.
    DAYTIME-Whenever the factory DRL circuit (PIN A1) is at 2vdc and the ignition circuit (PIN A0) is at 12vdc, the DAYTIME USE relay (PIN 3 OUT) should be high and send 12VDC to the pot that will allow brightness adjustment to the new LED DRL's.

    During night time, the factory DRL circuit (PIN A1) is off/at 0VDC. I would like to have the new LED DRL's to be on, but at a dim level so i want the NIGHT TIME USE relay to be high and this will send 12VDC to that pot so that i can adjust the LED DRL brightness.
    NIGHT TIME- Whenever the DRL circuit (PIN A1) is at 0vdc and the ignition circuit (PIN A0) is at 12vdc, the LED DRL circuit (PIN 2 OUT) should be high and send 12VDC to the pot that will allow brightness adjustment to the new LED DRL's.

    BRIGHT- Only when the brights (hi-beams) are activated by the driver (PIN A1) is at 12VDC and the ignition circuit (PIN A0) is at 12vdc, the LED DRL circuit (PIN 3 OUT) should be high and the HI-BEAM circuit (PIN 4 OUT) should also be high. This will actiavte the hi-beam bulbs and also activate the LED DRL's to the daytime brightness.
     
  17. jplatt50

    Thread Starter New Member

    Jul 10, 2015
    10
    0
    It works!!!! Proof of concept (without relays) on the breadboard just worked. With the pot turned all the way on, both the hi-beam and the daytime led's light. With the pot in the middle, the daytime led lights, and with the pot all the way off, the night time led lights.

    Now, if I can get some help cleaning up the code or making it more efficient I would appreciate it. Also need an assist with the circuit as I have not done a lot with the Arduino and relays. I don't have time to draw a schematic of the breadboard because I have to leave now but will do so later. I have attached a photo of it though. The short yellow wire is my "ignition" and the blue pot is used to alter the voltage going in to simulate the DRL input signal. Also just using the 5vdc from USB for now to test.
    20150717_172811700_iOS.jpg

    Here is the test code:

    int DRLinputPin = 1; //the output of the pot is connected to pin 1
    int IgnitionStatePin = 0; //this is the ignition pin voltage
    int hibeamrelay = 4;
    int daytimerelay = 3;
    int nighttimerelay = 2;
    int DRLinputValue; //declare variable to track the output of the pot
    int IgnitionState;
    int brightson = 0;

    void setup() // this function runs once when the sketch starts up
    {
    pinMode(2, OUTPUT); //declare the following pins as outputs
    pinMode(3, OUTPUT);
    pinMode(4, OUTPUT);
    }

    void loop() // this function runs repeatedly after setup() finishes
    {

    DRLinputValue = analogRead(DRLinputPin); //set the variable to equal read value of the pot
    IgnitionState = analogRead(IgnitionStatePin); //set the variable to equal read value of Input Pin A1
    //DRLinputValue = map(DRLinputValue, 0, 1023, 0, 255);
    DRLinputValue = constrain(DRLinputValue, 0, 1023);

    if (DRLinputValue > 1000) // if drl input is full on which implies brights
    //&& // AND
    //(IgnitionState > 1000)) // commenting out the ignition line because the hi-beams should always work
    {
    digitalWrite(hibeamrelay, HIGH); // turn the brights relay on
    digitalWrite(daytimerelay, HIGH); // also turn the daytime relay on
    }
    else
    {
    digitalWrite(hibeamrelay, LOW); // turn the brights relay off
    digitalWrite(daytimerelay, LOW); // turn the daytime relay off
    }

    if ((DRLinputValue > 5 and DRLinputValue < 999) // if drl input above 2v but less than 12v on which implies daytime
    && // AND
    (IgnitionState > 1000)) // ignition is on
    {
    digitalWrite(daytimerelay, HIGH); // turn the daytime relay on
    }
    else
    {
    //digitalWrite(daytimerelay, LOW); // turn the daytime relay off. had to comment this out because the bright circuit
    //wouldnt turn on the daytime relay with it uncommented
    }

    if ((DRLinputValue < 4) // if drl input is at 0vdc which implies night time
    && // AND
    (IgnitionState > 1000)) // ignition is on
    {
    digitalWrite(nighttimerelay, HIGH); // turn the nighttime relay on
    }
    else
    {
    digitalWrite(nighttimerelay, LOW); // turn the nighttime relay off
    }


    }
     
Loading...