Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   IR Beacon/reciever not working... still... (http://www.chiefdelphi.com/forums/showthread.php?t=24520)

Ferazel2001 29-01-2004 20:17

IR Beacon/reciever not working... still...
 
We built the IR unit, Then wired the reciever, then fixed both of them, and uploaded the program on Kevin.org but the setup is STILL not working.

Has anyone else had problems?
Can someone upload a picture of the setup, Top/bottom of a working reciever/transmitter and what code you used?

Thanks,
Devon

SeanCassidy 29-01-2004 20:46

Re: IR Beacon/reciever not working... still...
 
Make sure (for testing) you use tracking.zip instead of navigate.zip. I heard it can create problems. So try the tracking one.

DanL 29-01-2004 23:50

Re: IR Beacon/reciever not working... still...
 
Yes, start with tracking.zip

If your setup is fine, tracking.zip should make your servos go from left to right constantly until they catch the light. If they aren't moving after you load tracking.zip, then...

1. Check your wiring.
1a. Make sure the proper pins of the receiver are connected to the proper pins of the pwm wire (check the usfirst.org pdf)
1b. Check to make sure each of the receivers are plugged in to the correct Digi-input. If memory serves me right, IR_1 -> int01, IR_2 -> int02 IR_3 -> int04 IR_4 -> int05 (where IR_1 is left on left servo) - note the skipping of int03
1c. Check to make sure the servos are plugged in to the correct PWM-out (check the code)
1d. Do you have the backup battery charged and hooked up? The servos don't run without it.

2. Troubleshoot the receivers
2a. Turn the beacon off. Do the servos move then? If no, the problem is with your wiring. If yes, the problem lies with the setup of the receivers
2b. Check for reflections
2c. Bring your beacon down to 2 or 1 emitter LED
2d. Ambient light (see Kevin's faq)
2e. Receivers 'shotgunned' enough?

That should be enough to get you started. The purpose of the tracking code is to get your setup working - if the tracking code doesn't work, go back and refine your physical setup. When you get that to work, go to navigate.zip. I personally found that testing the nav code on blocks was a waste of time... you need to have the robot moving on the ground to have the code work.

Team981 30-01-2004 01:15

Re: IR Beacon/reciever not working... still...
 
FIRST made a mistake in the original detector diagram by reversing the 5 Volts and the Signal lines that was corrected in the afternoon of 1/29. Unfortunately for my team we blew up a detector before figuring to check Vishay's specs. Make sure that if you are looking at the detector from the front bulbed portion of it that it's wired from left to right as follows:

White/yellow | Black | Red

Also a simple code attached to the end of user_routines_fast.c in the portion that executes every loop on the EDU-bot RC can test whether your receiving or not. an example follows.

if (rc_dig_in01 != 1)
txdata.rc_pwm08 = 0;
else
txdata.rc_pwm08 = 127;

This causes a motor on PWM 8 to move when the detector finds an infrared signal. Rudimentary and crude it may be but it worked for our team. You can change this to suit your available PWM spaces and Digital inputs.

capenga 30-01-2004 05:41

Question...
 
How can i see the distance between the receiver and the transmitter??
I've read all the programs, but I didn't understand how can I do it. If someone knows, please help.

Thanks! :D

deltacoder1020 30-01-2004 08:38

Re: IR Beacon/reciever not working... still...
 
the sensors don't directly measure distance - if you want to find that, you'll have to use something called parallax - that is, using the two angles of the sensor servos, plus the known distance in between them, to calculate the missing sides of a triangle, and thus know the distance.

Ferazel2001 30-01-2004 09:22

Re: IR Beacon/reciever not working... still...
 
Quote:

Originally Posted by Team981
FIRST made a mistake in the original detector diagram by reversing the 5 Volts and the Signal lines that was corrected in the afternoon of 1/29. Unfortunately for my team we blew up a detector before figuring to check Vishay's specs. Make sure that if you are looking at the detector from the front bulbed portion of it that it's wired from left to right as follows:

White/yellow | Black | Red

Also a simple code attached to the end of user_routines_fast.c in the portion that executes every loop on the EDU-bot RC can test whether your receiving or not. an example follows.

if (rc_dig_in01 != 1)
txdata.rc_pwm08 = 0;
else
txdata.rc_pwm08 = 127;

This causes a motor on PWM 8 to move when the detector finds an infrared signal. Rudimentary and crude it may be but it worked for our team. You can change this to suit your available PWM spaces and Digital inputs.

Er, someone probly said this somewhere else, but I still havent found it. What PWM port does the Beacon go in on the EDU RC?

Also, We the program for the competition RC set up so it printf's digitalIO's current value, (if it changes). Our value goes from 260± 40 to 400± 50. Do all of the digital inputs always do this?

deltacoder1020 30-01-2004 12:21

Re: IR Beacon/reciever not working... still...
 
i believe beacon type 1 is on pwm1, and beacon type 2 is on pwm 2, but I may be incorrect.

as for printf, make sure you're casting the value to (int) before you pass it to printf - otherwise you'll get a printed value that's 256 times the true value of the unsigned char variable.

Team981 30-01-2004 12:34

Re: IR Beacon/reciever not working... still...
 
1 Attachment(s)
If using the EDU rc the program contained in beacon.zip (attached) you should connect the beacon to PWM 1 or 2. Each provides a different frequency for homing onto.
Now regarding the issue with your printing values I'm not sure whats going on there as I'm new to C so somebody else will need to answer that one, Sorry.

Damian Manda 30-01-2004 23:34

Re: IR Beacon/reciever not working... still...
 
Yes, we have been having problems too.

We have set up our system with the proper code running on both the EDU and Full-Size RC, the beacons wired correctly and the detectors hooked to the correct pins. We know that the beacon is emitting infrared, since we can detect it with a learning remote. When the bacon is off, the remote says "No Infrared Detected." We need to figure out if the beacons are somehow emitting the wrong waveforms/frequencies, or if our detectors are just faulty (we have tried more than one). We have hooked the sensors to various inputs, and even wired it to an LED, to no avail. Is there any way to do this without an oscilloscope or other expensive instrument that we do not have? We have everyone that knows anything about the code and infrared stumped, even the engineers. Any hints on other things to test or try?

--Damian Manda

tml240 30-01-2004 23:45

Re: IR Beacon/reciever not working... still...
 
we have problems with Receiver only.....we tried to increase the voltage....increase power...we left the code tho... anyone actually tried the electrical side to this problem?

Ferazel2001 31-01-2004 12:22

Re: IR Beacon/reciever not working... still...
 
Oops, Did I say port? I ment what PINS do the PWM cables connect too, cause PWM's on the new EDU RC are no longer 3 pins, now they are four. how are we supposed to connect them? are they the 3 pins farthest away from the center?

Matthew_H 31-01-2004 13:08

Re: IR Beacon/reciever not working... still...
 
Quote:

Originally Posted by Ferazel2001
Oops, Did I say port? I ment what PINS do the PWM cables connect too, cause PWM's on the new EDU RC are no longer 3 pins, now they are four. how are we supposed to connect them? are they the 3 pins farthest away from the center?

You will notice on the pwms there is pin that will tell you where to put the black side of the cable.

Ferazel2001 31-01-2004 14:07

Re: IR Beacon/reciever not working... still...
 
Quote:

Originally Posted by Matthew_H
You will notice on the pwms there is pin that will tell you where to put the black side of the cable.

well, thats what we thought. thanks for confirming.

Ryan Cumings 31-01-2004 22:24

Re: IR Beacon/reciever not working... still...
 
Quote:

Originally Posted by Damian Manda
Yes, we have been having problems too.

We have set up our system with the proper code running on both the EDU and Full-Size RC, the beacons wired correctly and the detectors hooked to the correct pins. We know that the beacon is emitting infrared, since we can detect it with a learning remote. When the bacon is off, the remote says "No Infrared Detected." We need to figure out if the beacons are somehow emitting the wrong waveforms/frequencies, or if our detectors are just faulty (we have tried more than one). We have hooked the sensors to various inputs, and even wired it to an LED, to no avail. Is there any way to do this without an oscilloscope or other expensive instrument that we do not have? We have everyone that knows anything about the code and infrared stumped, even the engineers. Any hints on other things to test or try?

--Damian Manda

We were fortunate to have not only one but two o-scopes lying around to see the waveforms for both the beacon and detectors. They both are exactly right. Type-1 Beacon causes the detector to go low for 1 ms, Type-2 for 2 ms.

We tryed with the tracking code and traced the problem all the way back to the digital inputs. Tonight I'm going to have a looksey to figure out what may cause the digital inputs to not work. (Note: if you hook up the detector this should keep the signal set to high as long as it doesn't see the beacon).

EDIT: Hmmm.... Maybe I'm wrong and that's why we are having trouble. Looking at the schematics and everything and maybe the input is 1 when the signal goes low. Test for tommorow I suppose.


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

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi