Giter Club home page Giter Club logo

arduino-ac-dimmer's Introduction

AC Dimmer Control with Arduino


What it does?

Controls power in AC load through a TRIAC, performing AC phase cutting with help of a zero-cross detection circuit in a dimmer module. The module used was a RobotDyn AC Dimmer module paired with an Arduino Uno board.

It is also possible to use similar modules, that work in the same way, or do the circuit yourself. That are plenty of tutorials online explaining how it works.

An incandescent light bulb was used as the load, allowing the visualization of the power control trough the light brightness. But it works with any AC resistive load where the current or voltage don't exceed the dimmer circuit specified capacity.

Advantages

Many sketches online uses delay() to make the interrupt routine wait to trigger the TRIAC. But it can lead to very long interrupts at low power. In the implementations on this repository, the Arduino hardware timer (Timer1) was used, making the interrupt at the zero-crossing non-blocking.

There is also libraries provided by manufacturers of this kind of module. RobotDyn suggests it's own library. The disadvantage of this approach is that you don't have full control over the TRIAC. Particularly, I've experienced flickering in the light bulb when trying to combine the dimming functionality through the library with other things, such as measuring and displaying temperature with a DS18B20.

What's the difference between the sketches?

There are two Arduino sketches in this repository:

ac-dimmer-user-input

Here you can control the time to trigger the TRIAC manually by a Serial input (you can use the Arduino IDE Serial Monitor to give inputs) with the power level desired, going from 1% to 100%, which is then converted to the time to trigger the TRIAC, resulting in more or less power delivered to the load.

ac-dimmer-with-temperature

It is the same, but paired with a DS18B20 temperature sensor, in which the temperatures are being read also in a non-blocking way and allowing the loop to keep running. Nothing is actually being done with the temperature, just the monitoring.

arduino-ac-dimmer's People

Contributors

leonardorib avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.