Previous in Forum: Power Cables Ampacity   Next in Forum: Operating Cycle in a Breaker
Close
Close
Close
19 comments
Rate Comments: Nested
Power-User

Join Date: Nov 2010
Posts: 277

Modifying the Dimmer Circuit

10/23/2011 1:47 PM

Hi guys,

I have this link which has a basic dimmer circuit (look at the Leading Dimmer Circuit). If I am right, the variable resistance is used to change waveform across the load for a leading edge dimmer. Its set to 50% in the waveforms shown.

My question is, how can I modify circuit for the % of ON time to be varied by sending parallel bits (say 8) from a microcontroller? Because I want to make this programmable, not change it manually.

If I have 8 bits, I have 256 discrete levels. For example: for 0xFF (decimal 255) sent, it can be 100% of the waveform, for 0x7F (decimal 127), it can be 50%. Likewise. Any suggestions?

Regards,

Jay.

Register to Reply
Pathfinder Tags: dimmer circuit duty cycle
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru
Popular Science - Weaponology - New Member United Kingdom - Member - New Member

Join Date: May 2007
Location: Harlow England
Posts: 16512
Good Answers: 670
#1

Re: Modifying the Dimmer Circuit

10/23/2011 2:01 PM

You can get digital potentiometers these days, a digital input gives a resitance proportional to the data.
Try googling digital potentiometer. digial variable resistance, or digital programable resistor.
That would prob be simplest.
Del

__________________
health warning: These posts may contain traces of nut.
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#3
In reply to #1

Re: Modifying the Dimmer Circuit

10/23/2011 9:10 PM

Sounds good - but I'm not sure what's the highest voltage it would ever see - may need some protection(?). Also, optoisolation is a good idea. (Hic).

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Power-User

Join Date: Nov 2010
Posts: 277
#8
In reply to #1

Re: Modifying the Dimmer Circuit

10/25/2011 2:03 PM

I had that in mind, but was not sure if I could get digital potentiometer where I stay. I could use an R-2R laddder, but that would make the circuit bigger in space. But for now, I think using a digital potentiometer is the best option.

Register to Reply
Power-User

Join Date: Nov 2010
Posts: 277
#10
In reply to #1

Re: Modifying the Dimmer Circuit

10/26/2011 1:06 AM

Nevertheless, which IC would you suggest for such a circuit? Would the AD8400 be a good option?

Register to Reply
Guru
Popular Science - Weaponology - New Member United Kingdom - Member - New Member

Join Date: May 2007
Location: Harlow England
Posts: 16512
Good Answers: 670
#11
In reply to #10

Re: Modifying the Dimmer Circuit

10/26/2011 2:22 AM

Dunno, ya gotta read the spec and make your own decision.
Del

__________________
health warning: These posts may contain traces of nut.
Register to Reply
Guru
Hobbies - HAM Radio - New Member Hobbies - Model Rocketry - New Member

Join Date: Jan 2007
Posts: 787
Good Answers: 52
#2

Re: Modifying the Dimmer Circuit

10/23/2011 7:52 PM

This link may be useful to you

http://www.dv-fansler.com/Computer%20Lights/dimmers.htm

Dimming from a microcontroller is often done for computer controlled xmas lights and searches for things relating to that should give you good results. There are a few different ways of doing this, so you can decided which one works best for your use.

Register to Reply
Power-User

Join Date: Aug 2008
Location: Melbourne, Australia
Posts: 476
Good Answers: 32
#4

Re: Modifying the Dimmer Circuit

10/23/2011 11:17 PM

The more conventional approach when using a uControllers in dimming circuits is to provide a zero crossing signal to the uCont and have it control the gate on the thyristor directly.

__________________
johny451
Register to Reply
Guru
United States - Member - Hobbies - Fishing - New Member Hobbies - Target Shooting - New Member Hobbies - RC Aircraft - New Member Engineering Fields - Aerospace Engineering - New Member

Join Date: May 2009
Location: Saint Helens, Oregon
Posts: 2216
Good Answers: 70
#5

Re: Modifying the Dimmer Circuit

10/24/2011 12:17 AM

