Go to Post Real projects have good and bad aspects, problems that must be dealt with, and lots of things that dont make any sense from your side of the fence. - KenWittlief [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 05-06-2006, 18:37
987HighRoller's Avatar
987HighRoller 987HighRoller is offline
Vegas....Baby
AKA: Alex Sambvani
FRC #0987 (High Rollers)
Team Role: College Student
 
Join Date: May 2006
Rookie Year: 2005
Location: Las Vegas, Nevada
Posts: 80
987HighRoller has a spectacular aura about987HighRoller has a spectacular aura about
Attaching the CMUcam to the Vex controller

Hi,


I am attempting to connect the CMUcam2 to the Vex controller, and am pretty confused. Can anyone who has been successful in using the camera with the Vex controller post some pictures of how they connected the camera's TTL port to the vex and how they powered the camera? Also, any instructions or additional descriptions on how to complete this task would be much appreciated Thanx!
__________________
Team 987 - The High Rollers - Las Vegas, Nevada
2007 Las Vegas Regional Finalists
2007 Newton Champions

2007 Championship Winners! Thanks to 190 and 177

2008 IRI CHAMPS with 67 and 330

Last edited by 987HighRoller : 06-06-2006 at 00:21.
Reply With Quote
  #2   Spotlight this post!  
Unread 05-06-2006, 19:25
skimoose's Avatar
skimoose skimoose is offline
Parent/Mentor/Engineer
AKA: Arthur Dutra
FRC #0228 (GUS)
Team Role: Electrical
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Meriden, Connecticut
Posts: 568
skimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond repute
Re: Attaching the CMUcam to the Vex controller

Well I haven't had time to complete this project yet, but it is on my very long list of summer projects. Here's my plan:
  1. camera power - use Vex motor port to camera power input - standard PWM cable.
  2. pan servo power - use 2nd Vex motor port to pan servo - standard PWM cable.
  3. tilt servo power - use 3rd Vex motor port to tilt servo - standard PWM cable.
  4. data connection - I planned to use the three wire RS-232 port on the camera out to the IFI TTL driver circuit just like on the full size FRC controller with a standard PWM cable. There is a schematic for the TTL driver at IFI here. The TTL drivers are available through IFI at $10 or you can build your own with components from Mouser, Digikey, or Jameco (sorry RadioShack doesn't stock the RS-232 driver chip) for about the same price. Modify two very short PWM cables. Tie the +5v (red) together from the Vex controller RX/TX ports and connect to the +5v (pin #4) on the TTL driver. Tie the two Gnd (black) together from the Vex controller RX/TX ports and connect to the Gnd (pin #1) on the TTL driver. Then take the signal (white) wires from the Vex controller RX/TX ports and connect to the TX and RX (pins #2 & 3) on the TTL driver respectively. Remember transmit from the camera would be receive on the controller and camera receive would be transmit on the Vex controller. Keep the TTL connection to the Vex controller very short. Use two sided foam tape to hold the TTL driver on the top of the Vex controller case.

Then comes the coding. I haven't even started thinking about the code yet.

I'm considering using two Vex batteries connected in parallel to give longer working time. The camera drained the standard 7.2v backup batteries rather quickly.

This is the start of my plan, again I haven't had time to try it yet. Good Luck.
__________________

2009 CT Regional Motorola Quality Award
2010 VRC Connecticut Championship Winners & Amaze Award
2010 VRC Championship Divisional Energy Award
2010 WPI Regional Winner
2010 WPI Regional Engineering Inspiration Award
2011 WPI Regional Chairman's Award
2012 WPI Regional Finalists
Reply With Quote
  #3   Spotlight this post!  
Unread 05-06-2006, 19:39
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: Attaching the CMUcam to the Vex controller

Instead of dealing with the driver chip and going from RS-232 to TTL (and dealing with intermittent and loose connections) why not use the camera's built on TTL port straight to the Vex controller?
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
Reply With Quote
  #4   Spotlight this post!  
Unread 06-06-2006, 00:24
987HighRoller's Avatar
987HighRoller 987HighRoller is offline
Vegas....Baby
AKA: Alex Sambvani
FRC #0987 (High Rollers)
Team Role: College Student
 
Join Date: May 2006
Rookie Year: 2005
Location: Las Vegas, Nevada
Posts: 80
987HighRoller has a spectacular aura about987HighRoller has a spectacular aura about
Re: Attaching the CMUcam to the Vex controller

So where do i get the tx/rx from? The digital/analog ports, the motors, the interrupts, or does it matter?
__________________
Team 987 - The High Rollers - Las Vegas, Nevada
2007 Las Vegas Regional Finalists
2007 Newton Champions

2007 Championship Winners! Thanks to 190 and 177

2008 IRI CHAMPS with 67 and 330
Reply With Quote
  #5   Spotlight this post!  
Unread 06-06-2006, 01:21
Donut Donut is offline
The Arizona Mentor
AKA: Andrew
FRC #2662 (RoboKrew)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Goodyear, AZ
Posts: 1,271
Donut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond repute
Re: Attaching the CMUcam to the Vex controller

There are seperate TX and RX ports along the same side as the digital/analog inputs and outputs.
Reply With Quote
  #6   Spotlight this post!  
Unread 06-06-2006, 22:27
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,976
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Attaching the CMUcam to the Vex controller

Quote:
Originally Posted by 987HighRoller
So where do i get the tx/rx from? The digital/analog ports, the motors, the interrupts, or does it matter?
So, it kind of goes without saying, that you won;t generally get plug-n-play answers from Chief Delphi. However, the information presented is more than enough for the motivated student to figure out what is needed.

I strongly urge you to follow this through. You will learn more from this than anything else you do this summer. This is where the phrase "hardest fun ever" comes from. Once you are done, you will understand CMU Cam, serial data, and Vex programming more than most of the people here. Then, you can teach us something.

Come back and ask, ask, ask, until you get what you need. We're all here to help, but we can't make you do it. Push yourself, and the rewards will be tremendous.

Don
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #7   Spotlight this post!  
Unread 06-06-2006, 22:57
David55 David55 is offline
Registered User
AKA: David Hillman
FRC #1577 (Steampunk) & FRC #125 (NUTRONS)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Raanana, Israel / Boston, MA
Posts: 279
David55 is a splendid one to beholdDavid55 is a splendid one to beholdDavid55 is a splendid one to beholdDavid55 is a splendid one to beholdDavid55 is a splendid one to beholdDavid55 is a splendid one to behold
Re: Attaching the CMUcam to the Vex controller

Thanks for all your advice guys!!!

I figured out the wiring side (not too hard when you have such detailed instructions ).

Now...what's there to do with the software side?
I think that's where the big problems will be...

David
Reply With Quote
  #8   Spotlight this post!  
Unread 06-06-2006, 21:55
skimoose's Avatar
skimoose skimoose is offline
Parent/Mentor/Engineer
AKA: Arthur Dutra
FRC #0228 (GUS)
Team Role: Electrical
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Meriden, Connecticut
Posts: 568
skimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond repute
Re: Attaching the CMUcam to the Vex controller

Quote:
Originally Posted by Matt Krass
Instead of dealing with the driver chip and going from RS-232 to TTL (and dealing with intermittent and loose connections) why not use the camera's built on TTL port straight to the Vex controller?
You can, but TTL is not reliable for other than short runs. Serial data can be transmitted further and more reliably. Whether you change signal levels or not, a loose connection is a loose connection.
__________________

2009 CT Regional Motorola Quality Award
2010 VRC Connecticut Championship Winners & Amaze Award
2010 VRC Championship Divisional Energy Award
2010 WPI Regional Winner
2010 WPI Regional Engineering Inspiration Award
2011 WPI Regional Chairman's Award
2012 WPI Regional Finalists

Last edited by skimoose : 06-06-2006 at 22:07.
Reply With Quote
  #9   Spotlight this post!  
Unread 06-06-2006, 23:30
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: Attaching the CMUcam to the Vex controller

Quote:
Originally Posted by skimoose
You can, but TTL is not reliable for other than short runs. Serial data can be transmitted further and more reliably. Whether you change signal levels or not, a loose connection is a loose connection.
We used straight TTL for the robot this year, and we covered at least 5 feet without any communication trouble, plus the connection was a lot steadier and less prone to wiggling free than with the driver chip. Plus that little (breakable) chip being a failure point for our targeting functions made us nervous.
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
Reply With Quote
  #10   Spotlight this post!  
Unread 07-06-2006, 08:45
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,695
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Attaching the CMUcam to the Vex controller

Quote:
Originally Posted by Matt Krass
We used straight TTL for the robot this year, and we covered at least 5 feet without any communication trouble...
You should note that we use shielded cable for those long runs and tested lengths, more than twice what we planned to use, for TTL signal degradation.
Always question, examine, measure, and test your solutions.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 07-06-2006 at 11:51.
Reply With Quote
  #11   Spotlight this post!  
Unread 13-01-2007, 15:12
Ctrl Alt Delete's Avatar
Ctrl Alt Delete Ctrl Alt Delete is offline
Code Monkey
AKA: David Weitz
FRC #0177 (Bobcats)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Connecticut
Posts: 89
Ctrl Alt Delete is a splendid one to beholdCtrl Alt Delete is a splendid one to beholdCtrl Alt Delete is a splendid one to beholdCtrl Alt Delete is a splendid one to beholdCtrl Alt Delete is a splendid one to beholdCtrl Alt Delete is a splendid one to behold
Send a message via AIM to Ctrl Alt Delete Send a message via MSN to Ctrl Alt Delete
Re: Attaching the CMUcam to the Vex controller

For the programming side of it. I just swapped in the vex library file, Vex_alltimers_wauton_jmpr.lib and it seems to work. I haven't tried the wiring yet, but the only thing you have to remember is that there are only 8 free pwm's instead of 16.
__________________

Life lessons learned at robot:
1.) Never take apart power strips
2.) Sleep is required, but not essential to survival

