Jump to content
Electronics-Lab.com Community

IR Switch for LED


PaulWood

Recommended Posts

I am a real neophyte at this, so please excuse my ignorance.

I am trying to design a circuit to turn on a blinking LED when an IR Emitter-Detector beam is broken.  The distance between the Emitter and Detector will be approximately 6 inches.  It will be located such that shaded daylight will fall on them.  The circuit I designed (Microsoft Visio) with parts specifications is attached.  I would appreciate any comments regarding the circuit and/or its components.  

Specifically, I would like someone who is much more knowledgeable regarding the math to validate, or correct, the resistor values I have.  
Further, any thoughts on the life of the 3-AAA-AA battery pack that I propose to use.  I think the IR Emitter-Detector will continuously draw some amount of current.

Thanks for the help and your insight.

Edit:  Should be 3-AA not 3-AAA batteries.

IR-Blinker_Circuit.pdf

Link to comment
Share on other sites


The second circuit is still wrong.

My comments below only refer to the first circuit which will work.

RB isn't required because RD will limit the current through the transistor's base.

The values for emitter and LED current given on the data sheet are maximum ratings and it continuous operation under them doesn't do the components any good. The emitter current only needs to be high enough to activate the detector and the LED current only needs to be sufficient to give adequate brightness. Try increasing RE to 220R, RD can be 10k and RC can stay as it is or reduced if you want more battery life.

Link to comment
Share on other sites

Hero999,

Sorry for the confusion regarding the second circuit - it was actually some junk symbols that I had left on my second Visio page.  Didn't realize that it would be a part of the .pdf file.  Should have looked more carefully.  I deleted the second circuit and now the .pdf file should be OK.  And also, thanks again for pointing out my backward emitter and detector in the original first circuit.

I'll pursue your resistor recommendations.  Any thoughts about battery life with RD = 10k?  My hope was to have a set of batteries last a couple of months, but I'm wondering if that's really possible.

Link to comment
Share on other sites

RD doesn't draw much current so is immaterial.

You won't be able to get that kind of battery life at a reasonable brightness from AAA cells.The only way is to use a CMOS oscillator to flash the LED for 0.1s per second (10% duty cycle) but not with a flashing LED which will flash at 50% duty cycle.

Link to comment
Share on other sites

Thinking about this more, you'll never get that kind of battery life from AA cells.

Your circuit draws 150mA continuously and the flashing LED draws 35mA pulses at presumably 50% duty cycle making the average current draw 150+35/2 = 167.5mA.
http://data.energizer.com/PDFs/l91.pdf

A standard AA cell will last just 45 hours with a load of 50mA and discharged to 1V (3V total for your circuit) and an expensive lithium AA cell lasts 60 hours under the same conditions. Your circuit draws over three times that current so it won't even last for a third of the time.

You need to use C cells and make changes to the circuit to reduce the current drawn, the duty cycle of the flashing LED and pulse the emitter at a low duty cycle too, rather than keeping it continuously on, which wastes power. This could be done using the 74HC14 hex Schmitt trigger IC.

Link to comment
Share on other sites

I understand about the C vs AA battery.  I was thinking along those lines also.

I understand the concept you laid out regarding changes to the circuit to reduce the current draw and reducing the duty cycle of both the flashing LED and the emitter.  However, I haven't the foggiest idea how to go about doing that.  I think I'm getting in way over my head for this project.  After all, it is rather trivial:

  • I got tired of going out to the street on a cold snowy morning to fetch the newspaper only to find out it hadn't been delivered yet.  So I started thinking about a signaling device.  The first generation I built used a couple of mini-switches, 2-AA batteries and one red blinking LED.  Worked find and the battery lasted several months.  Only problem I had was selecting the mini-switches and positioning them such that the weight of the paper would close one or more switch.  Sometimes with a light paper, none of the switches would close.  Recently the snow plow destroyed my mail box and newspaper box, so I thought I would try a IR circuit as a sensor that would not be dependent upon the weight of the paper.


