Wiring the IR Receiver

I know this has been discussed before, but I am curious about the voltage requirements of the IR Receiver. The documentation states that it requires between 7 and 15 volts of power. For the sake of reducing wiring and the use of expensive PWM cables, I proposed that the entire board be powered off of two pwm cables. Basically we would have one cable sitting sideways across Digital Inputs 14 - 16. It would cover all of the signal pins on these Digital Inputs. The second cable would be on Digital Input 17. This would have the ground, +5V, and Signal. The ground would be connected to the ground, the +5V would be connected to the power. The 4 other wires would each be connected to a signal pin.

I have tested the IR sensor with my bench top power supply and it was able to operate all the way down to 3.5 Volts.

Does anyone see any problems with setting the sensor up like this? The electrical advisor wants to pull power off a of a PWM, but I am trying to reduce the wiring and keep everything organized.

Just run the power and ground to the small fuse block and you are good to go.

That is all you have to do to power it.

I see that we could power it via a fuse block, however, I am trying to do everything through the two PWM cables to help avoid the rat’s nest of wire that we commonly have around the RC.

I am just questioning if anyone sees an issue supplying the sensor 5 Volts instead of the 7 - 15 which is recommended. Also, I’ve noticed that there is a 5 Volt Regulator on the board, so this leads me to further believe that 5 Volts is an acceptable supply voltage for the sensor.

We just got our IR receiver working yesterday, although it didn’t work for signaling the controller at first since we used a separate 9v battery and the controller thought that it was always receiving a signal (something about a floating ground was the explanation… o_0). But once we connected both power and ground pins from the receiver to the digital input’s power and ground, the board worked fine with no power problems. I wouldn’t guarantee it to work with only one power and ground pin connected, but it might… Maybe they just said seven volts to guarantee that the board will work, or having two sources of 5v power allows the board to draw enough current to power itself since it has two places to draw from.

Here is what we did…

We hooked it to the 12V BUSS fuse panel and then through another inline fuse holder that is rated at .75 of an AMP. For connecting it to the Digital I/O, we cut off one of the ends of the old LED competition lights (Please don’t cut the one from this year). It has 4 wires, and you need 4 wires, so it works perfectly. I think the last ones were shipped in 05’ and maybe 06’ but I don’t remember.

A 78XX regulator reuires a minimum of 2 volts across the device for operation. If you feed the regulator with 5 volts, the output will be 2 volts below that which is not enough for the devices to reliably operate and my be so low as to trigger the power function of the controller. The 7 volt minimum satisfies the 5 volt regulator and it is designed to work up to a fifteen volt input. So the specs have more to do with the 7805 then with the operation of the board itself. Although you could run it off a PWM the power there is coming from the 7.2 volts backup battery. I would go as recommended, attach to a breaker and the main power, +12.

I would definitely use 12V. If you use the 7.2V backup battery, you are only giving yourself a leeway of 1/5 of a volt (our backup battery was dead… around 6.5V). I believe under-volting the IR board can cause it to fail, as was in our case. The programming within our PIC controller failed. If you put it on a 12V circuit, you give it a 5V leeway, which is pretty good.

We just took the digital in/out and bridged 14 and 15 ground and power to our IR board and it was working with no problems (and this way your nor running off of your backup and your still giving the board 10 volts… also minimizing wire runs)

How did you “bridge” the connection? Did you tie two +5 together, and the two GNDs together or did you do GND, +5 to GND, +5? Either way should not work, and the second way mentioned will short out the +5V strip. The first way would still only give you +5V. I think you are saying you did it the 1st way.

The first way is a parallel circuit. It will not increase and will not decrease the voltage. In this certain case, it will also not increase the amount of current.

What you should have is a series circuit, which WILL NOT work with the RC. This would have two power sources… You take the negative of ES1, tie the positive from ES1, and tie it in with the negative of ES2, and then take the positive of the ES2 (ES1 = energy source 1, ES2 = energy source 2). You get the voltage by adding the voltage of each energy source. (Say you have 2 7.2V batteries, and you hook them in series, then you would have 14.4V.)

Parallel circuits are completely different. The current changes, and the voltages should be an average of the energy sources (I have a 6V and a 12V battery, and put them in parallel [Bad idea by the way, don’t do this] then the voltage should be around 9V.) As for the current, if you have 2 12V 17AH batteries put in parallel, it should make the output current 12V and 34AH.

So, to make this concise…
Parallel = adds more current
Series = adds more voltage

If it is working fine, then do what you wish. All I am saying is that we tried it with the 7.2V backup battery and killed ours. Check your voltage with a multimeter to see if you are actually getting 10V, because I really doubt you are.

Ok i will check the voltage tomorrow at the shop but ours was working perfectally fine running off port 14 and 15 of the RC

Unfortunately this is not the case. The six volt battery voltage would rise slightly during the time the 12 volt battery would be able to supply it current. The 12 volt would continue to try and dump current until it fell to 6 volts as well. If both batteries were fully charged to begin with, all the excess current would be turned into heat likely destroying the batteries or at least causing some nasty venting.
In the case of the 12 volt batteries in parallel, one will always be slightly higher voltage than the other. This condition will cause current flow between each of them as they ping pong trying to deliver current to the lower voltage battery. Without diodes directing current flow, the two batteries, over time will deplete each other right down to zero volts.

