Halogen lamp brightness control 12VAC (AC dimming)

Is it possible to control the brightness of a halogen lamp using a IMP001? Diagram of the device is presented . It has a detection circuit sine wave transition through zero . Pulse is output every 10 ms ( frequency 50 Hz) and fed to pin8 imp . Pin9 used as an output and sends a signal to MOC3021.
I can not understand how to adjust the brightness of the halogen lamp . Need to open the triac at a time sine wave. How to write the code is not clear. If someone is faced with a similar problem - help write code or lay howling for example. Thank you. And one more question . Is it possible to control the brightness of the lamp using PWM IMP001 ?


ON_OFF - pin9 (Digital_OUT)
CONT - pin8 (Digital_IN)

This is zero-cross triac dimming. See this blog post:

http://blog.electricimp.com/post/69522362891/light-bulb-moment-ac-dimming-with-the-imp

Looks like “cont” is your zero cross output (will go high when there is no voltage across pins 1/2 of the PC817), and ON_OFF needs to go LOW to turn the LED on - hence you need to use PTPG_OUT_ACTIVE_LOW

In the diagram the input terminals L and N - 220 are inputs VAC. Next there is a transformer converts 220 VAC to 12 VAC.To have this control scheme is worth between 220 VAC and step-down transformer.

No, you can use triac control on any AC signal. The blog post uses a 12VAC one.

Hello! Checked program IMP001 - everything works, lamp brightness changes. Thank you! But there is a curious crack - I think from the triac . Why think so.

  1. First, I excluded from the scheme down transformer 220VAC/12VAC and a halogen lamp . Instead, the lamp connected to the 220 VAC. Crackling preserved.
    2 . In my circuit triac used BTA24-600CW . In the datasheet for the triac is written that he snubberless . I removed from the circuit resistor R5 and capacitor C6 . Including schemes - crackling preserved.

How can I get rid of the cod ? Maybe it is not bursting at the triac , and capacitors - piezoelectric ? Or do something else , another element ?

I’m afraid I can’t help you debug your high voltage circuit remotely. Take care!

Thank you!

Are you sure its the triac crackling, not the renaming cap?

Are you leading or trailing edge dimming?

When you say there is “a transformer converts 220 VAC to 12 VAC” is it a transformer or something solid-state and in either case does the manufacturer specs say it’s “dimmable”