Page 1 of 1

IR Wiring

Posted: 30 Apr 2011, 15:26
by fuzzball27
Hello again!
I have an IR transmitter hooked up to my NXT
Photo on 2011-04-30 at 11.23 #2.jpg
I am running a very simple program to turn the transmitter on and off:

Code: Select all

task main () {
	SetSensorLight(IN_1);
	while (TRUE) {
		SetSensorType(IN_1, IN_TYPE_LIGHT_ACTIVE);
		Wait(1000);
		SetSensorType(IN_1, IN_TYPE_LIGHT_INACTIVE);
		Wait(1000);
	}
}
To ensure that the transmitter is working, I am using my phone camera. Indeed, the transmitter is working, but it is not turning off...
Does anyone know why this might be?

Re: IR Wiring

Posted: 30 Apr 2011, 15:28
by fuzzball27
I have tested the program with my Light sensor, and it does work, meaning this is a hardware problem.
Any ideas?

Re: IR Wiring

Posted: 30 Apr 2011, 18:47
by mattallen37
How is it wired?

Re: IR Wiring

Posted: 30 Apr 2011, 20:46
by fuzzball27
Green 4.3V wire --> IR Transmitter --> 560 Ohm Resistor --> Ground (Red)

Re: IR Wiring

Posted: 30 Apr 2011, 21:50
by mattallen37
The green one is always powered (when the NXT is on). It is the sensor supply voltage.

Pin 5 (yellow) is the control pin used for the light sensor. It is turned on and off to control the light. You should use a transistor to handle the power though.

Re: IR Wiring

Posted: 01 May 2011, 18:40
by fuzzball27
Thanks! I'll give it try :D

Re: IR Wiring

Posted: 01 May 2011, 19:34
by fuzzball27
It's working great! Thanks for the help.

Re: IR Wiring

Posted: 02 May 2011, 17:04
by mattallen37
Cool!