{"id":15967631,"url":"https://github.com/elucidation/ultrasonic_radar","last_synced_at":"2025-04-04T13:42:33.089Z","repository":{"id":10278198,"uuid":"12393500","full_name":"Elucidation/Ultrasonic_Radar","owner":"Elucidation","description":"Low-cost arduino ultrasonic radar fiddling.","archived":false,"fork":false,"pushed_at":"2013-08-27T06:35:11.000Z","size":132,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T23:27:18.630Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Elucidation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-27T00:55:37.000Z","updated_at":"2016-04-21T08:15:18.000Z","dependencies_parsed_at":"2022-09-22T18:46:37.444Z","dependency_job_id":null,"html_url":"https://github.com/Elucidation/Ultrasonic_Radar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Elucidation%2FUltrasonic_Radar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Elucidation%2FUltrasonic_Radar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Elucidation%2FUltrasonic_Radar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Elucidation%2FUltrasonic_Radar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Elucidation","download_url":"https://codeload.github.com/Elucidation/Ultrasonic_Radar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247188709,"owners_count":20898571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-07T18:40:32.828Z","updated_at":"2025-04-04T13:42:33.072Z","avatar_url":"https://github.com/Elucidation.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ultrasonic 2D Radar Scanning with hobby equipment\n---\nHaving a go at seeing how well an arduino, a servo, and 2 ultrasonic sensors can get at generating maps of the environment.\nThis is for testing the viability of cheap localization using particle filters on pre-computed maps.\n![Layout](http://i.imgur.com/nGzrfhP.jpg)\n![Imgur](http://i.imgur.com/ZoXTbn5.png)\n\nEven without a low-pass filter, the data is usable, here is a partial scan of the kitchen.\n![Imgur](http://i.imgur.com/abyPgFH.png)\n![Imgur](http://i.imgur.com/yHH4N0P.png)\n\n\nThe setup is pretty straightforward:\n2 ultrasonic sensors facing in opposite directions are placed on a breadboard.\nThe breadboard is placed on a servo, which since it's a cheap one can only turn about 130 degrees, that'll give us 260 degrees of scan with 2 blind spots.\n![Imgur](http://i.imgur.com/jbBMUz5.png)\n\nThe program is pretty much:\n```\nloop() {\n  left = sensor_left.getReading();\n  right = sensor_right.getReading();\n\n  print out position and sensor data\n  \n  servo_controller.update(); \n}\n```\n\nHere's a picture with just one sensor.\n![Imgur](http://i.imgur.com/LXJOIuC.png)\n![Imgur](http://i.imgur.com/2s2sfuV.png)\n\nHere's the 2 sensor setup.\n![Imgur](http://i.imgur.com/MEwrOy5.png)\n\nHoused the motor in a little box with some weights, and found some foam padding to provide a little support for the turning breadboard. I also used some poster putty to hold the board to the servo.\n![Imgur](http://i.imgur.com/DR9j3Hr.png)\n![Imgur](http://i.imgur.com/d8wNUdt.png)\n![Imgur](http://i.imgur.com/ZoXTbn5.png)\n\nSet up the scanner in the kitchen, once this system actually works, the arduino and rf link will be housed in the center of a robot with 8 ultrasound sensors arrayed around it, for now the wires and things are in the way.\n![Imgur](http://i.imgur.com/abyPgFH.png)\n![Imgur](http://i.imgur.com/T2lwSg6.png)\n![Imgur](http://i.imgur.com/yzZiVXr.png)\n![Imgur](http://i.imgur.com/PMibB54.png)\n\nA few scans show that there's pretty consistent readings even with varying scan speeds and motor step sizes. I settled on a roughly ~50ms scan step time and increment servo position by one each time, back and forth.\n![Imgur](http://i.imgur.com/LA2pInw.png)\n![Imgur](http://i.imgur.com/2YI363S.png)\n\nYou can kind of see the kitchen forming here, a guess as to why the walls are not getting straight sides, is that the sonar will pick up the first echo as the distance, so for walls angled to the sensor, even if it's center is facing the angled wall at distance X, the closest point of the wall within a small cone radiating out from the sensor is the first to echo back, resulting in that as the reading.\n\n![Imgur](http://i.imgur.com/9ekR5X8.png)\n![Imgur](http://i.imgur.com/8SEKVcw.png)\n![Imgur](http://i.imgur.com/G6nVygL.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felucidation%2Fultrasonic_radar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felucidation%2Fultrasonic_radar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felucidation%2Fultrasonic_radar/lists"}