Introduction: Optiguard Reflector

Hello, I'm Isaac Boateng, an electrical and electronics engineering student at Kwame Nkrumah University of Science and Technology, Ghana. Inspired by a passion for innovation and driven by the desire to make a meaningful impact, I am excited to present my latest project, the OptiGuard Reflector. This endeavor represents a fusion of my academic pursuits, creative vision, and dedication to solving real-world challenges through advanced technology.

Project Description:

Optiguard Reflector is a groundbreaking endeavor aimed at reinventing safety gear to enhance visibility, awareness, and accountability for law enforcement officers, cyclists, and outdoor enthusiasts. Building upon existing safety reflectors, this project introduces a host of innovative features designed to address the pressing need for improved safety solutions in low-light conditions.

Problem Statement:

The existing safety reflectors on the market often lack sufficient visibility, especially in low-light environments, leading to increased risks for law enforcement officers, cyclists, and outdoor enthusiasts alike. Traditional reflective gear fails to provide adequate awareness to both wearers and surrounding individuals, resulting in potential accidents, collisions, and safety hazards.

Improvements and Design Features:

  • High-Visibility Reflective Materials: OptiGuard Reflector incorporates premium reflective materials that ensure maximum visibility in low-light conditions, significantly enhancing the wearer's presence on the road or in outdoor environments.
  • Dynamic LED Blinking: Integrated LEDs blink intermittently, serving as a visual warning signal to attract attention and increase visibility for motorists and pedestrians, further enhancing safety awareness.
  • Ultrasonic Sensor and Proximity Alert: An ultrasonic sensor positioned at the back of the reflector continuously measures the distance between the wearer and approaching vehicles, triggering a proximity alert buzzer to notify the wearer of potential hazards.
  • Built-in Camera: The garment features a built-in camera that provides real-time monitoring of the wearer's surroundings, offering enhanced situational awareness and recording capabilities for law enforcement operations or outdoor adventures.
  • Solar Panel Integration: OptiGuard Reflector integrates a solar panel to harness solar energy, ensuring continuous operation and reducing reliance on external power sources, thus increasing sustainability and autonomy.
  • Future Aspirations: GPS Location Monitoring: In future iterations, OptiGuard Reflector aims to integrate GPS technology for real-time tracking and monitoring of the wearer's location. This enhancement will enable law enforcement agencies to identify the location of officers stationed in specific areas, improving operational efficiency and situational awareness. Additionally, through a software management system, the GPS data can be used to identify police checkpoints and optimize route planning for cyclists and motorists, enhancing overall safety and traffic management.

OptiGuard Reflector exemplifies the spirit of innovation and improvement, redefining safety gear for law enforcement officers, cyclists, and outdoor enthusiasts. By leveraging advanced technologies and design methodologies, this project not only addresses existing safety concerns but also paves the way for a safer and more sustainable future.



Supplies

Materials Used:

  1. Reflective fabric
  2. LEDs
  3. Ultrasonic sensor (HC-SR04)
  4. Buzzer
  5. ESP32 camera module
  6. Solar panel
  7. Microcontroller (Arduino or similar)
  8. Battery pack or rechargeable batteries
  9. Wires and connectors

Tools Used:

  1. Soldering iron and solder
  2. Wire cutters and strippers
  3. Multimeter
  4. Screwdriver set
  5. Glue gun and sticks

Software Used:

  1. Arduino IDE
  2. Tinkercad
  3. Microsoft Clipchamp



Step 1: Designing the Circuit

Now, let's bring our OptiGuard Reflector project to life by designing the circuit layout using Tinkercad. Tinkercad provides an intuitive platform for creating and simulating electronic circuits before prototyping them in the physical world.

  1. Open Tinkercad: Go to the Tinkercad website and log in to your account. If you don't have an account, you can sign up for free.
  2. Create a New Project: Once logged in, create a new project and select the "Circuits" option.
  3. Add Components: Start by adding the components from your OptiGuard Reflector project to the Tinkercad workspace. This includes the microcontroller, sensors, LEDs, buzzer, and any other electronic components.
  4. Wire the Components: Use the wire tool to connect the components according to your circuit diagram. Pay attention to proper wiring and connections to ensure the circuit functions correctly.
  5. Test the Circuit: Once the circuit is fully wired, use Tinkercad's simulation feature to test the functionality of the circuit. Check for any errors or issues and make adjustments as needed.
  6. Optimize and Finalize: Fine-tune the circuit layout and optimize component placement for efficiency and space-saving. Ensure that the circuit design meets the requirements of the OptiGuard Reflector project.
  7. Save and Export: Once satisfied with the circuit design, save your project in Tinkercad and consider exporting the schematic or layout for future reference.

