MATRIX Using a IR Sensor
In this Arduino project I wanted to use an IR object avoidance sensor and the Matrix LED's. My goal was for the sensor to detect an object and the Matrix LED's to display a message that an object was detected. Finding the supplies is fairly easy so is the setup for this Instructable. The only struggle that I dealt with was trying to figure out how the Matrix LED's operated.
Supplies
- 8 Breadboard Jumper Wires
https://www.amazon.com/ELEGOO-Solderless-Flexible-...
- 6 Female-to-Male Dupont Wires
https://www.amazon.com/Elegoo-EL-CP-004-Multicolor...
- 1 Arduino UNO (running on macOS Big Sur or Intel)
https://www.amazon.com/Arduino-A000066-ARDUINO-UNO...
- 1 Power Supply Module
https://www.amazon.com/Aoicrie-Supply-Prototype-Br...
- 8x8 Matrix LED's
https://www.amazon.com/ACEIRMC-Flexible-Individual...
- 830 Tie-Points Breadboard
https://www.amazon.com/4Pcs-MCIGICM-Point-Solderle...
- IR Sensor
Getting Connected
Connecting the wires to the right spot can be a little tricky.
IR SENSOR
Lets start simple. Starting with the IR sensor connect 3 Female-to-Male wires using the female part of the cable to the OUT, GND, and VCC. Once the female part is connected to the sensor we're going to place the male parts on the Arduino UNO. The wire that is connected to the VCC connect the male part to the 3.3V. The wire that is connected to the GND place the male part to the GND portion the Arduino UNO. Finally place the wire that is connected to the OUT plug the male part to pin 6.
Into the Matrix
Locate the Breadboard jumper wire adapter on the Matrix LED's. Connect the wires to the 5V, GND, and DIN with the Breadboard jumper wires. We are going to connect the Matrix LED's directly to the Breadboard. Connect the DIN wire to the middle of the Breadboard (I chose 30a). Connect the GND wire to the negative side (blue line) of the Breadboard. Connect the 5V wire to the positive side of the Breadboard.
TIP
- When placing the wires to the negative positive side on the Breadboard stick to one side.
- Make sure that the wires are long enough to reach.
- Make sure to color code your wires and remember the location they are connected to.
I Got the Power
I used the power supply component in order to protect the Breadboard from overproducing electricity. Grab two Female-to-Male wires and connect the female portion of the wire to the GND and VCC. Connect the GND wire to the negative side (blue line) of the Breadboard. Connect the VCC wire to the positive side (red line) of the Breadboard.
Connecting the Breadboard to the Arduino UNO
In order to connect the Breadboard to the Arduino UNO is really simple. We are going to need two Breadboard jumper wires. Place one jumper wire to pin 7 on the Arduino UNO on the same lines as the Matrix DIN wire. For example, if the Matrix DIN wire was connected to line 30a connect the pin 7 jumper wire to line 30c. For the second wire place one end in the 5V slot on the Arduino and the other end on the positive side (red line) of the Breadboard.
CODE BLUE
The coding is fairly simple and can easily be altered to ones liking.
The code is basically two commands that powers the whole thing. The first command states the settings on the Matrix LED's and the second part of the code explains if the IR sensor is activated the power the Matrix LED.