Inspiration

Creating a huge and accessible database for smart-cities is a must nowadays. Optimization of city traffic is one of the main topics to address since its directly related to contamination and city life standards. In addition, this sensor also has a huge potential in the world of smart parking lots, where it can provide real time information about parking in the city. The information obtained can be of use by particulars (parking spots, mean parking times, best times to find parking) or town halls (optimization of traffic, optimization of parking slots, parking meters).

What it does

With the use of an Arduino and several ultrasonic range finder sensors, we obtain data and process to count the flow of pedestrians crossing. In addition, it can also be implemented to control traffic flow and gather information about it. Then, by using an heuristic function, we minimize the queues formed (waiting times) by controlling the light traffic cycles. With Python we connect the Arduino via Bluetooth/USB to upload the data to the Thingtia API so that later we can process the information record (to optimize hour by hour).

How we built it

The Hardware consists mainly of 6 ultrasonic range finders that have their own microprocessor. With this microprocessor and some Arduino code we can easily send an ultrasonic pulse from the sensor and, via the ultrasonic echo, measure the distance between the sensor and any object. With this distance and some processing on the Arduino we can detect changes in the distance that are produced by objects or people passing through.

The heuristic function has been made with a simple model and we have checked that it behaves as expected. Note that this is just a prove of concept design and the heuristic function must be worked on since it is too simple (we take only quadratic polynomials and only one intersection is taken into account). In addition, to simulate the flows we have defined Poisson distributions around some estimated values to see if the behavior was correct.

Regarding the connection with the computer has been made remotely via Bluetooth using the "serial" module in python.

Finally, the uploading of our data has been made via bash to the Thingtia API.

Challenges we ran into

We have had several difficulties, most of which we were able to overcome. At first the uploading of data to the API was a little bit confusing. Also, we had some troubles connecting the Arduino to the computer. Furthermore the connection via Bluetooth with Arduino was really complicated due to hardware issues with the Bluetooth adaptor module.

Accomplishments that we're proud of

Making use of several sources to achieve a common goal: hardware and software. We think that with further work and more time our idea could be implemented to have a better way of regulating traffic lights in a simple and cheap way (range finders are cheap and easy to use). Also we are proud to offer a working prototype that is capable of registering people flow as a function of time.

What we learned

We have learned the cURL protocols to upload or download data from Thingtia API. In addition, we have used bash in Python environment and programmed in Arduino.

What's next for Aruki

Automation of data uploading as a stream. Implementation of the same infrastructure to track parking spots in a determined location to optimize parking. We could easily detect heavy parking dependent zones and mean parking times so that town halls have a way to make better decisions.

Built With

Share this project:

Updates