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.

Phase control dimming

Status
Not open for further replies.

Adam

New Member
I am trying to do phase control dimming using a 16f627 on 4mhz internal osc, using pic basic

**broken link removed** , but I used two of the 22k resisters in series becuase of the higher voltage in the uk

Code:
@ device INTRC_OSC_NOCLKOUT
cmcon = 7

level var byte
stage var byte

level = 128

sync:
if portb.1 = 0 then loop
goto sync

Loop:


if portb.1 = 1 then zero
goto loop

zero:
pauseus 100

for stage = 0 to 255

if stage = level then
  High PORTB.0
  pauseus 35
  low PORTB.0
else
  pauseus 35
endif
next stage


goto Loop
end

I know that by the time it finishes the loops that the full half cycle hasn't ended, but it needs time to detect the next zero crossing (pulse 100u before crossing), also triggering in last 10% wont result in any light output.

Now my problem is there is a fast flicker on the light, far too fast to count them, but its noticeable (sort of like when a computer monitor is not on fast enough refresh rate)

I haven't got any kind of filtering, but someone says that when they did phase control dimming with a PIC, it didn't flicker when it had no filtering (its only dimming a 60w desklamp)

The switching part is a moc3020 with 8 amp triac
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top