I'm curious as to what type of light your wanting to control with your dimmer? On a previous thread, the OP was wanted a wiring "plan" for replacing a wall toggle switch with a wall mounted dimmer switch. It sounded simple enough until post #21 of that thread, that we got a hint that the OP was planning to use CFLs on the dimming circuits. Not saying that it wouldn't work, just that he wasn't aware of some of the draw backs of controlling CFLs with a dimmer switch. Another thing I'm curious about is, do you have the extra room in the switch box to allow for the extra components of a programmable dimmer? I don't know what your working with but I would venture to say, that your going to need either, an extra deep single gang box or a double gang box to allow for your programmable dimmer.

__________________
Confucius once said, “ Ability will never catch up with the demand for it".
Register to Reply
Power-User

Join Date: Nov 2010
Posts: 277
#9
In reply to #5

Re: Modifying the Dimmer Circuit

10/25/2011 2:06 PM

Not for the CFL.

Register to Reply
Associate

Join Date: Aug 2011
Posts: 40
Good Answers: 4
#6

Re: Modifying the Dimmer Circuit

10/24/2011 1:18 AM

Hi One & All,

1.) Microchip manual TB094 http://ww1.microchip.com/downloads/en/AppNotes/91094A.pdf has a very nice simple circuit using a PC chip that works as a Digital dimmer at 110V AC. I would add fuse of about 1.5A slow blows type on the A/C input. The other thing that might be a problem, You will have to write your own program but they give you a lot information to help you. Plus, you need to buy a programmer device. The programmer device usually comes with programming software.

2.) Use a Velleman-kit K8064 http://www.apogeekits.com/PDF_Files/Light_Dimmer_Manual.pdf. Plus, using a LM117 http://www.national.com/ds/LM/LM117.pdf as controlling voltage source.

3.) Onsemi Pub AND8011 http://www.onsemi.com/pub_link/Collateral/AND8011-D.PDF has nice circuit.

4.) Look at another simple circuit at http://www.electro-tech-online.com/attachments/electronic-projects-design-ideas-reviews/48250d1290173549-ac-dimmer-circuit-microcontroller-controlled-dimmer-parts.jpg

Let us know how the work out?

BEN

Register to Reply
Guru
United States - Member - Hobbies - Fishing - New Member Hobbies - Target Shooting - New Member Hobbies - RC Aircraft - New Member Engineering Fields - Aerospace Engineering - New Member

Join Date: May 2009
Location: Saint Helens, Oregon
Posts: 2216
Good Answers: 70
#7
In reply to #6

Re: Modifying the Dimmer Circuit

10/24/2011 1:47 AM

I don't know, it seems like a lot of work for reinventing the wheel and with more components to fail. I always liked the K-I-S-S approach.

__________________
Confucius once said, “ Ability will never catch up with the demand for it".
Register to Reply
Power-User

Join Date: Nov 2010
Posts: 277
#12

Re: Modifying the Dimmer Circuit

10/29/2011 3:40 AM

Can anyone tell me if I used AD8400 instead of the variable resistor in the circuit shown above, will it work? My concern is using AD8400 with the mains (240 V, 50 Hz AC). I don't know if it will be able to handle.

Register to Reply
Guru
Popular Science - Weaponology - New Member United Kingdom - Member - New Member

Join Date: May 2007
Location: Harlow England
Posts: 16512
Good Answers: 670
#13
In reply to #12

Re: Modifying the Dimmer Circuit

10/29/2011 4:14 AM

Ok...
Out of the kindness of my feline heart, and the fact that I gave you a bum steer.
I googled AD8400 spec. The resistor terminal maximum voltadge is the VDD supply of the chip, (VDD being 2.7 to 5.5 volts max) therefore NO it's not suitable.
The point is, if you can't understand the spe's sheet of an IC you have almost zero chance of using it successfully.
I'm not having a pop at you. A while ago I tried to use a fancy battery charger IC... it was pants, even with the application notes it didn't work, (It was trying to fulfill too many functions at once, SMPSU chip, battery charger etc) so I gave up and made a simple 3 stage charger myself.
Some manufacturers have good app notes and chips which work (Maxim, NS) some have spec sheets and notes written by troops of marauding monkeys with typewriters.
Del

