Difference between revisions of "LoRa AC Dimmer"

From MakerFabsWiki
Jump to: navigation, search
(Using Demo)
 
(26 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  
==About the product==
 
===Introduce===
 
AC dimmer is designed to control the alternating current voltage, it is used to control the LED light, electronic heating element and the AC motor. LoRa AC Dimmer module is based on Atmel's Atmega328P to control the dimmer through the PWM signal the MCU generated. The board also features the LoRa module on board that provides a solution for controlling remotely. <br>
 
  
This is a special module that Makerfabs had burned the firmware to it before shipping. After receiving the package, it can be controlled to turn on or off, or turn the output by 35% through the Specific command, and it does not require additional programming.<br>
+
==Introduce==
 +
An AC Dimmer is used to control the AC cycle Normally, a dimmer is used to turning the power ON/OFF for lamps or heating elements, it can also be used in fans, pumps, air cleaners, etc.<br>
  
'''Model:[https://www.makerfabs.com/wiki/index.php?title=Main_Page LoRa AC Dimmer]<br>
+
Makerfabs Lora AC Dimmer chopper circuit is based on Triac BT139, and zero-cross checking circuit, it detects the zero-cross points and then the Triac controlled to chop the AC. Besides, to avoid the problem of AC can not be totally shunted off with Triac, a relay is implemented to make the AC totally On/Off. On-board AC/DC module implemented, so no external power supply needed, suitable for field applications.<br>  
  
[[File:LoRa_AC_dimmer 001.jpg|500px]]
+
Makerfabs Lora AC Dimmer adjust the AC cycle, suitable for applications that wireless control needed but without other wireless connections. Besides, the Wifi version, with ESP32, also available for customization. All Makerfabs products are totally Open Source for Makers.<br>
  
===Features===
+
'''Model:[https://www.makerfabs.com/lora-ac-dimmer.html LoRa AC Dimmer]<br>
 +
 
 +
[[File:LoRa_AC_dimmer 001.jpg|700px]]
 +
 
 +
==Features==
 
*ATMEL Atmega328P: High Performance, Low Power Atmel®AVR® Classic Microcontroller<br>
 
*ATMEL Atmega328P: High Performance, Low Power Atmel®AVR® Classic Microcontroller<br>
 
*Speed Grade: 20Mhz
 
*Speed Grade: 20Mhz
Line 18: Line 20:
 
*Onboard LoRa module
 
*Onboard LoRa module
 
*Photocoupler, 400V peak off-state voltage
 
*Photocoupler, 400V peak off-state voltage
*With integrated Phase detection and Zero Crossing Detection processing
+
*5V Controlled Relay(250VAC/10A, 125VAC/10A, 30VDC/10A, 28VDC/10A) for shutting off completely
*5V Relay for shutting off absolutely
 
 
*Fuse with 250V and 1.5A
 
*Fuse with 250V and 1.5A
 +
*BT139X-600 Triac: max 600V/16A
 +
*With integrated AC-DC Module
 +
*With integrated Zero Crossing Detection(ZCD) for phase angle control or zero crossover
 +
*With integrated RC snubber circuit design for TRIAC
  
 
+
==Hardware==
 
===Interfaces===
 
===Interfaces===
[[File:LoRa_AC_dimmer 002.jpg|500px]]
+
[[File:LoRa_AC_dimmer 002.jpg|1000px]]
==Preparation before using==
 
'''Note: Safety First.'''
 
  
*Prepare another LoRa terminal for transmitting commands to control the AC Dimmer.
+
===Schematic===
 +
*MCU circuit
 +
:[[File:LoRa_AC_dimmer 003.jpg|700px]]
 +
*LoRa Circuit
 +
:[[File:LoRa_AC_dimmer 004.jpg|700px]]
 +
*Zero crossing detection circuit
 +
:[[File:LoRa_AC_dimmer 005.jpg|700px]]
 +
*Control Circuit
 +
:[[File:LoRa_AC_dimmer 006.jpg|700px]]
  
==Hardware test==
+
===Singnal test===
 
*Use the oscilloscope to check the output of AC dimmer.<br>
 
*Use the oscilloscope to check the output of AC dimmer.<br>
:1. When the MCU control the dimmer to turn the output by 0%, the oscilloscope show:<br>
+
:1. When the MCU control the dimmer to turn the output by 100%, the oscilloscope show:<br>
:[[File:LoRa_AC_dimmer 004.jpg|500px]]<br>
+
:[[File:LoRa_AC_dimmer 007.png|500px]]<br>
 
:2. Turn the output by 20%, the oscilloscope show:<br>
 
:2. Turn the output by 20%, the oscilloscope show:<br>
:[[File:LoRa_AC_dimmer 005.jpg|500px]]<br>
+
:[[File:LoRa_AC_dimmer 008.png|500px]]<br>
:3. Turn the output by 45%:<br>
+
:3. Turn the output by 51%:<br>
:[[File:LoRa_AC_dimmer 006.jpg|500px]]<br>
+
:[[File:LoRa_AC_dimmer 009.png|500px]]<br>
 
:4. Turn the output by 83%:<br>
 
:4. Turn the output by 83%:<br>
:[[File:LoRa_AC_dimmer 007.jpg|500px]]<br>
+
:[[File:LoRa_AC_dimmer 010.png|500px]]<br>
*There is an onboard relay to shut off the dimmer completely.<br>
+
*There is an onboard relay to shut off the dimmer completely. when the relay was off, the oscilloscope will show:<br>
:[[File:LoRa_AC_dimmer 008.jpg|500px]]<br>
+
:[[File:LoRa_AC_dimmer 011.jpg|500px]]<br>
 
 
==Using Demo==
 
Overview: Use the Maduino LoRa Radio board to control the light connected with the AC Dimmer remotely.<br>
 
[[File:LoRa_AC_dimmer 003.jpg|700px]]
 
 
 
*Program the Maduino LoRa radio board to be the controller by Arduino.
 
:1. You can get the demo code from [https://github.com/Makerfabs/Makerfabs-Lora-AC-Dimmer/tree/main/example/RadioLib-demo/transmit here].
 
:2. Open the code with Arduino.
 
:3. Select the development board (Arduino Pro Mini) and the port.
 
:4. Install the library (RadioLib.h) for the LoRa module driver.
 
:5. Remember to modify the frequency to your modules at the code.
 
:6. Type the specific instruction you want in the code.<br>
 
<pre>
 
String command_text[5] = {"ID000032ACT001PARAM000000#",
 
                          "ID000032ACT000PARAM000000#",
 
                          "ID000032ACT002PARAM000060#",
 
                          "ID000032ACT003PARAM005060#",
 
                          "ID000032ACT003PARAM005150#"};
 
</pre>
 
:6. Verify the code and upload it to the board.
 
 
 
*Connect the light to the screw terminals of the output, plug the Live line and Null line to the input. Please note that all operations must be on the power cutting off.
 
*Power on the LoRa AC dimmer.
 
*Power on the Maduino LoRa radio board
 
  
==Instruction==
+
==Firmware==
 +
===Download===
 +
*LoRa AC Dimmer module has been uploaded the firmware before shipping, it does not require to program again. The firmware is available on [https://github.com/Makerfabs/Makerfabs-Lora-AC-Dimmer/tree/main/firmware/AC_Dimmer_V1.0 Github].
 +
===Device ID===
 +
*There is a serial number that Makerfabs coding it when the board was produced. The ID was made up of two words ("ID") and six digits ("000000"). Usually, the ID is printed on the PCB or case and you can see it clearly. As you see, each module has the only device ID for it which has been coded at the firmware. <br>
 +
:[[File:LoRa_AC_dimmer 021.jpg|500px]]<br>
 +
:Also the device ID can be changed if you want, modify the number to yours at the firmware, and upload the firmware to the board with Arduino IDE.<br>
 +
:[[File:LoRa_AC_dimmer 012.jpg|500px]]<br>
 +
 +
===Instruction===
 
*An instruction is composed of the three parts: Device ID, Action ID and Setting parameter.<br>
 
*An instruction is composed of the three parts: Device ID, Action ID and Setting parameter.<br>
 
<pre>
 
<pre>
Example: ID000123ACT001PARAM000000#
+
Example: IDxxxxxxACTxxxPARAMxxxxxx#
Device ID: ID000123
+
Device ID: IDxxxxxx
Action ID: ACT001
+
Action ID: ACTxxx
Parameter: PARAM000000
+
Parameter: PARAMxxxxxx
 
The preceding zeros of every part must exist.
 
The preceding zeros of every part must exist.
 
</pre>
 
</pre>
  
 
*Device ID
 
*Device ID
:This is a serial number that Makerfabs coding it when the board was produced. The ID was made up of two words ("ID") and six digits ("000000"). It usually is printed on the PCB or case and you can see it clearly. It is used to identify whether the received instructions are needed.<br>
+
:The device ID is used to identify whether the received instructions are needed.<br>
 
*Action ID  
 
*Action ID  
:There are four kinds of ID represented different operations: 000, 001, 002, 003.<br>
+
:There are five kinds of ID represented different operations: 000, 001, 002, 003, 004.<br>
 +
<pre>
 +
000: Turn off the relay and set the output by 0%. 
 +
001: Turn on the relay and set the output by 100%.
 +
002: Turn on the relay and set the output by your setting.
 +
003: Turn on the relay and set the output by your setting. Then hold it for the delay time you set and execute the 001 operation.
 +
004: Turn on the relay and set the output by your setting. Then hold it for the delay time you set and execute the 000 operation.
 +
</pre>
 +
*Setting Parameter
 +
:The setting parameter is composed of two parts: one is the delay time and another is the output. Each parameter is made up of three digits.
 +
<pre>
 +
Example: PARAM005150#
 +
Delay time: 005 ==> 5S (the range is 0 - 999)
 +
Output: 150 ==> 59% (the range is 0 - 255)
 +
</pre>
 +
 
 +
*Example
 +
:E: ID000032ACT001PARAM000000#
 +
:R: The dimmer named 000032 will be turned on, and set the output by 100%.
 +
:E: ID000032ACT003PARAM007051
 +
:R: It will set the output of the dimmer by 20% and hold it for 7 seconds, then turn the output by 20%.
 +
 
 +
==Using Demo==
 +
Overview: Use the Maduino LoRa Radio board as the LoRa terminal to control the light connected with the AC Dimmer remotely.<br>
 +
[[File:LoRa_AC_dimmer 013.jpg|700px]]
 +
*'''LoRa AC dimmer module''' does not require to program again, just remember the ID for the specified instruction.
 +
:1.Connect the light to the screw terminals of the output, plug the Live line and Neutral line into the input. Please note that all operations must be on the power cutting off.
 +
:2.Power on the LoRa AC dimmer.
 +
*Program the '''Maduino LoRa radio board''' to be the controller by Arduino.
 +
:1. You can get the demo code from [https://github.com/Makerfabs/Makerfabs-Lora-AC-Dimmer/tree/main/example/RadioLib-demo/transmit here].
 +
:2. Open the demo code with Arduino IDE.
 +
:3. Select the development board (Arduino Pro Mini) and the port.
 +
:[[File:LoRa_AC_dimmer 014.jpg|700px]]
 +
:4. Install the library (RadioLib.h) for the LoRa module driver.
 +
:[[File:LoRa_AC_dimmer 015.jpg|700px]]
 +
:5. Remember to modify the LoRa frequency to your modules at the code.
 +
:[[File:LoRa_AC_dimmer 016.jpg|700px]]
 +
:6. Type the specific instruction you want to transmit to the LoRa AC dimmer module in the code.<br>
 +
:[[File:LoRa_AC_dimmer 017.jpg|700px]]
 
<pre>
 
<pre>
000:
+
String command_text[5] = {"ID000032ACT001PARAM000000#",  //Control the dimmer to turn on the relay and output 100%
001:
+
                          "ID000032ACT000PARAM000000#",  //Control the dimmer to turn off
002:
+
                          "ID000032ACT003PARAM000060#",  //Control the dimmer to turn on the relay and output 23% (60/256)
003:
+
                          "ID000032ACT004PARAM005060#",  //Control the dimmer to turn on the relay and output 23% (60/256), and hold it for 5s,then turn off the relay
 +
                          "ID000032ACT002PARAM005150#"};  //Control the dimmer to turn on the relay and output 58% (60/256)
 
</pre>
 
</pre>
 +
:7. Verify the code and upload it to the board.
 +
*Power on the Maduino LoRa radio board. When it transmits the command "ID000032ACT001PARAM000000#", the dimmer which ID is 000032 will turn on the relay and set the output by 100%.
 +
:[[File:LoRa_AC_dimmer 018.jpg|700px]]
 +
*When it transmits the command "ID000032ACT000PARAM000000#"The dimmer which ID is 000032 will turn off the relay and set the output by 0%.
 +
:[[File:LoRa_AC_dimmer 019.jpg|700px]]
 +
*When it transmits the command "ID000032ACT002PARAM005150#"The dimmer which ID is 000032 will turn on the relay and set the dimmer output by 58%.
 +
*Show
 +
:[[File:LoRa_AC_dimmer 020.gif]]
  
 
==F&Q==
 
==F&Q==

Latest revision as of 06:26, 9 August 2021


Introduce

An AC Dimmer is used to control the AC cycle Normally, a dimmer is used to turning the power ON/OFF for lamps or heating elements, it can also be used in fans, pumps, air cleaners, etc.

Makerfabs Lora AC Dimmer chopper circuit is based on Triac BT139, and zero-cross checking circuit, it detects the zero-cross points and then the Triac controlled to chop the AC. Besides, to avoid the problem of AC can not be totally shunted off with Triac, a relay is implemented to make the AC totally On/Off. On-board AC/DC module implemented, so no external power supply needed, suitable for field applications.

Makerfabs Lora AC Dimmer adjust the AC cycle, suitable for applications that wireless control needed but without other wireless connections. Besides, the Wifi version, with ESP32, also available for customization. All Makerfabs products are totally Open Source for Makers.

Model:LoRa AC Dimmer

LoRa AC dimmer 001.jpg

Features

  • ATMEL Atmega328P: High Performance, Low Power Atmel®AVR® Classic Microcontroller
  • Speed Grade: 20Mhz
  • Flash: 32KBytes
  • RAM: 2KBytes
  • EEPROM: 1Kbytes
  • Onboard LoRa module
  • Photocoupler, 400V peak off-state voltage
  • 5V Controlled Relay(250VAC/10A, 125VAC/10A, 30VDC/10A, 28VDC/10A) for shutting off completely
  • Fuse with 250V and 1.5A
  • BT139X-600 Triac: max 600V/16A
  • With integrated AC-DC Module
  • With integrated Zero Crossing Detection(ZCD) for phase angle control or zero crossover
  • With integrated RC snubber circuit design for TRIAC

Hardware

Interfaces

LoRa AC dimmer 002.jpg

Schematic

  • MCU circuit
LoRa AC dimmer 003.jpg
  • LoRa Circuit
LoRa AC dimmer 004.jpg
  • Zero crossing detection circuit
LoRa AC dimmer 005.jpg
  • Control Circuit
LoRa AC dimmer 006.jpg

Singnal test

  • Use the oscilloscope to check the output of AC dimmer.
1. When the MCU control the dimmer to turn the output by 100%, the oscilloscope show:
LoRa AC dimmer 007.png
2. Turn the output by 20%, the oscilloscope show:
LoRa AC dimmer 008.png
3. Turn the output by 51%:
LoRa AC dimmer 009.png
4. Turn the output by 83%:
LoRa AC dimmer 010.png
  • There is an onboard relay to shut off the dimmer completely. when the relay was off, the oscilloscope will show:
LoRa AC dimmer 011.jpg

Firmware

Download

  • LoRa AC Dimmer module has been uploaded the firmware before shipping, it does not require to program again. The firmware is available on Github.

Device ID

  • There is a serial number that Makerfabs coding it when the board was produced. The ID was made up of two words ("ID") and six digits ("000000"). Usually, the ID is printed on the PCB or case and you can see it clearly. As you see, each module has the only device ID for it which has been coded at the firmware.
LoRa AC dimmer 021.jpg
Also the device ID can be changed if you want, modify the number to yours at the firmware, and upload the firmware to the board with Arduino IDE.
LoRa AC dimmer 012.jpg

Instruction

  • An instruction is composed of the three parts: Device ID, Action ID and Setting parameter.
Example: IDxxxxxxACTxxxPARAMxxxxxx#
Device ID: IDxxxxxx
Action ID: ACTxxx
Parameter: PARAMxxxxxx
The preceding zeros of every part must exist.
  • Device ID
The device ID is used to identify whether the received instructions are needed.
  • Action ID
There are five kinds of ID represented different operations: 000, 001, 002, 003, 004.
000: Turn off the relay and set the output by 0%.  
001: Turn on the relay and set the output by 100%.
002: Turn on the relay and set the output by your setting.
003: Turn on the relay and set the output by your setting. Then hold it for the delay time you set and execute the 001 operation.
004: Turn on the relay and set the output by your setting. Then hold it for the delay time you set and execute the 000 operation.
  • Setting Parameter
The setting parameter is composed of two parts: one is the delay time and another is the output. Each parameter is made up of three digits.
Example: PARAM005150#
Delay time: 005 ==> 5S (the range is 0 - 999)
Output: 150 ==> 59% (the range is 0 - 255)
  • Example
E: ID000032ACT001PARAM000000#
R: The dimmer named 000032 will be turned on, and set the output by 100%.
E: ID000032ACT003PARAM007051
R: It will set the output of the dimmer by 20% and hold it for 7 seconds, then turn the output by 20%.

Using Demo

Overview: Use the Maduino LoRa Radio board as the LoRa terminal to control the light connected with the AC Dimmer remotely.
LoRa AC dimmer 013.jpg

  • LoRa AC dimmer module does not require to program again, just remember the ID for the specified instruction.
1.Connect the light to the screw terminals of the output, plug the Live line and Neutral line into the input. Please note that all operations must be on the power cutting off.
2.Power on the LoRa AC dimmer.
  • Program the Maduino LoRa radio board to be the controller by Arduino.
1. You can get the demo code from here.
2. Open the demo code with Arduino IDE.
3. Select the development board (Arduino Pro Mini) and the port.
LoRa AC dimmer 014.jpg
4. Install the library (RadioLib.h) for the LoRa module driver.
LoRa AC dimmer 015.jpg
5. Remember to modify the LoRa frequency to your modules at the code.
LoRa AC dimmer 016.jpg
6. Type the specific instruction you want to transmit to the LoRa AC dimmer module in the code.
LoRa AC dimmer 017.jpg
String command_text[5] = {"ID000032ACT001PARAM000000#",   //Control the dimmer to turn on the relay and output 100%
                          "ID000032ACT000PARAM000000#",   //Control the dimmer to turn off
                          "ID000032ACT003PARAM000060#",   //Control the dimmer to turn on the relay and output 23% (60/256)
                          "ID000032ACT004PARAM005060#",   //Control the dimmer to turn on the relay and output 23% (60/256), and hold it for 5s,then turn off the relay
                          "ID000032ACT002PARAM005150#"};  //Control the dimmer to turn on the relay and output 58% (60/256)
7. Verify the code and upload it to the board.
  • Power on the Maduino LoRa radio board. When it transmits the command "ID000032ACT001PARAM000000#", the dimmer which ID is 000032 will turn on the relay and set the output by 100%.
LoRa AC dimmer 018.jpg
  • When it transmits the command "ID000032ACT000PARAM000000#"The dimmer which ID is 000032 will turn off the relay and set the output by 0%.
LoRa AC dimmer 019.jpg
  • When it transmits the command "ID000032ACT002PARAM005150#"The dimmer which ID is 000032 will turn on the relay and set the dimmer output by 58%.
  • Show
LoRa AC dimmer 020.gif

F&Q

You can list your question here or contact support@makerfabs.com for technology support. Detailed descriptions of your question will be helped to solve your question.

Recources