Changhao Li, Hang Zhao, Hongyi Li, Jingyi Cai
Smart Parking Philadelphia(SPP) is a program that detects and visualizes the availability of street parking. With the help of SPP, Philadelphia can reduce congestion, pollution and traffic accidents in the center city. It will use an LED matrix to visualize current availability of street parking, and guide drivers to find parking spots easily.
1. City Context
It’s hard to find parking spots in downtown Philadelphia, especially during peak hours or busy times. Hence, the drivers have to cruise around several blocks to find an available spot. The cruising process will lead to many problems, such as traffic congestion and air pollution.
Cruising will also lead to safety problems. As Figure 3 shows, when vehicle speeds change rapidly, drivers’ patience will decline, which may increase the risk of car accidents. Figure 4 is the map for street crashes, we can find that in Philadelphia’s downtown, the number of the crashes is much higher than the suburb.
2. Precedents
Barcelona has a sensor system called “fastprk” that guides drivers to available parking spots. They install the sensors under the asphalt layer to detect crossing vehicles, and drivers can use apps to find a parking spot, which is environmentally-friendly and efficient.
However, this project is very expensive. As the developers use a sensor for each parking spot, which will make it hard for the project’s further scale up. Fortunately, Philadelphia has its existing resources to save the cost of such a project.
3. Our Solution
We are proposing a new program, smart parking philadelphia, which aims to provide real-time parking availability information for drivers to check.
Our product can bring three main benefits to the city:
- Relieving congestion, by showing real-time parking availability information, which is highly beneficial to drivers’ decision;
- Reducing car accidents, cruising for parking may result in unnecessary risk for pedestrians on the streets, while our product can effectively improve driving safety and reduce accidents;
- Reducing carbon emission, as drivers don’t need to keep their vehicles cruising while they are looking for available parking spots, thus our product is environmentally-friendly.
Our visualization method is a LED matrix board which demonstrates a car shape. When there is plenty of parking availability, the LED car shape will be empty; When there is medium parking availability, the car shape will be half-filled; When there are no parking spaces, the car shape will be full-filled.
Chestnut St & Walnut St are the busiest streets in downtown Philadelphia, where many restaurants, small businesses, and public services are located, so the parking spots there are highly limited. On the contrary, the secondary streets have more available parking slots.
One big advantage of our product is that we are using existing inductive loops in the city, where every intersection with traffic lights has an inductive loop lying underground.
4. Users & Clients
The SPP program can benefit a wide range of potential users, including shoppers who need temporary parking, tourists who go to cultural spots, drivers who drive by those heavy roads, and shopkeepers of local businesses. To overcome the possible opposition of local residents, we make full use of existing resources to reduce construction and save investment. To avoid pedestrians from confusing different visualization signals, we improve the signal board in the SPP program for clearer information.
To better implement the SPP program, we need to contact the Department of Streets to sponsor & develop the project, and partner with the Office of Innovation and Technology (OIT) for consulting technical practices. For daily operation and maintenance, we tend to collaborate with Philadelphia Parking Authority.
5. Diagrams
In order to calculate the number of remaining parking spots in a street section, we need to calculate the number of vehicles entering (Vehicle Inflow) and leaving (Vehicle Outflow) the street, and estimate total parking spots in this section. In so doing, the number of parking vehicles equals to Vehicle Inflow minus Vehicle Outflow (P = I – O), and the number of remaining parking spots equals to estimated total parking spots minus the number of parking vehicles (R = T – P). As a result, the sensor system for each street is divided into two sections – Inflow & Outflow.
Based on existing sensor components, the inflow section consists of four parts:
- Power supply, which is shared with the signal light.
- Inductive loops, which can calculate vehicle inflow.
- Communication module. In the inflow section, it’s the signal receiver that can receive data from the outflow section wirelessly.
- Signal Board. We use LED matrix to visualize parking availability to drivers.
Similarly, the outflow section consists of power supply, inductive loops, and communication module (signal transmitter).
When drivers drive along those busy primary streets (Chestnut St, Walnut St), they may wonder where they should make a turn and park their cars. With our SPP system, drivers may quickly get the parking information they need for decision at each intersection. For example, if there is no available parking spot on 11th St, the signal board will show the low availability, and drivers can go straight to the next intersection. If there are available parking spots on 12th St, the signal board will notify drivers, so they can make a turn at that intersection.
6. Prototype Demonstration
7. Next Steps
Next step will be implementing our product to other blocks and streets in Philadelphia. As most of the streets in Philadelphia are one-way streets, there is huge potential for our product to be used in north and south Philadelphia, where there are compact one-way street networks.
Furthermore, our product can also be used in traffic volume control, where the traffic in busy streets during peak hours can be redirected to other routes, relieving traffic pressure, accidental risks, and saving time.
Moreover, we can develop a real-time parking APP or collaborate with an existing APP such as Google Map, to provide real-time parking availability information for drivers anytime.
8. Technical Specifications
Parts List
- You will need an Arduino Uno board to control the motor and other components.
- Cost: $25
Grove Base Shield V2.0 for Arduino
- Connect Arduino to each module through Grove Base Shield to make the connection more orderly.
- Cost: $3.50
- Use two inductive sensors to count vehicles. The Grove Inductive Sensor consists of three parts: the 2-Channel Inductive Sensor, coil-0, and coil-1.
- Cost: $16.40
MX-05V 433MHz Transmitter + Receiver
- The Receiver could be used to receive signal wirelessly from a transmitter up to a distance of 500 feet.Transmit the calculated remaining parking spaces to the receiver, and the receiver displays the corresponding remaining parking spaces after receiving the signal.
- Cost: $8.80
- 8*8 LED matrix can be used to display different icons to represent the availability of different parking spaces.
- Cost: $9.20
Universal 4-Pin Buckled Cable
- Connect the inductive sensors and the base shield.
Jumper Wires(Male To Female & Male To Male)
- Connect inductive sensors to inductive sensors and Arduino to transmitter.
Wiring Diagram
Wiring Diagrams
- Outflow Section: Inductive Loop & Transmitter Diagram*
- Inflow & Visualization Section: Inductive Loop, Receiver & LED Diagram*
*The Base Shield is connected to the Arduino Uno Board.
Photo of Prototype:
Code
Outflow Section (Transmitter & Inductive Loops):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
/* Smart Parking Philadelphia_Module for outflow sensing and transmitting created 4 May 2023 by Jingyi Cai, Hongyi Li, Hang Zhao, Changhao Li, This code uses an inductive loop sensor to detect vehicles and send the data to Inflow Module. reference code: CountVehicles_LDC1612V4 Author: P Mallon Description: Demo of counting vehicles using Grove - 2 Channel Inductive Sensor (LDC1612) Original Source: https://files.seeedstudio.com/products/E21011104/countVehicles_LDC1612V4.ino Copyright (c) 2018 Seeed Technology Co., Ltd. RF 433MHz Transmitter/Receiver Original Source: https://randomnerdtutorials.com/rf-433mhz-transmitter-receiver-module-with-arduino/ */ // Include the library #include "Seeed_LDC1612.h" #include "RH_ASK.h" #include "math.h" // Instantiate the sensor and the driver LDC1612 sensor; RH_ASK driver; // Define all variables and constants int vehicleCount0 =0; bool startVehicleTimer =true; long int ambientInduction =0; long int inductiveValeLowest = 43719616; long int inductiveValueMargin = 1500000; long int channel0 =0; unsigned long lastChannel0Time = 0; static uint32_t lastSendTime = 0; void setup() { Serial.begin(115200); // Start serial communication at 115200 baud rate delay(100); Serial.println("start!"); // Print "start!" to the serial monitor sensor.init(); // Initialize the sensor //multiple channel use case configuration. if(sensor.single_channel_config(CHANNEL_0)) { Serial.println("can't detect sensor!"); // If the sensor can't be detected, print an error message while(1); // If the sensor can't be detected, halt the program } if (!driver.init()) { Serial.println("init failed"); // If the initialization fails, print an error message } } // Function to check the inductive sensor void checkChannel0(){ long int channel0=0; sensor.get_channel_result(0,&channel0); // Get the result from the sensor // If the detected value is above the minimum plus the margin if ((channel0>= inductiveValeLowest + inductiveValueMargin)){ // And if at least 1 second has passed since the last vehicle was detected if (millis() - lastChannel0Time >= 1000) { Serial.println("metal0"); // Print "metal0" to the serial monitor vehicleCount0++; // Increase the vehicle count Serial.print("vehicleCount0:"); // Print data to the serial monitor Serial.println(vehicleCount0); lastChannel0Time = millis(); // Update the time of the last detected vehicle } } } void loop() { u32 result_channel0=0; // Get the result from the sensor sensor.get_channel_result(0,&result_channel0); channel0 = result_channel0; // Check the sensor checkChannel0(); // Pause for a second delay(1000); // If at least 1 second has passed since the last data was sent if (millis() - lastSendTime >= 1000) {//send data each 1s int data = vehicleCount0; // Prepare the data to be sent Serial.println((uint8_t) data); // Print the data to be sent to the serial monitor driver.send((uint8_t *)&data, 1); // Send the data driver.waitPacketSent(); // Wait for the data to be sent lastSendTime = millis(); // Update the time of the last sent data } } |
Inflow Section (Receiver & Inductive Loops & LED Matrix):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
/* Smart Parking Philadelphia_Module for inflow sensing, receiving and displaying created 4 May 2023 by Jingyi Cai, Hongyi Li, Hang Zhao, Changhao Li, This code uses an inductive loop sensor to detect vehicles, calculates the remaining parking spaces on the street, and visualizes this information. reference code: CountVehicles_LDC1612V4 Author: P Mallon Description: Demo of counting vehicles using Grove - 2 Channel Inductive Sensor (LDC1612) Original Source: https://files.seeedstudio.com/products/E21011104/countVehicles_LDC1612V4.ino Copyright (c) 2018 Seeed Technology Co., Ltd. RF 433MHz Transmitter/Receiver Original Source: https://randomnerdtutorials.com/rf-433mhz-transmitter-receiver-module-with-arduino/ MAX7219 - using SPI library to display 8x8 bitmap Author: Mario's Ideas Original Source: https://projecthub.arduino.cc/mdraber/0c417a04-ec3f-405a-a383-b2d66e889e7a */ // Include the libraries #include "Seeed_LDC1612.h" #include <RH_ASK.h> #include <SPI.h> // Not actually used but needed to compile #include <LedControl.h> // Initialize variables LDC1612 sensor; RH_ASK driver; // Define LED display pins int DIN = 9; int CS = 7; int CLK = 13; // Initialize LED display LedControl lc1 = LedControl(DIN, CLK, CS, 0); // Set location as 0 LedControl lc2 = LedControl(DIN, CLK, CS, 1); // Set location as 1 LedControl lc3 = LedControl(DIN, CLK, CS, 2); // Set location as 2 LedControl lc4 = LedControl(DIN, CLK, CS, 3); // Set location as 3 // Initialize vehicle counter int vehicleCount0 = 0; // Define parking slots int PN = 7; int RPS = PN; // Remaining parking slots // Define timer for vehicle detection unsigned long lastChannel0Time = 0; // Create bitmap of cars for LED display byte Car3[8]={B00011111,B00111111,B01111111,B01111111,B01111111,B01111111,B00111100,B00011000}; byte Car2[8]={B11100000,B11110000,B11110000,B11111110,B11111110,B11111110,B00111100,B00011000}; byte Car1[8]={B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000}; byte Car4[8]={B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000}; byte Car30[8]={B00011111,B00100000,B01000000,B01000000,B01000000,B01000011,B00100100,B00011000}; byte Car20[8]={B11100000,B00010000,B00010000,B00001110,B00000010,B11000010,B00100100,B00011000}; void setup() { // Initialize serial communication Serial.begin(115200); delay(1000); // Allow time for initialization // Initialize driver if (!driver.init()) { Serial.println("Driver initialization failed."); // Print error if initialization failed } // Initialize LED display lc1.shutdown(0, false); lc1.setIntensity(0, 0); lc1.clearDisplay(0); lc2.shutdown(0, false); lc2.setIntensity(0, 0); lc2.clearDisplay(0); lc3.shutdown(0, false); lc3.setIntensity(0, 0); lc3.clearDisplay(0); lc4.shutdown(0, false); lc4.setIntensity(0, 0); lc4.clearDisplay(0); // Initialize inductive sensor Serial.println("Inductive sensor initialization started."); sensor.init(); if (sensor.single_channel_config(CHANNEL_0)) { Serial.println("Sensor configuration failed."); // Print error if configuration failed while (1); // Keep looping if sensor configuration failed } Serial.println("Inductive sensor initialization complete."); // Indicate completion of sensor initialization } // Define function to check for vehicles on Channel 0 void checkChannel0() { long int channel0 = 0; sensor.get_channel_result(0, &channel0); // Get result from sensor if (channel0 >= 43719616 + 1500000) { // Check if vehicle is detected if (millis() - lastChannel0Time >= 1000) { // Ensure at least 1 second has passed since last detectio Serial.println("Vehicle detected on channel 0."); // Indicate vehicle detection vehicleCount0++; // Increase vehicle count Serial.print("Total vehicle count: "); Serial.println(vehicleCount0); // Print current vehicle count lastChannel0Time = millis(); // Reset timer } } } void loop() { // Call the checkChannel0 function to detect vehicles on channel 0 checkChannel0(); // Check if there is any incoming data from the driver uint8_t buf[2]; uint8_t buflen = sizeof(buf); static unsigned long lastUpdateTime = 0; // If there is incoming data, process it if (driver.recv(buf, &buflen) && (millis() - lastUpdateTime) >= 1000) { // Ensure at least 1 second has passed since last update lastUpdateTime = millis(); // Reset timer uint8_t vehicleCount1 = (buf[0]); // Get vehicle count from incoming data // Calculate RPS based on vehicle count RPS = PN - (vehicleCount0 - vehicleCount1); if (RPS < 0) { RPS = 0; } else if (RPS > 7) { RPS = 7; } // Update LED displays if (RPS <= 2) { for (int i = 0; i < 8; i++) { lc1.setRow(0, i, Car2[i]); lc2.setRow(0, i, Car3[i]); lc3.setRow(0, i, Car1[i]); lc4.setRow(0, i, Car4[i]); } // Print vehicle count and RPS Serial.println("No Parking Space"); } else if (RPS > 2 && RPS <= 5) { for (int i = 0; i < 8; i++) { lc1.setRow(0, i, Car20[i]); lc2.setRow(0, i, Car3[i]); lc3.setRow(0, i, Car1[i]); lc4.setRow(0, i, Car4[i]); } // Print vehicle count and RPS Serial.println("Half Parking Space"); } else { for (int i = 0; i < 8; i++) { lc1.setRow(0, i, Car20[i]); lc2.setRow(0, i, Car30[i]); lc3.setRow(0, i, Car1[i]); lc4.setRow(0, i, Car4[i]); } // Print vehicle count and RPS Serial.println("Full Parking Space"); } // Print vehicle count and RPS Serial.print("inflow: "); Serial.println(vehicleCount0); Serial.print("outflow: "); Serial.println(vehicleCount1); Serial.print("RPS: "); Serial.println(RPS); } Serial.println("Loading"); delay(1000); //if there is no delay the ad will Stuck in last loop } |
References
Case study for Fastprk control system:
https://urbiotica.com/us/fastprk-control-system-products/
Traffic 2 Lanes Mode:
Street Crash in Philadelphia:
Use of single inductive loop sensor for vehicle classification:
https://scholarworks.calstate.edu/downloads/3x816n02f
Inductive loop vehicle detector gets modernized:
https://hackaday.com/2017/11/04/inductive-loop-vehicle-detector-gets-modernized/
Vehicle Detector Cut In Loop Installation:
https://www.youtube.com/watch?v=ZvjhP5PUA3w
Philadelphia Complete Street Types Standards:
Pennsylvania Spatial Data Access (psu.edu)
CountVehicles_LDC1612V4:
https://files.seeedstudio.com/products/E21011104/countVehicles_LDC1612V4.ino
RF 433MHz Transmitter/Receiver:
https://randomnerdtutorials.com/rf-433mhz-transmitter-receiver-module-with-arduino/
Display 8×8:
https://projecthub.arduino.cc/mdraber/0c417a04-ec3f-405a-a383-b2d66e889e7a