Go to Post Yes, I have already determined that the device is capable of launching 2,160 Krispy Kreme donuts into the back seat of my Mustang with a vertical displacement of 65 feet, without cracking the sugary glaze on a single donut. - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 22-01-2005, 22:48
pi_guy578 pi_guy578 is offline
Programmer/Electrician
AKA: Jake
FRC #0578 (Blue Lightning)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Fairport
Posts: 48
pi_guy578 has a spectacular aura aboutpi_guy578 has a spectacular aura about
Send a message via AIM to pi_guy578
The *BIG* CMU Howto

Because many people come here before reading the manual and the manual can be cryptic at some times I've decided to write this howto.

The Case/Assembly

The case is made out of a Radio Shack 4x2x1 Enclosure (#270-1802) in which the control board fits nicely into. The assembly suggested in the manual uses Robovation (aka EDUBot) parts to create a static tilt(w/o a servo) system. The exploded assembly drawing in the manual is either in correct or we missed something but we added a part to make it easier (See the picture below).



To create a dynamic tilt, the design can be modified slightly to accommodate a servo on the side.

It is also a BIG help to not mount any of the camera parts inside the case until you've finished everything else. It ends up getting in the way and you have to take it out.

Connectors

Most of the pin headers are marked with a capital letter 'B'. This marks where the black wire should go. On the DB9 serial port, only pins 1, 3, and 4 are used.

Power

The camera requires 7.2v of power. This is supplied by a PWM port, by the "backup battery". It works on both the EDUBot and the Full-size FRC.

Image

The image can be grabbed with either the GUI included with the camera docs, or by using the SF command* in a terminal window.

The image can be modified/fine tuned in a number of ways. First is the focus. To focus it there are two good ways. The first and harder way is to turn the lens a half turn and grab the image. If it gets better keep turning in that direction and grabbing the frame until its the best quality. If it doesn't get better turn it the other way until it gets good. Don't take the lens completely off. There is a sensitive CCD that I wouldn't want to get dust on or anything else...

The better and faster way is through NTSC output. Follow the directions below to get the NTSC working, hook it up to your television and easily focus it.

*The SF command will return an unrecognizable string of characters that is in a format that should easily be able to be translated into an image.

NTSC

The CMU CAM comes with the ability to output a black and white NTSC signal to your television. It requires hooking up the header on the board to an RCA jack. In order for it to start outputting, the camera must be set into YCrCb.

The first method is to set it through the GUI. Simply move over to the config tab and set the color space to YCrCb.

To set it manually in a terminal window you must set register 18 to a value below with the following syntax:

cr 18 <val>

Values:
RGB w/o White Balance - 40
RGB w/ White Balance - 44
YCrCb w/o White Balance - 32
YCrCb w/ White Balance - 36

If you don't have a TV near by. unplug it from the serial port and without unpowering it plug it into a TV. (Supposedly the registers are supposed to save, even when unpowered, but it hasn't worked for me.)

Note: To those not in the US, your TV might not support NTSC. If it has a "Multi-System" feature on the box or in the manual you should be fine.

Serial

The camera must be connected to a serial port to be commanded (but no necessarily functional, see Demo Mode Below). Either the DB9 port or the 3-pin header will work. To use the DB9, you can connect it to either your computer through a COM port:

Default settings (to change see below):
115200
8 Data bits
No parity
1 Stop bit
No flow control

or, you can connect it to the program port on the RC.

If your computer cannot support 115200 (for any reason) or you're connecting it to the RC (I think this does require a lower bitrate...?) you can try a lower bit rate by setting the jumpers on the board:

Pin
0 1 2 (These are the 3 right most jumper pins on the mode settings, refer to the manual for specific location)
_ _ _ 115,200 Baud
_ _ X 57,600 Baud
_ X _ 38,400 Baud
_ X X 19,200 Baud
X _ _ 9,600 Baud
X _ X 4,800 Baud
X X _ 2,400 Baud
X X X 1,200 Baud

X = Jumped

Demo Mode

The CMU CAM comes with a demo mode to autonomously track a given color. Hold down the user button while powering the cam and holding a colored piece of paper in front of the lens (8~12in) (very trick to do by yourself, get someone to help) you should now be able to move the paper and have the cam track it. If it doesn't work try the following:

-Make sure you're in a well lit room.
-If the servos spaz or go in the wrong direction, they may need to be reversed. This can be done by jumping the pins on the mode headers. Try alternating between the pan and tilt reverse and see which one needs to be reversed.

Links

Very good CMUCAMresources:
http://www-2.cs.cmu.edu/~cmucam/cmucam2/
Official IFI CMU docs and code:
http://www.ifirobotics.com/camera.shtml
And of course:
http://kevin.org/frc/


Hopefully this will help a lot of people, but it might take a few edits to get it perfect. PLEASE post comments on anything that needs clarification or correcting.

Also don't feel afraid of asking how to do various GUI commands in the terminal window, (esp. those who have slow machines w/o Java) I know a lot of them ;p

Edit tracker:
-Forgot to add the links to everywhere important
-Added some assembly notes and fixed the image

Last edited by pi_guy578 : 23-01-2005 at 21:39. Reason: Forgotten stuff, picture not appearing
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Easter Egg in CMU Camera Manual David Foster Programming 8 10-01-2005 03:21
CMU Manual Easter Egg Rickertsen2 General Forum 4 09-01-2005 20:39
openFIRST Contributor's HOWTO Timothy D. Ginn FIRST-related Organizations 0 29-12-2004 21:11
HOWTO: Get a good color scheme Brandon Martus Website Design/Showcase 24 24-11-2004 21:52
New FIRST Team at CMU archiver 2001 4 24-06-2002 01:07


All times are GMT -5. The time now is 09:51.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi