Blueprint

The Smart road eye

It is a project that check the road by using Raspberry Pi 4 Model B (2GB) and Raspberry Pi Camera Module V1.3 (5 MP), then sends data to a Firebase Realtime database. Another ESP32 is connected with traffic light and control them based on the data analysis by the AI. the firebase is connected with an app build with flutter and it display the important details about the road at Realtime for drivers to check it also it send the percent of pollution to try another road if this one is highly polluted mean that there are a lot of cars. https://drive.google.com/drive/folders/1oXieUDFhaSvpWXGAfWP8MMazlWLh3bht?usp=drive_link (Folder for full assembly and 3D video render) https://drive.google.com/drive/folders/1KsriBLeugqPdMsl5KT9PRbp6rbyMKrla?usp=sharing (3D Blender file) https://wokwi.com/projects/453308781447889921 (Arduino code and wiring) https://wokwi.com/projects/453387951416239105 (ESP32 code and wiring)

Created by Abdallah Sayed Abdallah Sayed

Tier 3

9 views

0 followers

Abdallah Sayed Abdallah Sayed submitted The Smart road eye for review ago

Abdallah Sayed Abdallah Sayed added to the journal ago

Wire diagram

I could not find symbols for some of the parts, so I could not make a wire diagram, but instead, as I said before, I used Wokwi, and I added links for them before, and those are the links again
https://wokwi.com/projects/453308781447889921 (Arduino code and wiring)
https://wokwi.com/projects/453387951416239105 (ESP32 code and wiring)

About the full assembly, there are a lot of videos uploaded to the drive, and there you can check all the details.
https://drive.google.com/drive/folders/1oXieUDFhaSvpWXGAfWP8MMazlWLh3bht?usp=drive_link (Folder for full assembly and 3D video render)

And the links are available in the GitHub README, too. Check them all, please.
image

Iamalive Iamalive 🚀 requested changes for The Smart road eye ago

Hey, it looks like you forgot to include a wiring diagram, please do so and include it in your readme! Additionally, can you show where your electronics are in the full assembly? It's a little bit hard to tell. Thanks!

Abdallah Sayed Abdallah Sayed submitted The Smart road eye for review ago

Abdallah Sayed Abdallah Sayed added to the journal ago

Code to use WebCam and add wire diagram

I updated the code to support a webcam, but I still need funds to get a Raspberry Pi and a better YOLO model to view the system without latency. So I added the wire diagram and video for the prototype while working. I preferred to use a simulation instead of KiCad to indicate the parts better and prevent rejection, since I worked hard to add everything and really need the PI. Also, for the 3D, we have the step files uploaded for the printed parts. For the full prototype, check it out in the Blender video we rendered or in the file in the README.

image

Taran the Idiot Taran the Idiot 🚀 requested changes for The Smart road eye ago

hihi! This is a great project! However there are a few problems that I see:

  1. You need to include a Picture of the assembled project with everything easily visible
  2. You need a wiring diagram in your readme as well. this shows how the parts are connected together
  3. In your 3D folder, you need to have a step file that shows your project assembled, with all the electronics parts present. your assembly photos in the readme should be of this model.

If you have any questions, please ask in #blueprint-support and someone will help you out.

Abdallah Sayed Abdallah Sayed submitted The Smart road eye for review ago

Abdallah Sayed Abdallah Sayed added to the journal ago

Adding assembly images to Readme and why do I need RP

I added the full assembly and for that why we need Raspberry Pi we are working on AI vision which need a lot of RAM and processing power we firstly as indicated used ESP32 but it was not working and it needs the AI to be on a server and that take a lot of time and that won't be possible in real-life so we need to make this project actually taken by the governorate and use it so we need to show them something really great so we searched and find that the RP will be much faster and actually can run the model on it. Thanks for understanding.
image

Tanuki Tanuki ⚡🚀 requested changes for The Smart road eye ago

Hey! I cant see a screenshot of the actual full assembly in the readme. Additionally, why do u need an RPI 4 for this?

Abdallah Sayed Abdallah Sayed added to the journal ago

