Jump to content
Electronics-Lab.com Community

Infrared Activated Switch


Recommended Posts

Hi Hamoodyjamal,
You need a transistor to drive the low resistance relay because the obsolete LM307 can't supply enough current to drive it.
Most opamps have a minimum load spec of 2k. Your relay is only 245 ohms! The LM307 current-limits its output current at 25mA. 25mA through 245 ohms is only 6.13V. A 12V relay won't work with only 6V. The opamp can easily drive the base of a transistor through a couple of resistors as a voltage divider. The voltage divider is necessary because the output voltage of the opamp doesn't go low enough to turn off the transistor.

Also, the relay's coil is an inductance. When current is turned off to an inductance it produces a very high voltage across the coil as the magnetic field collapses. A diode is required to be connected across the relay coil in reverse, to arrest the high voltage and protect the relay driver from being fried. ;D 

Link to comment
Share on other sites


  • Replies 77
  • Created
  • Last Reply

Top Posters In This Topic

Hi audioguru,

Im having alot of trouble from the IR receiver module. Dont bother to ask why. After my first one got fried (which was perfect), ive been having alot of trouble. I couldnt get the exact same one and thus am having trouble with the new ones (As i mentioned before). So what i have in mind is using a Tone Decoder (Such as the obselete Philips NE567) to decode a 40KHz freqency using a phototransistor.

When it comes to the circuitry, i looked at the datasheet of the NE567 but read some things such as the bandwidth that i have no knowledge about ???(I deducted it could be like tolerance). I think what im looking for is a circuit like the one in arroncake's page. IR remote (http://www.aaroncake.net/circuits/irremote.htm) but many have complained that it didnt work. Can you shed some light on this subject : how to build a tone decoder. It may need an op-amp to amplify the phototransistor signal.

Thanks ;D

Link to comment
Share on other sites

Hi Hamoodyjamal,
Aaron's IR receiver circuit is missing a very important 100k resistor from pin 3 of the opamp to ground. It doesn't have AGC so it is easily overloaded by ambient light and IR from sunshine. Its slow opamp can't function at 40kHz. 
I don't know if a phototransistor can switch fast enough to detect 40kHz, usually a much quicker photo-diode is used.

Link to comment
Share on other sites

Hi audioguru,

Say i add the 100K resistor to the op-amp, and i reduce the freqency to say 200Hz (or what ever the photo transistor can detect - SFH300), and i get a 741 op-amp, will it work then?

Regarding the AGC, i dont need that. I actually dont want it. And since ill be setting the center frequency of the tone decoder to about 200Hz, i dont think there will be any interferance from ambiant light. What you say?

