Page 1 of 1

pwm dimmer

Posted: Thu Mar 28, 2019 10:43 pm
by Jdflyer
OK, I got my gauges restored by John and they are gorgeous. I had him do the LED lighting conversion and I can't speak highly enough of the quality of the work that was done. My biggest problem is when the lights are turned on the gauges flash through all their colors until I selected the one that I wanted on the easily lost remote. So I thought I would create a PWM dimmer that would:
1. Store my desired color,
2. Look original on the car
3 Allow me to leave (lose) the remote with no consequences to the operation.
4. Work for both RGB strips and single color bulbs.

Here is what I have so far. A single button cycles through all of the colors and the original car rheostat controls the brightness.

I had to convert the rheostat into a potentiometer (simple operation and completely reversible).
The PWM then maps the rheostat during a calibration phase.
After the calibration is complete the unit then acts like a normal dimmer.

Currently the rheostat has a constant 240mA @ 3.3V running though it as opposed to the stock max of 1.15A @ 14.4V (measured on a 1970 with stock incandescent bulbs ).

I would love to get some feedback on thoughts or suggestions. Thanks

https://drive.google.com/open?id=1hBTGu ... InfYjZcoE8

Re: pwm dimmer

Posted: Fri Mar 29, 2019 6:08 am
by notoptoy
We’ve got some crazy smart people here on this little forum! I’m impressed!

Re: pwm dimmer

Posted: Fri Mar 29, 2019 7:19 am
by cktrap
notoptoy wrote: Fri Mar 29, 2019 6:08 am We’ve got some crazy smart people here on this little forum! I’m impressed!
Some of us are just friggin nuts!!!

Re: pwm dimmer

Posted: Fri Mar 29, 2019 8:56 am
by theunz
I don't think we're talking 60s technology here🤔
Impressive though!

Re: pwm dimmer

Posted: Fri Mar 29, 2019 10:14 am
by Toptech360
Following. I tried tackling this on a different vehicle, long story short the radio display was led and factory pwm so turning on lights turns off display instead of dim. Is there a "box" or something you are using for the pulse width modulation?

Btw very cool!

Re: pwm dimmer

Posted: Fri Mar 29, 2019 11:06 am
by notoptoy
cktrap wrote: Fri Mar 29, 2019 7:19 am
notoptoy wrote: Fri Mar 29, 2019 6:08 am We’ve got some crazy smart people here on this little forum! I’m impressed!
Some of us are just friggin nuts!!!
I just didn't want to be the first, or only, one who had to ask what a PWM was! Thanks to subsequent (again, smarter) posters I now know that it's pulse wave modulation. I need one I think, maybe. It's just awesome to me that someone would do this, particularly as a Roadster specific modification!

Re: pwm dimmer

Posted: Fri Mar 29, 2019 2:20 pm
by theunz
But, do you know what pulse wave modulation is Tom? ☺️
I certainly don't!

Re: pwm dimmer

Posted: Fri Mar 29, 2019 3:15 pm
by notoptoy
theunz wrote: Fri Mar 29, 2019 2:20 pm But, do you know what pulse wave modulation is Tom? ☺️
I certainly don't!
You just had to complicate things, didn't you?

Not positive, but i think it has something to do with controlling the height, length, speed or duration of pulsed electrickery waves!
:shock:

Re: pwm dimmer

Posted: Fri Mar 29, 2019 7:37 pm
by Toptech360
Pulse width modulation. (Not wave although that may be an alternative term) it is like screen refresh, Hertz or cycles of off and on to change voltage. It happens so fast the human eye does not see that it actually is turning off and on, but rather interprets it as dimmer or brighter.

That is a very basic and somewhat innacurate layman's explanation.

Cheers and happy Friday!

Re: pwm dimmer

Posted: Sat Mar 30, 2019 1:24 pm
by Jdflyer
Toptech360 wrote: Fri Mar 29, 2019 7:37 pm Pulse width modulation. (Not wave although that may be an alternative term) it is like screen refresh, Hertz or cycles of off and on to change voltage. It happens so fast the human eye does not see that it actually is turning off and on, but rather interprets it as dimmer or brighter.