The way you hooked up the power will work until the backup battery falls below the 7 volt cutout on the regulator. At that point the regulator is no longer functioning and acts more like a resistor. It may work for a while but may not be reliable.

Interesting fact I did not know about 2 of the same voltage batteries depleting each other…
And I was pretty sure that there would be some nasty venting if one were to try to parallel 2 different voltage batteries (hence the reason I said not to try this :D).
Also, Brent said that he was using the Digital I/O port to supply power, which is a regulated +5V from the main 12V battery. It does not rely on the backup battery.

Yes, you are right. I shouldn’t answer before coffee. The effect would be the same, unreliable operation.

You can try wiring a 0 ohm resistor in parallel with the voltage regulator, there should be two soldering spots next to the regulator on the right that you could use to bypass it with.

Please note the schematic found here…
has a note in the upper right hand corner. Use the zero ohm jumper only if you remove the regulator.

We’re having a problem, we get a response from the IR board saying that the digital input has a value of 1 when it should be a 0. What should we do?

Make sure you are using either the 12 volt robot battery or the digital input power pins (which use the robot battery), otherwise the signal is not being grounded properly.

Under the online window it changes from 0 to 1 when the button is pressed, but when the actual program is downloaded it retains the value of 1.

Online window??? Anyway, here is the code we’re using. It has some safety built in, and shows the state on the OI.

//Variables should be declared at the beginning at the program
int mode = 0; //Set it to zero so the robot won't move!
int modea;
int irerror;
int errorloop;

//Switches off all the LEDs on the OI
Switch1_LED = 0;
Switch2_LED = 0;
Switch3_LED = 0;
Relay1_red = 0;
Relay2_red = 0;
Relay1_green = 0;
Relay2_green = 0;
Pwm1_green = 0;
Pwm2_green = 0;
Pwm1_red = 0;
Pwm2_red = 0;
/*The following code will check to make sure the IR sensor is not malfunctioning, 
or it is not disconnected, as no more than one button can be triggered at a time.*/
mode = 0; //If there is no signal from the IR board later in the code, then disable the robot
irerror = 1;
if ((rc_dig_in03 + rc_dig_in04 + rc_dig_in05 + rc_dig_in06) < 3) 
	irerror = 0; //Tells the disable program that there is no error detected
	if (rc_dig_in03 == 1)
		modea = 1;	//Set to Mode 1 (1st button)
	if (rc_dig_in04 == 1)
		modea = 2;	//Set to Mode 2 (2nd button)
	if (rc_dig_in05 == 1)
		modea = 3;	//Set to Mode 3 (3rd button)
	if (rc_dig_in06 == 1)
		modea = 0;	//EMERGENCY STOP (4th button)
	mode = modea;
//The following are the certain autonomous programs
//Each mode acts like a different program.  

if (mode == 1) //Mode 1
	printf("Mode 1 %d\r");
	Switch1_LED = 1;
//Put your custom programming here, this will execute when the first button is pressed			

if (mode == 2) //Mode 2
	printf("Mode 2 %d\r");
	Switch2_LED = 1;
//Put your custom programming here, this will execute when the second button is pressed

if (mode == 3) //Mode 3
	printf("Mode 3 %d\r");
	Switch3_LED = 1;
//Put your custom programming here, this will execute when the third button is pressed


//Leave the following code at the very end of the autonomous cycle, so it is sure to execute when and if it is needed.
if (mode == 0) //EMERGENCY STOP
	printf("Mode: Disabled %d\r");
	pwm01 = pwm02 = pwm03 = pwm04 = pwm05 = pwm06 = pwm07 = pwm08 = 127;
  	pwm09 = pwm10 = pwm11 = pwm12 = pwm13 = pwm14 = pwm15 = pwm16 = 127;
	relay1_fwd = relay1_rev = relay2_fwd = relay2_rev = 0;
	relay3_fwd = relay3_rev = relay4_fwd = relay4_rev = 0;
	relay5_fwd = relay5_rev = relay6_fwd = relay6_rev = 0;
	relay7_fwd = relay7_rev = relay8_fwd = relay8_rev = 0;	
	//The following code shows all the red lights
	//on the OI to tell the drivers that the autonomous
	//has been disabled
	Pwm1_red = 1;
	Pwm2_red = 1;
	Relay1_red = 1;
	Relay2_red = 1;
	if (irerror == 1) //If the IR has an error, then flash
		printf("IR Sensor Problem, Check connection %d\r");
		if (errorloop > 5)
			Pwm1_red = 0;
			Pwm2_red = 0;
			Relay1_red = 0;
			Relay2_red = 0;
		if (errorloop > 9)
			errorloop = 0;


I think I took all of our personal, never to be seen code out, and I think I have all the variables declared in the beginning. I give the right for any team to use this, and I give no warranty. If it does not work, you can PM me, and I can try to help. I will not help with any of your personal programming though.

PS: We have tried this on our robot, and it works great! So I encourage any teams that aren’t very programming savvy to try to use this to at least do something.

we have easy c, so if anyone could help then it would be appreciated.