Smart Radar With Evive, Ultrasonic Sensor & Adafruit IO
by himanshurana in Circuits > Arduino
9 Views, 0 Favorites, 0 Comments
Smart Radar With Evive, Ultrasonic Sensor & Adafruit IO
Use the actual project photo showing the HC-SR04 ultrasonic sensor mounted on the servo/Evive setup, rather than the circuit diagram. The close-up project photo you provided is the better cover image because it immediately shows the main hardware.
The goal of this project is to create a simple and affordable radar-like scanning system.
Instead of using a traditional radar module, this project uses an ultrasonic sensor mounted on a servo motor. As the servo rotates, the ultrasonic sensor scans different directions and measures the distance of objects.
Evive processes the readings and displays:
Object detection status
Scanning angle
Object distance
The project also connects to Adafruit IO, allowing the detected information to be transmitted for remote monitoring and analysis.
This makes the project useful for learning about robotics, sensors, automation, IoT, and real-time data visualization.
Supplies
Components and Software
Hardware
- Evive
- HC-SR04 Ultrasonic Sensor
- Servo Motor
- Jumper wires
- Mounting/support structure for the ultrasonic sensor
Software
- PictoBlox
- PictoBlox IoT Extension
- Adafruit IO
HOW DOES IT WORK?
Working Principle
The radar works through four main stages:
1. Scan
The servo motor rotates the ultrasonic sensor through different angles.
2. Measure
The HC-SR04 ultrasonic sensor sends an ultrasonic pulse and measures the returning echo to determine the distance of an object.
3. Detect
Evive compares the measured distance with a predefined detection threshold.
In this project, an object is treated as detected when the measured distance is below 40 cm.
4. Display and Monitor
When an object is detected, the Evive display changes to a red indication and displays the angle and distance.
The detected information is also sent to an Adafruit IO feed named Radar.
MOUNT THE ULTRASONIC SENSOR
Mounting the Ultrasonic Sensor
First, mount the HC-SR04 ultrasonic sensor on the servo motor.
The sensor should be fixed firmly so that it rotates together with the servo.
Make sure:
- The sensor is securely attached to the servo.
- The servo can rotate freely.
- The ultrasonic sensor faces forward.
- The wires do not interfere with servo movement.
The servo allows the ultrasonic sensor to scan different directions instead of measuring only one fixed direction.
CIRCUIT CONNECTION
Circuit Connections
Connect the HC-SR04 ultrasonic sensor and servo motor to the Evive board according to the circuit diagram.
The ultrasonic sensor uses:
- TRIG → Digital Pin 9
- ECHO → Digital Pin 8
These pin assignments are also used directly in the PictoBlox project code.
Connect the servo motor to the Evive servo connection used by the project.
Make sure the power and ground connections are secure before switching on the system.
Important: Check all connections before powering the Evive board.
INSTALL / OPEN PICTOBLOX
Programming the Evive
The project is programmed using PictoBlox block coding.
Open PictoBlox and select the Evive board.
The program uses:
- Ultrasonic sensor blocks
- Servo control blocks
- Evive display blocks
- Variables
- Conditional statements
- Loops
- IoT blocks for Adafruit IO
Upload the project to Evive and verify that the board is communicating correctly.
UNDERSTANDING THE SERVO SCANNING CODE
Servo Scanning
A variable called angle is used to control the servo position.
The program starts the angle at 15 degrees.
The servo then moves forward in small increments until it reaches approximately 165 degrees.
After reaching the end of the scanning range, the servo moves back in the opposite direction.
This creates a continuous back-and-forth scanning motion.
The scanning process allows the ultrasonic sensor to measure objects at different angles.
The servo control section of the project uses repeated loops and changes the angle variable by +1 during the forward scan and -1 during the return scan.
OBJECT DETECTION
Object Detection
During every scanning position, the ultrasonic sensor measures the distance of the object in front of it.
The program checks whether:
Distance < 40 cm
If this condition is true, an object is considered detected.
When an object is detected:
- The Evive display changes to red.
- The current angle is displayed.
- The measured distance is displayed.
- Object information is sent to Adafruit IO.
If an object is not detected within the defined threshold, the display changes back to the normal indication.
EVIVE DISPLAY
Displaying Angle and Distance
When an object is detected, the Evive display shows the scanning information.
The display presents:
Angle – [current angle]
Distance – [measured distance]
This makes it possible to understand not only how far away the object is, but also the approximate direction in which it was detected.
The display provides a simple real-time interface without requiring an external computer screen.
SET UP ADAFRUIT IO
Setting Up Adafruit IO
To enable IoT-based monitoring, an Adafruit IO account is required.
- Create an account on Adafruit IO.
- Open the Adafruit IO dashboard.
- Create a new feed.
- Name the feed Radar.
- Open the API Key section.
- Copy your Adafruit IO username and API key.
- Add the credentials to the IoT connection block in PictoBlox.
Security Note: Never publish your personal Adafruit IO API key in a public project. Use your own credentials when running this project.
CONNECT PICTOBLOX TO ADAFRUIT IO
Connecting PictoBlox to Adafruit IO
Add the IoT extension in PictoBlox and use the Adafruit IO connection block.
Enter:
Username: Your Adafruit IO username
API Key: Your Adafruit IO API key
After the connection is established, the program sends radar detection information to the Radar feed.
The data includes the detected angle and distance.
This allows the sensor information to be monitored remotely through Adafruit IO.
HOW THE DATA IS SENT
Data Transmission
When an object is detected, the program creates a message containing:
Object detected at: Angle – [angle] and Distance – [distance]
This information is sent to the Adafruit IO Radar feed.
The program then waits for approximately one second before continuing with the next transmission.
This provides a simple IoT-based record of detected objects during operation.
UPLOAD THE CODE
- Select the correct Evive board.
- Check the ultrasonic sensor connections.
- Check the servo connection.
- Enter your own Adafruit IO username.
- Enter your own Adafruit IO API key.
- Confirm that the feed name is Radar.
- Upload/run the program.
TESTING THE RADAR
Testing
After completing the hardware connections and uploading the program, switch on the Evive board.
The servo should begin scanning from one side to the other.
Place an object in front of the ultrasonic sensor.
When the object enters the detection range:
- The ultrasonic sensor measures its distance.
- Evive identifies the object.
- The display changes to red.
- The angle is displayed.
- The distance is displayed.
- The detection information is sent to Adafruit IO.
Move the object to different positions and observe how the angle and distance values change.
RESULTS
Results
The completed radar system successfully detected objects and displayed their distance and angle on the Evive screen.
According to the project testing documented for this build, the system detected objects within a range of 0–250 cm with an average reported accuracy of 98.5%.
The servo motor and ultrasonic sensor provided angular scanning and distance measurement, while Adafruit IO enabled remote data visualization and monitoring.
The system was also tested under different environmental conditions, including changes in lighting and temperature.
These results demonstrate the potential of combining low-cost maker hardware with IoT technology to create an interactive radar-like detection system.
CHALLENGES
Challenges Faced
One of the challenges during development was integrating the project with Processing IDE for external radar visualization.
The Processing IDE could not be successfully interfaced with the PictoBlox block-coding environment used in this project.
To overcome this limitation, the project was modified to use the built-in Evive display along with Adafruit IO for visualization and remote monitoring.
This approach allowed the project to remain functional while also providing a way to monitor the detected data.
FUTURE IMPROVEMENTS
Future Improvements
This project can be further improved in several ways.
1. Longer Detection Range
The system could be optimized to improve sensitivity and increase the detection range.
2. Smaller Object Detection
Additional sensor processing could be used to improve the detection of smaller objects.
3. Camera Integration
A camera could be added to provide visual information about detected objects.
4. Infrared Sensors
Additional infrared sensors could be integrated for improved object detection.
5. Object Recognition
Future versions could combine the radar system with computer vision to identify different types of objects.
6. Advanced Data Visualization
A dedicated dashboard could be developed to display the scanning angle, distance, and historical detection data in a more visual format.
APPLICATIONS
Possible Applications
This project can be used as an educational demonstration of:
- Robotics
- Ultrasonic sensing
- Servo motor control
- IoT
- Real-time monitoring
- Distance measurement
- Object detection
- Embedded systems
- Block-based programming
The same concept can be extended to applications such as obstacle detection, smart parking demonstrations, robotic navigation, security systems, and educational STEM projects.
CONCLUSION
Conclusion
The Smart Radar project demonstrates how an Evive board, ultrasonic sensor, servo motor, PictoBlox, and Adafruit IO can be combined to create a compact radar-like object detection system.
The rotating servo allows the ultrasonic sensor to scan different directions, while Evive processes the sensor data and provides immediate visual feedback.
The addition of Adafruit IO extends the project beyond local detection by enabling remote data monitoring and visualization.
This project provides a practical introduction to robotics, sensor integration, IoT, and real-time data processing using affordable maker technology.
The system can also serve as a foundation for more advanced projects involving object tracking, computer vision, and intelligent navigation.