My Projects

Differences

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

Link to this comparison view

robotic:Controller_for_Cybot [2018/04/06 22:39]
127.0.0.1 external edit
robotic:Controller_for_Cybot [2018/09/26 22:39] (current)
Line 1: Line 1:
-Published 6 Feb 2018 +{{:​pilone.png |Cone icon by Fornax, CC-BY-SA 3.0, wikimedia commons}} ((PAGE UNDER CONSTRUCTION)) 
-\\ +<​html><​p style="​text-align:​right;">​Published ​ 6 Feb 2018</​p></​html>​ 
-\\ +<​html><​p style="​text-align:​center;"><​b><​font size="​6">​Arduino controller for Cybot</​font></​b></​p></​html>​
-<​html><​center><​b><​font size="​6">​Arduino controller for Cybot</​font></​b></​center></​html>​ +
-\\+
 \\ \\
 +
 I have received a discarded Cybot robot which is mostly complete and decided to replace its control chips with an Arduino, which will require writing software to control the motors and receive inputs from the ultrasonic and LDR sensors. I have received a discarded Cybot robot which is mostly complete and decided to replace its control chips with an Arduino, which will require writing software to control the motors and receive inputs from the ultrasonic and LDR sensors.
  
 <​HTML>​ <​HTML>​
-  ​<​center>​<div class="​shadows"​+  <div class="​shadows" ​style="​text-align:​center; margin-left:​ auto;  margin-right:​ auto; ">
-    <center>+
     <a href="/​dokuwiki/​_detail/​arduino/​cybot/​P2066995a.JPG"​ class="​media"><​img src="/​dokuwiki/​_media/​arduino/​cybot/​P2066995a.JPG"​ width="​45%"​ class="​media"​ title="​Cybot side view" alt="​Cybot side view" /></​a>​ <a href="/​dokuwiki/​_detail/​arduino/​cybot/​P2066994.JPG"​ class="​media"><​img src="/​dokuwiki/​_media/​arduino/​cybot/​P2066994.JPG"​ width="​45%"​ class="​media"​ title="​Cybot top view" alt="​Cybot top view" /></​a>​     <a href="/​dokuwiki/​_detail/​arduino/​cybot/​P2066995a.JPG"​ class="​media"><​img src="/​dokuwiki/​_media/​arduino/​cybot/​P2066995a.JPG"​ width="​45%"​ class="​media"​ title="​Cybot side view" alt="​Cybot side view" /></​a>​ <a href="/​dokuwiki/​_detail/​arduino/​cybot/​P2066994.JPG"​ class="​media"><​img src="/​dokuwiki/​_media/​arduino/​cybot/​P2066994.JPG"​ width="​45%"​ class="​media"​ title="​Cybot top view" alt="​Cybot top view" /></​a>​
-    </​center>​ 
     <div class="​container">​     <div class="​container">​
-      ​<p>A mostly complete RealRobots Cybot</p>+      A mostly complete RealRobots Cybot
     </​div>​     </​div>​
-  </div></​center>+  </​div>​
 </​HTML>​ </​HTML>​
    
 ===== Overview ===== ===== Overview =====
-Surprisingly the Cybot was in basic working order, the front caster wheel was missing. Fortunately the batteries hadn't leaked, and after replacing them it fired up ok. But as an autonomous robot it doesn'​t perform brilliantly,​ and could do with a bit more sophistication.+Surprisingly the Cybot was in basic working order, ​although ​the front caster wheel was missing. Fortunately the batteries hadn't leaked, and after replacing them it fired up ok. But as an autonomous robot it doesn'​t perform brilliantly,​ and could do with a bit more sophistication.
  
 ===== Hardware description ===== ===== Hardware description =====
Line 60: Line 57:
 The Arduino has to generate the 40kHz, 10V p-p, driving signal for the two transmitters,​ then check for a received echo on the right and left receivers. The echo signal should provide range information as well as just presence/​absence of obstructions. The sensors face forward on an angle so don't actually tell you whether the detected object is forward or to the sides of the Cybot. If an object is directly ahead, and flat, both sensors should receive an equal signal that decreases in distance as the Cybot advances, but two converging walls on either side would produce a similar result. The Arduino has to generate the 40kHz, 10V p-p, driving signal for the two transmitters,​ then check for a received echo on the right and left receivers. The echo signal should provide range information as well as just presence/​absence of obstructions. The sensors face forward on an angle so don't actually tell you whether the detected object is forward or to the sides of the Cybot. If an object is directly ahead, and flat, both sensors should receive an equal signal that decreases in distance as the Cybot advances, but two converging walls on either side would produce a similar result.
  
-I decided that the software echo detector should be interrupt driven, so that the Cybot can continue to maneuver etc, and have the sensors update independently. The output of the Cybot sonar board is a negative going pulse for each echo received. Looking at an oscilloscope I see many more echo pulses than wave cycles ​transmitter, I expect that the Cybots ​pings are bouncing back and forth between the Cybot and the target, generating multiple echoes. The transmitter produces a broad pulse, so there are also multiple echoes from different direction and distances so there are groups of echoes returned. Difficult to interpret all the echoes, so we'll ignore all but the first pulse seen after sending our ping - that will give us the distance to the nearest object.+I decided that the software echo detector should be interrupt driven, so that the Cybot can continue to maneuver etc, and have the sensors update independently. The output of the Cybot sonar board is a negative going pulse for each echo received. Looking at an oscilloscope I see many more echo pulses than wave cycles ​transmitted, I expect that the Cybot'​s ​pings are bouncing back and forth between the Cybot and the target, generating multiple echoes. The transmitter produces a broad pulse, so there are also multiple echoes from different direction and distances so there are groups of echoes returned. Difficult to interpret all the echoes, so we'll ignore all but the first pulse seen after sending our ping - that will give us the distance to the nearest object.
  
 {{arduino:​cybot:​P2117151a.JPG?​350}} {{arduino:​cybot:​P2117153a.JPG?​350}} {{arduino:​cybot:​P2117151a.JPG?​350}} {{arduino:​cybot:​P2117153a.JPG?​350}}
  
-On the left is one of the sonar driver outputs (top trace) with the multiple echoes (bottom trace). On the right on a longer time base is again the sonar pulse (top trace), and multiple groups of echo from different objects (bottom trace)+On the left is one of the sonar driver outputs (top trace) with the multiple echoes (bottom trace). On the righton a longer time baseis again the sonar pulse (top trace), and multiple groups of echo from different objects (bottom trace)
  
 ==== Arduino Sonar wiring ==== ==== Arduino Sonar wiring ====
Line 73: Line 70:
   <​tr><​td width="​10%"><​b>​Arduino<​br/>​Pin</​b></​td><​td width="​10%"><​b>​Direction</​b><​br/>&​nbsp;</​td><​td width="​10%"><​b>​Cybot<​br/>​Sonar Pin</​b></​td><​td><​b>​Description</​b><​br/>&​nbsp;</​td></​tr>​   <​tr><​td width="​10%"><​b>​Arduino<​br/>​Pin</​b></​td><​td width="​10%"><​b>​Direction</​b><​br/>&​nbsp;</​td><​td width="​10%"><​b>​Cybot<​br/>​Sonar Pin</​b></​td><​td><​b>​Description</​b><​br/>&​nbsp;</​td></​tr>​
   <​tr><​td>​2</​td><​td>​I</​td><​td>​4 output</​td><​td>​received echo signal, to generate an interrupt</​td></​tr>​   <​tr><​td>​2</​td><​td>​I</​td><​td>​4 output</​td><​td>​received echo signal, to generate an interrupt</​td></​tr>​
-  <​tr><​td>​4</​td><​td>​I/​O</​td><​td>​3 gate 1</​td><​td>​select left/right receivers</​td></​tr>​ +  <​tr><​td>​4</​td><​td>​I/​O</​td><​td>​3 gate-1</​td><​td>​select left/right receivers</​td></​tr>​ 
-  <​tr><​td>​5</​td><​td>​I/​O</​td><​td>​2 gate 2</​td><​td>&​nbsp;&​nbsp;​disable by pulling low, enable by letting float (switch to input mode)</​td></​tr>​+  <​tr><​td>​5</​td><​td>​I/​O</​td><​td>​2 gate-2</​td><​td>&​nbsp;&​nbsp;​disable by pulling low, enable by letting float (switch to input mode)</​td></​tr>​
   <​tr><​td>​6</​td><​td>​O</​td><​td>​6 PZQ1</​td><​td>​outputs to drive ultrasonic transmitters</​td></​tr>​   <​tr><​td>​6</​td><​td>​O</​td><​td>​6 PZQ1</​td><​td>​outputs to drive ultrasonic transmitters</​td></​tr>​
   <​tr><​td>​7</​td><​td>​O</​td><​td>​5 PZQ2</​td><​td>&​nbsp;&​nbsp;​drive one high and one low at the same time, gives 10V across transducer</​td></​tr>​   <​tr><​td>​7</​td><​td>​O</​td><​td>​5 PZQ2</​td><​td>&​nbsp;&​nbsp;​drive one high and one low at the same time, gives 10V across transducer</​td></​tr>​
Line 85: Line 82:
 This is a stand alone piece of code to test drive the sonar, it expects an ANSI serial terminal program is present to display the results. This is a stand alone piece of code to test drive the sonar, it expects an ANSI serial terminal program is present to display the results.
 {{arduino:​cybot:​v1.00:​Cybot-sonar-test.ino}},​ sketch to test drive the Cybots sonar board. {{arduino:​cybot:​v1.00:​Cybot-sonar-test.ino}},​ sketch to test drive the Cybots sonar board.
 +
 Library Library
  
Line 97: Line 95:
  
      * [[https://​web.archive.org/​web/​20161221164000/​http://​www.lpilsley.co.uk:​80/​cybot/​index.htm|A Cybot Technical Site by Nigel Goodwin]].      * [[https://​web.archive.org/​web/​20161221164000/​http://​www.lpilsley.co.uk:​80/​cybot/​index.htm|A Cybot Technical Site by Nigel Goodwin]].
- 
      * Forum: Microcontroller and Digital Electronics,​ AT MEGA 163 ([[https://​www.mikrocontroller.net/​topic/​2486|German]],​ [[https://​www.mikrocontroller.net/​topic/​2486|English]])      * Forum: Microcontroller and Digital Electronics,​ AT MEGA 163 ([[https://​www.mikrocontroller.net/​topic/​2486|German]],​ [[https://​www.mikrocontroller.net/​topic/​2486|English]])
        * [[https://​www.mikrocontroller.net/​attachment/​683/​komplett.gif|Cybot schematic]]{{:​arduino:​cybot:​komplett.gif?​1| }}.        * [[https://​www.mikrocontroller.net/​attachment/​683/​komplett.gif|Cybot schematic]]{{:​arduino:​cybot:​komplett.gif?​1| }}.
- 
      * [[http://​www.adrirobot.it/​menu_new/​index/​index_cybot.htm|Adrirobot Cybot Presentazione]]. (Italian site with built in translation option).      * [[http://​www.adrirobot.it/​menu_new/​index/​index_cybot.htm|Adrirobot Cybot Presentazione]]. (Italian site with built in translation option).
        * [[http://​www.adrirobot.it/​menu_new/​index/​index_cybot_telecomando.htm|Cybot remote control]].        * [[http://​www.adrirobot.it/​menu_new/​index/​index_cybot_telecomando.htm|Cybot remote control]].
- 
      * [[http://​hobbyelectronica.hol.es/​|Electronica als hobby]]. (Dutch site, but built in translation links).      * [[http://​hobbyelectronica.hol.es/​|Electronica als hobby]]. (Dutch site, but built in translation links).
- 
      * [[https://​web.archive.org/​web/​20121010142548/​http://​www.mstracey.btinternet.co.uk/​|Mike'​s Cybot Page]].      * [[https://​web.archive.org/​web/​20121010142548/​http://​www.mstracey.btinternet.co.uk/​|Mike'​s Cybot Page]].
- 
      * [[https://​web.archive.org/​web/​20080821101139/​http://​www.cybench.co.uk/​index.php|Robotics,​ Cybot and Electronics Resources]].      * [[https://​web.archive.org/​web/​20080821101139/​http://​www.cybench.co.uk/​index.php|Robotics,​ Cybot and Electronics Resources]].
- 
      * [[http://​bolt37.tripod.com/​CybotBuilder/​|Cybot builder]]. "The no1 Cybot website, for all your robotic needs"​.      * [[http://​bolt37.tripod.com/​CybotBuilder/​|Cybot builder]]. "The no1 Cybot website, for all your robotic needs"​.
- 
      * [[https://​web.archive.org/​web/​20011221144735/​http://​andrewwhitehead.tripod.com:​80/​cybotmad/​id13.html|Cybot Mad]].      * [[https://​web.archive.org/​web/​20011221144735/​http://​andrewwhitehead.tripod.com:​80/​cybotmad/​id13.html|Cybot Mad]].
- 
      * [[http://​cybotbuilder.tripod.com/​cybotbuilder/​id15.html|Planet Cybot]].      * [[http://​cybotbuilder.tripod.com/​cybotbuilder/​id15.html|Planet Cybot]].
- 
      * [[https://​web.archive.org/​web/​20140725084721/​http://​drolez.com/​hardware/​cybot/​|Palm Cybot]]. Control a Cybot from your Palm device.      * [[https://​web.archive.org/​web/​20140725084721/​http://​drolez.com/​hardware/​cybot/​|Palm Cybot]]. Control a Cybot from your Palm device.
- 
      * [[http://​www.instructables.com/​id/​Scratch-4-Arduino-and-Cybot-Control/​|Scratch 4 Arduino and Cybot Control]].      * [[http://​www.instructables.com/​id/​Scratch-4-Arduino-and-Cybot-Control/​|Scratch 4 Arduino and Cybot Control]].
- 
      * [[http://​s4a.cat/​|"​Scratch"​ modified for simple programming of the Arduino]].      * [[http://​s4a.cat/​|"​Scratch"​ modified for simple programming of the Arduino]].
- 
      * [[https://​sourceforge.net/​projects/​cybotcompiler/​|Cycle - CYbot Control LanguagE]].\\ Java-like language for programming Ultimate Real Robots'​ Cybot and TOM robots.\\      * [[https://​sourceforge.net/​projects/​cybotcompiler/​|Cycle - CYbot Control LanguagE]].\\ Java-like language for programming Ultimate Real Robots'​ Cybot and TOM robots.\\
  
Line 140: Line 126:
      * [[https://​github.com/​Gallefray/​CyDuino|github Gallefray'​s Cybot]].\\ Cybot hacked to be controlled via an Arduino Uno.\\      * [[https://​github.com/​Gallefray/​CyDuino|github Gallefray'​s Cybot]].\\ Cybot hacked to be controlled via an Arduino Uno.\\
      * [[http://​www.wgmconsulting.com/​robots.htm|RealRobots Cybot Projects]], improvements and add-ons for the URR Cybot Robot.\\      * [[http://​www.wgmconsulting.com/​robots.htm|RealRobots Cybot Projects]], improvements and add-ons for the URR Cybot Robot.\\
 +     * [[http://​tims-arduino-cybot.blogspot.com/​2018/​03/​tims-cybot-arduino-conversion-hi.html|Tim'​s Cybot]] ​ Arduino Conversion.
 +     * [[https://​wiki.nottinghack.org.uk/​wiki/​TourRobot|Tour Robot]], add Arduino, soundboard and sensors.\\
  
-\\ +<​html><​small>​If any referenced page no longer exists, try looking for its URL on <a href="​http://​archive.org">​http://​archive.org</​a>​.</​small></​html>​
-\\ +
-<html><​center><​hr size="​7"​ width="​90%"></​center></​html>​ +
-\\ +
-<​html><​center><​small><p>If any referenced page no longer exists, try looking for its URL on <a href="​http://​archive.org">​http://​archive.org</​a>​.</p></small></​center></​html>​ +
-  +
-\\+
 \\ \\
 ---- ----
 +<​html><​div style="​width:​ 80%; text-align:​center">&​nbsp;</​html>​[[:​start|Home Page]]<​html>&​nbsp;&​nbsp;&​nbsp;</​html>​[[:​about|About this Site]]<​html>&​nbsp;&​nbsp;&​nbsp;</​html>​[[:​copyright|Copyright Questions]]<​html>&​nbsp;&​nbsp;&​nbsp;</​html>​[[:​contact|Contact Us]]<​html>&​nbsp;&​nbsp;&​nbsp;</​html>​[[:​robotic:​resources|Resources]]<​html></​div></​html>​\\
 \\ \\
-<​html>&​nbsp;&​nbsp;&​nbsp;</​html>​[[:​start|Home Page]]<​html>&​nbsp;&​nbsp;&​nbsp;</​html>​[[:​about|About this Site]]<​html>&​nbsp;&​nbsp;&​nbsp;</​html>​[[:​copyright|Copyright Questions]]<​html>&​nbsp;&​nbsp;&​nbsp;</​html>​[[:​contact|Contact Us]]<​html>&​nbsp;&​nbsp;&​nbsp;</​html>​[[:​robotic:​resources|Resources]]