Page 76 - Hacking Roomba
P. 76

Chapter 3 — Building a Roomba Serial Interface Tether                 57






































                             FIGURE 3-14: Keyspan US-19HS USB serial adapter



                             Simple Echo Test

                             Before plugging the serial tether into Roomba, do one final test. This test will be an end-to-
                             end test from the computer, through the USB serial adapter, through the circuit, to the Mini
                             DIN cable and back again. This end-to-end test enables you to check the entire communica-
                             tion path without worrying about the particulars of the Roomba protocol.
                             Using the Mini DIN jack connected to the Mini DIN cable, connect the DC wall wart power
                             supply to the tether to emulate Vpwr like in Step 6 of the previous section. Using a test clip,
                             connect pins 3 and 4 (RXD and TXD) of the Mini DIN jack together. That creates the loop
                             that will echo back any data you send. This is called a loopback connection; it is one of the most
                             powerful debugging techniques for serial data transmission.

                             With the USB serial adapter installed on your computer, start up a terminal program that can
                             speak to serial ports. Not all terminal programs can do this, as it’s not something that’s nor-
                             mally needed. To communicate with Roomba, you need to set your serial programs to 57,600
                             bps with 8N1, no hardware or software handshaking, and no local echo.
   71   72   73   74   75   76   77   78   79   80   81