Unresponsive camera

Earlier today before we started working we just hooked up the camera to show people how the tracking worked. It was working fine but the calibration for yellow was a bit off so I decided to get a new exposure value for yellow. I (eventually) got it, and put the new exposure value in, loaded the code and ran it, but I was getting the blinking red PWM lights and “Camera is not responding” message in the Terminal window. The strange thing is that the camera has power (the lights come on) and if it isn’t at its standard position its servos move it back.

I immediately figured the backup battery was low so I checked and it was okay, I then checked my connections, opened the camera case and checked its connections, and everything was in order.

I was stumped so I looked back at the code and noticed the lights are supposed to blink if:

(note: this is from the default code)


case 1:
      if (camera_init(64,85,50))  // Set the 3 exposure values yellow, green and red
      {
        cam_state_flag = 2;
        Pwm1_red = Pwm2_red = Relay1_red = Relay2_red = 0; 
      }
**      else
      {
        cam_state_flag = 4;   //Issue continual retries until camera responds
        delay = 19;           //Set delay for 1/2 sec (26.2ms * 19 = ~.5s)
        Pwm1_red ^= 1;      //Flash All Color LED Indicators when camera is not responding
        Pwm2_red ^= 1; 
        Relay1_red ^= 1; 
        Relay2_red ^= 1; 
      }

**

I concluded that there must be something wrong with the exposure values, so I loaded the default code and got the same problem. I then figured it must be something wrong with the hardware, and since the servos and power were working then it must be something wrong with the TTL serial connection. I checked the connection with the ohmmeter and tried changing the wire between the adapter and the camera and nothing works!

My question is, what could have happened when I went to calibrate the camera?? Does the camera save the exposure values on its hardware somehow? Does anyone have any other ideas?? Please?!?!?

Thank you!

Does your camera work with the GUI?
Cause if it doesn’t, we have the same problem and cant figure it out. I think it has nothing to do with values you entered in the code, because we never entered any values and still the camera didn’t work.
I’ll be 2morrow testing the camera on another bot in another team workshop and pm you if i figure somthing out.
Catch ya later.

Yeah it works with the GUI just fine… I still appreciate any input though. But for your problem, did you leave the TTL serial cable from the processor plugged in to the camera when you tried to use the GUI? That’s the general thing that makes it not work I think if for whatever reason you can’t calibrate.

We are having somewhat the same problem with our camera. The camera works fine with the GUI (takes pictures and calibrates correctly). The camera’s demo mode also works fine with the servos mounted. The backup battery is charged and all cables have good connections.

We are using the default code version 2.4 and the master software version 10 with no changes.

Each time we reload the default code we get a print statement in the feedback window that says “Camera not found- check power and connections.”

We think there could be a problem with the TTL-RS232 converter because that is the last thing left to check and we do not really know how to check if that is converting the code correctly.

Ok we were positive the TTL 232 was the problem and we checked it with the oscillator and everything, then in the process of testing other things out the servos also stopped working. So yeah now our team needs to order a new camera. What a nightmare this little thing has become…

no just a little pain, i think that we should take a hammer to it, :rolleyes: that always works for mechanical

OK well I feel better that we’re not the only ones with this problem.

Summary: camera works fine connected to a PC. Battery power good. All cables good. Still doesn’t work although it did work at least once while on the bench but not while on the robot now.

During testing one of two things happened. All the Red PWM lights blinked which means the camera_init failed and about every half second you get the check the cables message. This means the camera_state_flag made it to at least 1.

However most of the time it never made it that far. Got the IFI Initialized message and the joysticks worked, which means the user loop is processing however, there was no camera not found or blinking red lights on the OI. This means that it never made it to camera_state_flag ==1.

Has this happened to anyone else??

The part I can’t quite figure out is how camera_state_flag ==1 doesn’t happen. But here are my thoughts:

There is new Serial_Write function which uses buffered writing unlike the printf function. (I could be wrong on that, it is what I thought I read somewhere) there is also the wait_for_data function, which may be doing a buffered read. Either way the question is what happens if they fail or time out or whatever they do. This leads me to suspect that the problem is the serial communication at the root of our troubles. So trouble shooting continues by re-verifying everything.

The only component that we didn’t know how to test was the TTL-232 board. Magically IFI posted instructions on how to test the TTL serial and the TTL-232 board TODAY! :slight_smile: It is on the ifirobotics CMUCam2 page. The document is here:

Haven’t tried it yet but I believe it to the only part left to be a problem.

I posted a question to IFI in their forum about a replacement or extra TTL-232 board. The may have run out since you cannot purchase a CMUCam through them via their website today. You could a few days ago. Perhaps there is a note in the Team update today.

I may try some additional debugging code to se the history of the camera_state_flag and the delay. camera_state_flag gets set to 1 after the inital delay processed by camera_state_flag ==4.

case 4:
      if (delay)
        delay--;
      else
      {
        cam_state_flag = 1;
      }
      break;

I want to change the

 if (delay)

to an open ended condition such as:

case 4:
      if (delay>=delaycount)
        delay++;
      else
      {
        cam_state_flag = 1;
        delay = 0;
      }
      break;

Need to define a static variable for delaycount and change the case for case 0 and 1. This just seems a bit more robust. BTW this code is all in user_routines.c/Process_Data_From_Master_uP

Please let us know if anyone can come up with a solution for this issue as a whole.

We’re having the same problem as you…

but following the procedures of the document .pdf for testing the TTL 232, we evidenced that the TTL port and the TTL 232 don’t have any problem. But, when we reloaded the default code 2.4, the camera continues to not be found. Maybe the problem is not the TTL :confused:

We’re really confused right here

:slight_smile: We have conducted the prescribed test as well and found that the TTL-232 board was working.

:frowning: Yet we continued to find that we had the camera not found problem.

We also discovered a few other things:

The trigger on the joystick attached to port 2 was not functioning. This explains why on occasion it would NOT give us the “camera not found error” but the lights on the OI to indicate which color to track would not change.

Currently, the camera is working with the robot on the bench in the workshop area.

:confused: However, I still don’t know why it is working.

When we started testing on the bench it was NOT working.

We retested every thing again including the TTL-232 board. All ok, still it didn’t work.

:smiley: Then it did work.

The current hypothesis is that it is a problem in the connectivity. Each end is just fine but the connection is tenuous in between. It could be a loose connection or it could be RF interference with the power system based on the routing of the signal wire to the power distribution system.

It is frustrating because its working and I don’t know why!

INCREDIBLE!!!

Here, in a desperated act, we turned the camera on the 2004 RC (It haves a TTL port), by updating the firmware and downloading the 2.4 code. It works.

So we tried to do everything by the beginning with the 2005 RC, downloading the 2.4 code clean on the IFI webpage, updating the firmware again, and then… TADA!! :yikes: THE CAMERA NOW IS WORKING!! Our team is very happy now. :smiley:

I think that do everything by the beginning can help the teams with this problem.