That is a very basic and somewhat innacurate layman's explanation.

Cheers and happy Friday!
Absolutely correct. In essence LEDs can either be on or off, there is no dimmed state. We trick the eye into believing it's dim by turning the actually light off for a moment. The longer it is off the dimmer it appears.
Basic-electric-circuit.gif
Top trace would be full brightness with the bottom being off. The percentage is the amount of brightness that the LED would appear to be. This is why our rheostats struggle with dimming LED's. All the rheostat does is reduce the current flowing to the LED until there isn't enough current to turn the LED on, so it goes from almost full bright to off without much of a change in-between.
Toptech360 wrote: Fri Mar 29, 2019 10:14 am Following. I tried tackling this on a different vehicle, long story short the radio display was led and factory pwm so turning on lights turns off display instead of dim. Is there a "box" or something you are using for the pulse width modulation?

Btw very cool!
Thank you.

I'm using an Arduino board to create the square wave and modulate it on and off to give the appearance of dimming. The board also has to recalculate how much time each bulb is on to give the chosen color. For example, the color bright pink has
Red=255
Green=102
Blue=178
Screen Shot 2019-03-30 at 11.13.17 AM.png
If you reduce it by half in order to dim it
Red = 127
Green = 51
Blue = 89
Screen Shot 2019-03-30 at 11.12.37 AM.png
Not what the user would expect when they turn the dimmer. So the color schemes have to be converted through a bunch of math to be converted between different coloring systems. I feel lucky that I found an included program in the board that could do that as my attempts failed miserably.

I've ordered some additional components to do some more testing before I finalize the design.

Please note I updated the original measured current values in my first post.
On a 1970 Datsun with standard incandescent lights the total current measured through the rheostat was 1.15 Amps @ 14.4 Volts at maximum brightness. My original number was theoretical and didn't include the resistance for the wiring in the car.

The modified rheostat is only running 0.24 Amps (240mA) @ 3.3 Volts on the bench. There shouldn't really be much of an increase to that number.

Re: pwm dimmer

Posted: Tue Apr 23, 2019 3:36 am
by Jdflyer
Update:

Just got in my components and built a test rig. I've rethought some of the ways that I was previously trying to read the dimmer. I've moved away from modifying it. This does allow quite of bit of jumping around as can be seen in the flickering of the lights, especially at dim setting.

The system does have a calibration mode to try and align the high and low end points of the dimmer rheostat with full bright and off. I have a few more programing issues to work out, but once that is done I'll have a prototype board made, mount the components and do some more testing.

I'm looking for a potentiometer that is also combined with a momentary push button that will fit into the original location. That way there is no need to try and find an extra spot for the calibration/select color button.

Heres the latest video of the system powering 16+ feet of LEDs using less than 2Amps of current. The rheostat is only seeing 3.3V @ max of 110mV.

https://drive.google.com/open?id=1Af0yw ... __8g5gsP_L

Re: pwm dimmer

Posted: Sat May 11, 2019 5:56 pm
by Jdflyer
Just ordered the PCB and will assemble the prototypes next week. I'll do some testing and then I'll be looking for some guinea, sorry I mean testing Volunteers.
Screen Shot 2019-05-11 at 3.51.38 PM.png
Screen Shot 2019-05-11 at 3.51.26 PM.png

Re: pwm dimmer

Posted: Sun May 12, 2019 2:24 am
by mraitch
I have absolutely NO idea of what the hell you are doing, other than it all seems to make sense.

Gauge lighting sucks, and I just would love to have a solution.

Keep us posted.

Thanks.

Re: pwm dimmer

Posted: Fri May 24, 2019 6:33 pm
by Jdflyer
1 completed prototype and two mostly completed prototypes. Just got called to work so will finish later this week and let everyone know the results.

The quarter is for size reference. I think I can make it a about 15% smaller to make it easier to mount and hide.
BF6371DF-67F8-4BF2-AF2C-77FC31EA09B7.jpeg