{"id":28924162,"url":"https://github.com/customize5773/diy-self-driving-car","last_synced_at":"2026-04-18T15:40:25.982Z","repository":{"id":298275154,"uuid":"998946741","full_name":"Customize5773/DIY-Self-Driving-Car","owner":"Customize5773","description":"An open-source autonomous vehicle platform featuring sensor fusion (LiDAR + Ultrasonic), real-time navigation, and collision avoidance - all powered by ESP32","archived":false,"fork":false,"pushed_at":"2025-06-10T08:20:24.000Z","size":1567,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-13T14:07:05.192Z","etag":null,"topics":["autonomous-vehicles","esp32","lidar","robotics","sensor-fusion"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Customize5773.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-09T13:58:58.000Z","updated_at":"2025-06-10T08:20:28.000Z","dependencies_parsed_at":"2025-06-10T09:31:23.869Z","dependency_job_id":"a035d2eb-429c-4af2-a2a7-d221e618d9ca","html_url":"https://github.com/Customize5773/DIY-Self-Driving-Car","commit_stats":null,"previous_names":["customize5773/diy-self-driving-car"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Customize5773/DIY-Self-Driving-Car","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Customize5773%2FDIY-Self-Driving-Car","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Customize5773%2FDIY-Self-Driving-Car/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Customize5773%2FDIY-Self-Driving-Car/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Customize5773%2FDIY-Self-Driving-Car/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Customize5773","download_url":"https://codeload.github.com/Customize5773/DIY-Self-Driving-Car/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Customize5773%2FDIY-Self-Driving-Car/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31974952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autonomous-vehicles","esp32","lidar","robotics","sensor-fusion"],"created_at":"2025-06-22T10:08:50.357Z","updated_at":"2026-04-18T15:40:25.966Z","avatar_url":"https://github.com/Customize5773.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DIY LiDAR Self-Driving Car\n\n![Self-Driving-Car](image/Image-2.png)\n\n**An open-source autonomous vehicle platform** featuring sensor fusion (LiDAR + Ultrasonic), real-time navigation, and collision avoidance - all powered by ESP32!\n\n## Key Features\n\n- **Hybrid Sensor Fusion**: Combines TF-Luna LiDAR (8m range) with ultrasonic sensors for redundant obstacle detection\n- **Real-Time Navigation**: FreeRTOS-powered ESP32 processes sensor data at 100Hz\n- **Collision Avoidance**: Emergency braking system triggered at 20cm proximity\n- **ROS 2 Ready**: Migration path for advanced navigation with Nav2\n- **Open Hardware**: 3D printable parts and accessible components under $100\n\n## Hardware Setup\n\n### Bill of Materials\n| Component | Quantity | Source |\n|-----------|----------|--------|\n| [ESP32 Dev Board](https://www.aliexpress.com/item/1005005233434681.html) | 1 | AliExpress |\n| [TF-Luna LiDAR](https://www.sparkfun.com/products/17786) | 1 | SparkFun |\n| [HC-SR04 Ultrasonic Sensors](https://www.adafruit.com/product/3942) | 3 | Adafruit |\n| [L298N Motor Driver](https://www.amazon.com/HiLetgo-L298N-Driver-Stepper-Controller/dp/B014KMHSW6) | 1 | Amazon |\n| [TT Gear Motors](https://www.dfrobot.com/product-244.html) | 2 | DFRobot |\n| [18650 Batteries](https://18650batterystore.com/products/samsung-35e) | 2 | 18650BatteryStore |\n\n\u003e Full BOM with links: [Hardware/Bill_of_Materials.md](Hardware/Bill_of_Materials.md)\n\n## Getting Started\n\n### Prerequisites\n- PlatformIO (VSCode extension)\n- Arduino IDE (for initial flashing)\n- 3D printer (for custom parts)\n\n### Installation\n```bash\n# Clone repository\ngit clone https://github.com/Customize5773/DIY-Self-Driving-Car.git\ncd DIY-LiDAR-Car\n\n# Install dependencies\npio pkg install\n\n# Build and upload to ESP32\npio run -t upload\n\n# Monitor serial output\npio device monitor\n```\n\n### First-Time Calibration\n```python\n# Run calibration script\npython3 scripts/sensor_calibration.py\n\n# Follow on-screen instructions\nPlace calibration target at 50cm distance\nPress ENTER to record measurement...\n```\n\n## 🤖 Autonomous Logic\nOur decision-making system prioritizes safety while enabling efficient navigation:\n\n```mermaid\ngraph TD\n    A[Start] --\u003e B[Read Sensors]\n    B --\u003e C{Ultrasonic \u003c 20cm?}\n    C --\u003e|Yes| D[EMERGENCY STOP]\n    C --\u003e|No| E{LiDAR \u003c 50cm?}\n    E --\u003e|Yes| F[Adjust Path]\n    E --\u003e|No| G[Full Speed]\n    D --\u003e H[Continue]\n    F --\u003e H\n    G --\u003e H\n    H --\u003e B\n```\n\n\u003e Image flowchart: [Documentation/Autonomous_Logic_Flowchart.png](Documentation/Autonomous_Logic_Flowchart.png)\n\n## Build Instructions\n\n### Step 1: Mechanical Assembly\n1. Print 3D models\n2. Mount motors and wheels to chassis\n3. Install LiDAR at 15cm height with 30° forward tilt\n4. Position ultrasonic sensors: front (0°), left (+45°), right (-45°)\n\n### Step 2: Electronics\n```bash\n# Typical connections:\nLiDAR SDA → ESP32 GPIO21\nLiDAR SCL → ESP32 GPIO22\nUltrasonic TRIG → ESP32 GPIO16\nUltrasonic ECHO → ESP32 GPIO17\nMotor ENA → ESP32 GPIO25\n```\n\n### Step 3: Firmware Setup\n1. Install PlatformIO in VSCode\n2. Open `Firmware/PlatformIO_Project` folder\n3. Configure `platformio.ini` for your ESP32 variant\n4. Flash using PlatformIO task runner\n\n## Troubleshooting\n| Symptom | Solution |\n|---------|----------|\n| LiDAR not detected | Check I²C address (default 0x10), ensure 5V power |\n| False ultrasonic readings | Add foam ring around sensor, avoid reflective surfaces |\n| Motor jitter | Add 100µF capacitor across motor terminals |\n| ESP32 overheating | Enable deep sleep between navigation cycles |\n\n## Future Upgrades\n- [ ] ROS 2 integration ([see roadmap](Documentation/ROS_Integration.md))\n- [ ] IMU-based dead reckoning\n- [ ] Camera integration for object recognition\n- [ ] Swarm coordination protocol\n\n## Contributing\nWe welcome contributions! Please follow these steps:\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a pull request\n\n## License\nDistributed under the MIT License. See `LICENSE` for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcustomize5773%2Fdiy-self-driving-car","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcustomize5773%2Fdiy-self-driving-car","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcustomize5773%2Fdiy-self-driving-car/lists"}