Instructables

How to make A light-up distance sensor

Picture of How to make A light-up distance sensor
In this instructable, I will show you how to make a sensor that will light up more lights the closer you are to it.

Materials:
Arduino UNO
Arduino ultrasonic ping distance sensor
3 green LED's
2 yellow LED's
1 Red LED
6 220 ohm Resistors
USB Cable to connect Arduino
Wires to connect everything
 
Remove these adsRemove these ads by Signing Up

Step 1: Placing The Electronics

Picture of Placing The Electronics
DSCN4646.JPG
DSCN4647.JPG
This step will show you where and how to place the electronics on the breadboard

Materials:
6-220 ohm resistors
3 green LED's
2 yellow LED's
1 red LED
Ultrasonic ping distance sensor
Breadboard

First, place the distance sensor on one end of the breadboard so that none of the pins are connected (usually parallel to the outside rails).
Then place the LED's in the order from Left to Right : Green, Green, Green, Yellow, Yellow, Red
Each LED should have the long lead facing the same way. Mine are on the left side.
Next, connect a resistor to the short leg of each LED and to the inside rail of the breadboard.
Once that is done, move on to the next step.

Step 2: Adding The Wires

In this step, I will show you how to put the wires into the breadboard to connect to the arduino.

Materials:
Wire

First, Take the pin on the sensor marked VCC. Connect that to the outside rail of the breadboard
Then take the pin marked GND and connect that to the inside rail of the breadboard.
The pins marked TRIG and ECHO can be placed in another column to combine them. Then, add a wire connected to the same column on one end but not the other. This will later be connected to that arduino, but not in this step.
Connect a wire to the long pin on each LED. These will later be connected to the arduino, but not in this step.
Finally, connect a wire to each of the rails on the breadboard. These too will later be connected to the arduino, but not in this step.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!