Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Thread Tools Display Modes
Old 14th August 2006, 11:45 PM   (permalink)
Default Flashing LED circuit with photoresistor switch help needed

Hi

Tis me again. I've got two schematics of two seperate circuits, one that turns an LED on using a photoresistor and LM339, the other is to flash two LEDs alternately.

Both work individually although not knowing too much I have no idea how or why.

The thing is I want to turn on the flashing LEDs using the photoresistor when 'darkness falls'. I've had a go at a schematic using a transistor to switch the second circuit on, guessing how the two circuits would fit together.

Can someone take a peek at the schematic and give me the ppropriate nudge in the right direction please.
Attached Images
File Type: jpg AFLwPTS.jpg (34.2 KB, 39 views)
angie1199 is offline   Reply With Quote
Old 15th August 2006, 01:44 AM   (permalink)
Default

Look at the datasheet of an LM339 quad comparator IC. Its outputs are the collector of an NPN transistor. An NPN collector can sink current to ground but cannot source a positive current that is needed by the base of Q2 for it to turn on. Add a 10k resistor from the base of Q2 to the positive supply to turn on Q2 when the output of the comparator goes high.

You have the inputs of the comparator connected so that light on the phototransistor will cause the alternating LEDs to light up. Reverse the connections for the alternating LEDs to light up when it is dark.
Attached Images
File Type: png AFLwPTS.PNG (40.8 KB, 22 views)
__________________
Uncle $crooge
audioguru is online now   Reply With Quote
Old 15th August 2006, 05:10 AM   (permalink)
Default NPN transistor.

Hi Angie1199,

You could keep the circuit as it is and replace the NPN transistor with a PNP transistor and a resistor, and remove D1. Otherwise you gonna have a
voltage drop of at least 2 volt over the NPN transistor and the diode.
Attached Images
File Type: png PNP.PNG (8.0 KB, 15 views)
on1aag is offline   Reply With Quote
Old 15th August 2006, 09:12 AM   (permalink)
Default

on1aag

Thanks for that. Is there any website you can point me to that explains in plain simple english the difference between PNP and NPN transistors? I've looked and the quote I remember fully is

'The direction of the current flow differs between the PNP and NPN type. When the power supply is the side of the positive (plus), the NPN type is easy to use.'

which is why I used the NPN.

Also this is based on 12VDC. Would this work on 5VDC if I used the PNP transistor instead and removed D1?
angie1199 is offline   Reply With Quote
Old 15th August 2006, 09:21 AM   (permalink)
Default

Quote:
Originally Posted by audioguru
An NPN collector can sink current to ground but cannot source a positive current that is needed by the base of Q2 for it to turn on. Add a 10k resistor from the base of Q2 to the positive supply to turn on Q2 when the output of the comparator goes high.
So this is the difference between NPN and PNP? An NPN needs a positive 'in' to negative 'out' and a PNP needs a negative 'in' to positive 'out'?

Quote:
Originally Posted by audioguru
You have the inputs of the comparator connected so that light on the phototransistor will cause the alternating LEDs to light up. Reverse the connections for the alternating LEDs to light up when it is dark.
But I have the first part of the circuit as a seperate entity and instead of the transistor to the second circuit I have an LED with negative leg to the 339 and that lights up when it goes dark. While I don't question what you're saying I just don't understand why.

Ah, That's because the program I used to do the schematic had the comparator that way up and I didn't engage the brain when I inserted it and joined it up.

However, that little gem has helped me gain more knowledge in this, the mere fact that it can work in reverse

Last edited by angie1199; 15th August 2006 at 09:23 AM.
angie1199 is offline   Reply With Quote
Old 15th August 2006, 09:37 AM   (permalink)
Default

And now it's the right way?
Attached Images
File Type: jpg AFLwPTS_3.jpg (49.9 KB, 16 views)

Last edited by angie1199; 15th August 2006 at 09:42 AM.
angie1199 is offline   Reply With Quote
Old 15th August 2006, 11:28 AM   (permalink)
Default

What values do I look at when deciding the transistors for this circuit? I've looked at a datasheet for an NPN power transistor (2N3055 15A Ic 4Vce) but there's so many values.

I assume 15A is the maximum current it can pass but what is the 4Vce? Is this the voltage required to switch it on?

[Edit] Ok, Vce - voltage across collector-emitter. And I've found out what the others mean.

So:
Vceo > 5VDC
Vcbo > 5VDC
Vebo > 5VDC
Ic > 1A
Ib > 1A
PD - 25W
Vbe(on) 1.3VDC

Would this be good?

Last edited by angie1199; 15th August 2006 at 12:18 PM.
angie1199 is offline   Reply With Quote
Old 15th August 2006, 12:10 PM   (permalink)
Default

