Parking Pass
Hi, my name is Ramneek and today I will be showcasing a final project I completed in class. This instructables will provide you with a step by step instructions on how to make a parking pass. This parking pass operates with a distance sensor signalling (with a green led) whether the parking station is occupied or not; Along with a 7-segment countdown, showing the time given to set up and pay, with the payment process being done through a touch switch sensor, which if you can guess, if touched indicates payment. This will allow for a servo arm to grant access to the "parking facility".
To start you will need to gather the necessary supplies...
Supplies
- Servo motor (1)
- Seven Segment Display (1)
- NPN Transistors (2)
- Capacitor (2)
- 330 ohm Resistors (4)
- 10k ohm Resistors (2)
- Popsicle Stick (1)
- Wires (Multiple)
- Wire Stripper (1)
- Distance Sensor (1)
- Touch Switch (1)
- Breadboard (1)
- Led's (4)
Planning
The inspiration of my circuit cam alongside the idea of a railroad crossing, however since I wanted to add a push button function I resulted to the idea of "making a payment". Thus after researching different functions that would require an crossing arm and payment, I came to the conclusion of the parking pass. When I thought of the idea of my circuit I immediately realized that I needed to plan the space on my servo board correctly. Therefore I began with a multivibrator circuit placed on the far left side of my breadboard.
So as I said we will being with the multivibrator part of the circuit. This section will give us a set of two blinking led's, allowing for a more realistic parking pas experience. For this we will need, (2) NPN transistors, (2) 330 ohm resistors, (2) 10k ohm resistors, (2) capacitors, and 2 led's.
Wiring Multivibrator
To wire the multivibrator we must do the following:
- Connect 330 ohm resistors on the power rail, to cathode (pos) of both led's.
- Connect cathode (pos) of both capacitors to 10 k ohm resistors in the power rail.
- Connect anode of both capacitors (neg) to anode of led's.
- Connect anode of led legs to collectors of NPN's
- Connect cathode of capacitors to base of NPN's
- Connect emitter to ground (negative) for NPN's
This creates the Negative, Positive, Negative function of an NPN.
No code is needed for this part of the circuit.
Seven Segment & Distance Sensor
The next step is to wire the seven segment and distance sensor.
For the distance sensor both echo and trig need to be in analog pins. For echo I used ~5, and for trig I used ~3.
The distance sensor also requires ground and power to correct legs.
As for the seven segment, you need (2) 330 ohm resistors connected from power in the middle slots/comms. Reminder, keeping the pins close is ideal. Which is why I placed my seven segment to the far left of my breadboard.
In the picture/code above you can see where I placed each pin.
Code is attached below to test both.
Touch Switch
For touch switch all you need to do is connect power, ground, and a pin#,aka the signal. I made this pin 2. For the placement of the touch switch I wanted it to be accessible for any "driver" coming by.
Once this is done you can upload a code and whenever you make contact with the touch switch your function will operate. In this case my servo arm will turn 90 degrees (indicating the process of purchase) making an opening to pass.
Downloads
Servo Motor
Now we attach the servo motor. To do so we once again need power(red), ground(black), and a pin #(orange).These colour coded wires all represent each. The pin for servo also needs to be analog, which is why I chose pin ~6.
You can also attach a popsicle stick to the servo to represent the arm/boom gate.
Downloads
LED'S
The last step is to wire to led's. To do so you need to connect 330 ohm resistors to the yellow and green led, and connect the cathode to a pin #. (13 & A1) All thats left now is the final code.
CODE
The last step is the code. Upload this and create your circuit!! You can also create a prop and make this look realistic.
PROP
If you have made it to this step that means you have successfully created your parking pass circuit and code. Now its your choice whether to build the realistic prop that ties everything together. Above is mine :)