pwm dimmer

Tech tips and how to's

Moderators: garth, notoptoy, S Allen

Jdflyer
Roadster Fanatic
Posts: 228
Joined: Mon Oct 26, 2015 12:50 am
Location: Phoenix, AZ

pwm dimmer

Post by Jdflyer » Thu Mar 28, 2019 10:43 pm

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

Last edited by Jdflyer on Sat Mar 30, 2019 12:46 pm, edited 1 time in total.
1970 SPL 311-29311
Phoenix, AZ

User avatar
notoptoy
Vendor-Site Supporter
Posts: 8830
Joined: Fri Oct 02, 2009 2:55 pm
Location: Winston-Salem, NC and Ocala, FL

Re: pwm dimmer

Post by notoptoy » Fri Mar 29, 2019 6:08 am

We’ve got some crazy smart people here on this little forum! I’m impressed!
"When all else fails, force prevails!" Ummm, we're gonna need a bigger hammer here.

67.5 SPL311 H20 w/5 speed
65 Impala Convertible
2017 C43 AMG

User avatar
cktrap
Monthly Subscriber-Roadster Enthusiast
Posts: 916
Joined: Sun Mar 23, 2008 8:56 pm
Location: colleyville,tx

Re: pwm dimmer

Post by cktrap » 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!!!
'70 SRL311
'10 GMC 2500HD

User avatar
theunz
Roadster Nut-Site Supporter
Posts: 1255
Joined: Sat May 02, 2009 1:54 pm
Location: Catoosa Ok.
Model: 2000
Year: High Windshield-68-70

Re: pwm dimmer

Post by theunz » Fri Mar 29, 2019 8:56 am

I don't think we're talking 60s technology here🤔
Impressive though!
__________

Mike M
1969 2000 solex mine since 1972, under resurrection. 1969 Porsche 911s -worth more, but not as valuable!

Toptech360
Roadsteraholic
Posts: 667
Joined: Mon Oct 28, 2013 1:59 pm
Location: Bellingham, Washington

Re: pwm dimmer

Post by Toptech360 » 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!
Dan
1964 Datsun SPL310. The Datsun
1997 Toyota Tacoma LX 4wd. The Truck
2009 Subaru Forester XT.
2017 Toyota AWD Swagger Wagon.

User avatar
notoptoy
Vendor-Site Supporter
Posts: 8830
Joined: Fri Oct 02, 2009 2:55 pm
Location: Winston-Salem, NC and Ocala, FL

Re: pwm dimmer

Post by notoptoy » Fri Mar 29, 2019 11:06 am

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!
"When all else fails, force prevails!" Ummm, we're gonna need a bigger hammer here.

67.5 SPL311 H20 w/5 speed
65 Impala Convertible
2017 C43 AMG

User avatar
theunz
Roadster Nut-Site Supporter
Posts: 1255
Joined: Sat May 02, 2009 1:54 pm
Location: Catoosa Ok.
Model: 2000
Year: High Windshield-68-70

Re: pwm dimmer

Post by theunz » Fri Mar 29, 2019 2:20 pm

But, do you know what pulse wave modulation is Tom? ☺️
I certainly don't!
__________

Mike M
1969 2000 solex mine since 1972, under resurrection. 1969 Porsche 911s -worth more, but not as valuable!

User avatar
notoptoy
Vendor-Site Supporter
Posts: 8830
Joined: Fri Oct 02, 2009 2:55 pm
Location: Winston-Salem, NC and Ocala, FL

Re: pwm dimmer

Post by notoptoy » Fri Mar 29, 2019 3:15 pm

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:
"When all else fails, force prevails!" Ummm, we're gonna need a bigger hammer here.

67.5 SPL311 H20 w/5 speed
65 Impala Convertible
2017 C43 AMG

Toptech360
Roadsteraholic
Posts: 667
Joined: Mon Oct 28, 2013 1:59 pm
Location: Bellingham, Washington

Re: pwm dimmer

Post by Toptech360 » 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!
Dan
1964 Datsun SPL310. The Datsun
1997 Toyota Tacoma LX 4wd. The Truck
2009 Subaru Forester XT.
2017 Toyota AWD Swagger Wagon.

Jdflyer
Roadster Fanatic
Posts: 228
Joined: Mon Oct 26, 2015 12:50 am
Location: Phoenix, AZ

Re: pwm dimmer

Post by Jdflyer » Sat Mar 30, 2019 1:24 pm

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.
You do not have the required permissions to view the files attached to this post.
1970 SPL 311-29311
Phoenix, AZ

Jdflyer
Roadster Fanatic
Posts: 228
Joined: Mon Oct 26, 2015 12:50 am
Location: Phoenix, AZ

Re: pwm dimmer

Post by Jdflyer » Tue Apr 23, 2019 3:36 am

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.

1970 SPL 311-29311
Phoenix, AZ

Jdflyer
Roadster Fanatic
Posts: 228
Joined: Mon Oct 26, 2015 12:50 am
Location: Phoenix, AZ

Re: pwm dimmer

Post by Jdflyer » Sat May 11, 2019 5:56 pm

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
You do not have the required permissions to view the files attached to this post.
1970 SPL 311-29311
Phoenix, AZ

User avatar
mraitch
Monthly Subscriber-Roadster Enthusiast
Posts: 3319
Joined: Mon Oct 02, 2006 7:03 pm
Location: Lake Balboa (SFV) - CA
Model: 1500/1600
Year: High Windshield-68-70

Re: pwm dimmer

Post by mraitch » Sun May 12, 2019 2:24 am

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.
Peter Harrison
1970 1600 (Stroker) - TOAD SAN (Eliza)
1970 1600 (Stock) - As Yet Unnamed
Lake Balboa (SFV) , California

Jdflyer
Roadster Fanatic
Posts: 228
Joined: Mon Oct 26, 2015 12:50 am
Location: Phoenix, AZ

Re: pwm dimmer

Post by Jdflyer » Fri May 24, 2019 6:33 pm

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
You do not have the required permissions to view the files attached to this post.
1970 SPL 311-29311
Phoenix, AZ