Subscribe to EDN
RSS
Reprints/License
Print
Email

Fader switch uses inexpensive controller

Control the brightness of an LED or incandescent lamp.

William Grill, Lenexa, KS; Edited by Martin Rowe and Fran Granville -- EDN, November 12, 2009

Customizing a model or a simulator with a bit of illumination is a nice touch. Rather than a simple on or off, you can add a touch of both refinement and control to your display with fading light. Employing a Microchip 10F20x microcontroller, the circuit in Figure 1 provides dual-rate fader control for a push-on/push-off switch, a momentary pushbutton switch, or a simple on/off SPST (single-pole/single-throw) switch. The circuit monitors and debounces the switch and generates a multiple-cycle, 470-Hz, PWM (pulse-width-modulated) output to drive LEDs or incandescent lamps. The circuit includes a Maxim MAX16823 IC that drives multiple LEDs.

See all of EDN's
Design Ideas

The microcontroller produces 64 linear steps of a PWM signal between 0 and 100% duty cycle. The controller maintains each pulse width for a variable number of cycles employing a table in the assembly code (Listing 1). You can modify the code to build profiles of LEDs or incandescent lamps by applying a settable dwell time to each PWM step. The code contains two tables to set fast- and slow-fade characteristics. The fade values provide a cubed index that produces a 3-to-1 fade ratio (Figure 2). Using the final state of the output at Pin 3 of the 10F200, you access the tabled number of dwell cycles from the first table entry to the last for a high final state or from the last entry to the first to arrive at the final low state.

Fade-transition timing is user-selectable for either a 3- or a 9-second period. The circuit periodically samples both the fade rate and button or switch mode, allowing you to multiplex the design or use it in multiple configurations. The mode control is on Pin 5 of the controller, and the rate control is on Pin 4. The application exploits the controller's internal 4-MHz clock and the configurable pullup resistors on the monitored inputs. A prototype of the circuit uses a 10F20x in an eight-pin DIP, but the controller is also available in a smaller SOT-23 package.

RSS
Reprints/License
Print
Email
Canon Resource Center

Featured Company


Most Recent Resources

Advertisement
Related Content

No related content found.

  • 0 rated items found.
Advertisement

KNOWLEDGE CENTER

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
Engineering Careers
Jobs sponsored by
Advertisement
About EDN   |   Site Map   |   Contact Us   |   Subscription   |   RSS
© 2012 UBM Electronics. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy

Please visit these other UBM Canon sites

UBM Canon | Design News | Test & Measurement World | Packaging Digest | EDN | Qmed | Pharmalive | Appliance Magazine | Plastics Today | Powder Bulk Solids | Canon Trade Shows