WS2812B Controlled in Bluetooth With an Arduino Nano

by Geicihg in Circuits > Arduino

1065 Views, 7 Favorites, 0 Comments

WS2812B Controlled in Bluetooth With an Arduino Nano

après rogné.png

I'm gonna show you how i controlled a WS2812B in Bluetooth using an Arduino Nano to control it.

There are differents mode that i can choose on my phone using Bluetooth Electronics app. There's Rainbow Mode wich is just a rainbow.

https://tenor.com/view/gif-20565957

There's Stay Mode which is a color that just stay there.

https://tenor.com/view/gif-20565558

There is the Strobe mode which is the Stay mode but which flashes, you can adjust how long it stay on & off.

https://tenor.com/view/gif-20565642

There's the sound mode which is the Strobe mode but with random colour and it only flash when music is high.

How to Control a WS2812B in Bluetooth Using Arduino Nano

Screenshot_20210228-174301.jpg

Required to do this :

Arduino Nano : https://www.amazon.com/ATmega328P-Microcontroller-...

5V 30A (or 20A) power supply : https://www.amazon.com/LETOUR-Supply-Converter-Ada...

KY-038 sound sensor : https://www.amazon.com/Microphone-Sensor-Arduino-D...

HC-05 bluetooth module : https://www.amazon.com/DSD-TECH-HC-05-Pass-through...

Led Aluminium Profiles : https://www.amazon.com/TORCHSTAR-V-Shape-Aluminum-...

Passive buzzer : https://www.amazon.com/Gikfun-Terminals-Passive-El...

Something to know temperature like a Thermoresistor

A Switching mode power supply case (i used this one) : http://domotique.ekoenig.fr/alimentation-electriqu...

WS2812B (5m 60leds/m IP30) : https://www.amazon.com/BTF-LIGHTING-Flexible-Indiv...

Connecting cable : https://www.conrad.fr/p/cable-de-raccordement-lapp... (H03VV-F 3G 0.75 mm²)

Some Wago or lug : https://www.amazon.fr/LOT-BARRETTES-CONNEXION-PLOT...

(optional) junction box : https://www.amazon.fr/debox-deksb-001-72-4-p%C3%B4...

(you can use WS2812B ECO, and you can take any length you want, you will just need to adjust several things like power supply and the number of LEDs in the code if you want more than 5m 60leds/m led strip please verify the power of your PSU if you're using too much current than your power supply can handle there is a risk of overheating, exploding, fire or just breaking the power supply if you don't know which of them you should use please ask to me or someone who knows)


Schematic

schéma_bb.jpg

Here is the complete schematic of the system, i made the PSU in inkscape but only the breadboard view.

You can download the schematic here : https://drive.google.com/file/d/14gS6-WA69FARAUQ4v...

If you don't have any LEDs on your power supply case you can remove them.

Be careful by connecting 230V or 110V (depends you country) because it's a pretty high voltage for a beginner (you can kill you, really)

Connect the ground wire for more safety please

https://incompliancemag.com/wp-content/uploads/201... Ground wire (yellow / green)

https://images-na.ssl-images-amazon.com/images/I/7... Zero line wire is the blue one

Fire line wire is the other on (brown or red in most of case)

Arduino : connect V+ to VIN and V- to any GND

WS2812B : connect V+ to the red wire and V- to the white wire the wire of the connector, connect the pin 8 of the Arduino Nano on the green wire

https://images-na.ssl-images-amazon.com/images/I/6...

Buzzer : Connect the + leg to (2) and the - leg to (GND)

Thermistor (if you use one) : one leg to (5V), the other one to (A0) and between the (A0) wire, add a 2k ohms resistor who is connected to (GND)

Sound Sensor : + to (5V), G to (GND), D0 to (D4)

HC-05 : TX to (RX), RX to (TX), GND to (GND), VCC to (5V), State to (a led if you want to have an indicator)

The Code

Yeah i know the name suck but whatever.

You will need to download FasLED.h library on Arduino IDE or here :

https://github.com/FastLED/FastLED

if your using another led strip than WS2812B it might not work


You can modify several things here like "NUM_LEDS" if you have a different led strip than 60leds/m 5m

The code is made to be used with the application "Bluetooth Electronics" you can find the panel here : https://drive.google.com/file/d/1_PA6ut1DfAmN2DBp5...

you just need to copy it in : Phone/kewlsoft then on the application go to an empty panel, there is an Import/Export option click on it ans select the WS2812B BLUETOOTH.kwl panel



Downloads

Heat Protection System

I also made an heat protection system to protect my power supply from overheating, the alarm is triggered when the temperature is over 50°C (wich is the max working temp)

On this video i changed the trigger temperature to 25°C just for demo.

Attach Your LED Profiles to the Wall

FJIMG_20210301_120621.jpg
Bannière instructables (dimensions).png
FJIMG_20210301_120552.jpg
FJIMG_20210301_120705.jpg.jpg
FJIMG_20210301_170937.jpg
FJIMG_20210301_120529.jpg

I used 42x15mm cleats to form a 2x3m base, then i attached my LED profiles on it.

You can attach you junction box on the cleats