![]() |
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! |
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. :ahh: 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. |
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?
|
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?
|
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.
|
Re: Attaching the CMUcam to the Vex controller
Quote:
|
Re: Attaching the CMUcam to the Vex controller
3 Attachment(s)
Here's what I do and what Matt was referring to in his post. See if the snapshots I took help make the wiring clear.
We don't run the servos from the CMUcam2 board, but if you choose to then take the camera power from the Vex motor outputs for the extra voltage (unregulated-straight from the battery). We tend to prefer the consistency of the regulated 5v from any of the other Vex outputs, but it's inadequate to also power servos driven directly from the camera. It's a personal choice to not use the CMUcam's servo control capabilities because the uses we put the camera to sometimes involve servos and sometimes don't and when we do use them we want to control the programming. Quote:
|
Re: Attaching the CMUcam to the Vex controller
Quote:
|
Re: Attaching the CMUcam to the Vex controller
Quote:
Everything people have mentioned here should work, there's always more than one way to make it work. |
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 |
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 :D ). Now...what's there to do with the software side? I think that's where the big problems will be... David |
Re: Attaching the CMUcam to the Vex controller
Quote:
|
Re: Attaching the CMUcam to the Vex controller
Quote:
Always question, examine, measure, and test your solutions. |
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.
|
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 |
| All times are GMT -5. The time now is 12:40. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi