My Projects

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

arduino:Controller_for_Cybot [2020/02/06 20:42]
tony
arduino:Controller_for_Cybot [2021/01/01 19:05] (current)
tony
Line 90: Line 90:
 {{ arduino:​cybot:​v1.00:​cybot_arduino_schem.png?​600 |Arduino to Cybot connections}} {{ arduino:​cybot:​v1.00:​cybot_arduino_schem.png?​600 |Arduino to Cybot connections}}
  
-{{arduino:​cybot:​v1.00:​p1269362b.mp4}} ​Test drive of Cybot showing it sometimes avoiding hard surfaces, sometimes crashing into them.  Also shows stall detection when it runs into an edge which the angled front sonar detectors can not see - after 20 seconds it decides it is stalled, and restarts. (NB in this test the front wheel is tending to veer right so the Cybot does not travel in straight lines).+Test drive of Cybot showing it sometimes avoiding hard surfaces, sometimes crashing into them.  Also shows stall detection when it runs into an edge which the angled front sonar detectors can not see - after 20 seconds it decides it is stalled, and restarts. (NB in this test the front wheel is tending to veer right so the Cybot does not travel in straight lines). 
 + 
 +<​HTML>​ 
 +  <div class="​shadows"​ style="​text-align:​center">​ 
 +    <video width="​640" ​ controls>​ 
 +      <source src="/​dokuwiki/​_media/​arduino/​cybot/​v1.00/​p1269362b.mp4"​ type="​video/​mp4">​ 
 +Your browser does not support the video tag. 
 +    </​video>​ 
 +    <div class="​container">​ 
 +      Test drive of Arduino controlled Cybot 
 +    </​div>​ 
 +  </​div>​ 
 +</​HTML>​
  
 My main problem was detecting when the Cybot had got itself into trouble and was not moving. ​ I tried looking at whether the sonar echos were unchanging - indicating it was not moving (or there was a very uniform environment),​ but there was too much "​noise",​ natural variability,​ in  the returned echos to tell the difference. ​ Of course there are lots of ways involving adding extra sensors (eg wheel rotation detectors) to detect whether it was stalled, but adding them would be going against the plan of trying to make the best Cybot using the current hardware, but just replacing the brains. ​  I did add a voltage divider to monitor the battery level using an Arduino analog input - when stalled the Cybot draws a lot of current and because of the batteries internal resistance, the voltage drops. ​ While not actually adding another active sensor device, this is cheating a little. ​  Not 100% successful as on smooth surfaces the Cybot'​s wheels just spin when it is stalled, so the current peek is not as high. My main problem was detecting when the Cybot had got itself into trouble and was not moving. ​ I tried looking at whether the sonar echos were unchanging - indicating it was not moving (or there was a very uniform environment),​ but there was too much "​noise",​ natural variability,​ in  the returned echos to tell the difference. ​ Of course there are lots of ways involving adding extra sensors (eg wheel rotation detectors) to detect whether it was stalled, but adding them would be going against the plan of trying to make the best Cybot using the current hardware, but just replacing the brains. ​  I did add a voltage divider to monitor the battery level using an Arduino analog input - when stalled the Cybot draws a lot of current and because of the batteries internal resistance, the voltage drops. ​ While not actually adding another active sensor device, this is cheating a little. ​  Not 100% successful as on smooth surfaces the Cybot'​s wheels just spin when it is stalled, so the current peek is not as high.