Infrared Activated Switch

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
Hi Hamoodyjamal,
Now your circuit certainly doesn't have a -12V supply. It has +12V and ground, or 0V.
I am sorry you don't understand, I think explained my comments simply. What don't you understand?

The end of the 10 seconds time period from the 555 is its "time-out". The datasheet for the 555 explains that it won't time-out if its trigger pin is still low just before and during its scheduled time-out. So if your IR beam is blocked for more than 10 seconds then the alarm won't shut off until the IR receiver is illuminated again by the IR.
Capacitor-coupling the low output from the IR receiver provides a brief low-going pulse to trigger the 555, then the coupling capacitor quickly charges to +5V by the 10k resistor so that the 555's trigger pin is no longer low and can time-out on schedule even if the IR beam is still blocked. ;D 

 

hamoodyjamal

Jun 15, 2005
74
Joined
Jun 15, 2005
Messages
74
Hi audioguru,

The time-out thing is no problem. I want the alarm to sound for 10s + the time the beam is blocked. So that’s ok.

What are current-spikes that are caused by the 555 timer? And how are they dangerous to the other components?

And what do you mean by "well-filtered", do I need to add some extra components?

BTW, do you know a code for a General Purpose transistor that can pass 1A through CE? I already have some in mind (2N2222A, TIP31); I just want a second opinion.

Thanks. ;D

 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
Hi Hamoodyjamal,
Since you don't care if the 555 doesn't time-out on schedule when the IR beam remains blocked, just connect the output of the IR receiver directly to the trigger pin 2 of the 555. The pull-up resistor in the output of the IR receiver will set pin 2 to +5V when it sees the beam. So you don't need a coupling capacitor nor an extra resistor.

The 555 has high-power output transistors. One transistor pulls the output high and the other pulls the output low. Because they are high-power devices, when the output switches state they both conduct about 400mA from the supply. The manufacturer recommends a 0.1uF ceramic disc plus at least 1uF on its supply to provide small filtering of the current pulse. I use a 0.1uF ceramic disc and a 100uF capacitors. Without the capacitors the supply voltage might collapse for a moment, upsetting anything on the supply.

With a 0.1uF ceramic disc and a 100uF capacitors across the supply, it is well filtered.

A 2N2222A transistor can't conduct 1A safely. Its absolute max rating is 800mA, and its min current gain of 40 is rated at 500mA.
A TIP31 has an absolute max current rating of 3A, and its min current gain of only 25 is rated at 1A. ;D   

 

hamoodyjamal

Jun 15, 2005
74
Joined
Jun 15, 2005
Messages
74
With a 0.1uF ceramic disc and a 100uF capacitors across the supply, it is well filtered.

Question: why dont i just use one capacitor i.e. 220uF? Also, since I will be using two 555 timers, do i need to double the values?

Regarding the transistors, i understand the TIP31 is the better choice. But if i cant find it, are there any equivilents?

;D
 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
An electrolytic capacitor provides poor filtering at the high frequency of the switching edge of the supply current spike caused by a 555. The 0.1uF ceramic disc capacitor is an excellent filter for medium-high frequencies due to its low inductance. At radio frequencies much smaller-values of ceramic disc capacitors are used as filters.

Each 555 needs a 0.1uF ceramic disc capacitor mounted as close as possible to its supply and ground pins. If they are close together then a single 220uF capacitor will be fine.

There are many power transistors like the TIP31 that can conduct 1A. Their availability depends on where in the world you are. ;D

 

hamoodyjamal

Jun 15, 2005
74
Joined
Jun 15, 2005
Messages
74
Hi audioguru,

I'll add those capacitors you told me about.

BTW, I was reading about the 555 timer set as a monostable circuit and I came across this line

"For a simple 555 monostable, the trigger pulse must be shorter than the output pulse" found at http://www.doctronics.co.uk/555.htm#triggering

Can you please explain this to me? And what are the affects if the beam is blocked for more than 10s?

Also, I live in the United Arab Emirates. There are Maplin and radioshack stores near where i live. So which transistors do you recommend i use for conducting 1A?

I dont know if this helps, but the alarm circuit draws arround 850mA which is quite close to the limits of a 1A transistor? any tips on how to avoid damage to anything?

Thanks  ;D

 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
hamoodyjamal said:
"For a simple 555 monostable, the trigger pulse must be shorter than the output pulse"
Can you please explain this to me? And what are the affects if the beam is blocked for more than 10s?
That is the "it won't time-out when the beam is blocked" problem I mentioned.

Also, I live in the United Arab Emirates. There are Maplin and radioshack stores near where i live. So which transistors do you recommend i use for conducting 1A?
Buy a transistor rated for 1A to 3A.

