[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

I've been googling around, putting together a schematic

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 27
Thread images: 9

File: transistor circuit.jpg (138KB, 742x341px) Image search: [Google]
transistor circuit.jpg
138KB, 742x341px
I've been googling around, putting together a schematic for a circuit I'm trying to build. I think I have the components and connections down, I just need to know what value of resistors I should use

[pic related]

in short, I want this circuit to turn on an LED when the switch is in the open position.

R4 I should pick based on the LED and voltage of the circuit, that's easy enough, R1 I was going to make it a trim pot instead because the switch is going to be a magnetic reed switch some 300 feet or so away, and may change depending on install location (I need to make several of these things. also, what value of trim pot should I use then?), and the voltage drop may be too great for a fixed value.

so R2 and R3 are the ones I'm not sure of.

I plan on powering this circuit with 5 to 12v DC.

all that said, my other question is: will this work and be reliable?
>>
I forgot to mention the transistors are going to be regular generic 2n2222's (or whatever the common part is)
>>
>>1186333
R1=R2=R3=10kΩ, no need to adjust anything. R4 depends on supply voltage and LED voltage/current.
>>
that sounds fairly consistent with what I'm finding in google. there's a lot of math involved and lengthy forum discussions that I think is overkill for what I'm doing -- I just need to turn on an LED from far away with a magnetic reed switch, nothing too precise here.

I only have 20k resistors as far as anything in that range, I'll just put them in pairs, in parallel for the test version of the circuit then.

thanks, I appreciate your help.

I'm building right now, so I'll post back with results.
>>
>>1186345
You can do this with half the parts... ill post in a sec.
>>
File: pic.jpg (29KB, 1024x768px) Image search: [Google]
pic.jpg
29KB, 1024x768px
>>1186345
>>
>>1186349
Seconding this. Far too many parts in OP pic.
>>
File: 1496284044755.jpg (53KB, 742x341px) Image search: [Google]
1496284044755.jpg
53KB, 742x341px
>>1186347
>>1186349

You did this while I was working on OP's pic
>>
>>1186356
Sorry for my shit paintbrush trackpad version.
>>
File: magnet led switch thing.jpg (353KB, 800x524px) Image search: [Google]
magnet led switch thing.jpg
353KB, 800x524px
it works exactly as needed! --but the true test will be when I put the magnet switch 300 feet out. it would be great if I can get away with powering the whole thing with only 5 volts.

>>1186349
>>1186352
>>1186356
I opted for the second transistor to invert the output -- wouldn't a single transistor version of the circuit as you've shown here have the LED turn on only when the switch is closed? I need the led to be on when the switch is open -- indicating the magnet is not near the switch (the door is open, or the object is not in place, etc...)

I still greatly appreciate the help.
>>
>>1186362
No - look at the circuit. Current through R1 (10K) to the base of Q1 will turn on Q1, thus turning on the LED. When the switch is closed, all current through R1 will go to ground, leaving no current for the base of Q1, turning LED off. An NPN transistor already "inverts".
>>
>>1186365
I'm almost done building the single transistor version right now. with all that I've learned, transistor logic still escapes me. It's frustrating.

I wonder why there were so many instances of the two transistor version then...

I'll post back with results once completed.
>>
>>1186362
While there is nothing wrong with your circuit, it just uses way more stuff than you need to. More stuff = more to go wrong. There is a place for inverters like this but for a simple binary switch it isn't necessary.
>>
It would use more power, but a simpler circuit would be to just power the LED and put the switch across the LED.
>>
>>1186371
I think his mag switches are N.C...
>>
>>1186374
>I think his mag switches are N.C...


Doesn't matter what the normal condition is - if the closed switch is across the led the power is shunted around the LED when the switch is closed.

When the switch opens the power goes through the LED.
>>
File: 1496284044755.jpg (41KB, 539x341px) Image search: [Google]
1496284044755.jpg
41KB, 539x341px
>>1186374
>>
>>1186374
it's a normally open magnet switch. I've never seen a normally closed one, would love to get some-- it'd make some circuits simpler.

but hey! it works!!
I don't understand it... will have to study what's going on here.

at first, I was like "...nothing's happening", but it turns out I had the switch wired wrong, and actually, everything was happening as it should, because wired wrong, the switch part of the circuit was in the closed position, so the LED would be off anyway. fixed, it works as needed.

this is great guys.
>>
>>1186362
>wouldn't a single transistor version of the circuit as you've shown here have the LED turn on only when the switch is closed?

No. Only on when its open.
>>
>>1186383
No magic smoke is always a good sign. Can't put it back once its out.
>>
File: spdt magnetic reed switch.png (67KB, 628x403px) Image search: [Google]
spdt magnetic reed switch.png
67KB, 628x403px
>>1186383
>I've never seen a normally closed one, would love to get some-- it'd make some circuits simpler.
>>
File: spdt_reed.jpg (55KB, 400x400px) Image search: [Google]
spdt_reed.jpg
55KB, 400x400px
>>1186383
>I've never seen a normally closed one, would love to get some

We used to sell them at work in a plastic housing with three screw terminals.
>>
>>1186389
oh, right. now that I think about it, I might have seen those after all.
>>
>>1186382
that looks like it would work too. but while the switch is closed, that'd just be wasting energy as heat through the resistor..

with the transistor, while the LED is off, wouldn't the current draw be much less?

>>1186356
>>1186349
wait.. what if I was stuck with a higher voltage power supply, say around 12 volts, wouldn't I need a resistor a the base of the transistor to keep it happy? the resistor on the LED would need to be bigger too, but I'm not worried about the LED so much.
>>
>>1186461
>with the transistor, while the LED is off, wouldn't the current draw be much less?
Yes, by around 10 fold. 10K vs 1K

>wouldn't I need a resistor a the base of the transistor to keep it happy?
No, not to ground.

There's kinda 2 separate circuits. They act similar to a relay coil and contacts

1) The base-emitter current circuit (similar to a relay coil)
-The current path is Vcc-10K-base-emitter-ground.
-With the switch closed, the current path is Vcc-10K-ground. The transistor base has no current.
-The base-emitter current switches the other circuit(collector-emitter).

2) The collector-emitter circuit (similar to relay contacts)
-The current path is Vcc-1K-LED-collector-emitter-ground.
-When the base-emitter circuit has current flowing, the collector-emitter circuit is switched on.

This is simplification, but explains basic switching.
>>
File: alert_s.png (3KB, 518x144px) Image search: [Google]
alert_s.png
3KB, 518x144px
>>1186330
>>
>>1186383
5v reedrelays have an NO and NC connection
and still react to magnets
Thread posts: 27
Thread images: 9


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.