I will be using the circuit found at (http://www.reconnsworld.com/schemdepot/cgi-bin/ikonboard.cgi?s=a7212d5f7c71e899286c2e9a1677dfb8;act=ST;f=11;t=1) and the IR remote control on Arron's page as a refrence. Good?

BTW, that -9v on the op-amp (ir remote control in arron's page), is it really -9v or just ground? It seems too high for an op-amp. No?

Thanks ;D

Link to comment
Share on other sites


Say i add the 100K resistor to the op-amp, and i reduce the freqency to say 200Hz (or what ever the photo transistor can detect - SFH300), and i get a 741 op-amp, will it work then?

The SFH300 phototransistor is in a clear case and detects all light plus IR. A SFH300FA is in a black case which is an IR filter and doesn't respond much to visible light.
A frequency as low as 200Hz is very close to double the mains frequency produced by mains-powered electric lights and would cause severe intrerference.
An old 741 opamp is also very slow with a cutoff frequency of only about 8kHz.

I would try a black phototransistor at 10kHz or higher and use a more-modern (only 20 years old) TL071 opamp that has a 100kHz cutoff frequency. Really we should be using a black photodiode like everyone else and operate it at 40kHz.

Regarding the AGC, i dont need that. I actually dont want it. And since ill be setting the center frequency of the tone decoder to about 200Hz, i dont think there will be any interferance from ambiant light. What you say?

Besides interference from mains-powered electric lights, a phototransistor without AGC saturates easily from ambient heat and light. When it is saturated then it doesn't work anymore.

I will be using the circuit found at (http://www.reconnsworld.com/schemdepot/cgi-bin/ikonboard.cgi?s=a7212d5f7c71e899286c2e9a1677dfb8;act=ST;f=11;t=1) and the IR remote control on Arron's page as a refrence. Good?

I have never used an old NE567. Aaron doesn't spec an operating frequency for his IR transmitter.

BTW, that -9v on the op-amp (ir remote control in arron's page), is it really -9v or just ground? It seems too high for an op-amp. No?

The -9V in the receiver circuit is a second 9V battery for its negative supply. Most opamps operate with a total of 30V, with +15V and -15V. Aaron's receiver would need a couple of resistors and capacitors added to work with just one 9V battery. ;D
Link to comment
Share on other sites

Hi audioguru,

The thing is, it was somewhat difficult to get my hands on a phototransistor, yet enough, get a photodiode. But ill try.

I was looking through the datasheet of the NE567 and showed my how to calculate the center freqency. But it doesn't mention what unit to use for the Capacitor (i know its Farad, but, nF, or uF or F) because in the bandwith calculation, it tells you to use uF for the capacitor value. So, im confused here. What do you think?

BTW, i used my multimeter (set on Duty %) to check the duty cycle of my 555 timer output and gave me values between 7% - 46% , as i changed R2(4.7K POT). I think i need 50% yeah? Which might mean i need to change R1 and R2 to give 40KHz and a 50% duty cycle. Maybe this is the reason for my IR receiver not responding well. No?

Thanks.

Link to comment
Share on other sites

Hi Hamoodyjamal,
National Semi still make an LM567. Its datasheet shows the calculation for frequency and a test circuit. Just use their test circuit with a 10k pot adjusted about halway to replace their 2.4k resistor.

I don't know if the Duty % reading of your multimeter is accurate at high frequencies. The duty-cycle of a 555 is easy to calculate because the cap charges through two resistors and discharges though one. I think the 567 works best with near 50%.

Please post the schematic of whichever IR transmitter circuit you tested recently to see its duty-cycle and IR LED current. ;D

post-1706-14279142338404_thumb.png

Link to comment
Share on other sites

Hey audioguru,

I have that AC test circuit along with the equation. I actually have the same page. But the problem is that i dont know if to use uF or F for C1. C2 it tells you to use uF. This confused me if weather to use uF also for C1.

Im using a general design for the oscilator but ive drawn it anyway. When i change R2, Duty % changes. What does that tell me?

Thanks ;D

post-10092-14279142338559_thumb.gif

Link to comment
Share on other sites


i dont know if to use uF or F for C1. C2 it tells you to use uF. This confused me if whether to use uF also for C1.

The LM567 test circuit uses 0.0033uF (3.3nF) for C1, 0.005uF (5nF) for C2 and 0.02uF (20nF) for C3.

Im using a general design for the oscilator but ive drawn it anyway. When i change R2, Duty % changes. What does that tell me?

Your 555 circuit is conducting about 90mA through its IR LED which is plenty.
Of course the duty % changes because the cap is charged with 2 resistors but discharged with only one. This circuit will provide very close to 50% no matter what frequency it is adjusted:

post-1706-14279142338725_thumb.gif

Link to comment
Share on other sites

Hi,

Seeing as there is no R1, what formula should i use to calculate the frequency?

And is this circuit garanteed to work? Because i've already soldered the components. But i can always desolder if it is going to work.

Regarding the LED, it is rated 100mA. so thats not a problem. Quite big considering most LED's are maxed at 30-40mA.

Thanks ;D

Link to comment
Share on other sites


what formula should i use to calculate the frequency?

The calculation for R2 discharging the capacitor can be doubled, so would be 2 x (0.693RC), but since the output of a 555 doesn't go as high as +12V nor as low as ground then the frequency would actually be lower than calculated. You got a pot so just adjust it to the correct frequency.

is this circuit guaranteed to work?

Sure, with the cap discharged, the output goes high and the pot charges the cap. When the cap reaches the threshold voltage of pin 6, the output goes low and the pot discharges the cap until its voltage reaches the trigger voltage of pin 2.

I don't know the upper frequency limit of your phototransistor and I don't know how much ambient light you have which will saturate it.
I don't know which opamp you are going to use to see if it works at high frequencies. ;D
Link to comment
Share on other sites

Hi,

OK, i try the circuit.

Regarding the op-amp and the phototransistor, i'm willing to get a photodiode and any op-amp as long as they're available. I can try and get an SFH2030 or a General Purpose IR Photodiode from Maplin, and the op-amp from anywhere that i can.

SFH2030 - http://www.maplin.co.uk/module.aspx?ModuleNo=2242&doy=search
GP IR Photodiode - http://www.maplin.co.uk/Module.aspx?ModuleNo=2256&doy=24m7

What are you suggesting?

BTW, the NE567 is rated 0 - 500KHz.

Thanks ;D

Link to comment
Share on other sites

Get the SFH2030F with the daylight filter. It has a much narrower pickup angle than the wide-angle Chinese one.
Get a TL072 dual low-noise opamp confiured as 2 stages with a gain of about 30 each.

Then you will have a home-made IR circuit similar to an IR receiver module without its important AGC. ;D

Link to comment
Share on other sites

Get a TL072 dual low-noise opamp confiured as 2 stages with a gain of about 30 each.


Sorry, im not quite following what you mean. Do you mean Amplifier-Amplifier, or Comprator-Amplifier or what?

Also, a gain of 30!? A transistor has more gain. Did you mean 30K?

Then you will have a home-made IR circuit similar to an IR receiver module without its important AGC


LOL, that sounds really cool!!! ;D
Link to comment
Share on other sites




Sorry, im not quite following what you mean. Do you mean Amplifier-Amplifier, or Comparator-Amplifier or what?

Also, a gain of 30!? A transistor has more gain. Did you mean 30K?

A TL072 opamp has a voltage gain of 200,000 at DC and very low frequencies. Is frequency response is to 3MHz with a circuit gain of 1 and reduces to 1/10th for each increase in gain of 10. Therefore with a circuit gain of 100, its frequency response is to only 30kHz.

With a circuit gain of 30, its frequency response is to 100kHz.
With a gain of 30 from each of its two opamps in series, the total gain is 900 and its frequency response is to 50kHz. ;D
Link to comment
Share on other sites

Hi,

BTW, why do i need an op-amp in the first place? cant i just connect to the input of the NE567 to a photodiode? or is there not enough power?

Also, since the photodiode is a photo volatic cell, will it not give power to the input of the NE567?

The above 2 questions sound similar. But im not sure if the second one sounds right.

Thanks ;D

Link to comment
Share on other sites


why do i need an op-amp in the first place? cant i just connect to the input of the NE567 to a photodiode?

IR radiation on a reverse-biased IR photodiode causes it to leak a tiny reverse-current. If you want a range more than a few cm then your circuit needs the gain of an opamp or two.
You could try an extremely high value for the resistor that feeds the IR photodiode its reverse voltage.
Then it would be slow (poor high frequency response) and might saturate from moonlight when it's cloudy at night. ;D
Link to comment
Share on other sites

Hi,

Is this circuit what i should be building?

Also, can you check if the op-amps and the photodiode (especially) are arranged correctly. If they're correct, ill just set my 555 timer to 100KHz.

BTW, my sister gave birth yesterday. So i might not get to the project very quickly. HEHE, im an uncle now!!! ;D ;D

Thanks ;D

post-10092-14279142339217_thumb.gif

Link to comment
Share on other sites

Hi,
Congratulations, Uncle! ;D  I thought I was the uncle around here.

1) In your 1st opamp, you have a single supply, but it is drawn like it should have a dual-polarity supply. Pin3 doesn't have a reference voltage so will float around 0V. Then the opamp will amplify the difference in voltage of about 6V between its inputs 200,000 times and its output will be saturated near 0V.
2) Both opamps don't have negative feedback and are DC-coupled so will amplify (if the 1st opamp was biased correctly) mains interference from lamps and noise about 40 billion times and will probably oscillate with such a high gain.

I have re-done your photovoltaic circuit for you with the opamps biased at half-supply and using capacitor-coupling as highpass filters.
I prefer the photoconductive mode because it has additional highpass filtering.
You can try it each way if you want, I haven't built it. ;D

post-1706-14279142339434_thumb.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
  • Create New...