Failure to abide by these lessons will result in headaches...and flaming pants.

"Here at Bobcat Robotics, we pride ourselves in having 60-table MySQL databases, girlfriend cookies, and a vinyl cutter." -Chris Jelly
Reply With Quote
  #12   Spotlight this post!  
Unread 13-03-2007, 18:19
Culvan Van Li's Avatar
Culvan Van Li Culvan Van Li is offline
Jack-Of-All-Trades
AKA: Andy
FRC #1939 (Kuh-Nig-Its)
Team Role: Engineer
 
Join Date: Sep 2006
Rookie Year: 2006
Location: Kansas City, MO
Posts: 36
Culvan Van Li is on a distinguished road
Re: Attaching the CMUcam to the Vex controller

I'm trying to connect a CMU2 camera to my vex kit. Electrically I think I've got everything working. I'm using PWM1&2 for the pan/tilt and I'm using PWM3 to power the camera. I made a custom cable to connect the TTL serial to the VEX ports that are next to the digital16 port. I've got a laptop setup with the programming kit/cable and I've got a second laptop connected to the RS232 serial port on the camera monitoring it with Procom plus.

I've been adding in modules from Kevin Watson's frc_camera_s_21 set. I've used the instructions in the readme files to add serial_ports.c/h, camera.c/h, tracking.c/h, terminal.c/h. I've added in the following commands into the Process data from master routine:

Tracking_Info_Terminal();
Camera_Handler();
Servo_Track();

I've also turned on debugging. When it fires up it runs through the initilization and I can see it perform all 17 steps. The servos start panning all ofer the place and I get "searching..." messages. The camera never seems to lock onto anything (incluging my green target). I tried using it with labview's software and I can pull an image and check the color of my target. It comes up with 235+/-5 for all three colors. I tried changing the settings in camera.h to match those, but I can't get it to pick anything up. I get T packets with a parenthesis after it. I'm assuming that's because I'm in raw mode.

Anyone have any good suggestions of what to try next? I can get the camera working in non-raw mode directly to my computer running procomm plus, but I'm struggling to get it working with the vex kit.

Andy
Reply With Quote
  #13   Spotlight this post!  
Unread 13-03-2007, 19:02
billbo911's Avatar
billbo911 billbo911 is online now
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,345
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Attaching the CMUcam to the Vex controller

Quote:
Originally Posted by Culvan Van Li View Post
I made a custom cable to connect the TTL serial to the VEX ports that are next to the digital16 port....and I've got a second laptop connected to the RS232 serial port on the camera monitoring it with Procom plus.

The servos start panning all over the place and I get "searching..." messages. The camera never seems to lock onto anything (incluging my green target).


Andy
To quote one of the "Myth Busters" "There's your problem right there"

The CMU Cam can not drive both the TTL and RS232 connections at the same time. So, when the controller never receives tracking data from the camera, it just keeps searching. Try disconnecting the RS232 to the second laptop. You should start seeing better performance.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #14   Spotlight this post!  
Unread 15-10-2007, 16:02
yara92's Avatar
yara92 yara92 is offline
M.Fawdah Mechanical engineering
AKA: Mohamed
FRC #1946 (Mechka Monster)
Team Role: RoboCoach
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Israel
Posts: 236
yara92 will become famous soon enoughyara92 will become famous soon enough
Re: Attaching the CMUcam to the Vex controller

Hi Andy!
I tried this long way I Confused with the friends helping me how to connect and different codes but I did not succeed the camera dos not Tracking.
So may be you did not given up and you succeed to work it out.
Please try to send me any information met help. I'm struggling to get it working with the vex kit.
Mohamed team 1946
Reply With Quote
  #15   Spotlight this post!  
Unread 23-10-2007, 17:10
Culvan Van Li's Avatar
Culvan Van Li Culvan Van Li is offline
Jack-Of-All-Trades
AKA: Andy
FRC #1939 (Kuh-Nig-Its)
Team Role: Engineer
 
Join Date: Sep 2006
Rookie Year: 2006
Location: Kansas City, MO
Posts: 36
Culvan Van Li is on a distinguished road
Re: Attaching the CMUcam to the Vex controller

I did make some more progress on this, but I haven't worked on it for months. I was able to get the camera to find objects. My previous setup worked (even the part about having two laptops connected at the same time.) I can't get the tracking code to properly control my servos, but that's a different problem.

My problem was that I was calibrating the search color in Labview and it was defaulting to RGB mode. The default camera code from Kevin Watson is in YCrCb mode. It will work with both set the same way, but YCrCb is closer to the way the camera sees the world. RGB is basically calculated from the YCrCb data. You will probably have better results using YCrCb.

The setting is controlled inside the COMA register on the camera. It's only one bit so you will change it by adding or subtracting that bit (the number 8, I believe). I found the following thread that clued me into my problem.

http://www.chiefdelphi.com/forums/sh...highlight=COMA

Hope this helps.

Andy
Reply With Quote
Reply


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
IR on the Vex controller? jgarbers FIRST Tech Challenge 0 18-04-2006 14:07
Making the VEX OI (controller) beep? ForgottenSalad FIRST Tech Challenge 2 27-03-2006 08:50
Attaching the Fisher Price sburro Motors 4 14-01-2006 13:47
Attaching Potentiometers to VEX billbo911 FIRST Tech Challenge 9 07-07-2005 19:03
Attaching the Gears and sprockets to the shaft archiver 2001 2 23-06-2002 23:18


All times are GMT -5. The time now is 00:59.

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