[LTSpice] Trouble with a simple simulation

Thread Starter

exscape

Joined Jan 19, 2012
28
Hi, everyone!
I'm new to electronics (and even newer to LTSpice, having started yesterday or so), and I'm having some trouble with a simulation.

I have a simple circuit with a transistor and two LEDs (see the attched picture and/or LTSpice file; the screenshot is the exact same circuit, just to make it easier for some).
I've built the circuit, and it appears to work as expected. However, I did not know quite how to add a push button in LTSpice; in the real circuit, it's on the wire along the very right.
With the push button "open", one LED is lit. When the button is held down, the other LED is lit.

Now, the problem is that LTSpice tells me there's a 3.23 amp current on the transistor's base pin! :confused:

I assume that's not accurate (not only because it doesn't make any sense to me, but also because my circuit works with my arduino via USB as a power source), but what is causing it? Some quirk of SPICE I'm unaware of? Or am I actually doing something wrong with the circuit itself?
 

Attachments

Jony130

Joined Feb 17, 2009
5,487
The circuit on you diagram cannot work properly.
I attach correct diagram.

Use Ctrl+ R to rotate the part and Ctrl+E to mirror
 

Attachments

Thread Starter

exscape

Joined Jan 19, 2012
28
Thanks, but is there something in particular wrong with my circuit? The error is clearly in my LTSpice model, since it works exactly as it should IRL. It might be a dumb mistake I'm not seeing, or something I'm just doing wrong with LTSpice.
 

crutschow

Joined Mar 14, 2008
34,285
Thanks, but is there something in particular wrong with my circuit? The error is clearly in my LTSpice model, since it works exactly as it should IRL. It might be a dumb mistake I'm not seeing, or something I'm just doing wrong with LTSpice.
The simulation is correct. You have the +5V directly connected to the base which, in real life, will draw a large base current and zap the transistor. Did you mean to have the +5V connected to the base through R1?
 

Thread Starter

exscape

Joined Jan 19, 2012
28
The simulation is correct. You have the +5V directly connected to the base which, in real life, will draw a large base current and zap the transistor. Did you mean to have the +5V connected to the base through R1?
Whoops. No, I did mean to have it connected directly, though clearly I shouldn't. I pretty much learnt about transistors this morning, and not thoroughly yet, either!

I tried to copy this schematic... So now two options remain:
1) I don't really know what "IN" is supposed to be connected to (that's a fact, by the way, not just a possibility)
2) That schematic is also faulty.

Which options is it? ;)
Also, since I really don't know what "IN" really means in this context, could someone give a brief explanation? Thanks.
 

Ron H

Joined Apr 14, 2005
7,063
Whoops. No, I did mean to have it connected directly, though clearly I shouldn't. I pretty much learnt about transistors this morning, and not thoroughly yet, either!

I tried to copy this schematic... So now two options remain:
1) I don't really know what "IN" is supposed to be connected to (that's a fact, by the way, not just a possibility)
2) That schematic is also faulty.

Which options is it? ;)
Also, since I really don't know what "IN" really means in this context, could someone give a brief explanation? Thanks.
That doofus in the video doesn't know what he is doing.
 

Jony130

Joined Feb 17, 2009
5,487
The correct answer is two (That schematic is also faulty) or he use the MOSFET instead of BJT in his video.
BJT always need resistor in series with the base, which reduces the base current is to a safe value. See my diagram in post 2.
 

Ron H

Joined Apr 14, 2005
7,063
The correct answer is two (That schematic is also faulty) or he use the MOSFET instead of BJT in his video.
BJT always need resistor in series with the base, which reduces the base current is to a safe value. See my diagram in post 2.
Your schematic is good for simulation, but the voltage-controlled switch may confuse a newbie.
 

Attachments

Thread Starter

exscape

Joined Jan 19, 2012
28
Your schematic is good for simulation, but the voltage-controlled switch may confuse a newbie.
Thanks! However, your schematic differs in purpose from mine (actually I'm not 100% sure what yours does). Mine switches between two LEDs (green with the button up/open, red with the button pressed), though with the "slight" issue of a short.
Can I simply add a resistor to the transistor base pin? If so, what ballpark resistance should I use? 10k?
 
Top