Go Down

Topic: Weak IR LEDs (Read 984 times) previous topic - next topic

Chagrin

I'd suggest testing with a bright red or white LED so you can see obvious problems, and either of those should get you a meter distance minimum. Once you get that working then you can switch to the infrared LED.

These receivers don't require "940nm" LEDs but rather that is just the optimal wavelength. But, y'know, premature optimization is the root of all evil.

SillyNewbie

Well, the circuit works. The camera shots a picture every 2 seconds.

Here's the sketch:
Code: [Select]

////////////////////////////////////
// Simplest test. IR + Canon camera
////////////////////////////////////

int pin8 = 8;

void setup()
{
  pinMode(pin8, OUTPUT);
}

void loop()
{
  /* ----- shutter! ----- */
  for(int i=0; i<16; i++)
  {
    digitalWrite(pin8, HIGH);
    delayMicroseconds(11);
    digitalWrite(pin8, LOW);
    delayMicroseconds(11);
  }
   
  delayMicroseconds(7330);
   
  for(int i=0; i<16; i++)
  {
    digitalWrite(pin8, HIGH);
    delayMicroseconds(11);
    digitalWrite(pin8, LOW);
    delayMicroseconds(11);
  }
  /* ----- end shutter ----- */

delay(2000); //2seg
}


And here's the circuit as it is now:


I've tried without the resistor. Without the switch. Without both. With the resistor after the switch. Bigger resistors. Smaller ones... All of these tests worked, but the distance seems to be approximately the same.

AWOL

Did you read reply #4?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

MarkT

I presume you do have the LED the right way round unlike the diagram?  That ought to give 30mA or so, so reasonably bright, but
adding a transistor to boost it to 100mA peak pulses should increase the range somewhat.  Making sure the modulation frequency is
spot on is also worth checking, thinking about it - 40kHz or 38kHz, or whatever it is...
[ I won't respond to messages, use the forum please ]

SillyNewbie

Quote

I presume you do have the LED the right way round unlike the diagram?  That ought to give 30mA or so, so reasonably bright, but
adding a transistor to boost it to 100mA peak pulses should increase the range somewhat.  Making sure the modulation frequency is
spot on is also worth checking, thinking about it - 40kHz or 38kHz, or whatever it is...

Thanks, MarkT! I will give it a try!  :)  :)  :)

Quote

I presume you do have the LED the right way round unlike the diagram?

:~ yes!

Go Up