Feasibility and Advice on Car Dimmer Input and LED Driver

Hello,

I had a few specific questions as well as hoping to get overall feedback and advice. I am building an off-road capable camper and for my interior I wanted to add some red map light and under seat lighting to allow visibility in the cabin that preserves night vision. My general objectives are as follows:

  1. Have an Arduino generate a PWM signal to feed two LED Drivers (Two Channels) to light the LEDs
  2. Use the existing car dimmer circuit (a 12v PWM) as an input to the arduino such that when I dim my cabin lights, these new lights will also dim to an extent.
  3. Use the Arduino to record rapid succession of turning these lights on and off such that within a short amount of time it will cycle through (Floor Lights Only, Floor Light - Map Light on Low, Floor Lights - Map Lights on High)
  4. Given that I will make a PCB board for this project, make a few extra and sell to fellow enthusiast on a forum I frequent to recover some of the cost and help those guys achieve a similar effect.

For reference, here are the lights I will be driving:

9.5 Feet of these

and two of these

Also for handy reference here is the LED Driver spec sheet:
https://www.mouser.com/ds/2/256/MAX16819-MAX16820-84188.pdf

I have attached a diagram of the circuit I made for this purpose from Multisim.

My specific questions are:

  1. I know that my battery voltage will be 13-16 volts depending on how it is charging at the moment, when I simulated this, I was under the impression that the bucking of the LED driver would clamp this down to 12 volts steady, and at constant amperage. This is not what I observed in multisim
    A. Does this matter, are my leds going to look great and last a long time?
    B. If not, how do I fix this

  2. The Rsense resistor used to regulate everything is given both in the spec sheet, and the in the excel worksheet linked to in the spec sheet (the calculator). Those two sources don’t agree, in the spreadsheet its telling me in a range of 3-6 amps of load, I will need a resistor between .04 to .20 ohms, tiny! even in the formula I calculate between 1 and 5 ohms.

A. am I way off, did I do something wrong?
B. how sensitive is all of this, as I want to put some pots on the final product so that other people that are using a very similiar setup (but maybe a little variance) can still use this solution.

  1. I was going to simply read the pwm signal from my cars dimmer after voltage dividing it and reading it on the analog pin, any issue with doing this?

  2. That dimmer connects to a an expensive 1200 dollar part on my truck, I have factored putting a .5amp fuse as well as a diode, is that enough protection to make sure my goofing around doesn’t break something expensive?

  3. Any and all general feedback, tips, or life lessons welcomed!

  1. The automotive environment is a hazardous one for electronics, but there are many who ignore the risk and get away with it. Circuit Protection Technology Overview for Automotive Applications

  2. Current sensing resistors are usually less than 1 ohm. The datasheet's Electrical Characteristics were derived using a 0.5 ohm resistor. Recheck your calculations. A potentiometer will not work and isn't needed just design it for a nominal 12v. Circuit protection should be filtering out voltage variations.

  3. The Arduino cannot accurately read a pwm signal directly that way.
    Fortunately there is the pulseIn function to help you out.

  4. Your diode and fuse are protecting the arduino(a good thing)not the dimmer. but your voltage divider is drawing way to much current from your dimmer. Raise your resistors up into the 50 - 100k range, you want to draw as little current from the dimmer as possible. The only danger the dimmer and your $1200 part are in is if you are drawing too much current from them.

Wow,

That feedback already helped considerably.

Do I need to regulate the output of the LED drivers to try to get the voltage close to 12v or does it not really matter. I know one of the two lights has a 12-24 v input range so I assume it doesnt matter on that one, not sure about the LED strips though.

no, the led's care much more about the current. that's why led drivers are constant current regulators vs the usual constant voltage regulators most other things use.

Amazing,

If I could pepper you with one last question. In regard's to getting those Rsense value perfect:

  1. My understanding is that a device like the LED would try to draw a certain amount of amps, as far the constant amperage supply I building, will it... for lack of my vocabulary... send to much current if I get those resistor values wrong

  2. is it better err to one side or the other on the calculator that the led driver manufacture provides... for instance, lets say I believe my load to be 3 amps @ 12v, per the led spec sheet should I enter 4 amps into the calculator to give wiggle room.

  3. After about 3 to 5 second of simulation time (about 5 real minutes) in multisim, I get a transient that multisim can't converge. Normally, this is ok, especially since the circuit works for a while through all it cycles. But do you see anything in terms of power smoothing or other general good best practices I am missing on my circuit diagram.

I think my problem is that I don't know the mechanism of the voltage supply used here, leading me to ask uneducated questions, thank you for the patience.

Led's are kinda backwards from most loads.
Normally a load doesn't care about current, as long as there is enough it takes what it needs and ignores the any extra. but if you give it more voltage than it needs it overloads and burns up. So they draw a certain amount of current but must have a regulated voltage.

Led's burn up if you give them to much current but don't really care about the voltage. So they draw a certain amount of voltage but must have a regulated current. This isn't exactly right but works well enough to get the point across.

Besides circuit protection I would probably use a voltage regulator to supply 12v to all the electronics.