Go to Post I am sorry if something was missed at your regional, it will be checked at this event. - Al Skierkiewicz [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-01-2006, 23:35
Kyveck Kyveck is offline
Registered User
FRC #1014 (Dublin Robotics)
Team Role: Programmer
 
Join Date: Jan 2006
Location: Ohio
Posts: 16
Kyveck is an unknown quantity at this point
CMUcam default code not responding

I have spent quite a bit of time trying to get this to work, and I suspect some kind of configuration problem. I'm hoping that if I list everything, someone might be able to see what's wrong.

frc_camera_s, using compiled .hex that was in the download
CMUcam2 connected via TTL port to RC
2006 RC tethered to 2006 OI
tilt/pan servos connected to RC pwm1,2
RC pwm to CMUcam2 power
jumpers on pan reverse, oscillator connect, internal power to servos
DB-9 serial from RC program port to laptop via USB to Serial converter
12 volt and 7.2 volt batteries fully charged

The camera shows a green light, and all of RC lights are green like normal. The camera holds its default position, and does not respond to any light. Nothing comes up over the terminal, although I expected to see "Scanning...". With the camera configured stand-alone (DB-9 to USB to laptop, servos plugged directly in to camera, power still supplied by RC) I was able to use LabView and the CMUcam2 demo program to calibrate the camera well. It tracked as I believe it was supposed to without any problems.

Any assistance would be appreciated. Thanks.
Dublin Robotics, Team 1014 (with the Bad Robot t-shirts)
  #2   Spotlight this post!  
Unread 15-01-2006, 00:54
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: CMUcam default code not responding

Quote:
Originally Posted by Kyveck
I have spent quite a bit of time trying to get this to work, and I suspect some kind of configuration problem. I'm hoping that if I list everything, someone might be able to see what's wrong.

frc_camera_s, using compiled .hex that was in the download
CMUcam2 connected via TTL port to RC
2006 RC tethered to 2006 OI
tilt/pan servos connected to RC pwm1,2
RC pwm to CMUcam2 power
jumpers on pan reverse, oscillator connect, internal power to servos
DB-9 serial from RC program port to laptop via USB to Serial converter
12 volt and 7.2 volt batteries fully charged

The camera shows a green light, and all of RC lights are green like normal. The camera holds its default position, and does not respond to any light. Nothing comes up over the terminal, although I expected to see "Scanning...". With the camera configured stand-alone (DB-9 to USB to laptop, servos plugged directly in to camera, power still supplied by RC) I was able to use LabView and the CMUcam2 demo program to calibrate the camera well. It tracked as I believe it was supposed to without any problems.

Any assistance would be appreciated. Thanks.
Dublin Robotics, Team 1014 (with the Bad Robot t-shirts)
I was working with another team today that was also having a similar problem. Here's the thread. Unless you're using the code build that was messed up, I can only conclude that your TTL serial port is malfunctioning. Just as I had the other team do, turn-on debugging messages in camera.h and report back with the output (if any) from your terminal screen. In the meantime, I'll whip-up a piece of software that you can use to test the serial port.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org

Last edited by Kevin Watson : 15-01-2006 at 13:52. Reason: Fixed a link.
  #3   Spotlight this post!  
Unread 15-01-2006, 03:14
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: CMUcam default code not responding

In addition to the debugging messages, can you try the software mentioned here and report back with the results?

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #4   Spotlight this post!  
Unread 15-01-2006, 13:38
Kyveck Kyveck is offline
Registered User
FRC #1014 (Dublin Robotics)
Team Role: Programmer
 
Join Date: Jan 2006
Location: Ohio
Posts: 16
Kyveck is an unknown quantity at this point
Re: CMUcam default code not responding

I had already verified that I was not using the code with the serail port setting bug. I will run the two tests you asked for as soon as I get the RC and camera, which are locked in the school until Tuesday morning. I can't get the link to the other forum you mentioned to work. Thank you, and I'll post my results when I have them.
  #5   Spotlight this post!  
Unread 17-01-2006, 09:11
Kyveck Kyveck is offline
Registered User
FRC #1014 (Dublin Robotics)
Team Role: Programmer
 
Join Date: Jan 2006
Location: Ohio
Posts: 16
Kyveck is an unknown quantity at this point
Re: CMUcam default code not responding

I ran the serial port diagnostic tests. In loopback mode, terminal input was not echoed. When connected to the camera, there was no responce. I am confident that I configured everything per the ReadMe file.

When I ran debug, the following was printed to the terminal:
Camera: Initialized abnormally with code 131
Camera: Initialization state = 1
Camera: Initialization state = 2
Camera: Initialization state = 3

I hope to test the TTL to RS232 board soon using the ifi instructions.
Thank you for your help.
Kyle W
  #6   Spotlight this post!  
Unread 17-01-2006, 10:46
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: CMUcam default code not responding

Quote:
Originally Posted by Kyveck
I have spent quite a bit of time trying to get this to work, and I suspect some kind of configuration problem. I'm hoping that if I list everything, someone might be able to see what's wrong.

frc_camera_s, using compiled .hex that was in the download
CMUcam2 connected via TTL port to RC
2006 RC tethered to 2006 OI
tilt/pan servos connected to RC pwm1,2
RC pwm to CMUcam2 power
jumpers on pan reverse, oscillator connect, internal power to servos
DB-9 serial from RC program port to laptop via USB to Serial converter
12 volt and 7.2 volt batteries fully charged
One thing you didn't list is whether or not you still have anything plugged into the DB-9 on the CMUcam board. If the computer is still connected there, it'll interfere with the RC-to-camera communication.
  #7   Spotlight this post!  
Unread 17-01-2006, 13:10
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: CMUcam default code not responding

Quote:
Originally Posted by Kyveck
I ran the serial port diagnostic tests. In loopback mode, terminal input was not echoed.
This indicates that your TTL-RS232 converter board, cable, or the TTL serial port port itself is messed-up. To discount the TTL serial port as the source of your problem, remove the converter board from the TTL serial port and short the RX and TX pins with a piece of wire, jumper block etc. See the attached file to identify the RX and TX pins. Once you've done that, reload the serial port diagnostics and perform test one, the loopback test. If you get characters echoed back to the terminal, your problem is either the converter board or your cable. Remove the jumper and plug the converter board back in and short the two upper pins that connect to the red and white wires. Perform the loopback test again. Do you get the characters echoed? If not, your converter board is toast. If you do get echo, your PWM cable is bad.

-Kevin
Attached Files
File Type: pdf TTL Serial Port.pdf (44.3 KB, 67 views)
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #8   Spotlight this post!  
Unread 17-01-2006, 19:44
Kyveck Kyveck is offline
Registered User
FRC #1014 (Dublin Robotics)
Team Role: Programmer
 
Join Date: Jan 2006
Location: Ohio
Posts: 16
Kyveck is an unknown quantity at this point
Re: CMUcam default code not responding

Of course, the DB-9 serial was not connected from the camera to computer. I feel like whacking myself in the head; the problem was the pwm cable. We didn't think to check it because it was brand new and unabused. We also found that I had misplaced the oscillate jumper to accidentally short user i/o 5v+ and ground when I was working on it this morning, which caused a lot of trouble as we tried to figure out how the camera didn't have enough power. Finally we noticed that the servos were only powered when the camera was off, which gave away the problem. Thanks again for the help and the great code.
Kyle W,
1014 Controls Team
  #9   Spotlight this post!  
Unread 18-01-2006, 00:41
jaustin jaustin is offline
Registered User
AKA: Jeff Austin
FRC #2930 (The Taterbotz)
Team Role: Mentor
 
Join Date: Dec 2004
Rookie Year: 2005
Location: Snohomish, WA
Posts: 33
jaustin is an unknown quantity at this point
Re: CMUcam default code not responding

Hi Kevin,
We are having the same issue (failing in State 3) - something probably amiss with our camera to RC communication. The readme file for the diagnostic files says it's only for the full sized controller. We are still messing with the EDU until we get our full system running. Any tweaks I can do to get the diagnositcs to work with the EDU?
  #10   Spotlight this post!  
Unread 18-01-2006, 01:00
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: CMUcam default code not responding

Quote:
Originally Posted by jaustin
Hi Kevin,
We are having the same issue (failing in State 3) - something probably amiss with our camera to RC communication. The readme file for the diagnostic files says it's only for the full sized controller. We are still messing with the EDU until we get our full system running. Any tweaks I can do to get the diagnositcs to work with the EDU?
Grab a copy of the edu_serial_ports.zip file from my website and modify the EDU Process_Data_From_Master_uP() function to look like the same function in the diagnostics package. I think that's all you'll need to do.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #11   Spotlight this post!  
Unread 19-01-2006, 00:59
jaustin jaustin is offline
Registered User
AKA: Jeff Austin
FRC #2930 (The Taterbotz)
Team Role: Mentor
 
Join Date: Dec 2004
Rookie Year: 2005
Location: Snohomish, WA
Posts: 33
jaustin is an unknown quantity at this point
Re: CMUcam default code not responding

Quote:
Originally Posted by Kevin Watson
Grab a copy of the edu_serial_ports.zip file from my website and modify the EDU Process_Data_From_Master_uP() function to look like the same function in the diagnostics package. I think that's all you'll need to do.

-Kevin
Hi Kevin,
I got the diagnostics to run on the EDU, thanks. We pass the loop back test so we know the RS232 converter and cable are good. We don't pass the second diagnostic test. Your notes say we either have our camera misconfigured or it's a bad camera. The baud is set to 115200 (no jumpers). Are there other config items we need to check?

I even went into the EDU version of serial_ports.c and changed the SPBRG2 = BAUD_115200; and XSTA2bits.BRGH = 1; thinking that might be the anwer but it did not help.

You must be swamped! Thanks for your efforts Kevin!
  #12   Spotlight this post!  
Unread 19-01-2006, 13:53
Ryan O's Avatar
Ryan O Ryan O is offline
FRC Eclipse Plug-in Developer
no team (FRC Eclipse)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Plaistow
Posts: 111
Ryan O is an unknown quantity at this point
Send a message via AIM to Ryan O
Re: CMUcam default code

I just uploaded the default "bells and whistles" code to the robot. The prgram state and code error LEDs are flashing red. Any help would be great.
  #13   Spotlight this post!  
Unread 19-01-2006, 15:51
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: CMUcam default code

Quote:
Originally Posted by Ryan O
I just uploaded the default "bells and whistles" code to the robot. The prgram state and code error LEDs are flashing red. Any help would be great.
If you're using a USB to serial converter, try to find a PC with a real serial port and try it again.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #14   Spotlight this post!  
Unread 19-01-2006, 15:57
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: CMUcam default code not responding

Quote:
Originally Posted by jaustin
Hi Kevin,
I got the diagnostics to run on the EDU, thanks. We pass the loop back test so we know the RS232 converter and cable are good. We don't pass the second diagnostic test. Your notes say we either have our camera misconfigured or it's a bad camera. The baud is set to 115200 (no jumpers). Are there other config items we need to check?
Have you tried the camera with the LabVIEW software? If so, did it work?


Quote:
Originally Posted by jaustin
You must be swamped!
Yep, the help desk is pretty busy these days <grin>.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #15   Spotlight this post!  
Unread 19-01-2006, 23:01
jaustin jaustin is offline
Registered User
AKA: Jeff Austin
FRC #2930 (The Taterbotz)
Team Role: Mentor
 
Join Date: Dec 2004
Rookie Year: 2005
Location: Snohomish, WA
Posts: 33
jaustin is an unknown quantity at this point
Re: CMUcam default code not responding

Quote:
Originally Posted by Kevin Watson
Have you tried the camera with the LabVIEW software? If so, did it work?
Yes, it worked fine with LabView using the DB9. I have all the calibration numbers for tracking an orange traffic cone to get us started (our green light is not assembled yet!). I guess that would narrow it down to the camera's 3 pin RS232 port? That does not seem very likely. I'll keep playing...
Closed Thread


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
Out of the Box Camera Code russell Programming 9 21-10-2009 05:28
Best Way To Insert Autonomous Code Into Default then load help.? :-)? gemccnp Programming 2 05-02-2005 18:58
default code vs. 2.4 stephenthe1 Programming 2 05-02-2005 18:02
Team THRUST - Kevin's Code and Camera Code Combine Chris_Elston Programming 3 31-01-2005 22:28
heres the code. y this not working omega Programming 16 31-03-2004 15:18


All times are GMT -5. The time now is 11:33.

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