Need help on a 12V car project

Discussion in 'The Projects Forum' started by StuRox, Nov 24, 2008.

Thread Status:
Not open for further replies.
  1. StuRox

    Thread Starter Member

    Nov 24, 2008
    21
    0
    Hello all,

    Hoping that some of you guys can shed a bit of ‘light’ on a problem I have.

    I am in the process of re-wiring the rear lights on my BMW to the new LED versions.

    However, BMW being 'BMW' haven't done things straight forward!

    In the car, they use a one filament bulb as the tail and stop, sending 6v to light as the tail, and then 12v to act as the brake.

    In the new lights, they have LED light bars to act as the tail, which I have working, but my brake lights are still dimly lit, to which I need to remove the 6v supply.

    I have tried using a 12v relay to act as a 12v switch, but this hasn't worked, as clicks rapidly once the brakes have been applied, and keeps the lights on.

    So what I need is a device that soaks up the 6v and only lets out the output to the bulb when it hits 12v....is there such a thing, as searched high and low, and not come up with anything like a 12v switching diode etc.

    I know it can be done, but I need educating.....please help......oh, and I hope the above makes sense, as I know what I mean, and can be sometimes hard trying to explain to other people.

    Anything else I can say to help, please let me know, but have enclosed a pic to try and help, as the left side is how it is, and the right side I have temporarily removed the brake lights to show how it should light up.

    [​IMG]
     
  2. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,694
    904
    Are you sure BMW sends 6V and that it is not PWM? With PWM, your voltmeter will not respond fast enough to give you an accurate peak voltage. The rapid clicking of the relay may be related to the PWM frequency.

    Can you locate the tail/brake light driving board? If it's PWM, you might attack it at the control board. Alternatively, you could take the PWM signal, use a low-pass (RC filter) to control a transistor that would then drive a relay without the rapid clicking. See the recent thread on this forum that asks whether a capacitor can keep a relay turned on.

    John
     
  3. StuRox

    Thread Starter Member

    Nov 24, 2008
    21
    0
    Thanks John,

    Forgot to say, I am a newbie to this site, so unsure of the abbreviations you are using.....

    If you can explain in a lay person DIY then that would be great, as although I know a bit of electronics - this is getting a bit beyond me, thanks....
     
  4. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,694
    904
    PWM (Pulse Width Modulation) is a way to control the power while retaining the same voltage. Basically, it switches the light on and off rapidly to dim it. I saw a circuit several years ago used by BMW to do just that, which is why I questioned whether it was truly 6 V or PWM. The circuit used a microcontroller.

    John
     
  5. StuRox

    Thread Starter Member

    Nov 24, 2008
    21
    0
    thanks for that John - ye it is this type of circuit, as I thought it had some gone to AC from DC, as when you look through a digital camera, you can see the light almost strobing....

    So can I just use the wire that goes to the light, with the suggestion you made above?

    If so, is there any type of 'low-pass (RC filter)' I need and also what sort of 'transistor' will I require? Will this then just connect to the 12v relay as I previously setup?

    Cheers

    Stu
     
  6. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,694
    904
    Here's the type of circuit I described.
    View attachment 5544
    Basically, C1 is charged by the PWM signal. I don't know if the input diode is necessary. I put it there to keep the capacitor from discharging back through the unknown source circuit during low states. R1 ensures the capacitor discharges when there is no signal. The transistor is a mosfet, and its gate will turn on fully at 8 to 10 volts. It will stay on, rather than blink so long as there is adequate input. R1XC1 determines those timings. I suspect something around a 1 uF capacitor and 220K resistor will work (i.e., time constant = 0.22 second). You can increase either to increase that value.

    The relay runs the new light circuit off 12 V.

    Caution: I am not very good at theory and am pretty much a novice too. I have seen similar circuits for the same purpose and tend to build and test to get the right values rather than calculate them.

    John
     
  7. StuRox

    Thread Starter Member

    Nov 24, 2008
    21
    0
    Ok, Iink I am now getting this...

    So I need to get the following (per Light):-

    1 uF capacitor
    220K resistor
    12v Relay
    Mosfet Transistor
    and a couple of 12v Diodes

    I am fine with everything except the Transistor - as I have had a look at my local Electric shop (Maplins) and searched Mosfet, and quite a few things came up - and I have never used a Transistor before, so any help on which one I need?

    Cheers

    Stu
     
  8. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,694
    904
    How much current does your relay draw? Probably not much, so almost and N-channel mosfet will work. You need an allowable drain current greater than the relay coil. I have used a small 2N7002 in a similar application to run a relay. John
     
  9. StuRox

    Thread Starter Member

    Nov 24, 2008
    21
    0
    I have just got 12v 30A and 40A relays that I use

    Also, just searched for 2N7002 and it has brought them up but with SMD on the end - is this the right one?
     
  10. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Hmm - sounds to me like your new LED taillights may have a built-in constant current circuit, perhaps with capacitors on the input. That would cause them to look about the same intensity all the time, regardless of the vehicle's PWM input.
     
  11. StuRox

    Thread Starter Member

    Nov 24, 2008
    21
    0
    Found this one, just unsure which pins are for what???

    [​IMG]

    Also, been looking at the capacitor's and they require a few more numbers:-

    xx uF xx v capacitor - any idea's - I presume the volts is to be 12V, but not sure on the first figure??
     
    Last edited: Nov 24, 2008
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Rule of thumb on capacitor voltage is to double what you expect to see in the circuit.

    2N7000 MOSFETs will be easier for you to work with than 2N7002s.
    See datasheet, attached.
     
  13. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,694
    904
    Let's be sure we are all talking about the same thing. My understanding is:

    1) Your led fixture plugged into the original tail light circuit. It gives good brightness and is not intended to increase in brightness when the brakes are applied. SgtWookie makes a good point, but I am assuming the LEDs are only for the tail light.

    2) When you made the change, the original brake light, which used to respond to application of the brakes, no longer responds and stays dim as if it were a tail light only.

    3) There is only one positive wire that feeds both lights. Thus, my assumption was that the wire was PWM'd to give approximately 50% power for the tail lights, and when brakes are applied, it gave full (100%) power to brighten the bulb.

    4) If 1-3 are correct, we can see that the LEDs stay constant (e.g., SgtWookie's comment), but I don't understand why with brakes applied, the duty cycle doesn't go to 100%, but rather remains low.

    Questions:

    1) When you apply the brakes, what happens to the measured voltage on the power wire?

    2) Are we dealing with only 2 wires: 1) One ground, which may be attached to ground near the lights or even part of the mounting and not identifiable as a wire per se; and 2) Signal/power. Or, are there 2 or 3 wires. One of which is signal/power and one is feedback?

    3) If your tail light or brake light goes out, is there a warning light on the panel?

    There are lots of possibilities for what is going on. I think we need a better understanding before building the circuit.

    As for which pin is which, go to: http://www.alldatasheet.com/view.jsp?Searchword

    You can look up any part and find out what pin does what.

    John
     
  14. StuRox

    Thread Starter Member

    Nov 24, 2008
    21
    0
    1) Your led fixture plugged into the original tail light circuit. It gives good brightness and is not intended to increase in brightness when the brakes are applied. SgtWookie makes a good point, but I am assuming the LEDs are only for the tail light.

    I have used a different feed for the tail light to light the LED bars, so they are at a consent voltage when the tail lights are on.


    2) When you made the change, the original brake light, which used to respond to application of the brakes, no longer responds and stays dim as if it were a tail light only.

    The brakes still work as normal, dim lit for tail and bright for brakes - this is the feed I need to take away the 6v feed to stop dimmly lighting the brake light


    3) There is only one positive wire that feeds both lights. Thus, my assumption was that the wire was PWM'd to give approximately 50% power for the tail lights, and when brakes are applied, it gave full (100%) power to brighten the bulb.

    This is correct

    Questions:

    1) When you apply the brakes, what happens to the measured voltage on the power wire?

    Goes to 12v

    2) Are we dealing with only 2 wires: 1) One ground, which may be attached to ground near the lights or even part of the mounting and not identifiable as a wire per se; and 2) Signal/power. Or, are there 2 or 3 wires. One of which is signal/power and one is feedback?

    there is one ground and one wire to the tail/brake

    3) If your tail light or brake light goes out, is there a warning light on the panel?

    Yes, have used load resistors to stop getting error messages

    Does this help?
     
  15. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,694
    904
    Great. Now, I think I understand. The circuit I drew did the opposite. It would take the 50% power and allow you to up convert it to 12V at full power via the relay. Making the time constant very short (smaller resistor and or capacitor) might work, but there is probably a much better way.

    What you need is something that responds to full 12V DC, but not to pulsed DC. That must be why you used the 12V relay, thinking it would not activate at the lower apparent voltage. Let me give that some thought.

    John
     
  16. StuRox

    Thread Starter Member

    Nov 24, 2008
    21
    0
    Like I said, its hard for me to explain in words without you actually seeing it - but glad you now understand (hopefully ;) )
     
  17. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    See the attached for one approach.

    V1 represents a square wave generator running at 100Hz, 50% duty cycle; my guess as to what kind of signal is coming out of your cars' PWM circuit.

    R1/C1 form an integrator circuit. R2 provides a constant discharge for C1. D1 is a blocking diode, so that the PWM circuit can't drain C1 via R1. This causes C1 to charge/discharge to a relatively constant voltage.

    R3 is a reference level adjust. Right now, it's set to midway just to demonstrate what happens when the integrated square wave crosses over the reference level. R3 is adjusted so that Q1 is OFF when the running lights are on, but ON when the brakelight comes on.

    LM339 is a quad comparator. An LM2903 dual comparator would be a much better choice, but I didn't have one in my library.

    R4 is a pull-up resistor. LM339 and LM2903 comparators have "open-collector" outputs; they can't source current, only sink it.

    R5 is a "snubbing" resistor to prevent oscillations when the gate of Q1 is being charged/discharged.

    Q1 is a P-ch enhanced power MOSFET capable of 11A current.

    R6 and D2 represent your taillight.
     
  18. StuRox

    Thread Starter Member

    Nov 24, 2008
    21
    0
    Blimey :eek: So that is what I need to stop the brake lights dimly lighting up....don't suppose you have all that lying around spare??

    Also, I have seen another picture of a prototype version that does the job (but this takes care of the LED bars as well as the LED indicators, which I don't need), but been unable to put the pieces together...

    [​IMG]

    any of these familiar to you guys to use in the circuit??
     
  19. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I can't see the photo you linked to.

    Please attach it using the Advanced options.
     
  20. StuRox

    Thread Starter Member

    Nov 24, 2008
    21
    0
    Whats the 'advanced options'? As I just inserted the pic using the normal procedure of clicking on the pic icon and inserting the link :confused:
     
Loading...
Thread Status:
Not open for further replies.