Fw: Homebuilt Turtlebot Interface furstration.

65 views
Skip to first unread message

anfederman@comcast

unread,
Feb 10, 2012, 1:08:06 PM2/10/12
to hbrob...@googlegroups.com, t...@todbot.com
Hello EE/interface experts.
 
    I am trying to interface a Roomba 510  to make it a Turtlebot.  It seems my efforts at connectivity  are less than successful.
 
I am using the following circuit:  http://www.flickr.com/photos/todbot/94701997/sizes/o/  (there is a missing connection on the diagram from pin 5 on the DB-9 to ground.)  I am using an old ps/2 din connector  with the center key broken out, so there is no pin 4 or 7, but these signals aren't used.  Also,  I am just using the 5 volt input to power the max232.  I don't think I need rs-232 driver voltage levels on the DB-9 side, since I am using a usb/rs232 converter, but I've wired them up anyway.   On a terminal I see characters out across at 57600 baud, and they appear to be clean. On the windows side I've tried to run a Roomba control panel,  I get beeps, but also error messages about no Roomba found.  So right now the problem could be anywhere, Roomba, Cable, USB converter, baud rate set up.  Another issue is the Roomba has a bad battery so I am running it attached to the charger, and I don't know if this is a no-no or not.
 
I don't understand some things on the diagram.
(The diagram is too big to include in the post)
 
I get that  You need a ground connection,  at Transmit and receive signal  (three wires for each side)  but there is a 4th signal  'DD' on the Roomba Side and pin 7 on the DB-9 side that I don't get -  is this data set ready?  Is it really needed?  I also am a little fuzzy on the DB-9 signals.   I always thought it was pins 2,3,7 on both a DB-25 and DB-9 connector)  But I've seen a couple of references to pin 5 being the ground on a DB-9.  Also,  what purpose do the caps between pins 1-3,4-5 serve?
 
 
On the ros-turtlebot side  I am getting two kinds of errors,  SCI data length  and OI Charging errors with various byte codes (255, 61) appear frequently. I've read that the 500 series interface runs at 115200, while the create runs at 57600, from what I am seeing my 510 is running at 57600.
 
 
Thanks
 

Chris Palmer

unread,
Feb 10, 2012, 2:14:05 PM2/10/12
to hbrob...@googlegroups.com
Hi, Alan...

The diagram looks incomplete or the interface is doing something odd.  On the DB9 side... pins 7 and 8 are RTS and CTS, and are a complimentary pair that provides hardware flow control (if I understand it properly).  The pin used is labelled "DD" and looks like it will pass on the computer's request (from the DB9 side) to the Roomba to send data, but without pin 8 wired, there's no signal for acknowledgement to tell the sender on the DB9 to "go ahead".  It's incomplete, doing something odd, or not used.

The caps on MAX232 pins 1-3 and 4-5 are used for the charge pump to generate the +/-12V on the DB9 side.

From what I've seen on diagrams, pin 5 on the DB9 is GND.  If you don't need hardware flow control, the minimum used for a null-modem cable is 2, 3, and 5 (with 2 and 3 cross connected for Transmit and Receive).

Hope that helps. I'm not familiar with the rest of the puzzle you're working...  

-Chris

On Feb 10, 2012, at 10:08 AM, "anfederman@comcast" <anfed...@comcast.net> wrote:

(...some snippage...)

anfederman@comcast

unread,
Feb 10, 2012, 5:35:38 PM2/10/12
to hbrob...@googlegroups.com
Thanks for your input Chris -   The diagram looked a little strange to me as well.  Sometimes explaining the problem to someone else is all that is needed to figure out a better approach.
I abandoned my MAX232 based circuit.  I took a USB to Arduino bib (This is the one we use for the Techshop Freeduino board),  hooked up TXD, RXD and GND - (I only had to swap TXD and RXD once),  and  and away I went.
 
Of course, I am not sure if my baud rate change is really working as intended, and it is complaining about not seeing the Gyro (which isn't there. ) But I got Teleop to run. 
 
Shoot, If I had known that I wouldn't have wasted two weeks.  
 
To quote Hannibal when told there was no road over the Alps:  "I will find a road, or make a road."
 
 
 
 
PS: For Turtlebot users - if the unit is charging, it thinks it is near a cliff and will give error warnings.  This will show up on the Dashboard.
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To post to this group, send email to hbrob...@googlegroups.com.
To unsubscribe from this group, send email to hbrobotics+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hbrobotics?hl=en.
E915.bmp

Randy M. Dumse

unread,
Feb 11, 2012, 4:44:28 PM2/11/12
to hbrob...@googlegroups.com
The circuit is a pretty simple implementation of an RS-232 converter.
 
Yes the GND on pin 5 is critical.
 
Between the DB9 and the DB25 pinouts, pins 2 and 3 are not the same. They are swapped.
 
Reasonable reference here:
 
Some serial ports need handshaking lines looped back to operate. Couldn't hurt. So circuit could be improved by wiring DB9 pin-6 to pin-4, also include pin-1. Sometimes also looping 7 to 8, but in your diagram pin-7 is attached. Pin 7 is Request-to-Send. Not sure what DD stands for. No telling if this signal is needed or not, but quite possibly the Roomba side wants to control flow rate with it. Oh, in Roomba documentation, it says it is Device Detect and it has to be "active low, used to wake up the Roomba from sleep". You'd probably do just as well by gnd'ing that pin, then, and leaving the RS-232 convertor out of it.

The Max232 generates RS-232 voltage by doing a charge pump. Charge pumps work by switching capacitors in parallel across the power leads to being in series standing on the power lines. Those caps on 1-3, 4-5 are the ones being switched to generate the higher RS-232 voltages our of the 5V supplied.
 
It would be very easy/likely to get the wiring on the Mini-Din wrong, because they show using a DIN-8, when  the actual connector is supposed to be DIN-7. It appears the PS2 DIN is a DIN-6. Plus your description of no pin 4 or 7 is also worrisome. Note, which pin is in which physical position depends on if we are talking a DIN-8 or a DIN-7. I'd be most suspicious about those. For instance:
says Pin-4 is TxD. That would still be Pin-4 on a DIN-6. Pin-5 would be DD.
 
Finally, there are USB to TTL adapters which could do this job without going to RS-232 as an intermediary. Have you considered using those? Then your whole circuit would be the adapter and the DIN-7.
 
Randy
 
 
 
 

From: hbrob...@googlegroups.com [mailto:hbrob...@googlegroups.com] On Behalf Of anfederman@comcast
Sent: Friday, February 10, 2012 12:08 PM
To: hbrob...@googlegroups.com
Cc: t...@todbot.com
Subject: [HBRobotics] Fw: Homebuilt Turtlebot Interface furstration.

--
Reply all
Reply to author
Forward
0 new messages