|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
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!Last edited by 987HighRoller : 06-06-2006 at 00:21. |
|
#2
|
||||
|
||||
|
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:
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. |
|
#3
|
||||
|
||||
|
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?
|
|
#4
|
||||
|
||||
|
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?
|
|
#5
|
||||
|
||||
|
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.
|
|
#6
|
|||||
|
|||||
|
Re: Attaching the CMUcam to the Vex controller
Quote:
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 |
|
#7
|
||||
|
||||
|
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 |
|
#8
|
||||
|
||||
|
Re: Attaching the CMUcam to the Vex controller
Quote:
Last edited by skimoose : 06-06-2006 at 22:07. |
|
#9
|
||||
|
||||
|
Re: Attaching the CMUcam to the Vex controller
Quote:
|
|
#10
|
|||||
|
|||||
|
Re: Attaching the CMUcam to the Vex controller
Quote:
Always question, examine, measure, and test your solutions. Last edited by Mark McLeod : 07-06-2006 at 11:51. |
|
#11
|
||||
|
||||
|
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.
|
|
#12
|
||||
|
||||
|
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 |
|
#13
|
||||
|
||||
|
Re: Attaching the CMUcam to the Vex controller
Quote:
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. |
|
#14
|
||||
|
||||
|
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 |
|
#15
|
||||
|
||||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |