Go to Post This is a community that builds people as well as knowledge. - Karibou [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
  #16   Spotlight this post!  
Unread 09-03-2008, 21:56
writchie writchie is offline
Engineering Mentor
AKA: Wally Ritchie
FRC #2152 (Team Daytona)
Team Role: Coach
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Daytona Beach, Florida
Posts: 148
writchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond repute
Re: New Infrared Remote Control Software

Beware of Differing Pinouts on Vishay IR Sensors.

There are different versions of the Vishay sensors in Identical packages.
The TSOP48xx family is one that works as documented with Gnd on Pin 2.
However, the TSOP322 family, which is arguably better because of its 2.7 - 5.5V power supply range, has ground on pin 3 and power on pin two. This is
reversed from TSPO48xx family.

IF YOU USE A TSOP322XX FAMILY SENSOR AND FOLLOW KEVIN'S DIAGRAM
YOU WILL INSTANTLY FRY THE SENSOR.

Good practice is to always make sure you have a datasheet for the actual
device you are using and double check the connections.
  #17   Spotlight this post!  
Unread 09-03-2008, 22:19
writchie writchie is offline
Engineering Mentor
AKA: Wally Ritchie
FRC #2152 (Team Daytona)
Team Role: Coach
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Daytona Beach, Florida
Posts: 148
writchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond repute
Re: New Infrared Remote Control Software

Quote:
Originally Posted by gauntletguy View Post
would it be possible to wire multiple sensors together?
Short answer is yes. The output is a transistor with a 30K pullup. It should
remain well within spec with 3 additional identical devices plus the current
sourced from the Robot Controller. So you should be able to have a total
of 4 sensors on one input. (You could probably have several more but then
you will be outside the 250mV max output low voltage specification.

Beware, however, that you be subject to interference from any sensor
which may prevent your desired signal from getting through. An interfering
signal on the same carrier frequency being received from any of the sensors
will interface will all sensors.

A more robust approach would be to use separate interrupts for multiple sensors
f you have the available interrupts (from 3 to 6). This way, an interfering signal being received from one sensor will not mess up the signal
being received at the other sensor. You will need to modify the code to
share a timer.
  #18   Spotlight this post!  
Unread 09-03-2008, 22:29
writchie writchie is offline
Engineering Mentor
AKA: Wally Ritchie
FRC #2152 (Team Daytona)
Team Role: Coach
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Daytona Beach, Florida
Posts: 148
writchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond repute
Re: New Infrared Remote Control Software

Quote:
Originally Posted by neoshaakti View Post
correct me if I am wrong, but isnt that IR receiver the same kind that is locating in any computer mouse?
I know that if you are using a mouse with a ball in it, when the ball turns and moves it spins a shaft. On the end of the shaft there is a disk with usually 36 slits so that an IR beam can be picked up by an IR receiver to determine the movement of the mouse.
I have a rough understanding...
yea

-Neel
IIRC a mouse uses a fairly simple interrupter. The Vishay IR receiver modules have a more complex integrated receiver that handles pulse bursts of a specified frequency and use AGC, a bandpass filer, and a demodulator to produce a very stable output pulse train. Interference is not an issue inside a (mechanical) mouse. It's a big issue for remote controls.
  #19   Spotlight this post!  
Unread 10-03-2008, 23:41
Ian G Ian G is offline
BUILD SUCCEEDED
FRC #2415 (WiredCats)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2004
Location: Atlanta
Posts: 23
Ian G is an unknown quantity at this point
Send a message via AIM to Ian G
Re: New Infrared Remote Control Software

Would it be possible to use the sensor off of the IR board instead of buying a new sensor? Thanks.
  #20   Spotlight this post!  
Unread 11-03-2008, 00:30
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: New Infrared Remote Control Software

Quote:
Originally Posted by Ian G View Post
Would it be possible to use the sensor off of the IR board instead of buying a new sensor? Thanks.
Assuming you can remove it without damaging it, it should work just fine. Here's the datasheet.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #21   Spotlight this post!  
Unread 11-03-2008, 14:10
Ian G Ian G is offline
BUILD SUCCEEDED
FRC #2415 (WiredCats)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2004
Location: Atlanta
Posts: 23
Ian G is an unknown quantity at this point
Send a message via AIM to Ian G
Re: New Infrared Remote Control Software

Quote:
Originally Posted by Kevin Watson View Post
Assuming you can remove it without damaging it, it should work just fine. Here's the datasheet.

-Kevin
Thanks, I had to check before we wasted valuable time on Thursday.
  #22   Spotlight this post!  
Unread 18-03-2008, 09:31
Ian G Ian G is offline
BUILD SUCCEEDED
FRC #2415 (WiredCats)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2004
Location: Atlanta
Posts: 23
Ian G is an unknown quantity at this point
Send a message via AIM to Ian G
Re: New Infrared Remote Control Software

I tried to make a quick fix to increase the coverage of our IR sensors by quickly adding a second interrupt and third interrupt. I knew the way I did it wasn't right, but it mostly worked enough. I was wondering what I would have to do to properly add more interrupts to the the IR code. I don't like wiring multiple sensors in parallel, because it looks like if the sensors receive signals at different times, their output pulses will interfere.

Here is what I did:

Code:
		#ifdef ENABLE_INT_3
		if(Port_B_Delta & 0x10) // did external interrupt 3 change state?
		{
			IR_Sensor_ISR(Port_B & 0x10 ? 1 : 0); // call the interrupt 3 handler (in interrupts.c or encoder.c)
		}
		#endif
		#ifdef ENABLE_INT_4
		if(Port_B_Delta & 0x20) // did external interrupt 4 change state?
		{
			IR_Sensor_ISR(Port_B & 0x20 ? 1 : 0);//Int_4_ISR(Port_B & 0x20 ? 1 : 0); // call the interrupt 4 handler (in interrupts.c or encoder.c)
		}
		#endif
		#ifdef ENABLE_INT_5
		if(Port_B_Delta & 0x40) // did external interrupt 5 change state?
		{
			IR_Sensor_ISR(Port_B & 0x40 ? 1 : 0);//Int_5_ISR(Port_B & 0x40 ? 1 : 0); // call the interrupt 5 handler (in interrupts.c or encoder.c)
		}
Thanks in advance!
  #23   Spotlight this post!  
Unread 18-03-2008, 12:42
writchie writchie is offline
Engineering Mentor
AKA: Wally Ritchie
FRC #2152 (Team Daytona)
Team Role: Coach
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Daytona Beach, Florida
Posts: 148
writchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond reputewritchie has a reputation beyond repute
Re: New Infrared Remote Control Software

Quote:
Originally Posted by Ian G View Post
I tried to make a quick fix to increase the coverage of our IR sensors by quickly adding a second interrupt and third interrupt. I knew the way I did it wasn't right, but it mostly worked enough. I was wondering what I would have to do to properly add more interrupts to the the IR code. I don't like wiring multiple sensors in parallel, because it looks like if the sensors receive signals at different times, their output pulses will interfere.

Here is what I did:

Code:
		#ifdef ENABLE_INT_3
		if(Port_B_Delta & 0x10) // did external interrupt 3 change state?
		{
			IR_Sensor_ISR(Port_B & 0x10 ? 1 : 0); // call the interrupt 3 handler (in interrupts.c or encoder.c)
		}
		#endif
		#ifdef ENABLE_INT_4
		if(Port_B_Delta & 0x20) // did external interrupt 4 change state?
		{
			IR_Sensor_ISR(Port_B & 0x20 ? 1 : 0);//Int_4_ISR(Port_B & 0x20 ? 1 : 0); // call the interrupt 4 handler (in interrupts.c or encoder.c)
		}
		#endif
		#ifdef ENABLE_INT_5
		if(Port_B_Delta & 0x40) // did external interrupt 5 change state?
		{
			IR_Sensor_ISR(Port_B & 0x40 ? 1 : 0);//Int_5_ISR(Port_B & 0x40 ? 1 : 0); // call the interrupt 5 handler (in interrupts.c or encoder.c)
		}
Thanks in advance!
From what I see above, you will still be subject to interference. All three
sensors will generate edges and if 2 or more are active at the same time
the pulse width measurement will be messed up.

One solution is to dedicate timer1 as a free running timer (which is what we
do). We use it to count 100ns clocks. It overflows every 6.5536 ms. The
interrupt for the timer increments a global "tick" which can be used for less
precise timing tasks and to tell whether overflow has occurred, i.e. more
than 6.5ms has passed.

For short interval time measurements (like the IR pulse widths) you can
store the values from the timer (and the tick) and compute the time
interval that has passed.

You need to be sure to use 16 bit read/write mode on the timer
(RD16 control bitof T1CON) and read TMR1L first followed by TMR1H.
The read of TMR1L latches the upper bits of the actual counter into
a temporary buffer so that overflow is not a concern.

You should also disable interrupts globally while reading the two timer bytes
to eliminate a race conditions. You might want to include your reading
of the current global "tick" value within the same critical section.

Hope this helps!
  #24   Spotlight this post!  
Unread 01-04-2008, 20:39
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,590
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: New Infrared Remote Control Software

We are using this software with the IR sensor in the kit. Since we had already made a nice enclosure for the IR board, we just cut the traces to the IR sensor and soldered a PWM cable per Kevin's diagram.

Once we found a remote that had the right protocol, we had no problems.
  #25   Spotlight this post!  
Unread 18-04-2008, 16:41
MattLopez MattLopez is offline
Registered User
FRC #1522 (Defenders of the Multiverse)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2005
Location: VA
Posts: 1
MattLopez is an unknown quantity at this point
Re: New Infrared Remote Control Software

Our team is currently using the IR code, but have a problem with interference when two Sony remotes are on the field. Is there anyway to set it to only respond to a specific remote control?
  #26   Spotlight this post!  
Unread 18-04-2008, 18:14
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,383
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: New Infrared Remote Control Software

Quote:
Originally Posted by MattLopez View Post
Our team is currently using the IR code, but have a problem with interference when two Sony remotes are on the field. Is there anyway to set it to only respond to a specific remote control?
One way that might get around this is to have your code only respond to a given pair of "Address" and Command". For instance, only the pair of Address = 26 && Command = 3 will cause it to take a specific action.

One thing that I noticed when playing with my Universal remote, most of the Sony devices ==> (Address), use the same Commands when the same button is pressed. So if you are just looking at Command, you may have issues.


Here is something that might also help. When you configure the remote to control a Sony Audio amplifier, it uses really odd "Command" values. ie: 63, 57, 67 for buttons like 1, 2 and 3. Also 3-9 use the same command. (This is the odd behavior I mentioned in a different thread, and we took advantage of this year. We never once had interference.)
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist

Last edited by billbo911 : 18-04-2008 at 18:28.
  #27   Spotlight this post!  
Unread 22-05-2008, 16:02
Maicon Lima Maicon Lima is offline
Registered User
FRC #1772
 
Join Date: Apr 2008
Location: Brazil
Posts: 1
Maicon Lima is an unknown quantity at this point
Re: New Infrared Remote Control Software

at?
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
Remote Control Rover Help Dominator_Legen Math and Science 7 12-02-2005 03:35
Remote Control Car SUCCESS!! arpus maximus Control System 77 10-12-2004 20:30
Manual override of compressor software control willross Pneumatics 15 18-02-2004 23:51
Remote Remote Kickoff for Southern California ChrisH Southern California Regional Robotics Forum 0 05-01-2004 12:36
Remote Remote Kick off at University High School George1902 Off-Season Events 4 04-01-2004 21:05


All times are GMT -5. The time now is 02:49.

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