IR PMW Help

Hello,

We are using 2 EDU RCs one has the edu_tracker.zip and the other one has Beacon.zip from Mr.Watson’s site. Our sensors are working fine, but the beacons we can’i see any lights when they are plugged on either PMW 1 or 2. Yes, we are looking through a camera. But when we put them on Digital O/I 1 we see the lights, but they are solid. I have checked the diagram more than 10 times and our beacons are fine. The servos keep searching but ofcourse they wont find anything because the sensor is not working. We have checked the programs in the EDU RC’s and redownlaoded them like 5 times.

Is anyone having a simmilar problem? Or is the camera not supposed to show any lights when connected to PMW 1 or 2 , because my understanding was that we see flickering lights or something to that aspect.

Thankyou in advance.

That’s a stumper!
The beacon should be on pwm1 or pwm2.
If you can see the LEDs glowing on Dig I/O 1 then your camera should be capable of seeing them at work on the pwms. They will look solid on the pwms as well, but only because your eye cannot see the 100Hz flashes.

I can only offer a few suggestions that you may have already tried.

  • Make sure your pwm cable is attached to the three pins on the “BLK” side of the connection, not the fourth pin.

  • Switch the functions of the EDU controllers you are using (beacon -> tracker).

  • You can printf the receiver.c data to see if the IR sensors are receiving any hits, or put one of your IR sensors on a digital input and printf the value it’s receiving just to check it.

  • The IR sensor won’t be able to detect the LED emissions when you’re on dig I/O 1, or at least not for very long.

double check the code, and make sure that it’s generating the pwms, and on the correct pins. (nobody’s perfect…)

As painful as it might be ( :ahh: ), make sure you read the FAQ. Are you plugging in the sensors to the correct interrupt inputs (not digital inputs)? Did you wire the sensors correctly (see the FAQ). If you don’t have a switch on digital I/O 7, make sure your beacon is plugged into PWM 2. Did you place the eye of newt under your pillow last night and then sleep with your feet on the pillow for at least 2*Pi hours (this is important)?

-Kevin

Did you purchase extra Infra-red from Innovation FIRST in case you’ve run out?:yikes:

When you say “when we put them on Digital O/I 1 we see the lights, but they are solid,” I take it you are referring to the IR emitters seen through a camera? The frequency they blink at is too fast to be detected by humans, and a camera’s viewfinder refresh rate will make it even more unreconizable. The best way to make sure your beacon is pulsing is to put a visible wavelength LED in parallel with the IR leds (don’t forget the appropriate resistor). Shake the beacon back and forth really quickly. If you observe a continuous blur, your IR emitters aren’t being pulsed. You should observe a ‘strobe effect’ - rather than the visible-wavelength LED apearing as a blur, it should apear as a series of dots. If you don’t see this, then you’re either not sending the right pulse signal (check your wiring) or your wired your transistor up wrong (FIRST origionally released a mistake with the transistor wiring - make sure you didn’t wire it according to that document).

Also, there are two different version of receiver.c. I believe the one in edu_tracker.zip is different than the one in tracker.zip - open the file up and make sure your sensors are wired appropriately.

[Edit/Shameless Plug]
I wrote a whitepaper about debugging your IR setup - http://www.chiefdelphi.com/forums/papers.php?s=&action=single&paperid=263
Check it out if you haven’t.

Thanx a lot all of you, we got it working after following some instructions here and messign around, and yes we are able to see the lights through a camera, its digital camera i dont know the refresh rate but it will be around 30/s which is not that high but still we see the lights , once again thnx all of you. As it truned out it was not the beacon but are EDU RC. :ahh:

my teams beacon works becasse we saw the leds light up through the digital camera and i loaded the tracker code and it works but when i lod navugate its says in the thing after you download it wating to drive. The thing that i am talking about is(it pops up after u downlaod a code and says alot of things

navigate was setup to run at the push of a button rather than during the autonomous mode for the kick-off demonstration. You can just push p1_sw_trig to get it to start.

You’ll have to change a couple of things to use it for competition, however:

  • Move the navigate() call from the bottom of user_routines_fast.c into the User_Autonomous() earlier in that same file.

  • In navigate.c at the top of the file change:


int Navigator_State = WAIT_TO_DRIVE;
 
to 
 
int Navigator_State = [size=2]DRIVE_TO_CENTER;

[/size]

i get one aprt of what your are telling me but i don’t get this part

  • Move the navigate() call from the bottom of user_routines_fast.c into the User_Autonomous() earlier in that same file.

i kinda get it but can u break it down a little further and wich plugs do i plug the sensors into

What to attach where is detailed in the code. There are several versions of the code, so see the comments at the top of these files for how to hook up your version.

  • receiver.c
  • tracker.c

There is also a call for a beacon selector switch on digital input 7. You can test without the switch by putting the beacon on pwm02.

To use navigate in competition you’ll also need to add in the Default_Routine() from the original default code into file user_routines.c, and you’ll need to uncomment the line that calls it in Process_Data_From_Master_uP() in that same file. The routine was dropped out of the navigate project.