Link for Hassan project

Ah I forget this is the link for Hassan blueprint project as I forget to add in the last journal
https://blueprint.hackclub.com/projects/796
A lot of Thanks to the Blueprint team for hard working in reviewing all these projects and happy new year.
image

Abdallah Sayed Abdallah Sayed submitted The Smart road eye for review ago

Abdallah Sayed Abdallah Sayed added to the journal ago

This is Hassan Project

We worked hard on this project form a lot of months and it pass through a lot of things and now something went wrong with my teammate Hassan blueprint account so I added everything here in this one and added the GitHub and everything needed also as you need I tried to make the budget on tier 3 but it was really hard as the detection need high processing and the low versions of PI cannot do as the PI zero 2 W it is cheap but its ram and processor wont work for detection so we searched a lot until we found RP 3B+ which is not good for detection too but it is better than the zero 2 W and wont exceed the budget. and here is images for the least price we found after a lot of search for all the components and we really worked and searched a lot for this project so please approve it before blueprint end and thanks in advance.
1
2
Also the testing and training the model on the toy car for a huge number of data through different ways took a lot of time I am sure that it take more than 30 but I reduced it to 20 as you say so please approve it.

Abdallah Sayed Abdallah Sayed added to the journal ago

I really searched for the lowest price vendor

As you can see, I ordered from two different places, most electronics stores and Amazon, because some items at most are more expensive than Amazon, also the opposite, the adapter and other items may not be available in most, or were more expensive, so that is the lowest price here. I stayed one day opening mostly all the sites that accept Visa here in Egypt and sell electronics, and this is the lowest price actually, if someone finds another vendor that accepts Visa and is cheaper, but please be aware of customs, then DM me, and thanks. Why ordering from Alibaba and Temu is not possible for me, as here in Egypt we have high customs, so its price will be higher than buying it from Amazon.
and now this is what is important this project is submitted by Hassan before and he is one of my team members and for some reasons that is not related to blueprint but with hack time. his account is banned but we really as a team worked hard on this project so we did not want to give up so please review it from my account and this is the new prices images as there was some changes in the past days and this is actually the lowest prices we found.
Screenshot 2025-12-23 124350
Screenshot 2025-12-23 125138
Screenshot 2025-12-23 125207

Abdallah Sayed Abdallah Sayed added to the journal ago

Edit the codes for Raspberry pi

Now after chosing to continue the work with Raspberry pi instead of ESP32 CAM the setup will be a bit different so I started checking what is the differences and write the new code and steps to make when get the Raspberry pi and operate on it and how to add to it an OS and all the steps in a .md file in code folder also I searched for the best Raspberry pi and camera for the project to get the highest accuracy. I also learned how to connect the Firebase to the Raspberry Pi using Python and write the code for it in the AI client Python code to be run on the Raspberry Pi and send real-time data to the Firebase database, so the ESP32 responds to it without any problems.

image

Abdallah Sayed Abdallah Sayed added to the journal ago

Changing mostly everything

