go_away

Author Topic: Headphone powered IR Light Circuitry Problem  (Read 1812 times)

0 Members and 1 Guest are viewing this topic.

Offline IgnitorDetonateTopic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Headphone powered IR Light Circuitry Problem
« on: January 01, 2012, 06:43:16 PM »
I am trying to light up an IR LED with the power from Headphones jack on my smartphone so i can use it as a universal remote control for TVs and such. I have written an app that emits a constant high frequency tone, which i have checked and am sure is not the problem. I have made several attempts at getting a green LED to light up, but no success. Can anyone provide some insight into why this may not be working, and possibly how to make the circuit work?

Thanks in advance.

Details:
3.5 mm 3 pin connector with the ground and right speaker terminals connected to the LED's  negative and positive terminals, respectively. (should i be using a capacitor or something...)
Nexus S running Android 2.3.3.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Headphone powered IR Light Circuitry Problem
« Reply #1 on: January 01, 2012, 11:54:45 PM »
Hi,

A green LED typically takes around 2.2V at 20mA, while an IR LED is somewhere around 1.5V to 1.6V.
If you use an IR LED, you can check it with eg. a web cam.

What's the peak amplitude at the HP output of your phone?
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline IgnitorDetonateTopic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: Headphone powered IR Light Circuitry Problem
« Reply #2 on: January 02, 2012, 03:41:59 PM »
The sine wave ranges from the maximum to the minimum power (0v), at a frequency of 2000 hz, with a peak voltage of about 4.3Volts, 30ma (this may be inaccurate, my equipment is not the most accurate)

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Headphone powered IR Light Circuitry Problem
« Reply #3 on: January 02, 2012, 05:00:01 PM »
Hi,

The sine wave ranges from the maximum to the minimum power (0v), at a frequency of 2000 hz, with a peak voltage of about 4.3Volts, 30ma (this may be inaccurate, my equipment is not the most accurate)
Even if you were 50% off, you should see some light from a continuous wave if the LED is intact and connected (either way round, won't matter).
No need for capacitors if the output is indeed that high - a LED can flash at less than 1 µs (although that may be hard to see ;D).

- Did you try to reverse the connections to the LED?
- Do you have any resistor in series with the LED as is?
- Can you get the LED to light up on eg. a 9V battery (with a series resistor of say 330 Ohm to 1200 Ohm)?

If you can, your output may be way below the 4.3V and if that's the case, a voltage doubler could be used - using both stereo channels together, each with a resistor of 33 Ohm before they get merged into one (to protect the output amplifier in case the outputs should be 180° out of phase) will give you twice the power (not voltage) if needed.


As an aside, for when you get it to work - 2kHz is a very low frequency when talking about IR remote control applications. Most remotes use a carrier wave of 36kHz or 38kHz (although some remotes can be found from around 25kHz to 455kHz).
With eg. 20kHz, you'd probably need to be that close to the controlled device, that you could just as well push the buttons manually and 2kHz will be way off.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline IgnitorDetonateTopic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: Headphone powered IR Light Circuitry Problem
« Reply #4 on: January 05, 2012, 09:04:34 AM »
2khz was just a testing frequency. It could go as high as 40khz for sure and possably upto 220.5khz. The LED can light up with power from a battey.

Is it possable the minimum value in an audio stream means negitive, and the AC-like power configuration is preventing the LED from lighting up. I've heard LEDs cant run on AC

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Headphone powered IR Light Circuitry Problem
« Reply #5 on: January 05, 2012, 07:41:06 PM »
Hi,

2khz was just a testing frequency. It could go as high as 40khz for sure and possably upto 220.5khz. The LED can light up with power from a battey.
OK, what about the remaining questions?


Is it possable the minimum value in an audio stream means negitive, and the AC-like power configuration is preventing the LED from lighting up. I've heard LEDs cant run on AC
LEDs only light up when a (limited!) current runs through them from the anode (+ side) to the Cathode (- side).
On a sine wave (AC) this means it flashes on off, but at 2kHz, you won't notice the flashing. LEDs does not tolerate above 5V "backwards", but that is not a problem in your application.

I don't know where you got the info on the head phone amplitude, but if you have access to an oscilloscope, you'd know in a minute whether the problem is a capacitor coupled output, wrong pins in the 4 pole connector, or if the head phone connector sees the output at all (some smart phones need you to enable the head phones AFAIK). Not sure, but perhaps the application running the 2kHz signal is responsible for setting the output level as well.

If the output is AC coupled, then the hot terminal of the jack will be swinging ~2,15V +/- around the gnd. An ordinary (not high brightness) red LED should would still be able to put out a little light at that voltage, but a green LED may be just a shade below, that depends on the actual LED.

If you peak rectify the output, to get a higher voltage, it won't work for remote control, as it depends on the carrier wave being present (which it won't if you peak rectify it.
You could use the other channel/side to drive a voltage doubler, making a DC rail and then use a transistor driven from the modulated output to control the LED, with the power for the LED taken from the generated DC rail. But then it's not just an LED (plus resistor!) that you need to make it happen.

As I don't have a Nex-S, I cannot make any measurements etc. That's why I ask you questions instead - If you don't answer them, it's the equivalent of blindfolding me and then I have no chance in "a hot place" to help.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline IgnitorDetonateTopic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: Headphone powered IR Light Circuitry Problem
« Reply #6 on: January 05, 2012, 08:37:45 PM »
I determined the cable i was using to connect the smartphone to the LED was broken. After using a set of headphones as the new connector, I was able to get it to light up.

Thanks for your awesome help.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Headphone powered IR Light Circuitry Problem
« Reply #7 on: January 05, 2012, 09:15:56 PM »
Hi,

After using a set of headphones as the new connector, I was able to get it to light up.
Great ;D

Do you have the codes for what you want to control?
If not, the code files for LIRC may be quite helpful.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


Get Your Ad Here