Project showcase
Parking Sensor

Parking Sensor © CC BY-NC

Yes, you could use a tennis ball but who doesn't like things that light up?! For real, this is a great way to help you park in tight spaces.

  • 2,850 views
  • 0 comments
  • 11 respects

Components and supplies

Necessary tools and machines

3drag
3D Printer (generic)
09507 01
Soldering iron (generic)

About this project

In Action

Back Story

The overall point of this project was not to make litho boxes but that is what ended up happening. I wanted to make lights that would alert my wife andI to how close our truck was to the wall when parking in the garage. I modified the sensor code off the Arduino website and made some litho boxes to be illuminated by the LEDs.

The Boxes: The boxes turned out to be quite awesome. I realized when I was making them that these could also be used as a decoration to spell out someone's name or to make a cool custom lamp.Each box contains a LED and a wire that runs to the board. The boxes have a passthrough channel so the wires are hidden. Each litho pane slides in so you can change them without removing the boxes. Be careful when printing as there is a left, right and middle box. Make sure that when connecting your LED that you use a resistor that is suited to your LED.

Litho panes: I used paulbovbel litho pane customizer and in my slicer. I made them .75 of the original. The panes, as I said above, are able to slide into the the boxes without removing the boxes themselves, enabeling you to change what appears easlly.

Thank you paulbovbl! LINK----> http://bit.ly/SWEETLITHO to his page.

Not included: I did print a case for the arduino and the ultrasonic sensors; however, since I did not make these I will not include the files. A quick search and you will find many suited to your needs.

#define trigPin 7
#define echoPin 6
#define led 13
#define led2 12
#define led3 11
#define led4 10
#define led5 9
#define led6 8
void setup() {
 Serial.begin (9600);
 pinMode(trigPin, OUTPUT);
 pinMode(echoPin, INPUT);
 pinMode(led, OUTPUT);
 pinMode(led2, OUTPUT);
 pinMode(led3, OUTPUT);
 pinMode(led4, OUTPUT);
 pinMode(led5, OUTPUT);
 pinMode(led6, OUTPUT);
}
void loop() {
 long duration, distance;
 digitalWrite(trigPin, LOW); 
 delayMicroseconds(2);
 digitalWrite(trigPin, HIGH);
 delayMicroseconds(10);
 digitalWrite(trigPin, LOW);
 duration = pulseIn(echoPin, HIGH);
 distance = (duration/2) / 29.1;
 if (distance > 13 && distance < 200) { //green 1 
   digitalWrite(led, HIGH);
 }
 else {
   digitalWrite(led,LOW);
 }
 if (distance > 13 && distance < 125) { //green2 
     digitalWrite(led2, HIGH);
}
 else {
     digitalWrite(led2, LOW);
 }
 if (distance > 13 && distance < 100) { //yellow 1
     digitalWrite(led3, HIGH);
} 
 else {
   digitalWrite(led3, LOW);
 }
 if (distance > 13 && distance < 50) { //yellow 2
   digitalWrite(led4, HIGH);
}
 else {
   digitalWrite(led4,LOW);
 }
 if (distance > 13 && distance < 30) { //red1
   digitalWrite(led5, HIGH);
}
 else {
   digitalWrite(led5,LOW);
 }
 if (distance > 13 && distance < 20) { //red2
   digitalWrite(led6, HIGH);
}
 else {
   digitalWrite(led6,LOW); 
 }
 if (distance >=200 || distance <=13){
   Serial.println("Out of range");
 }
 else {
   Serial.print(distance);
   Serial.println(" cm");
 }   
}

Custom parts and enclosures

Litho boxes and panes
Simple. download and print.

Schematics

How to wire
Shown is with the uno board (only one tinker cad has)my code is set up for the Mega. You will need to check the trigger and echo wires and make sure they are correctly defined in your code (super easy).
Capture1 8votykoqwu

Comments

Author

Default
MrBancroft
  • 1 project
  • 2 followers

Additional contributors

  • Has a customizer on thingiverse for litho-panes by Paul Bovbel

Published on

September 30, 2018

Members who respect this project

Adrianna potrace zbeo5722hpPhotoDefaultDefaultPhotoKayaking tKrisnagyPhoto

and 3 others

See similar projects
you might like

Similar projects you might like

Parking Sensor with Arduino

Project showcase by Team VINICIUS LOPES

  • 9,934 views
  • 4 comments
  • 17 respects

Building a Sensor Network for an 18th Century Gristmill

Project showcase by Jeremy McGinnis

  • 3,953 views
  • 4 comments
  • 25 respects

Touch Sensor and Sound Sensor Controlling AC/DC Lights

Project showcase by Anbumachi

  • 1,178 views
  • 2 comments
  • 5 respects

Garage Parking Stop Light

Project showcase by Rich Noordam

  • 2,663 views
  • 0 comments
  • 11 respects

Distance Sensor and OLED

Project tutorial by javier muñoz sáez

  • 22,053 views
  • 22 comments
  • 65 respects

Touchless Automatic Motion Sensor Trash Can

Project showcase by Will Su

  • 24,906 views
  • 23 comments
  • 41 respects
Add projectSign up / Login