After buying the camera with my own money and testing a lot of AI for it using YOLO and the Edge Impulse web service, I got early feedback that YOLO is excellent. Still, using it locally and the ESP32-CAM's low processing power led to remarkably high latency. Still, the Edge impulse site uses FOMO for compilation, so it is much lighter. It also works offline as an Arduino library, but its accuracy is very low. So, we concluded that we actually need a raspberry for high accuracy and low latency, as it will work on roads, so it needs to be accurate and very fast. That was the first conclusion. We made the prototype and printed some 3D printed parts, which I added to the GitHub link. We start building a prototype to see how the project will work, and we add additional systems that are far apart, which led us to cancel the PCB and use jumper wires for connections, since a PCB wouldn't be efficient for the far-apart parts. The systems we added are first a light-saver system that uses an LDR to detect Day and night, and an Ultrasonic system that detects whether there are cars and turns on the light only at night. During the day, the light is always off. Also, we added an emergency lane that is always open and closed. If the camera detects an emergency, it opens the gate using a servo motor. The third system is the speed bump, also called an ACTibump, which uses two IRs to detect the car's speed. The IRs measure the time between the trigger and the distance, then calculate the speed. If the speed is very high, larger than the limit, then the servo, which is attached to a part that is 3D printed, opens to make a part of the road downward, and that makes the person who is moving at high speed decrease their speed. The fourth system is the push buttons for the citizens' pass lane. When clicked, they send a signal to the system that someone needs to pass. The system then checks whether an emergency is in progress; if so, it ignores the push button click until the emergency passes. Then it returned to its original state and added the citizens' passing lane, under the condition that the ESP32 analysis would determine what to do and which decision to make.
image
image
image
For the construction of the road, we get a piece of cardboard and then design the road over it, then we put another cardboard part over the platforms in the street to make them different. We make the traffic light stand and camera stand using the 3D printer, then fix them using super glue. We make the light bulbs using juice straws and some white LEDs and resistances then connect them and connect them with a relay module to control them using the ESP32 master and then we fix the traffic light and connect it with the ESP32 then we fix the 2 IRs and the servo bump that will make the system of the speed ACTibump to the ESP32 and put them in there place in the prototype. We add a push button and a servo for the citizens' lane process and connect them to the ESP32, then we add a Servo motor for the emergency lane and connect it to the ESP32. At the end, we connect the LCD I2C to the ESP32 and make sure that it is working. We made the master code for all of that, then connected all of that to the Firebase Realtime Database to be the main way to send and receive between the ESP32 CAM and the ESP32. The problem now is with the ESP32 CAM, as it is late with the server, but it has high accuracy and is fast, but with very low accuracy.

Abdallah Sayed Abdallah Sayed added to the journal ago

Adding images to the README.md File

It is now better for the user to check the README.md by adding visuals. The user can now see the project more easily on the README.md rather than cloning the project or searching in the files.
image
image
image
image

Abdallah Sayed Abdallah Sayed added to the journal ago

Now making the readme.md file

I am not the best at making Readme.md so I try to search a bit to make a good md and I get many ideas from different website and AI agents. I made this final Readme.md file.
image

Abdallah Sayed Abdallah Sayed added to the journal ago

Making a case for the project

Taking measurements from the PCB, going to fusion and make a case for the same dimensions and make it a top and bottom parts and leave open place for the camera from top and bottom as it has MB module to upload the code so to make it easy to access and as it open from top to make the camera see the road. making small parts at the corners as a nail to close the case well.
image
image

Abdallah Sayed Abdallah Sayed added to the journal ago

Editing PCB

Adding a battery holder and connect it with LDO to prevent overvoltage and connect the ESP32 as a master for ESP32 cam using TX and RX connection to then use it in code to send data between them if needed.
image

Abdallah Sayed Abdallah Sayed added to the journal ago

Start coding Python for image analysis

The data that the ESP32-CAM will get will need to be analysis so I start thinking about the best library and how each one work and the best one for the project, so I find that there are a lot of library so I start testing by some online images for roads and let it analysis it.
image

Abdallah Sayed Abdallah Sayed added to the journal ago

Thinking and start the first PCB routing.

I start thinking how can I solve the problem of accident and crowded roads, so I found that the best way to vision the road with AI and send commands to the motors to open and close the street also send for the users messages on an app about the roads state as it is will be a database that held all the data. AI will analysis the images. so, I start with making the PCB that will send data and make actions, so I start searching for the footprints then start working on the Kicad files.
image
image
image

Abdallah Sayed Abdallah Sayed started The Smart road eye ago

12/23/2025 12:27 PM - Thinking and start the first PCB routing.

I start thinking how can I solve the problem of accident and crowded roads, so I found that the best way to vision the road with AI and send commands to the motors to open and close the street also send for the users messages on an app about the roads state as it is will be a database that held all the data. AI will analysis the images. so, I start with making the PCB that will send data and make actions, so I start searching for the footprints then start working on the Kicad files.
image
image
image

12/23/2025 12:32 PM - Start coding Python for image analysis

The data that the ESP32-CAM will get will need to be analysis so I start thinking about the best library and how each one work and the best one for the project, so I find that there are a lot of library so I start testing by some online images for roads and let it analysis it.
image

