Automatic multilevel parking system
Finding parking space is a major problem in Nairobi city. A big number of the city occupants find it hard to find an empty slot especially in the city center. The process is time consuming and most parking spaces are not safe hence leading to stolen car parts. I believe a secure structure that is multilevel to maximise in vertical space will be a suitable solution to solve this particular problem. The car park will be able identify which slot is empty and assign park the vehicle on behalf of the client. My prototype will illustrate the basic functions of the parking system whereas it can be scaled up and more functions added.
I began with a hand made sketch of the idea as shown below.
2D models
The first order of business was to redesign the stages. I took the designs designed for uline cardboard. I had to redesign for them to fit 6.5mm cardboard and eliminate the folding lines. I began with changing it from a trifold design to a press-fit design as shown. for the side pieces i had to change the positioning of the holes to align due to the modification.
sides
I then redesigned the rest of the box
outer box
I then proceeded to modify the inner box. This took alot of trial and error before getting it to fit right. i had to change the sizes of the top and bottom piece since this was no longer a trifold design. I also eliminated two pairs of the holes on the top piece that were meant for the folding pieces.
inner box
top and bottom piece
When cut out the outcome was as shown
The inner contents of the axis
The two axes
I then designed the stage and the model parking lot
The platform
To transform this into a 3D model i sent the dxf files to onshape as seen below and gave it a thickness equivalent to that of the cardboard and assembled it in a part assembly. The cad design can be foundHere
importing dxf
extruding
in 3D
Rearranging and rotating parts
The assembly
model lot
import dxf into On shape
extruding the parts one at a time
second part
all the parts extruded
moving and rotating the parts
assembly using planar mates
full assembly with appearance settings modified
The assembly can be found here
The 3D printed parts were a model car and a rack and pinion shown below. I used blender software to edit the different parts by importing them and toggling to edit mode. In this mode i could do various modifications in size to fit my design. For the car, i resized it to fit the slots ot the model car parking slot. For the servo holder, rack and pinion i made it smaller and adjusted the hole fitting the servo to be the same size as mine. The models are found in the link 1 and this link 2
car in blender(mesh editing)
car (object mode)
car
Servo holder
rack(mesh)
rack
Pinion gear
pinion gear
For the circuitry i fabricated control board using atmega 1284 and designed a separate board for power regulation for both the microcontroller board and the pololu motor drivers. the motors run using 12V whereas the rest of the board uses 5v. Circuit design was done by using Eagle software.
Eagle schematic
Eagle board
controller board schematic
controller board
board
motor controller board
I decided to then design a casing for the electronics. I started with making the botttom part with nternal fixing holes for screwing the board onto.
sketch
sketch
extrude and sketch of fixing holes
extruding the sketches
model with fixing holes
complete with fixing holes
I Then made the top cover and gave it an open top so that the jumper wires can move out of it
Top
Top
I then went on to print it using the uprint se plus through the user interface called Dimension.
sending to printer
in the printer
The top font
The top back
drilling fixing holes on the board
The bottom
both pieces
putting it together
Assembled
with the board inside
The program uploaded was programmed on arduino IDE. The program controls the movement of the motors. it runs a loop that first moves the first(x axis) motor for 8 revolution in the forward direction . The code that controls this movement is shown below.
digitalWrite(dirPin,LOW); // Enables the motor to move in a particular direction // 200 pulses are for making one full cycle rotation for(int x = 0; x < 1600; x++) { digitalWrite(stepPin,HIGH); delayMicroseconds(500); digitalWrite(stepPin,LOW); delayMicroseconds(500);The second motor(y-axis) is then moved upwards by the same amount of revolutions. This is done by setting the direction pin to high. This is done with a similar code snippet.
digitalWrite(dirPin2,HIGH); for(int x = 0; x < 1600; x++) { digitalWrite(stepPin2,HIGH); delayMicroseconds(500); digitalWrite(stepPin2,LOW); delayMicroseconds(500);When at the top, the servo is activated and it does a sweep motion to push the vehicle into an empty slot and then retreat to start position. this action is achieved using the following segment of code.
for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees // in steps of 1 degree myservo.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position } for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees myservo.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position }Once this is done, the motion is reversed to the original position. The direction of both motors is reversed simultaneously in order to achieve this. Look at the code below and compare with the first two snippets.
digitalWrite(dirPin2,LOW); // causes the motor to move in opposite direction // Makes 200 pulses for making one full cycle rotation for(int x = 0; x < 1600; x++) { digitalWrite(stepPin2,HIGH); delayMicroseconds(500); digitalWrite(stepPin2,LOW); delayMicroseconds(500); } digitalWrite(dirPin,HIGH); // Causes the motor to move in opposite direction // Makes 200 pulses for making one full cycle rotation for(int x = 0; x < 1600; x++) { // 8 full rotations digitalWrite(stepPin,HIGH); delayMicroseconds(500); digitalWrite(stepPin,LOW); delayMicroseconds(500); }
the program part1
Programing part 2
board to fab isp connection
To program the board i connected it to the fab isp using the following pinout diagram
Programing the board
I tested the board with 12V power supply to see if it was working optimally
Testing the board
I put the parts together module by module until i had a full system. To hold them together i used hot glue and for the inner box i used screws to connect the bottom piece to the thread
fixing the rods in the holes
fixing screws
the inside of the box
motors
fixing the rack and pinion
The final outcome is as seen below
lot
laser cut
I needed to use vinyl stickers to further improve the appearance of the project. I imported the clipart and began extracting the vectors by using the trace bitmap tool.
Working with the roland vinyl cutter was pretty straight forward. I loaded my file in dxf format to rhino, as shown. I then selected the print option and selected the drivers of the machine.
rhino
The printer options window appeared where different parameters such as force are set
printer parameters
The next step entails setting up the machine. setting the home and loading the vinyl roll and securing it.
material setup
The printing began soon after and this was the outcome after weeding
weeded
The sticker i stuck on one of the modules of my final project
sticker
The final product is as seen below
assembled
assembled
assembled
Item | Quantity | Cost |
---|---|---|
pololu stepper motor drivers | 2 | Kshs 600 |
atmega 328p | 1 | Kshs 500 |
capacitors | 9 | 200 |
voltage regulators | 4 | 100 |
Cardboard | 2m x 2m | 0 |
stepper motors | 2 | 6000 |
wires | 4m | 300 |
crystal (16Mhz) | 1 | 20 |
servo motor | 1 | 400 |
As seen in the BOM, the whole project cost around $70(Kshs 7000)
This first design made in cardboard posed alot of problems in stability and was not string enough to work with the needed structural stability. I therefore decided to upgrade the design to use 3D printed parts on the axes. I embarked first in designing the movable plate that would move as the motor does.
The sketch
adding holes
dimensioning
Adding fillets
Consraints
Extruding
The final outcome
The design i chose for the motor cage was an open design with a top plate and bottom one both containing pockets to constrain the motor's movements. The two plates are connected using rods as seen below.
The top plate
adding holes
the hole pockets
adding the motor pocket with chamfers
Bottom plate
Adding hole pockets for connecting
chamfers(3mm) and fillet(1mm)
Bottom plate(bottom view)
Connecting rod
The assembly
To visualise how the parts connect i had to first create a replica of the rods and a connecting piece for the x and y axis.
The long rod connecors
X-y connector
side view of x-y connector
This was the exciting part of the whole design process. Testing how the different parts fit together. I started with assembling one of the axes and grouping all of its parts. I then proceeded to attempt to form a linear array of the parts. I then realised the linear array behaved like a clone whereby whatever you did to one assembly happened to another. I therefore resolved to form an another assembly and assemble two instances of the axis. This worked out fine.
First assembly
rotating
linear pattern
Assembly of asssemblies
Assembly of asssemblies
I decided to upgrade my circuit board and integrate both the microcontroller and the motor drivers in one board. I began with designing on eagle.
The schematic
the board view
component placement
The routed board
Top layer and pads
The outcome
I then proceeded to test the board on 12V power. Unfortunately the voltage regulator used was not able to handle the current the circuit was drawing. So in short the circuit failed the smoke test.
The testing
Having hit this obstacle i set to redesign the board to use an LM05 voltage regulator that can handle high current. I also added pull-up resistors to the buttons. To separate the through hole components from the surface mount i designed them to be on different sides of the board. Hence surface mount components were in the botton layer while the through hole ones stayed at the top.
The new design
The outcome top
The outcome bottom
This version passed the smoke test and was now time to program it and do test runs. I started with test code that would help calibrate my system so as to know how many staeps to take in order to park the vehicle. Having put an arduino bootloader in the chip it was easy to upload code using arduino IDE.
arduino code
Programming
Testing the system
I also made a casing for the electronics using onshape CAD
I finally put the whole system together and put it in an enclosure
Front view
Side view
My biggest issue was finding the best way to manage the wires without messing with the motion. I at first used a cable tray which i put all the wires. This did not work well for me because the wires got stuck in the tray as seen in the below video
I then separated the wires of the moving part from the wires of non moving parts . I then implemented the tray only i the moving portion and passed the rest of the wires through trunking as seen below.
For strength and stability of the system i had to add some more connectors .