I dont know if this helps, but the alarm circuit draws arround 850mA which is quite close to the limits of a 1A transistor? any tips on how to avoid damage to anything?
Since the transistor has a minimum gain of 25, supply it with at least 850/25 X 1.3 = 44mA of base current to be certain that it saturates fairly well. ;D
 

hamoodyjamal

Jun 15, 2005
74
Joined
Jun 15, 2005
Messages
74
Hi audioguru,

I'll see if i can find the TIP31 in some stores. However, if i cant get my hands on it, can you tell me if this will be equivilent?

http://www.alldatasheet.co.kr/datasheet-pdf/view/STMICROELECTRONICS/BFY51.html

Oh yeh, what are the charastaristics of a General Purpose Transistor?
I once read on a website that the Hfe should be around 100. What you say?

;D

 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
Hi Hamoodyjamal,
I wouldn't use an old BFY51 transistor to drive 850mA. It is shown in my 1968 Philips databook! :eek:
It doesn't have much DC current gain, a minimum of only 15 at 1A. Also, it doesn't saturate very well at its max current, its max saturation voltage is 1.6V at 1A even with a huge 100mA of base current. It will melt without some kind of heatsink and your load will receive up to 1.6V less than you want.

Since the hFE of all transistors drops-off at less than their max current rating, I would use a newer transistor rated for a max current of about 3A. Even a fairly old TIP31 has a minimum DC current gain of only 10 at its max current of 3A, but its gain is 25 at 1A. Its saturation voltage is very low so that it will become barely warm.

What is "general purpose"? I dunno.
What is a "typical rating"? A TIP31 has a typical Hfe of 50 at 3A, but its minimum is only 10. You might need to go through a bucket full of them to find one that is typical. I always use the minimum rating that is guaranteed. ;D

 

hamoodyjamal

Jun 15, 2005
74
Joined
Jun 15, 2005
Messages
74
Hi audioguru,

I'll do my best to get the TIP31.

I was reading through the thread and came to your post where you mentioned "Why not use only a transistor to replace the relay?"  And then I thought about it and said, "That’s a darn good idea!” I drew out a schematic for what I plan. The only problem I have is I don’t really know how to calculate the values ??? Of the resistors because their values relate and affect each other (I think). Would you be so kind as to find the values?

The link for the datasheet of the transistor (BC107) is below:

http://www.ortodoxism.ro/datasheets/stmicroelectronics/9293.pdf

Schematic Explanation:

The first transistor is used as an inverter to drive the second transistor which in turn will trigger the 555 monostable circuit depending on the input of the first transistor.

Thank you very much. ;D

View attachment 37244

 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
Hi Hamoodyjamal,
What are the transistors for? They both invert, so the output might be the same as the input, except:
1) The output of the receiver has a very high value pull-up resistor. So R1 isn't necessary

 

hamoodyjamal

Jun 15, 2005
74
Joined
Jun 15, 2005
Messages
74
Hi audioguru,

I forgot to mention that the input for the 1st transistor is 5V. If you go back and look through the thread, you'll see a picture of what I plan to do. And you can see that the receiver consists of a 56 KHz IR receiver module which is actually connected to a battery. When it receives IR, it will output 5V (which is the supply voltage) through its Vout junction. I cannot connect all that 5V through the BE. That’s why I need a current limiting resistor.

The first transistor is connected as an inverter. And the second transistor is the replacement of the relay.

I don’t know if this will affect your reply, but what the heck.

BTW, I will be using the picture (attached) to build the monostable circuit. What do you think? I got it from: http://www.eleinmec.com/article.asp?4

As you can see, there is a 10K Ohm resistor near Pin2 and the Vs, is this what you're talking about?

Also, one of the parts is a "0.01uF Metallised Polyester Film Capacitor", can I use a normal ceramic disc if I can’t find a Metallised Polyester Film Capacitor?

Thanks. ;D

PS: I will only be using 5V for everything. Although I have a 12V supply, I prefer lower voltage for IC's.

View attachment 37245

 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
hamoodyjamal said:
If you go back and look through the thread, you'll see a picture of what I plan to do. And you can see that the receiver consists of a 56 KHz IR receiver module which is actually connected to a battery. When it receives IR, it will output 5V (which is the supply voltage) through its Vout junction.
We were both wrong. The receiver's output is active low, when it receives IR. It will be pulled high by an 80k resistor when the beam is blocked.

I cannot connect all that 5V through the BE. That’s why I need a current limiting resistor.
You certainly can connect the base directly to the reciever's output. The output is already an 80k  current-limiting resistor.

