Make Your Own Arduino AC Dimmer | Drive Motors & Lights

AC Dimmer Drive Motors Lights

AC Dimmer Drive Motors Lights

Hi every one, here Chris, and I want to show you how I made my own Arduino AC dimmer that can control AC loads such as motors and lights easily. It has the power to handle 1200+ Watts and It’s a very nice project for domotics and home automation because the microcontroller I used is the ESP8266 that has WiFi capabilities and the code could be adapted with few changes.

Here I leave you a tutorial with all the information so you can make your own version.If you are a visual learner I know that a video worth more than 1000 words, so here is a Tutorial video. (I am a Spanish speaker, so please consider turning on English subtitles):

Step 1: Skills Required:

Skills RequiredThis project may seem difficult or very complex, but it is definitely not completely, since you will have all the guidance for the construction, it was difficult for me to design it to make life a little easier for you. Any conceptual doubt, you are free to ask it without problems.

  • You should have an understanding of:
  • 3D Printing (Optional for the case).
  • Arduino programming (I give you the code).
  • Soldering through hole components.

Warning: In this project we will handle main power, so please be careful

Step 2: Components and Parts List

Components and Parts ListThe Electronics discrete components as resistors and transistors will be attached in a BOM file in the PCB Step.

  • Here is the list of what you will need for the whole process:
  • -10kohm Potentiometer.
  • -2 Double Terminal blocks.
  • -AC motor of your preference (single phase).
  • -Dimmable Lightbulb.
  • -Small 5 volts cellphone power supply.
  • -Measuring tools: multimeters, clamp meters (optional).
  • -Micro USB SMD connector.
  • -1.3 inch OLED Display.
  • Wire.

BOM list of PCB components attached.

Great, cheap and awesome Graphical Multimeter to watch the Sinusoidal AC wave form

Step 3: Circuit Diagram

Circuit Diagram 2 (4)Here is the Circuit Diagram of our project:

It has all the internal conections of the circuit that will us allow to create the PCB design later.

I also attached the PDF of the Schematics so you can see it better.

Step 4: PCB Design and Ordering

PCB Design and OrderingFor the implementation of a good project we need a reliable assembly for the circuit that makes it up, and there is no better way to do it than with a good PCB.

Here you can download the Gerber, BOM and Pick & Place Files, the ones you need to order your PCB on your PCB manufacturing company.

I suggest JLCPCB:

$2 for 1-4 Layer PCBs⚡, Get SMT Coupons?

UnZip the .rar file with a software like WinRar or any other.

Step 5: 3D Parts (Housing + Motor Holder)

3D Parts Housing Motor HolderHere you have the STL files for the 3D parts of the project.

  • Housing.
  • Cover
  • Potentiometer Knob and nut.
  • Button cap.
  • Motor holder.

Step 6: Programming the ESP8266 Microcontroller

Programming the ESP8266 Microcontroller1- To program the ESP-12s we need to connect it directly to our PC through the USB cable, open the Code “ACControl”, install the libraries that I also attached and click on upload.

If the current measurements are wrong on your display, or you want to improve them, you can tune experimentally this parameters in the code:

  • float Sensibilidad = 0.066; //sensitivity of the 30Amps sensor (see datasheet of ACS712 if use 20A or 5A version).
  • float intercept = 35952.685; // Change this until you got closer as posible to the real current.
  • float slope = 273; // Change this until you got closer as posible to the real current.
  • float testFrequency = 60; // frequency of your circuit (Hz)
  • float windowLength = 40.0 / testFrequency; // num of cycles that will be test.


Step 7: Wiring Up

Wiring Up (1)Follow this few steps carefully:

  1. Insert the OLED Display in the case slot.
  2. Wire the Display and make shure the connections are right between the PCB and OLED (Pinout may vary).
  3. Connect the motor or light wires (Black and Red) to the output terminal block, it doesn’t matter the polarity.
  4. Get an AC Cable, findout the Line and Neutral wires, and connect them respectively in the power terminal block ( INPORTANT).

Step 8: Controlling a Single Phase AC Motor

AC MotorIf you are in this step, you are already enjoying the successfull end of the project:

  • Make shure the potentiometer is on it’s min position.
  • Turn on the system.
  • Click on the push button to enable the dimming function.
  • Turn the potentiometer, gradually and the motor should start.
  • You must see in the display the motor current.
  • If you click on the push button again the motor will turn off.

Step 9: Intelligent Functions Setup

This isn’t a simple dimmer, it has some interesting functions and let’s try them.

  1. Press the push button for +3 seconds.
  2. The display should show up “Max Amps”.
  3. Turn the potentiometer to set up the max amps setpoint.
  4. Click on the push button again and you should be in the start screen again.
  5. Now, if you simulate an overload of your motor, it should turn off when the current exceeds the setpoint.

Read more: Make Your Own Arduino AC Dimmer | Drive Motors & Lights

Leave a Comment

Your email address will not be published. Required fields are marked *