12/23/2025 12:32 PM - Editing PCB

Adding a battery holder and connect it with LDO to prevent overvoltage and connect the ESP32 as a master for ESP32 cam using TX and RX connection to then use it in code to send data between them if needed.
image

12/23/2025 12:33 PM - Making a case for the project

Taking measurements from the PCB, going to fusion and make a case for the same dimensions and make it a top and bottom parts and leave open place for the camera from top and bottom as it has MB module to upload the code so to make it easy to access and as it open from top to make the camera see the road. making small parts at the corners as a nail to close the case well.
image
image

12/23/2025 12:33 PM - Now making the readme.md file

I am not the best at making Readme.md so I try to search a bit to make a good md and I get many ideas from different website and AI agents. I made this final Readme.md file.
image

12/23/2025 12:35 PM - Adding images to the README.md File

It is now better for the user to check the README.md by adding visuals. The user can now see the project more easily on the README.md rather than cloning the project or searching in the files.
image
image
image
image

12/23/2025 12:35 PM - Changing mostly everything

After buying the camera with my own money and testing a lot of AI for it using YOLO and the Edge Impulse web service, I got early feedback that YOLO is excellent. Still, using it locally and the ESP32-CAM's low processing power led to remarkably high latency. Still, the Edge impulse site uses FOMO for compilation, so it is much lighter. It also works offline as an Arduino library, but its accuracy is very low. So, we concluded that we actually need a raspberry for high accuracy and low latency, as it will work on roads, so it needs to be accurate and very fast. That was the first conclusion. We made the prototype and printed some 3D printed parts, which I added to the GitHub link. We start building a prototype to see how the project will work, and we add additional systems that are far apart, which led us to cancel the PCB and use jumper wires for connections, since a PCB wouldn't be efficient for the far-apart parts. The systems we added are first a light-saver system that uses an LDR to detect Day and night, and an Ultrasonic system that detects whether there are cars and turns on the light only at night. During the day, the light is always off. Also, we added an emergency lane that is always open and closed. If the camera detects an emergency, it opens the gate using a servo motor. The third system is the speed bump, also called an ACTibump, which uses two IRs to detect the car's speed. The IRs measure the time between the trigger and the distance, then calculate the speed. If the speed is very high, larger than the limit, then the servo, which is attached to a part that is 3D printed, opens to make a part of the road downward, and that makes the person who is moving at high speed decrease their speed. The fourth system is the push buttons for the citizens' pass lane. When clicked, they send a signal to the system that someone needs to pass. The system then checks whether an emergency is in progress; if so, it ignores the push button click until the emergency passes. Then it returned to its original state and added the citizens' passing lane, under the condition that the ESP32 analysis would determine what to do and which decision to make.
image
image
image
For the construction of the road, we get a piece of cardboard and then design the road over it, then we put another cardboard part over the platforms in the street to make them different. We make the traffic light stand and camera stand using the 3D printer, then fix them using super glue. We make the light bulbs using juice straws and some white LEDs and resistances then connect them and connect them with a relay module to control them using the ESP32 master and then we fix the traffic light and connect it with the ESP32 then we fix the 2 IRs and the servo bump that will make the system of the speed ACTibump to the ESP32 and put them in there place in the prototype. We add a push button and a servo for the citizens' lane process and connect them to the ESP32, then we add a Servo motor for the emergency lane and connect it to the ESP32. At the end, we connect the LCD I2C to the ESP32 and make sure that it is working. We made the master code for all of that, then connected all of that to the Firebase Realtime Database to be the main way to send and receive between the ESP32 CAM and the ESP32. The problem now is with the ESP32 CAM, as it is late with the server, but it has high accuracy and is fast, but with very low accuracy.

12/23/2025 12:36 PM - Edit the codes for Raspberry pi

