Bluetooth led strip controller

Simple project to turn on / off and control a led strip brightness remotely

Status:
Work in progress
Category:
Embedded
Published at:
11 de maio de 2022
https://github.com/randysoriani/led-strip-controller

Introduction

I decided to create this project by 2 reasons. The first one is because I have some led strip lights at my living room without any controller and every time I have to plug in the power supply at mains and this is a little bit annoying. The second and most important reason for this project is to learn and test some React Native concepts.

Block diagram

Even this being a relatively simple project, it can be hard to begin drawing the entire schematic from head, so usually the best way to work on this is to break it in small blocks.

Below is the blocks and how they connect to each other. In this case, there's only 5 building blocks (the Led Strip block is just the output connector).

MCU

The chosen microcontroller is the AtMega8 because it have all the necessary peripherals and also because I have those chips stocked here and won't cost me a penny :D

The necessary peripherals is just a PWM to control the brightness and a UART to interface with the bluetooth module.

Bluetooth module

The module for bluetooth is the HC05. Nowadays is normal to find this in a breakout board with a 6 vias connector at the bottom. I bought the model without this breakout board exactly like the image below because in this way we can have easier access to all pins without have to solder wires or jumpers.

Clock

The AtMega8 have an internal oscillator but the precision is not good for UART and introduce some error percentage. To prevent it I included a 16MHz crystal oscillator and some capacitors as showed in datasheet. 

Led Driver

The 'led driver' in this case is a simple TTL compatible Mosfet. I used the IRFZ44N because I have it in stock here and I can interface it with the microcontroller I/O pin very simple. 

DC Supply

This projects uses 3 different voltages. 12 volts to the led stripes, 5 volts to the microcontroller and 3.3 volts to the bluetooth module. I know I can run the atmega8 with 3.3V but for this I must use a small clock frequency and as consequence a small PWM frequency as well.

A common power supply provides the 12V (the same supplied to the leds). This will feed the input of a 7805 that will generate the 5V. This is then applied to the input of a 1117-33 that will step down to 3.3V