Notice: Click on the Disclaimer button prior to taking any action shown on this website.
SPECIAL NOTICE TO EUROPEAN UNION (EU) VIEWERS

This site may use cookies for delivering advertisements, and is not intended for use by subjects of the EU. Continued use of this site is acknowledgement of your compliance with all EU laws, and accepting full responsibility for any and all actions related to accessing this website, including (but not limited to) agreement to the use of cookies.

 

RV Super Dimmer Construction Details.

 

I originally constructed three different dimmer boards - a High Side, Low Side, or Combo High/Low. The Combo High/Low Side dimmer is perhaps more flexible, but requires extensive SMD (Surface Mount Device) soldering, which is beyond the capability of many hobbyists.

The High and Low side boards use thru-hole components, and are easier to construct. Other than the connection method of the LED to the dimmer, the functionality of all three boards are identical.

Since the High Side board will work with all LED configuations, that is the one that will be built. If you desire a Low Side board, use the link below.

 

High Side Board

To get stared with the project, you must down the documentation package at the right. The documentation package contains a schematic, Bill of Materials, and a detailed parts placement diagram for the circuit board.

In addition, you will need to decide how you want to configure the dimmer, and what controls will be needed, so you may need to order additional components not listed in the Bill of Materials (switches, Remote Control/Receivers, etc).


High-Side 2"x3" board fits into potting box.

Next, the circuit board is available from from OSHPark by clicking on the icon to the right. Unfortunately, there is a three board minimum order from OSHPark (must be three of the same board). This ends up being one of the more expensive items for the project.

However, many installations could use more than one board; for example, you could control the main overhead puck lights, the outside awning light, and perhaps other overhead lighting in the bedroom or salon. Thing is, each dimmer is independant, so they do not have to be centrally located. You can "tap in" to any wiring between the LED and it's on-off switch.

Order from OSH Park

Due to the cost of the circuit board and potting compound (which will provide more than enough material for 3 boards, the boards end up costing around $25 each, so they are not out of line with commercial dimmers (which cost between $10 and $60). Even when you add the $25 or so for the programmer and a few more dollars for the peripherials (Remote Control Wireless Transmitter, switches, etc), you are still within the cost range of a less capable commercial dimmer.

Since the construction video and documentation package provide adequate information about building the dimmer, I will not replicate that information here. Feel free to drop an email to RV-Project.com should you have any questions,

 

 

Automation

In order to program an ATTiny85, you need to accomplish a few tasks. First, you need to download the Arduino IDE (Integrated Development Envrionment), which is a fancy way to say the interface software for these microcontrollers. It is essentially the programmer. Ardunio is one of the public domain companies that was instrumental in the growth of microcontrollers for hobbyists, and their IDE is a free download.

 

 

At this point, if you were able to get the LED blinky program to work (from the Arduino IDE Setup Guide), you are ready to continue. If not, YouTube has many videos on installing the Arduino IDE, and adapting it for the ATTiny85. Some of these resources are very good, so it is not necessary to replicate that information here.

You will also need to download the Sketch, which is the program for the ATTiny85 MicroController, and contains all of the necessary instructions for the MicroController to function properly.

Super RV Dimmer Sketch

 

 

A few items of interest:

// set the timer mode with default Timer0 timer mode = 0 forever on
if(TimerMode == 1) interval = 3600000; //one hour
if(TimerMode == 2) interval = 7200000; //two hours
if(TimerMode == 3) interval = 14400000; //four hours
//28800000; //eight hours

This section sets the various intervals for the different timer modes. The current setup is for one, two, or four hours. Also, there is a reference line for eight hours. By simply replacing the interval on one of the above lines with that value, the time delay for that mode can be changed.

The time delay values are in mS (MilliSeconds). Therefore 28,800,000 is the time delay in mS. Divide by 1000 to obtain seconds; 28,800. And since there are 3,600 seconds in an hour, dividing 28800 by 3,600 equals 8 hours. Note that you must not use commas in the program.

 

//TCCR0B = TCCR0B & 0b11111000 | 0x01 ; //31Khz
//TCCR0B = TCCR0B & 0b11111000 | 0x02 ; //4Khz
//TCCR0B = TCCR0B & 0b11111000 | 0x03 ; //500hz (same as default)
//TCCR0B = TCCR0B & 0b11111000 | 0x04 ; //125hz

The default PWM frequency for the timer is 500Hz. If required to drive a specific LED, you can change the frequency according to the values shown. However, be absolutely sure you need to do this as the delay mechanism will not function properly. The same timer that controls the PWM frequency controls the delay, and by changing the timer, both are changed.

 

PWMLevel = int(pow(2,analogRead(A1)/128.0904)-1);
//PWMLevel = map(analogRead(A1),0,1023,0,255);

The first line is the logarithmic function for the dimmer. The second line is the linear equivalent. The value of A1 will be 0-1023, which is the Analog-to-Digital conversion of the voltage set by the dimmer potentiometer.Feel free to experiment as needed.

 

 

 

 

 

 

 

 

Advertisement
        

        

 


Last reviewed and/or updated Mar 20, 2026