Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Variable resistor separate from control circuit?

Status
Not open for further replies.

biggerB

New Member
Good morning,

I am making a simple AC chopper for a dimmer circuit for a table lamp. It consists of a simple Triac which is fired using a RC circuit with a variable resistor. I've attached the schematic.
ads.png


My problem is that instead of using a potentiometer like in the circuit, I now want to control this circuit using a microcontroller to vary the resistance. The problem is that there is 220vAC flowing through the variable resistor and I obviously have a control signal of 5vDC coming from the microcontroller.

I have controlled AC switches before using DC control circuits by using simple relays which have 2 completely isolated coils. What I'm asking is, is there a similar way to control a variable resistor?

I've been researching photocouplers, looking for a solution. But it seems photocouplers behave similar to relays (in that there are only 2 states, either on or off). Any help would be appreciated.

Thanks !
 
A micro-controller dimmer is nothing like the crude analogue one you've shown - it's all done in software, you detect the zero-crossing point, and trigger the TRIAC a suitable time after that in order to set the dimming level you want.

If you wanted a crude analogue dimmer, then use a servo (or simple geared motor, if only want relative control and not absolute) to turn the pot, and a micro-controller to control the servo/motor.
 
A micro-controller dimmer is nothing like the crude analogue one you've shown - it's all done in software, you detect the zero-crossing point, and trigger the TRIAC a suitable time after that in order to set the dimming level you want.

If you wanted a crude analogue dimmer, then use a servo (or simple geared motor, if only want relative control and not absolute) to turn the pot, and a micro-controller to control the servo/motor.

Thankyou very much for your reply Nigel.

I am very new to analog circuitry and triacs, so forgive me for proposing a preposterous analog design :p

From what I understand, you are proposing that I use a triac which would be fired directly by my microcontroller through the coding. Correct me if I'm wrong there.

A few things that pop into my head if this is the case then.
  1. My microcontroller is powered by the same power source, except it passes through a transformer + rectifier + filter + linear regulator combination to obtain a steady 5v DC voltage. How would I go about using the output 5v of the microcontroller to control a triac? Though I imagine this would be done using an optocoupler, what are your thoughts?
  2. How would I go about detecting the zero crossing point of the input voltage? How would I translate that into an interrupt for my microscontroller?
Thankyou very much!
 
You could probably use this part, and have mcu control the opto coupler.
FODM3062-pinout.jpg

The part has the zero crossing detector built in. The link for the data sheet: https://www.fairchildsemi.com/datasheets/FO/FODM3063.pdf

This will keep you away from the mains more than building the zero cross detector from separate parts. Nigel may have a better solution?
 
Last edited by a moderator:
From what I understand, you are proposing that I use a triac which would be fired directly by my microcontroller through the coding. Correct me if I'm wrong there.

Nope, you're quite correct - that's the way it's done

A few things that pop into my head if this is the case then.
  1. My microcontroller is powered by the same power source, except it passes through a transformer + rectifier + filter + linear regulator combination to obtain a steady 5v DC voltage. How would I go about using the output 5v of the microcontroller to control a triac? Though I imagine this would be done using an optocoupler, what are your thoughts?
  2. How would I go about detecting the zero crossing point of the input voltage? How would I translate that into an interrupt for my microscontroller?

If you google for 'PIC light dimmer' there's loads of info out there - such as this example:

broken link removed

As you can see, it's quite simple (or at least the hardware is :D).
 
Last edited by a moderator:
Nope, you're quite correct - that's the way it's done



If you google for 'PIC light dimmer' there's loads of info out there - such as this example:

broken link removed

As you can see, it's quite simple (or at least the hardware is :D).

Thankyou for the reply.

I understand the circuit you gave in the link you posted, but it is connected to the mains grounds though a high resistance. Wouldn't it be better to just isolate the controller side of things completely?

For now this is what I think I'm going for, as this circuit completely isolates the AC Mains via 2 opto couples. However I may also look into opto-triacs with built in zero cross sensors like Mikebits said as they seem to be much easier to work with.
Capture.PNG
Thanks for everything guys !
 
Last edited by a moderator:
oops :{
I totally forgot about the dimmer part.
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top