Introduction |
Published date: 22/12/2015
|
|
In this project I will show you how to make your own music rhythm LED lighting effect box , Arduino based circuit with the ATtiny45 micro-controller.
This is a simply way to make an led lighting effect by reading sound values from an analog input pin. It's not the correct way to analyze sound signals but it will flash the LEDs in music rhythm. |
Watch the presentation video and please subscribe to our YouTube channel!
You can also use the Arduino uno board (or any other board) but you have to find first the analog values by using the serial monitor and make the necessary changes in code that you will find below.
So, let's get started!
You can also use the Arduino uno board (or any other board) but you have to find first the analog values by using the serial monitor and make the necessary changes in code that you will find below.
So, let's get started!
What you will need - Hardware
For the circuit you will need:
We will use the Arduino as ISP to program the ATtiny45 micro controller, so you will also need an Arduino uno board and an breadboard (+6 breadboard cables and 10uF capacitor) |
|
How to program the ATtiny45 with Arduino UNO board
Here's the "Arduino ISP" code, embedded embedded using Codebender!
Codebender is an online Arduino IDE - It's the easiest way to program your Arduino board directly from your browser! Just click on the "Run on Arduino" button and that's it! Try it! It's really amazing!
Now take an breadboard and follow the breadboard circuit schematic below.
Codebender is an online Arduino IDE - It's the easiest way to program your Arduino board directly from your browser! Just click on the "Run on Arduino" button and that's it! Try it! It's really amazing!
Now take an breadboard and follow the breadboard circuit schematic below.
The connections are pretty easy, see the above image with the breadboard circuit schematic.
Tip: The dot in the corner of the ATtiny shows the first pin.
|
|
Connect a 10uF electrolytic capacitor between Arduino uno reset pin and ground.
Tip: The stripe on one side of the capacitor shows the negative pin and should connected with ground.
We will use the capacitor because it prevents the Arduino UNO from resetting, so we are sure that the Codebender (or Arduino IDE) talks to the ArduinoISP, and not with the bootloader, during the upload of sketches.
You can now connect again the Arduino uno to your computer and proceed to next step!
Tip: The stripe on one side of the capacitor shows the negative pin and should connected with ground.
We will use the capacitor because it prevents the Arduino UNO from resetting, so we are sure that the Codebender (or Arduino IDE) talks to the ArduinoISP, and not with the bootloader, during the upload of sketches.
You can now connect again the Arduino uno to your computer and proceed to next step!
The Code
|
We will use Codebender - online Arduino IDE - to program the ATtiny85 micro controller. Click here to connect with your Codebender account. To do this you have to se;ect the "Arduino as ISP" option from Codebender menu (watch the image above) Make sure to select the correct tiny micro controller. (ATtiny45 (internal 1Mhz clock))
|
The Circuit
Audio Jack: Input and Output
Take a male to female audio (with 3.5mm jack) cable and cut it in the half. Connect the "inside" cables again but this time connect also an extra cable to ground and an extra cable to left (or right) channel. The cable from left channel will be connected with the analog pin 3 of ATtiny45. See the below images.
Power: Use an USB cable
Make the box!
I have used plexiglass (50% transparency) and an Balsa wood sheet (you can also use MDF) to build mine lighting box. The above images will help you understand more. Be sure to use wood to separate the LEDs inside the box, image below shows with red lines where you need to use wood pieces.
Well done!
Now you have your own music LED lighting box on your desk! I would like to see photos of your construction!
I hope you liked this, let me know in the comments below.
I hope you liked this, let me know in the comments below.