Now after chosing to continue the work with Raspberry pi instead of ESP32 CAM the setup will be a bit different so I started checking what is the differences and write the new code and steps to make when get the Raspberry pi and operate on it and how to add to it an OS and all the steps in a .md file in code folder also I searched for the best Raspberry pi and camera for the project to get the highest accuracy. I also learned how to connect the Firebase to the Raspberry Pi using Python and write the code for it in the AI client Python code to be run on the Raspberry Pi and send real-time data to the Firebase database, so the ESP32 responds to it without any problems.

image

12/23/2025 12:52 PM - I really searched for the lowest price vendor

As you can see, I ordered from two different places, most electronics stores and Amazon, because some items at most are more expensive than Amazon, also the opposite, the adapter and other items may not be available in most, or were more expensive, so that is the lowest price here. I stayed one day opening mostly all the sites that accept Visa here in Egypt and sell electronics, and this is the lowest price actually, if someone finds another vendor that accepts Visa and is cheaper, but please be aware of customs, then DM me, and thanks. Why ordering from Alibaba and Temu is not possible for me, as here in Egypt we have high customs, so its price will be higher than buying it from Amazon.
and now this is what is important this project is submitted by Hassan before and he is one of my team members and for some reasons that is not related to blueprint but with hack time. his account is banned but we really as a team worked hard on this project so we did not want to give up so please review it from my account and this is the new prices images as there was some changes in the past days and this is actually the lowest prices we found.
Screenshot 2025-12-23 124350
Screenshot 2025-12-23 125138
Screenshot 2025-12-23 125207

12/26/2025 - This is Hassan Project

We worked hard on this project form a lot of months and it pass through a lot of things and now something went wrong with my teammate Hassan blueprint account so I added everything here in this one and added the GitHub and everything needed also as you need I tried to make the budget on tier 3 but it was really hard as the detection need high processing and the low versions of PI cannot do as the PI zero 2 W it is cheap but its ram and processor wont work for detection so we searched a lot until we found RP 3B+ which is not good for detection too but it is better than the zero 2 W and wont exceed the budget. and here is images for the least price we found after a lot of search for all the components and we really worked and searched a lot for this project so please approve it before blueprint end and thanks in advance.
1
2
Also the testing and training the model on the toy car for a huge number of data through different ways took a lot of time I am sure that it take more than 30 but I reduced it to 20 as you say so please approve it.

12/27/2025 - Link for Hassan project

Ah I forget this is the link for Hassan blueprint project as I forget to add in the last journal
https://blueprint.hackclub.com/projects/796
A lot of Thanks to the Blueprint team for hard working in reviewing all these projects and happy new year.
image

1/3/2026 - Adding assembly images to Readme and why do I need RP

I added the full assembly and for that why we need Raspberry Pi we are working on AI vision which need a lot of RAM and processing power we firstly as indicated used ESP32 but it was not working and it needs the AI to be on a server and that take a lot of time and that won't be possible in real-life so we need to make this project actually taken by the governorate and use it so we need to show them something really great so we searched and find that the RP will be much faster and actually can run the model on it. Thanks for understanding.
image

1/17/2026 - Code to use WebCam and add wire diagram

I updated the code to support a webcam, but I still need funds to get a Raspberry Pi and a better YOLO model to view the system without latency. So I added the wire diagram and video for the prototype while working. I preferred to use a simulation instead of KiCad to indicate the parts better and prevent rejection, since I worked hard to add everything and really need the PI. Also, for the 3D, we have the step files uploaded for the printed parts. For the full prototype, check it out in the Blender video we rendered or in the file in the README.

image

2/3/2026 - Wire diagram

I could not find symbols for some of the parts, so I could not make a wire diagram, but instead, as I said before, I used Wokwi, and I added links for them before, and those are the links again
https://wokwi.com/projects/453308781447889921 (Arduino code and wiring)
https://wokwi.com/projects/453387951416239105 (ESP32 code and wiring)

About the full assembly, there are a lot of videos uploaded to the drive, and there you can check all the details.
https://drive.google.com/drive/folders/1oXieUDFhaSvpWXGAfWP8MMazlWLh3bht?usp=drive_link (Folder for full assembly and 3D video render)

And the links are available in the GitHub README, too. Check them all, please.
image