So, that's what brought me to this forum (I'm a pharmacist so I have no real electronic background).  I appreciate your information, patience and understanding; but, I think I'll need to abandon this project and rebuild a mini-switch based signal.
Link to comment
Share on other sites

If depends on the day length and light intensity on the shortest darkest winter day and the size of the panel.

I suppose you could put the  IR sensor in a position where it receives daylight it'll save power by not working when it's not used during the day.

I have an idea of how it can be done and will draft a schematic tomorrow, when I have time.

Link to comment
Share on other sites

Here's my idea.

The LED current is 11mA but it's pulsed at 10% duty cycle at just under 1Hz.

The emitter current is 40mA and pulses at about 1% duty, (I didn't bother calculating the frequency, ballpark 100Hz). Note that two gates have been connected in parallel because each one is only capable of suppling 25mA.

The input of the unused gate should be connected to either 0V or +4.5V. Refer to the datasheet of the 74HC14 (this can be found uding Google) for the pin out.

This should last a couple of months with a fresh set of alkaline AA cells or longer if the detector is exposed to sunlight so the LED will be off during the day.

The circuit could be powered from AAA cells charged from a solar panel.

Link to comment
Share on other sites

Hero999,

You've been so kind to work on my project, even to provide a potential solution schematic.  As mentioned above, I have no electronics background and it is apparent to me that the IR-switched solution I was envisioning is beyond my abilities.  In my ignorance, I don't understand what your schematic is doing - much less am able to put the pieces together.  I googled the two parts listed to find out what they are; however, it's still "Greek to me".  I think if I were set on pursuing this project I would need someone to develop a turn-key solution that I could connect to a power source and signal LED.  I imaging that would be cost prohibitive for such a trivial project.  Now, if I were developing a solution to mass production, that would be another story.

Again, thanks for all your effort.

Link to comment
Share on other sites

Don't give up too soon it's not as complicated as it seems.

The circuit is actually very simple.

If you can build the circuit attached, you should be able to build the other circuit fairly easily.

It's also pretty easy to explain. A Schmitt trigger is a logic gate with two trigger levels, one to turn on and the other to turn off, I'll explain later. The circuit shown below uses a NOT gate, also known as an inverter. The output is opposite to the input. When the input is 0V, the output is +4.5V and when the input is +4.5V, the output is 0V.  

The Schmitt trigger has hysteresis (memory). When the input voltage falls below 1.4V the output will go on but it won't go off again until the input voltage rises above 2.38V, now the input won't go on until the input voltage falls below 1.4V.

This capacitor is connected to the output of the Schmitt trigger via a resistor and the input connected to the capacitor. When the power is first applied the voltage on the capacitor will be 0V so the output will be on, the capacitor will charge via the resistor, until the voltage on it exceeds 2.38V upon which the output will change to 0V. The capacitor will discharge back into the output via the resistor until the voltage drops below 1.4V causing it to turn back on again and the cycle repeat indefinitely.

The oscillators in the previous circuit work on the same principle but include diodes and other reisstors to control the duty cycle. I'll explain more if you're interested.

Link to comment
Share on other sites


it's the emitter who is a current eater..:D

I think a pulse emitter with 20-25% duty cycle for a distance of 6 inches will do...

That's exactly what my circuit does. Except a 20% duty cycle is still too high for decent battery life which is why I chose a duty cycle of 1% and to lower the current to 40mA, which should still be enough to activate the emitter.
Link to comment
Share on other sites

I've had a look at it.

You'll notice that the pin numbers for op-amps are not normally shown on schematics. This is because you can use any gates in the package and what connection goes where will depend on how you lay out the PCB, i.e. whether you're using SMT parts or through hole,strip board or a propper PCB and if the circuit as part of a bigger project.

I didn't check every single connection but I when added the gates, the inputs and outputs seem to be correct. There are some other errors though:

The values of two resistors are wrong: you missed off the k.

The input of the unused gate is not connected to either +V or 0V.

That's also not the best way of doing it. You should never show an IC as just a box because the schematic doesn't make any sense without referring to the data sheet.

The best way of doing this is to add pin numbers to the schematic, as per my previous example. Then as you assemble it, you tick off each pin number as you put the connections in place. I always connect the power supply pins and inputs of the unused gates to either +V or 0V first, before doing anything else.

I suppose I didn't make it easy for you by not tagging each component. Attached is your schematic with corrections and the original with tags added.

Note that I've not checked everything, go though it and check it again before building it.

Low_power_IR_gate_flash_#1.pdf

Link to comment
Share on other sites

Thanks for the clarifications.  I understand your point about not showing the pin numbers on schematics.  I just needed something to translate the schematic into something more visual that would in some way show me how the connections between the parts and the pins could flow.  That's why I showed the IC as a box, even though that's not the correct way to show it.

What tolerance and wattage should I use for the various resistors?  You mentioned that two of the resistors were wrong.  Do you mean the missing "k" label or were the values wrong?

Link to comment
Share on other sites

That's why I showed the IC as a box, even though that's not the correct way to show it.

My criticism was aimed more at not showing the gates inside the box, than drawing it that way to help you to lay it out.

What tolerance and wattage should I use for the various resistors?  You mentioned that two of the resistors were wrong.  Do you mean the missing "k" label or were the values wrong?

I've corrected the resistor values.

The wattage can be calculated by looking at the voltage across the resistor and applying Ohm's law.

P = V2/R

So for R3
P = (4.5-1.2)2/82 = 3.32/82 = (3.3*3.3)/82 = 9.9/82 = 0.121W
4.5 is the power supply voltage and 1.2 is the voltage across the LED.

The duty cycle is only 1% so the average power is much less.

So a 1/8 W  or 1/4W resistor will do.

The other resistors used in the circuit use much less power so just use whatever power rating you can get hold of.

Tolerance is also unimportant as you're not bothered if the flash rate is different, standard 5% tolerance metal or carbon film resistors will do. Capacitors tend to have a larger tolerance anyway which will swamp the resistors.

Link to comment
Share on other sites

You've got the value of R7 wrong there.

In the previous schematic you posted, you got the values of R1 and R5 wrong.

You need to be more careful with your decimal suffixes.

Resistors are always specified in Ohms. If there's no suffix, or the letter R is used, it means *101 so a resistor with a 10 or 10R next to it, is just 10 Ohms.  The decimal point often replaced with the suffix, so 1k2 is 1.2k or 1200 Ohms, 1R5 is 1.5 Ohms and 0R75 is 750m or 0.75 Ohms. Be careful with your use of upper/lower case, m means 10-3 or milliOhms so 10m is 0.01 Ohms and 10M is 10*106 Ohms or 10,000,000 Ohms.

Link to comment
Share on other sites

I see.  Thanks for the explanation regarding suffix and how the letter can be used as a decimal point.
Looks like the resistors should then be:
R1 = 10k
R2 = 1M
R3 = 82
R4 = 1M
R5 = 100k
R6 = 1M
R7 = 220
Tolerance is unimportant as is power (1/4watt should be OK).

Capacitors:
While looking at capacitors (on digikey.com) I see a plethora of options.  Is is OK to utilize general purpose, ceramic, tolerance +80%/-20%, 50VDC?
Make sure I get units correct:
1

Link to comment
Share on other sites

  • 2 weeks later...

Nice Post but i think Transmitting binary ones and zeros via IR (infrared) light is not as complicated as it may appear at first glance. Just as radio stations transmit information using radio waves, infrared devices transmit data using the infrared frequencies of the electromagnetic spectrum. Also, just as you need a compatible device to listen to a radio broadcast, you must have a device capable of understanding and translating incoming infrared signals.

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...