When a software project gets complicated beyond a certain complexity, we tend to separate it into different modules where each module has its own dedicated purpose.
In my latest experiment, I tried to do the same with an Arduino, where I separated the AC dimming module with a dedicated controller and I then integrated it back to the main project with the use of the I2C protocol.
By using an additional Arduino, we definitely increase the cost of the project, but we get the added benefit of releasing some of the used pins so they can be used for other tasks, and we also reduce the work that the main controller needs to complete on each cycle.
You can check the video below for more details and also the project Instructable for all the connection and code instructions.
Tools and materials used in the video:
- Arduino Nano - https://s.click.aliexpress.com/e/_Aey8wk
- AC Dimmer Module - https://s.click.aliexpress.com/e/_A2DIQ4
- Mini Breadboards - https://s.click.aliexpress.com/e/_A69aO4
- Jumper Wires - https://s.click.aliexpress.com/e/_AFkya8