__________________
health warning: These posts may contain traces of nut.
Register to Reply
Active Contributor

Join Date: Oct 2011
Location: DALLAS, USA
Posts: 22
#14

Re: Modifying the Dimmer Circuit

10/29/2011 1:30 PM

You have supplied the basic circuit BUT FORGOT and possibly with that in mind -- what you are trying to do -- that has generated a lot of messages that at the end are not usable by you because you do not explain IN DETAIL what you want to do

It seems that You want to do it digitally and if it is like that why don't you say it to assist those that want to assist you .

To accomplish such digital control you need to have a reference and that is the zero crossing of the sine wave feeding the triac circuit -- so the digital circuit receiving the reference point then the , I presume a microprocessor, will determine where the trigger pulse is generated to turn the TRIAC -- ON - remembering that the TRIAC turns OFF when the sine wave crosses a voltage level toward ZERO volts when the holding Current of the TRIAC is lower -- also remembering that the TRIAC has to have a certain minimum voltage above the generated holding current to stay ON for the rest of the half Hertz .

Detail what you want to do and you will get the proper assistance, I think !!

Register to Reply
Guru
United States - Member - Hobbies - Fishing - New Member Hobbies - Target Shooting - New Member Hobbies - RC Aircraft - New Member Engineering Fields - Aerospace Engineering - New Member

Join Date: May 2009
Location: Saint Helens, Oregon
Posts: 2216
Good Answers: 70
#15
In reply to #14

Re: Modifying the Dimmer Circuit

10/29/2011 2:15 PM

Stick around CR4 long enough, you too, will acquire the ability to read one of these

And this not to offend the OP, just some most times, you'll need.....

__________________
Confucius once said, “ Ability will never catch up with the demand for it".
Register to Reply Off Topic (Score 5)
Power-User

Join Date: Nov 2010
Posts: 277
#16
In reply to #14

Re: Modifying the Dimmer Circuit

10/31/2011 2:57 PM

"Detail what you want to do and you will get the proper assistance, I think !!"

I want to change the duty cycle of the dimmer output using binary signals from 4 or 8 pins of the microcontroller (I am not using a microprocessor, I am using Atmega16).

Del the cat gave reason as to why I can't use the AD8400, so what is a good option here?

Register to Reply
Active Contributor

Join Date: Oct 2011
Location: DALLAS, USA
Posts: 22
#17
In reply to #16

Re: Modifying the Dimmer Circuit

10/31/2011 3:15 PM

You are using a microprocessor it is the Atmega 16 which is an 8 bit unit.

You need to have the zero cross reference of the sine wave , know the sine wave 1/2 frequency and learn to pulse the Triac starting at around 170 degrees from zero crossing with a pulse at least 1 millisecond duration and increment the TRIAC time by regressing toward the zero crossing which give a PWM to the TRIAC, the maximum width in this case would be around from 10 degrees from Zero crossing to 170 degrees from zero crossing .

http://www.atmel.com/dyn/resources/prod_documents/doc2466.pdf

A wiser message would be to show what you want to do as a final product -- the AD8400 is totally unnecessary if you learn to use the microprocessor well.

Register to Reply
Power-User

Join Date: Nov 2010
Posts: 277
#18
In reply to #17

Re: Modifying the Dimmer Circuit

11/02/2011 7:05 AM

Yes, but Atmega16 is a microcontroller why do you keep calling it a microprocessor?

Register to Reply
Active Contributor

Join Date: Oct 2011
Location: DALLAS, USA
Posts: 22
#19
In reply to #18

Re: Modifying the Dimmer Circuit

11/02/2011 11:48 AM

A micro controller is a micro processor -- just semantics

See the block diagram of your ATMEGA 16 .

Register to Reply
Register to Reply 19 comments
Copy to Clipboard

Users who posted comments:

ben1son1 (1); dj95401 (3); frankd20 (1); Jay_ (6); JohnDG (1); Johny451 (1); Nando37 (3); user-deleted-1105 (3)

Previous in Forum: Power Cables Ampacity   Next in Forum: Operating Cycle in a Breaker

Advertisement