Quote:
Originally Posted by angie1199
And now it's the right way?
No. You swapped the inputs of the comparator but you also swapped the NPN transistor that didn't invert to this PNP transistor that inverts because its load is at its collector. So the LEDs light up when it is light.

You need to learn about Ohm's Law and about transistors for you to select parts for circuits.
The currents in this circuit are only a few milliamps. You wouldn't use 15A power transistors in it, you would use small, general purpose transistors.
__________________
Uncle $crooge
audioguru is online now   Reply With Quote
Old 15th August 2006, 12:33 PM   (permalink)
Default

Quote:
Originally Posted by audioguru
No. You swapped the inputs of the comparator but you also swapped the NPN transistor that didn't invert to this PNP transistor that inverts because its load is at its collector.
So change one or the other and not both?

Quote:
Originally Posted by audioguru
You need to learn about Ohm's Law and about transistors for you to select parts for circuits.
While I understand that, I can't find any documentation that is not 'basic' or 'advanced'. I need the bit in the middle.

I know what a base, collector and emitter are and do, but that's about as far as it goes. Also there's the added problem that there are other components in the circuit. For example the LM339. Where the transistor is connected to the 339 is of confusion to me. After all I don't want to blow the thing up.

And the two transistors at the right for flashing the LEDs. I know LEDs are small current but the circuit I used said to use a 2N3055 which is 15A. Is the author of the circuit simply being 'over cautious'?

BTW, you're a star helping like this. Glad I'm not doing my homework
angie1199 is offline   Reply With Quote
Old 15th August 2006, 01:24 PM   (permalink)
Default

Quote:
Originally Posted by angie1199
While I understand that, I can't find any documentation that is not 'basic' or 'advanced'. I need the bit in the middle.
You need to start at the bottom and work up!, you can't expect to get 3 years college education from a few sites on the internet? - I don't mean to be rude?, but you're still nowhere near up to 'basic'.

Quote:
And the two transistors at the right for flashing the LEDs. I know LEDs are small current but the circuit I used said to use a 2N3055 which is 15A. Is the author of the circuit simply being 'over cautious'?
No, if it used 2N3055's it was for a specific purpose, and it WASN'T flashing a couple of LED's - what's the URL you got it from?.

BTW, that part of the circuit is an 'astable multivibrator', a very basic circuit
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 15th August 2006, 02:59 PM   (permalink)
Default

Quote:
Originally Posted by Nigel Goodwin
No, if it used 2N3055's it was for a specific purpose, and it WASN'T flashing a couple of LED's - what's the URL you got it from?.

BTW, that part of the circuit is an 'astable multivibrator', a very basic circuit
The LED flasher is Circuit008_001.gif

The Astable Multivibrator is Circuit001_002.jpg

And this is 3rd year college???
Attached Images
File Type: gif Circuit008_001.gif (20.8 KB, 15 views)
File Type: jpg Circuit001_002.jpg (24.4 KB, 10 views)
angie1199 is offline   Reply With Quote
Old 15th August 2006, 03:32 PM   (permalink)
Default

The huge 2N3055 transistors are used to flash powerful car lights, not LEDs, or ring a powerful bell.
This very simple circuit isn't for 3rd year colege, it is designed by sombody who never went to school.
__________________
Uncle $crooge
audioguru is online now   Reply With Quote
Old 15th August 2006, 03:42 PM   (permalink)
Default

Quote:
Originally Posted by audioguru
This very simple circuit isn't for 3rd year colege, it is designed by sombody who never went to school.
That's a bit cruel?, perhaps they went ONE day, but the school was closed?

It's certainly NOT anywhere near a good design (if it can be called a 'design' at all?).
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 15th August 2006, 03:47 PM   (permalink)
Default

If you are using the light detector to switch the flasher circuit, surely a MOSFET would be the best choice? Use a general purpose 2N7000 device, with an RDS-ON of 5 ohms, the voltage drop would be negligable. I think that's best, or does it need to be a P-channel? Similar P-channel devices are avialabe anyhow at a slightly higher cost. If you still want to use a BJT, which should perform fine providing the supply is high enough, use the 3906 for PNP, or 3904 for NPN, cheap and reliable
__________________
Angry!? I'm absolutely electrolytic!

Will have to make do with myspace now I guess...
Dr.EM is offline   Reply With Quote
Old 15th August 2006, 04:09 PM   (permalink)
Default

Quote:
Originally Posted by audioguru
The huge 2N3055 transistors are used to flash powerful car lights, not LEDs, or ring a powerful bell.
This very simple circuit isn't for 3rd year colege, it is designed by sombody who never went to school.
Well I didn't do it. I'm trying to learn here. Obviously that's not the right way to switch alternating flashing LEDs on using a photoresistor.

I think I'll experiment. If I blow up a few pennies of components, as a teacher once told me (about 28 years ago), one learns from ones mistakes.
angie1199 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 07:49 PM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.