The first transistor is connected as an inverter. And the second transistor is the replacement of the relay.
Your 2nd transistor is also an inverter that you do not want.

BTW, I will be using the picture (attached) to build the monostable circuit. What do you think?
As you can see, there is a 10K Ohm resistor near Pin2 and the Vs, is this what you're talking about?
Yes, the 10k resistor in the monostable circuit is the same resistor as the collector resistor.

Also, one of the parts is a "0.01uF Metallised Polyester Film Capacitor", can I use a normal ceramic disc if I can’t find a Metallised Polyester Film Capacitor?
Yes, nearly any capacitor will be OK to filter pin 5.

I will only be using 5V for everything. Although I have a 12V supply, I prefer lower voltage for IC's.
5V for the 555's brings them close to their minimum operating voltage of 4.5V. Also, you won't be able to filter the supply voltage from them for the IR receiver. Therefore it is best to power the 555's from 12V and use a 78L05 to power the receiver and 10k resistor.

I think your circuit should look like this:View attachment 37248

 

hamoodyjamal

Jun 15, 2005
74
Joined
Jun 15, 2005
Messages
74
hi audioguru,

First of all,  !!!!THANKS A MILLION!!!!  :D

I never really saw that 80K resistor. I guess thats a plus for us ;D

Did you design that circuit your self? What Program?

Chow.  ;D

 

hamoodyjamal

Jun 15, 2005
74
Joined
Jun 15, 2005
Messages
74
Hi audioguru,

I'll Try and get the components for the circuit hopefully tomorrow and will let you know about the results.

However, I did some testing, but with a different NPN transistor (SC945C) and the results where negative. I had a hunch that it was because of the 10K resistor, so I changed it to a much lower value of 100Ohm and the circuit worked like it was supposed to. I guess it was because I didn't use a BC107 transistor. What you say?

Thanks again! ;D

 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
Hi Hamoodyjamal,
My schematic looks lousy on this page, click on it to open it and it is clear. I used Microsoft Paint to copy, paste and add to the block diagram in the datasheet.

Didn't you use my circuit for your test?
It should work fine with a 10k collector resistor and any little NPN transistor. Your 100 ohm resistor is trying to draw a massive 118mA which is too much for a little transistor. Since the 80k resistor in the output of the receiver provides only 54uA of base current, a transistor would need a current gain of 2200 to saturate poorly. Little transistors have a current gain of only a few hundred and might overheat trying to drive a 100 ohm load from 12V.

 

hamoodyjamal

Jun 15, 2005
74
Joined
Jun 15, 2005
Messages
74
Hi audioguru,

I kind of tested your circuit. What i mean is that i didnt quite use the same components you specified. The reason is that i dont have them. i.e. i didnt add the voltage regulator, nor the capacitors, also i used SC945C trans. instead of BC107.

Hopefully I'll go and buy them tomorrow and let you know how it comes along.

Test result: no inversion!
When there is IR light aimed at the receiver, the ouput at junctions CE are about 5V (HIGH), and when there is no light, output is 0V (LOW). I showed the schematic to my dad and he noticed there is a transistor connected to the GND and OUT of the IR receiver module which is set up like an inverter. So how i see it is your inverting something thats already inverted. What you say?

Chow.

Chow.

 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
Hi Chow Chow, ;D
I thought you want the 555 to be triggered when the IR beam is blocked. The IR receiver's output is low when there is IR radiation, and goes high when the IR is blocked. That is why I added an inverting transistor to its output, so that it can trigger (low) the 555.
That is what is shown on the datasheet:

View attachment 37249

 

hamoodyjamal

Jun 15, 2005
74
Joined
Jun 15, 2005
Messages
74
Aparantly Sasi didnt read the thread before posting.

Quick recap Sasi, I've solved my problem in a much simpler way.

Thanks anyway ;D

PS: what do you mean by "Dont ask More Questions ....I am busy, but its working fine. ", when did i ask YOU anything?

 

hamoodyjamal

Jun 15, 2005
74
Joined
Jun 15, 2005
Messages
74
Hi audioguru,

I haven’t been getting to build the project because of some problems. First, my soldering iron is kind of busted and I couldn't get one. Well, not yet. Secondly, my sister is here, from another city, so we're spending some quality time.

BTW, I was testing the IR receiver module, and I accidentally burnt it. Not literally, but I applied 9V when the max is 6V. Opps! I went to get a replacement, and the only thing I was looking for was the number 56 on the module. When I came home, I noticed it was TSOP 1156. I used to have TSOP 1756. Will this be a problem? Hope not, because it looks like it functions the same.

What you say?

;D

 
Top