| ||||||||||||||
| ||||||||||||||
|
||||||||||||||
Cambot: Creating a Mobile Machine Vision PlatformThis article will look at interfacing a CMUcam2 with Parallax's Board of Education (Revision B). Firstly, I decided to use the Rogue Blue chassis, since it allowed for a lot more room than the standard Boebot chassis. The larger batteries also help with the fairly substantial 200mA drain of the CMUcam2.
BuildingSetting up the CMUcam2 to work with the Stamp microprocessor is fairly simple. Firstly, the Stamp microprocessor communicates at a baudrate of 9600, compared to CMUcam2's default baudrate of 115,200. Thankfully, CMUcam2 is designed to work with slower processors, and has jumper settings for 1,200, 2,400, 4,800, 9,600, 19,200, 38,400, 57,600 and 115,200.Adjacent to the power switch is an array of six jumpers. By setting the third-from-bottom jumper, the CMUcam2 communicates at our desired baudrate (see picture).
Setting up the TTL serial cable is simple. The Logic Receive/Transmit connectors should be connected to two of the BOE's breadboard connectors (I used P10 and P9 respectively). Next, in order to make the communications work properly, the serial line needs to be grounded, so that connects to Vss. Finally, the serial jumper to the right of the TTL serial connectors must be removed to enabled TTL communications.
Mounting the camera is mainly up to you and available resources. Currently I have the CMUcam2 wedged between the two levels of Rogue Blue chassis, although I hope to use a Rogue Robotics sensor mount to make the camera a little more stable. Nevertheless, the current incarnation of Cambot looks like this:
ProgrammingProgramming the CMUcam2 is fairly straightforward, although I received a lot of help from the excellent tutorials by Seattle Robotics. An initial test to make sure everything is working properly:Main: SEROUT 10, 84, ["L1 0",CR] DELAY 5000 SEROUT 10, 84, ["L1 1",CR] GOTO MainThis article isn't meant to cover Stamp programming, so if you are unsure about these commands, either consult the Stamp manual or this Generation5 article. The L1 0 turns the green LED off, L1 1 turns it on (for reference, L1 2 puts the LED in automatic mode). If the test program doesn't work, check your cabling, connections and power supply. If it works, then everything is fine and you have your own mobile vision platform! As a further test, I have slightly modified Seattle Robotics' example tracking program allowing the baudrate, input and servo pins to be changed without major code alteration.
Submitted: 25/09/2004 Article content copyright © James Matthews, 2004.
|
|
|||||||||||||
All content copyright © 1998-2007, Generation5 unless otherwise noted.
- Privacy Policy - Legal - Terms of Use -