By designing the circuit in Tinkercad, we can visualize the components and their interactions, identify potential issues, and ensure the functionality of our OptiGuard Reflector project before moving on to the prototyping stage.

Step 2: Inserting the LEDs Into the OptiGuard Reflector Fabric

Now that we have the circuit design ready, let's proceed to physically insert the LEDs into the OptiGuard Reflector fabric. This step brings us closer to creating a functional and high-visibility safety solution.

Before inserting the LEDs into the OptiGuard Reflector fabric, it's essential to determine the optimal placement for the Arduino microcontroller. The Arduino will serve as the control hub for the LEDs and other components, so positioning it correctly is crucial for ensuring proper functionality and ease of use.

  1. Prepare the OptiGuard Reflector Fabric: Lay out the OptiGuard Reflector fabric on a flat surface. Ensure that the fabric is clean and free from any obstructions or wrinkles that could interfere with the LED insertion process.
  2. Mark LED Placement: Using fabric chalk or a washable marker, mark the locations on the fabric where you intend to insert the LEDs. Consider factors such as visibility, coverage area, and aesthetic appeal when determining the placement of the LEDs.
  3. Insert the LEDs: Carefully insert the LEDs into the marked locations on the fabric. Depending on the type of LEDs and fabric used, you may need to create small openings or pockets to accommodate the LEDs securely.
  4. Secure the LEDs: Once the LEDs are inserted, secure them in place using fabric glue, sewing, or other suitable methods. Ensure that the LEDs are firmly attached to the fabric and will not come loose during use.
  5. Connect the LEDs: Connect the leads of the LEDs to the corresponding wires from the circuit. Use soldering or other electrical connectors to establish a secure and reliable connection between the LEDs and the circuit.
  6. Test LED Functionality: After connecting the LEDs, test their functionality to ensure that they illuminate properly and are wired correctly to the circuit. Check for any issues such as loose connections or faulty LEDs and make adjustments as needed.
  7. Optimize and Finalize: Fine-tune the placement and orientation of the LEDs to optimize visibility and coverage. Ensure that the LEDs are evenly distributed across the OptiGuard Reflector fabric for consistent illumination.
  8. Inspect and Quality Check: Carefully inspect the LED installation to ensure that all connections are secure and that the LEDs are functioning as intended. Conduct a quality check to verify that the OptiGuard Reflector is ready for use.

By inserting the LEDs into the OptiGuard Reflector fabric, we transform it into a functional safety accessory that enhances visibility and promotes safety in low-light conditions for law enforcement officers, cyclists, and outdoor enthusiasts.

Step 3: Integrating the Camera, Buzzer, and Solar Panel

Now that we have inserted the LEDs into the OptiGuard Reflector fabric, let's proceed to integrate the camera, buzzer, and solar panel components to enhance its functionality and safety features.

  1. Camera Integration:
  • Select a suitable location on the OptiGuard Reflector fabric to mount the camera module. Ensure that the camera has a clear line of sight and is positioned for optimal visibility and coverage.
  • Secure the camera module to the fabric using adhesive or stitching, ensuring that it is firmly attached and will not become dislodged during use.
  • Connect the camera module to the circuit, ensuring proper wiring and connectivity. Test the camera functionality to verify that it captures clear images and video footage.
  1. Buzzer Installation:
  • Determine the desired location for the buzzer module on the OptiGuard Reflector fabric. Choose a position that allows for easy access and audible alerts.
  • Secure the buzzer module to the fabric using adhesive or stitching, ensuring that it is securely attached and will emit clear audible alerts when activated.
  • Connect the buzzer module to the circuit, ensuring proper wiring and connectivity. Test the buzzer functionality to verify that it emits audible alerts as intended.
  1. Solar Panel Integration:
  • Identify a suitable area on the OptiGuard Reflector fabric to mount the solar panel. Choose a location that receives sufficient sunlight exposure for efficient solar energy harvesting.
  • Secure the solar panel to the fabric using adhesive or stitching, ensuring that it is positioned for maximum sunlight exposure and stability.
  • Connect the solar panel to the circuit, ensuring proper wiring and connectivity. Test the solar panel functionality to verify that it effectively charges the battery pack or power source.
  1. Final Checks and Adjustments:
  • Conduct a final inspection of the OptiGuard Reflector to ensure that all components, including the camera, buzzer, and solar panel, are securely installed and functioning correctly.
  • Make any necessary adjustments or refinements to the component placement or wiring to optimize performance and functionality.
  • Test the integrated system in real-world conditions to verify its effectiveness and reliability in enhancing visibility and safety in low-light environments.

