LoRa AC Dimmer

From MakerFabsWiki
Revision as of 06:07, 6 August 2021 by Hefang (talk | contribs) (Hardware test)

Jump to: navigation, search

About the product


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.

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.

Model:LoRa AC Dimmer

LoRa AC dimmer 001.jpg


  • 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


LoRa AC dimmer 002.jpg

Preparation before using

Note: Safety First.

  • Prepare another LoRa terminal for transmitting commands to control the AC Dimmer.
  • The load of the Dimmer is resistive.

Hardware 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 004.png
2. Turn the output by 20%, the oscilloscope show:
LoRa AC dimmer 005.png
3. Turn the output by 45%:
LoRa AC dimmer 006.png
4. Turn the output by 83%:
LoRa AC dimmer 007.png
  • There is an onboard relay to shut off the dimmer completely. when the relay was off, the oscilloscope will show:
LoRa AC dimmer 008.jpg

Using Demo

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

  • Program the Maduino LoRa radio board to be the controller by Arduino.
1. You can get the demo code from 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.
String command_text[5] = {"ID000032ACT001PARAM000000#",
7. Verify the code and upload it to the board.
  • Connect the light to the screw terminals of the output, plug the Live line and Neutral 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, it will transmit the command you filled in one by one with LoRa. The dimmer will turn on or off after received the command.


  • An instruction is composed of the three parts: Device ID, Action ID and Setting parameter.
Example: ID000123ACT001PARAM000000#
Device ID: ID000123
Action ID: ACT001
Parameter: PARAM000000
The preceding zeros of every part must exist.
  • 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"). Usually, the ID is printed on the PCB or case and you can see it clearly. It 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 phase cutting by 100%.  
001: Turn on the relay and set the phase cutting by 0%.
002: Turn on the relay and set the phase cutting by your setting.
003: Turn on the relay and set the phase cutting 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 phase cutting 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 phase cutting. Each parameter is made up of three digits.
Example: PARAM005150#
Delay time: 005 ==> 5S (the range is 0 - 999)
Phase cutting: 150 ==> 41% (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 100%.


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.