Go Down

Topic: IR Remote decoding signal (Read 456 times) previous topic - next topic

Hi there,
since i cannot reply to the related old thread i need to create a new one ( & thats stupid ):
simple question ,i'm working on controlling devices with a remote and starting hacking the IR code with all the examples already written.
The only problem i'm facing is that any time i'm pluggin my receiver ( TSOP model ) and trying to simply print the received data or pulses, i only get 0 , whatever i may do.

Any advices?

_ i'm using MEGA2560, sensor supplied with 5V ( 2,2 - 5,5 v ), one pin to the gnd, last one to a digital input. I also have tried many different remotes, i still get 0 as an output signal. I dont have any other idea. Thats weird cause if i'm right, we're supposed to get a 0 when IRSignal are received, and 1 on the other case. The only thing i didnt test is putting a resistor between arduino and sensor.

thanks for your help

dc42

1. Check with a multimeter that you really do have 5V at the power pin of the sensor.

2. Post your code, schematic (hand drawn will do), and a link to the sensor datasheet.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

#2
Jan 06, 2013, 04:02 pm Last Edit: Jan 06, 2013, 04:08 pm by guillaume13200 Reason: 1
hey, thanks for your reply.
here is a link to the related datasheet
http://www.vishay.com/docs/81745/tsop312.pdf
5v are delivered, pin connected the proper way ( i tried normal pins, pwm pins etc.. ) . The exact model is 31238 ( standard applications 38Khz );

The only advice i found on the net is to use a sony remote. Do you think it might be a solution?
Though i tried many different brand but not a sony if i'm right .

my code is really simple as i'm just starting, i always print in the sensor signal to make sure it is working.
and to do so i wrote :

const int REMOTE = 52;  // i tried PWM inputs pins - digital, even analog cause i thought it would output an analog, but
                                  // datasheet says it is only 0-1
int data;
 
void setup() {
  Serial.begin(9600);
}

void loop() {
  data = digitalRead (REMOTE) ;
 
  Serial.println( data );
}
 

dc42

1. Check you have the right pin connections on the IR receiver: pin 1 to Arduino ground, pin 2 to +5V, pin 3 to the Ardino input pin.

2. Don't use Arduino pin 0, 1 or 13. Any other I/O pin should do.

3. Test the Arduino input pin. To so this, add a call in setup to set the pin mode to INPUT_PULLUP and disconnect the pin from the sensor. You should see a succession of ones.

4. If that works, leave the pin mode as INPUT_PULLUP and reconnect the sensor. If it goes back to all zeros with no remote control active and you are certain that the sensor is connected correctly, get a new sensor.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up