By integrating the camera, buzzer, and solar panel components into the OptiGuard Reflector, we enhance its functionality and safety features, making it a versatile and effective safety accessory for law enforcement officers, cyclists, and outdoor enthusiasts.


Step 4: Uploading the Code to the Arduino(Leds,ultrasonic Sensor and Buzzer)

Now that we have placed the Arduino in the OptiGuard Reflector and connected all the components, it's time to upload the code to the Arduino microcontroller. The code will control the behavior of the LEDs, buzzer, and ultrasonic sensor to provide the desired functionality for the OptiGuard Reflector.

#include <NewPing.h>
#define echoPin A0 // A0 for the echo
#define trigPin A1// A2 for trigger
int buzzPin = 8;  // Pin 8 for the buzzer
int ledPin = 11;   // Pin 6 for the LED
int led2=2;
int led3=3;
int led4=4;
int led5=5;
int duration, inches, cm; // Establish variables for duration of the ping, and the distance result


NewPing sonar(trigPin, echoPin, 200); // Sets up the sonar function and limits distance to 200 cm


void setup() {
  pinMode(ledPin, OUTPUT);
  pinMode(buzzPin, OUTPUT);
  pinMode(led2,OUTPUT);
  pinMode(led3,OUTPUT);
  pinMode(led4,OUTPUT);
  pinMode(led5,OUTPUT);
  Serial.begin(9600); // Sets up serial monitor
}


void loop() {


digitalWrite(led2,HIGH);
delay (100);
digitalWrite(led2,LOW);
delay(100);

 digitalWrite(led3,HIGH);
delay (100);
digitalWrite(led3,LOW);
delay(100);


digitalWrite(led4,HIGH);
delay (100);
digitalWrite(led4,LOW);
delay(100);


digitalWrite(led5,HIGH);
delay(100);
digitalWrite(led5,LOW);
delay(100);

  delay(1000);
  cm = sonar.ping_cm(); // Measure distance

  Serial.print("Ping: ");
  Serial.print(cm);
  Serial.println(" cm");

  if (cm <= 40 && cm > 0) { // If an object is detected within 15cm
    digitalWrite(ledPin, HIGH); // Turn on LED
    digitalWrite(buzzPin, HIGH); // Turn on buzzer
  } else {
    digitalWrite(ledPin, LOW); // Turn off LED
    digitalWrite(buzzPin, LOW); // Turn off buzzer
  }
}


Step 5: Uploading the Code to the Camera

  1. Open Arduino IDE and ensure ESP32 board support is installed. If not, install it through the board manager.
  2. Select Board: From the "Tools" menu, choose the "AI-Thinker ESP32-CAM" board.
  3. Install Library: If not already installed, add the ESP32-CAM library from the Library Manager to enable camera functionalities.
  4. Open Example: Navigate to "Examples" > "ESP32 Camera" and select an example sketch, such as "CameraWebServer" or "CameraWebServer_SD".
  5. Configure: In the selected example sketch, configure settings like Wi-Fi credentials, server settings, resolution, and pins used for camera connection according to the AI-Thinker ESP32-CAM specifications.
  6. Upload Code: Connect the AI-Thinker ESP32-CAM to your computer via USB using a USB-to-UART adapter. Ensure GPIO0 is grounded to put the ESP32-CAM into programming mode. Then, click the "Upload" button to upload the code to the ESP32-CAM.
  7. Test Functionality: After uploading, power on the OptiGuard Reflector and verify the camera functionality by accessing the camera stream or web interface as specified in the code. Ensure the camera captures images or streams video as expected.
  8. Optimize: Fine-tune code parameters if necessary to optimize camera performance, resolution, and other settings for the specific application of the OptiGuard Reflector.
//Camera code
#include "esp_camera.h"
#include <WiFi.h>
#define CAMERA_MODEL_AI_THINKER // Has PSRAM
#include "camera_pins.h"


// Enter your WiFi credentials
const char* ssid = "newtons1";
const char* password = "newtons1234";
void startCameraServer();
void setupLedFlash(int pin);


void setup() {
Serial.begin(115200);
Serial.setDebugOutput(true);
Serial.println();


camera_config_t config;
config.ledc_channel = LEDC_CHANNEL_0;
config.ledc_timer= LEDC_TIMER_0;
config.pin_d0 =Y2_GPIO_NUM;
config.pin_d1 =Y3_GPIO_NUM;
config.pin_d2 =Y4_GPIO_NUM;
config.pin_d3 =Y5_GPIO_NUM;
config.pin_d4 =Y6_GPIO_NUM;
config.pin_d5 =Y7_GPIO_NUM;
config.pin_d6 =Y8_GPIO_NUM;
config.pin_d7 =Y9_GPIO_NUM;
config.pin_xclk =XCLK_GPIO_NUM;
config.pin_pclk =PCLK_GPIO_NUM;
config.pin_vsync= VSYNC_GPIO_NUM;
config.pin_href =HREF_GPIO_NUM;
config.pin_sccb_sda = SIOD_GPIO_NUM;
config.pin_sccb_scl = SIOC_GPIO_NUM;
config.pin_pwdn =PWDN_GPIO_NUM;
config.pin_reset= RESET_GPIO_NUM;
config.xclk_freq_hz = 20000000;
config.frame_size= FRAMESIZE_UXGA;
config.pixel_format = PIXFORMAT_JPEG; // for streaming


//config.pixel_format = PIXFORMAT_RGB565; // for face detection/recognition
config.grab_mode= CAMERA_GRAB_WHEN_EMPTY;
config.fb_location = CAMERA_FB_IN_PSRAM;
config.jpeg_quality = 12;
config.fb_count =1;


// if PSRAM IC present, init with UXGA resolution and higher JPEG quality
//for larger pre-allocated frame buffer.
if(config.pixel_format == PIXFORMAT_JPEG){
if(psramFound()){
config.jpeg_quality = 10;
config.fb_count = 2;
config.grab_mode = CAMERA_GRAB_LATEST;
}
else {
// Limit the frame size when PSRAM is not available
config.frame_size = FRAMESIZE_SVGA;
config.fb_location = CAMERA_FB_IN_DRAM;
}
}
else {
// Best option for face detection/recognition
config.frame_size = FRAMESIZE_240X240;
#if CONFIG_IDF_TARGET_ESP32S3
config.fb_count= 2;
#endif
}
#if defined(CAMERA_MODEL_ESP_EYE)
pinMode(13,INPUT_PULLUP);
pinMode(14,INPUT_PULLUP);
#endif
// camera init
esp_err_t err = esp_camera_init(&config);
if (err != ESP_OK) {
Serial.printf("Camera init failed with error 0x%x", err);
return;
}
sensor_t * s = esp_camera_sensor_get();
// initial sensors are flipped vertically and colors are a bit saturated
if (s->id.PID== OV3660_PID) {
s->set_vflip(s, 1); // flip it back
s->set_brightness(s, 1); // up the brightness just a bit
s->set_saturation(s, -2); // lower the saturation
}
// drop down frame size for higher initial frame rate
if(config.pixel_format == PIXFORMAT_JPEG){
s->set_framesize(s, FRAMESIZE_QVGA);
}
#if defined(CAMERA_MODEL_M5STACK_WIDE) ||defined(CAMERA_MODEL_M5STACK_ESP32CAM)
s->set_vflip(s, 1);
s->set_hmirror(s, 1);
#endif
#if defined(CAMERA_MODEL_ESP32S3_EYE)
s->set_vflip(s, 1);
#endif
// Setup LED FLash if LED pin is defined in camera_pins.h
#if defined(LED_GPIO_NUM)
setupLedFlash(LED_GPIO_NUM);

#endif
WiFi.begin(ssid, password);
WiFi.setSleep(false);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
startCameraServer();
Serial.print("Camera Ready! Use 'http://");
Serial.print(WiFi.localIP());
Serial.println("' to connect");


}
void loop() {
// Do nothing.Everything is done in another task by the web server
delay(10000);
}


Remake It - Autodesk Design & Make - Student Contest

This is an entry in the
Remake It - Autodesk Design & Make - Student Contest