The BlueSmirf bluetooth modem available from Sparkfun (http://www.sparkfun.com/) provides an easy way to add wireless communications to a robot that doesn't need to communicate beyond about 30 feet. The current version of the Midnight Prowlerbot uses a BlueSmirf connected to the CMUCam2+ to allow wireless control of the camera from a laptop.
It seems that every module or device has some sort of gotcha and the gotcha with the BlueSmirf is that if it is not in fast data mode that the CMUCam2+ will overrun the buffer of the BlueSmirf and cause it to freeze when transferring an image. This is easily fixed by going into command mode and issuing ATMF to cause the BlueSmirf to use fast data transfer mode wherein it ignores BlueSmirf commands and simply transfers data. This applies to BlueSmirf v1 - I'm not sure if it applies to BlueSmirf v2.
I wanted more direct control of the Midnight Prowlerbot by communicating directly with the Atom Bot Board (ABB) instead of using the CMUCam2+ servo output to signal commands to the ABB. The goal was simply to split the receive line from the BlueSmirf to the CMUCam2+ and the ABB. Using a resistor to buffer between the ABB and the BlueSmirf while having a direct connection from the BlueSmirf to the CMUCam2+ achieved the goal. Any commands received through the BlueSmirf would be sent to both devices and each device would just ignore messages not intended for it.
The gotcha is that the Basic Atom Pro will not receive from the BlueSmirf any faster than 38400 baud. This was the limit using the hardware serial port. The max for the software serial port is 57600 baud anyway, so I didn't even bother with it. It did not matter if the BlueSmirf was in fast data mode or not, 38400 was the max for communicating with the Basic Atom Pro. It also didn't matter if the Basic Atom Pro was the only thing connected to the BlueSmirf or if the connection was being shared with the CMUCam2+, the limit was 38400. This appeared to be the true when using just a Basic Atom 28 instead of the Pro as well.
The 38400 baud limit would not be a problem if it was not for the desire to transfer images from the camera and have motion detection and color updates that would update as quickly as possible. So in the interest of not giving up these features, I just reconfigured the Midnight Prowlerbot back to the way it was using the servo output from the CMUCam2+ as the command pipeline.
The next revision of the bot is apparently going to need a second BlueSmirf since I can't seem to get both the CMUCam2+ and ABB/Basic Atom Pro to receive at the same speed without sacrificing more than I'm willing to tolerate. By not having to send commands through the CMUCam2+, it will no longer be necessary to interrupt color or motion tracking to update the robot position.
No comments:
Post a Comment