Blueprint

The Smart road eye

It is a project that check the road by using Raspberry Pi 4 Model B (8GB) and Raspberry Pi Camera Module V2 (8 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.

Created by Hassan Mohamed Hassan Mohamed

Tier 2

47 views

0 followers

Timeline

Hassan Mohamed Hassan Mohamed submitted The Smart road eye for review ago

Hassan Mohamed Hassan Mohamed 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.Screenshot 2025-12-10 064754Screenshot 2025-12-10 064733Screenshot 2025-12-10 064741

Iamalive Iamalive 🚀 requested changes for The Smart road eye ago

Again, most of your parts are from Amazon. Is this a necessary thing? Try looking for alternative options such as Alibaba and Temu. If this isn't possible, please make a journal entry that justifies this.

Hassan Mohamed Hassan Mohamed submitted The Smart road eye for review ago

technical_. technical_. requested changes for The Smart road eye ago

Please do not use AI for your read.me. Even if your code is AI generated, you should not be using AI to describe how to set it up. In addition, is there a reason why a cheaper RP can't be used?

Hassan Mohamed Hassan Mohamed submitted The Smart road eye for review ago

funkeudo funkeudo requested changes for The Smart road eye ago

Please add images of your components in the README!! Also a description of where it would be mounted, if you have a CAD case, etc. Heads up - ultrasonic sensors won't work if you're planning to mount this inside the vehicle; additionally, gas sensors seem a bit redundant - are they really needed?

Hassan Mohamed Hassan Mohamed submitted The Smart road eye for review ago

Shaurya Bisht Shaurya Bisht requested changes for The Smart road eye ago

if you didnt write the readme yourself please rewrite also include images of the components in the readme and make sure you addressed reviewer concerns

Hassan Mohamed Hassan Mohamed submitted The Smart road eye for review ago

Hassan Mohamed Hassan Mohamed 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

Hassan Mohamed Hassan Mohamed 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. 17160e21-c3e8-4156-8168-b5e637ebaf4684b82b9f-c0b8-411b-b61f-d8473a4bb70070c2cf47-f4d2-4b7c-b450-616ea0e21903
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.

technical_. technical_. requested changes for The Smart road eye ago

Make sure your BOM in your Read.Me is accurate, it doesn't match the BOM file. There are some components missing. Please improve upon your journals as well, it is very curt. Describe a bit more on the design process, like why you chose some parts, design requirements, etc, on all of your journals please!

Hassan Mohamed Hassan Mohamed submitted The Smart road eye for review ago

Jay Jay 🚀 requested changes for The Smart road eye ago

Wait, where is your BOM? https://blueprint.hackclub.com/about/submission-guidelines

Hassan Mohamed Hassan Mohamed submitted The Smart road eye for review ago

technical_. technical_. requested changes for The Smart road eye ago

We are not going to be funding materials to "test" your project. Please remove the amazon cart picture, as well as that amount from your grant.

Hassan Mohamed Hassan Mohamed submitted The Smart road eye for review ago

Jay Jay 🚀 requested changes for The Smart road eye ago

Can you make this cheaper? Specifically, look at everything you're getting from Amazon and see how you can get it from Alibaba or something...?

Hassan Mohamed Hassan Mohamed submitted The Smart road eye for review ago

Hassan Mohamed Hassan Mohamed 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

Tanook Tanook 🚀 requested changes for The Smart road eye ago

Please include your project images in the readme: 1. Schematic 2. PCB 3. CAD You need more detail in your journal, and you need a 3D modeled case for this project.

Hassan Mohamed Hassan Mohamed submitted The Smart road eye for review ago

1Mon 1Mon requested changes for The Smart road eye ago

please source from aliexpress instead of amazon!

Hassan Mohamed Hassan Mohamed submitted The Smart road eye for review ago

Hassan Mohamed Hassan Mohamed 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

Hassan Mohamed Hassan Mohamed 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

Hassan Mohamed Hassan Mohamed 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

Nachu Thenappan Nachu Thenappan 🚀 requested changes for The Smart road eye ago

Hi, please add a README for this project in the Repository. Furthermore, for the parts you request this project must be more complex. I would suggest adding traces between the ESP-32 and the ESP-32 Cam as right now they are completely disconnected, a battery system to power the project without a USB connection and creating a 3d model of a case that could hold this system together. Feel free to DM me with any questions.

Hassan Mohamed Hassan Mohamed submitted The Smart road eye for review ago

Hassan Mohamed Hassan Mohamed 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.Screenshot 2025-10-23 180529.png

Hassan Mohamed Hassan Mohamed 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.Screenshot 2025-10-23 174736.png
Screenshot 2025-10-23 175036.png
Screenshot 2025-10-23 175126.png

Hassan Mohamed Hassan Mohamed started The Smart road eye ago