overview
1. The system starts from distance sensor. Sensors detect the movement of cars and calculate the speed.
2.Sensors inform the corresponding child board. The child board inform other child boards as well as motherboard.
3.Combining the information gathering from childboards, the childboard makes the decision, whether turn on or off the light.
4. The motherboard connecting with WIFI, and upload the data to the cloud servers.
5. The cloud server is always listening to the events by ZigBee boards.
6. Once receiving data, the server stores those data, and out them into cloud computing model.
7. The model is based on machine learning, that uses number of cars passing and the average speed, to predict the current road traffic situation.
8. Users/ Client side is Android app, where users can check the current traffic situation and traffic trend.
9. Once users click on the interface on the app, the post request would be sent to another http server on another EC2 virtual machine.
10. After receiving that message from users, the http server retrieve data from cloud database and return the result back to the users side.
2.Sensors inform the corresponding child board. The child board inform other child boards as well as motherboard.
3.Combining the information gathering from childboards, the childboard makes the decision, whether turn on or off the light.
4. The motherboard connecting with WIFI, and upload the data to the cloud servers.
5. The cloud server is always listening to the events by ZigBee boards.
6. Once receiving data, the server stores those data, and out them into cloud computing model.
7. The model is based on machine learning, that uses number of cars passing and the average speed, to predict the current road traffic situation.
8. Users/ Client side is Android app, where users can check the current traffic situation and traffic trend.
9. Once users click on the interface on the app, the post request would be sent to another http server on another EC2 virtual machine.
10. After receiving that message from users, the http server retrieve data from cloud database and return the result back to the users side.
block diagram
Every 3 street lights form a group and are controlled by a motherboard. Each street light is connected to a child board for communication and an ultrasonic distance sensor is used for speed and motion detection.
A machine learning deployed on Amazon EC2 server is used to classify the traffic condition. The result would be sent to a user’s Android application and is able to perform data visualization. |
sensors design
As long as the distance is larger than 100cm, we mark that there is no object in front of the sensor, thus there is no vehicle in front of or passing by a street light.
In practice, we also set a error range that if ever there is a disturbance, the system won’t count up and the light would not light up.
As shown above, firstly we disable the interrupt when the process steps into the function and set the trigger for 10ms in order to generate ultrasound signal. Now we set the timer to zero and wait for the low level to come in. As soon as the low level comes in, the timer is stopped and both the higher digit and the lower digit are taken out. Then, the interrupt is enabled again and wait for another interrupt.
In practice, we also set a error range that if ever there is a disturbance, the system won’t count up and the light would not light up.
As shown above, firstly we disable the interrupt when the process steps into the function and set the trigger for 10ms in order to generate ultrasound signal. Now we set the timer to zero and wait for the low level to come in. As soon as the low level comes in, the timer is stopped and both the higher digit and the lower digit are taken out. Then, the interrupt is enabled again and wait for another interrupt.
zigbee network
We choose the CC2530 chip from Taxers Instruments and the accompanied development board which is a true system-on-chip (SoC) solution for IEEE 802.15.4, ZigBee and RF4CE applications as our network gateway and micro-controller.
The CC2530 combines an excellent performance RF transceiver with an industrial standard enhanced 8051 MCU so that we can program it like a single chip machine. Each street light transfers the speed messages to the motherboard in a Peer-to-Peer manner and the motherboard transfers the control messages as feedback which is able to control the street lights to turn on and off. |
The network within a group is a Star Topology. The motherboard serves as a coordinator and the street light child boards will serve as end devices. The role of each board is defined in the software link layer and application layer. Each device has a unique 8 bits address.
The address of the coordinator will always be “0x00” and the end devices will have different self-define addresses. |
The design logic of the relationship between speed and the control message is shown in Fig.10. Speed would be divided into three level - S1, S2, S3, where S1 stands for the slowest level and S3 stands for the fastest level.
If sensor 0 notice a car is coming really fast, the motherboard will turn on all the light after receiving the message and then the lights will turn off one by one after the car has passed them.
If the car is running in S2, the lights will turn on 2 by 2. And if the car is running in S1, the lights will turn 1 by 1. Therefore, we can minimize power consumption while making sure the drivers’ safety.
If sensor 0 notice a car is coming really fast, the motherboard will turn on all the light after receiving the message and then the lights will turn off one by one after the car has passed them.
If the car is running in S2, the lights will turn on 2 by 2. And if the car is running in S1, the lights will turn 1 by 1. Therefore, we can minimize power consumption while making sure the drivers’ safety.
Android application
The above results have reached our expectations which perform correctly in different speed situations and we can receive reliable feedback from the Android App. However, there are still a lot of places to be improved in terms of latency,machine learning model accuracy, etc.