DIY

Face mask with LED animation

Face mask with LED animation  Face mask with LED animation In this article, a wizard with the nickname MertArduino will tell us how to install LED animation on a face mask. LED animation has several modes and can even respond to a voice.
The wizard makes two options for the mask, one on the printed circuit board, the second assembly by conventional installation.
Tools and materials: -LED strip WS2812 5V; -Adhesive conductive copper tape one-sided foil; -Face mask; -Wires;
-Nippers;
-Soldering accessories;
-Scissors;
-Cardboard;
For surface mounting
-ATtiny85; -Sound module; -Battery connector; -Jumpers;
-Battery 9V;
For printed circuit board
-Adapter module for USB to TTL serial converter; -Digital microscope (for board mounting); – Hairdryer; -SMD LED; -SMD capacitor; -SMD resistor; -JST connector; -3.7V Lipo battery; Step one: LEDs
This device uses addressable LEDs. In a regular LED strip, when you turn it on, all the LEDs light up at the same time. The addressable LED turns on depending on which command is sent from the microcontroller. For example, LED number one lights up in one color, and LED number ten lights up in a different color.
The LED strip needs to be fixed to the mask somehow.
Place two strips of copper tape on the cardboard. One of the strips of copper tape will be used to connect the positive leads of the LEDs and the other to connect the negative leads.
Cut some LED strips to the appropriate length.
Place the cut out LED strips onto the cardboard. The most important here are the Din and Do points on the LED strip, the LED strip array should be positioned as Din-Do, Din-Do. Thus, if one end of the LED strip is Din, the other end of the LED strip must be connected to the Do end.
After placing the LED strips, make the connections. The negative (GND) points of the LED strips should be common, the positive (5V) points should be common.
Install a jumper to each output to connect to the microcontroller.
Face mask with LED animation Face mask with LED animation Face mask with LED animation Step two: hinged assembly
To control the LED strips, the master uses the ATtiny85 board. The prototype uses a sound sensor, ATtiny board, 9V battery and wires.
You need to solder two wires to the 5V output of the microcontroller.
Solder 3 jumpers to the GND output for use on the sound sensor, LED strip and 9V battery.
Solder 1 jumper to the VIN input to connect the battery.
Solder the jumper to pins P1 and P2 which will be used for sound sensor and LED strips.
Connect 5V of LED strip to 5V of microcontroller.
Connect GND of LED strip to GND of microcontroller.
Connect Din of LED strip to P1 wire on microcontroller.
Connect the 5V sound sensor to the 5V output of the microcontroller.
Connect the sound sensor GND to the microcontroller GND.
Connect the sound sensor input to the P2 output of the microcontroller.
After loading the source code, the VIN and GND of the battery will be connected.
Face mask with LED animation Face mask with LED animation  Face mask with LED animation Step Three: PCB
To make the project more compact, the wizard designed the PCB. With the PCB, everything is simplified and you only need one 3.7V lithium polymer battery. The board contains an Atmega329P microcontroller, there are 3 outputs for LED strip, a tiny microphone.
PCB programming requires an FTDI USB To TTL module.
The specification for the board can be viewed here.
The code for this board is also different, you can download it here.
Face mask with LED animation Face mask with LED animation  Face mask with LED animation  Face mask with LED animation Face mask with LED animation Step Four: Programming
To upload the code to ATtiny85, we will need to follow some steps.
Download the corresponding Arduino package from the Arduino.cc website: https://www.arduino.cc/en/Main/Software
If you are using Arduino 1.6.6 (or newer) and Windows – you will need to download and install the drivers manually. Download, unzip and run “Install Drivers” (32-bit systems) or “DPInst64” (64-bit systems).
The driver files are located here.
Install or unzip the Arduino app.
Launch the Arduino app.
In the Arduino app, go to the “File” menu and select “Preferences.”
In the “Additional Boards Manager URLs” field, enter: http://digistump.com/package_digistump_index.json and click OK.
Note. If you have already entered additional URLs in this field, click the button to the right of the field and enter that URL in a new line.
Go to the “Tools” menu and then from the “Board” submenu – select “Boards Manager”, and then select “Contributed” from the type dropdown list ::
Select the “Digistump AVR Boards” package and click the “Install” button.
Boards Manager should start downloading on the bottom pane of the Boards Manager window, and when finished, “Installed” will be displayed next to this item in the list.
For WINDOWS users: after the installation is complete and the driver installation wizard pops up, click “Next” in this window to install the drivers for the Digistump boards (if you already have them, this installer will update them and install whatever is missing.)
After the installation is complete, close the Boards Manager window and select Digispark from the Tools → Boards menu. “Digispark (default – 16.5 MHz)” is the board that all new users should choose.
This completes the installation.
Next, here, you need to download the code.
Download the code accordingly via Arduino IDE:
From the Tools menu, select Board → Digispark (the default is 16.5 MHz).
(Tools → Programmer does not matter)
Open the code.
Click the download button. The bottom status field will now prompt you to connect the ATtiny85 – at this point you need to connect it – or disconnect and reconnect.
Conclusions:
All pins can be used as digital I/O
Pin 0 → I2C SDA, PWM
Pin 1 → PWM
Pin 2 → I2C SCK, analog input
Pin 3 → Analog input (also used for USB +)
Pin 4 → PWM, analog (also used for USB -)
Pin 5 → Analog input
 Face mask with LED animation Face mask with LED animation Everything is ready.
 Face mask with LED animation < img class = "aligncenter" alt = "Face mask with LED animation" src = "https://usamodelkina.ru/uploads/posts/2021-02/1612785684_1-14.jpg"/> How this mask works with animation, as well as a detailed assembly process, you can watch the video.

Source:

usamodelkina.ru

Show More

Related Articles

Leave a Reply

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

Back to top button