110-220V AC Digital Dimmer Module Microcontrollers 16 Levels 3V 5V opto-couplers ATMEL PIC


Please see below video 
https://youtu.be/tjeGFqFtIyM

Main Features:
  • Works on AC power supply
  • Load Capacity 12 Amp AC
  • Operating Voltage 5V DC
  • Works from any microcontroller input
  • 16 Levels of Control

The board can be used in applications where dimming of 110-220V AC power is required like dimming of bulb or fan. The input can be simple 4 bit high/low signal from microcontroller working at 3V or 5V which is isolated with the use of opto-couplers. Total of 16 levels of power control can be set from totally off(0%) to full on(100%) as per input control levels.
Features:
Works on AC power supply
Load Capacity 12 Amp AC
Operating Voltage 5V DC
Works from any microcontroller input
16 Levels of Control
High quality PCB FR4 Grade with FPT Certified.
Screen Shots:
Input for Dimmer module:
Input for Dimmer module is of digital input of 4bit data.D0, D1, D2, D3 are the input pins of dimmer which can be connected to I/O pins microcontroller. 16 level of dimmer controlling input of 0 to 100% is shown below.
Package Contains :
Digital Dimmer Module.
Documents:
Datasheet (Digital Dimmer Module)
Circuit Diagram (Digital Dimmer Module)
Schematic (ATMEL)
Schematic (PIC)
Schematic (MSP430)
Code (ATMEL)
Code (PIC)
https://drive.google.com/open?id=1kaQfSJknKifNauf2tgF1CAWKX_0cq7JL




const int D3 = 5;
const int D2 = 4;
const int D1 = 3;
const int D0 = 2;
const int Pins[4]={D3, D2, D1, D0};
 int n=2; //change delay value here
int count;
void setup()
{
Serial.begin(9600);
Serial.println("Initializing the state of Pins as Output");
 for (int pin =0; pin < 4; pin++)
{
 pinMode (Pins[pin], OUTPUT);
}
}
void loop()
{
for ( count = 0; count < 16; count++)
{
  Dimming();
 delay (n*1000); //To change the delay simply change the n value in the program(n x 1sec).
}
}
void Dimming()
{
digitalWrite (Pins[3], boolean ((count & 8)>>3));
digitalWrite (Pins[2], boolean ((count & 4)>>2));
digitalWrite (Pins[1], boolean ((count & 2)>>1));
digitalWrite (Pins[0], boolean (count & 1));

}