Introduction: NeoPanel Controlled by Arduino
This project was for 'Creative Electronics', a Beng Electronics Engineering 4th year module at the University of Málaga, School of Telecommunications (www.etsit.uma.es).
In this instructable we have created a 10x10 led matrix controlled by a homemade Arduino Leonardo. In this matrix, you will be free to program the behavior of the leds as you desire. Our main objective is to create a spectrum analyzer that will represent the different frequencies of a song in the matrix.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Material and Components You Will Need
You will need:
- A A2 wood board of 4mm of thickness.
- A A2 black foam of mm of thickness.
- A 24.5x24.5cm thin board of a translucent material. We used two plastic folders.
- 100 WS2812b leds.
- A 5V 4A power supply.
- Lots of wires.
- An Arduino board.
- 2 1.8kOhm resistors.
- 1 4.7kOhm resistor.
- A dc male jack.
- A dc female jack.
- 2 audio sockets.
And you will also need some tools:
- Soldering iron and soldering wire.
- Silicon and glue gun.
Step 2: Building the Case
First of all, we need to draw the different pieces of our box in the wooden board, just like in the first picture. We will need 4 rectangular pieces(first photo) for the sides and 2 squares of 24.5x24.5cm (second photo). In one of the squares we will draw a 2x2cm square every 0.5cm with a total of 100 squares, and we will have to drill 4 holes in every square (third photo).
Once we have the 4 sides cut, we can stick them with glue making a square just like in the fourth picture. We will make 4 holes on one side for the dc input, 2 audio sockets and the USB.
Finally we have 4 1.8x3cm pieces that we will use to separate both big squares (sixth photo).
Step 3: Building the Matrix
In this part of the guide, we are going to make a 10x10 matrix. We will use foam, a material that is very easy to cut with any sharp tool. If you find any material similar to this but it isn't thick enough, you can just duplicate them and then put together.
You will need 18 strips. We didn´t find foam of that thickness so we had to make 36 strips and put them in two.
Once we have cut all the strips and we have made all the slots, we can build our matrix just like in the fourth picture. It is not necessary to stick them because they fix each other.
Finally, after all this process, we have a box like in the last picture (Don´t glue the foam pieces yet).
Step 4: Doing the Wiring
First of all, we should test our leds with a testing code to check that they work correctly and they light in series (Adafruit_NeoPixel library). After that we cut and separate every led because we need them to fix in the squares we drew. If we had a smaller matrix that fix with the distance of our leds, maybe we could omit this part, although remember that we had to cut them in rows and do a similar connection.
If we decide to cut them, we stick them in one of the faces of the wooden holed square, we will try to fix them with silicon in the centre, coinciding with the holes.
Now we can choice between two different ways of connection:
For the first way, we will need two main nets to connect each led which his correspondent electronic power supply and ground connection. To make that part, we have two different ways. We can take a wire with the correct dimension. The other way consist of cutting little wires and then weld between them. If you follow this way, you will need a total of 198 wires with their correspondent weld. You have to make two main wires of 9 pieces, and then for one net, 10 wires of 4 pieces and another 10 wires of 5 pieces (this is only for one net, you will need the same for the other one). Whatever the way you follow, you will finally have something like in the first photo.
Once you have completed the nets, we can stick them in the wooden square where we did the holes and in the opposite face of the leds. Be careful not to short-circuit them. You can use silicone to glue them to the wood.
Now we can do all the connections between the led and the main nets. Remember that each led will be in serie with the next led, so we have to connect them correctly. We introduced wires through all the holes and we weld each pad of the led with their correspondent connection: Gnd with ground net, vcc with power supply and each data out with the next data in of the next led.
The other way would be almost the same, but we would do the connection in the same face of the plank, where the leds are stuck. We wouldn't need nets and only a few holes. We would process to weld the different pad with the pad of the next led. We have to remember that we will need to connect each row.
We will have to check if we have made any mistake. We will take a multimeter and we will measure in continuity if we have short circuit the different pads. If we think we haven't failed, we can proceed and connect to the power supply.
Step 5: Testing the Matrix and Final Details
Now we will connect to the power supply. We have to weld three new wires, one for the ground line, another for the power and the last for the in data that will be the data in of the first led.
We can compile a testing program in our microprocessor and try in our matrix. Once we have connected all, we can visualize if we have connected wrong any led. If there is any led off, we have to check every weld and if we are sure that all are perfect, maybe that led can be broken and you have to change it. For the testing program, you can use those which are in the Arduino examples (Adafruit_NeoMatrix library). Finally, if our matrix is running, we can introduce the plank like in the photo. Now we can weld the dc connections and we can cut the translucent material and glue at the top.
Step 6: Programs
Now you have finish your own matrix and you can try the different programs and combinations you desire.
For example we decided to make a spectrum analizer. We needed the circuit above. We use ARef to change the ADC ref from 5V by default to 3.3 * 32/(4.7 + 32) = 2.87V (ARef has a 32k grounded resistor), we need to do this because audio signals are too weak (1V peak to peak). Moreover, as arduino can´t handle negative voltages we make a voltage divisor with the two resistors so that the signal now varies over half the ADC reference and then through software we can get the real signal. The program we made takes 128 samples, then makes the fft of the samples and finally represents the result on the LED matrix. Repository for matrix programs