MODELED CIRCUIT WON'T WORK

I modeled up a circuit driving a relay with a 2n2222 transistor. I applied a logic low (about .16 V) input voltage thru a 10k resistor into the base of the transistor. After running the simulator on this circuit, the collector voltage was what I expected. About equal to my 12V voltage on the relay coil. The transistor was in cutoff just as it should be. However, when I bread-boarded this circuit up, my Vce was 6.4 volts unlike the the 12V when I ran the simulator. Does anyone have any ideas what I did wrong?

by DavidC
February 09, 2013

Hi David,

Um, yes, you did not post / link your circuit!

:-(

Regards, Sancho

by Sancho_P
February 09, 2013

OK I linked my circuit.

by DavidC
February 10, 2013

https://www.circuitlab.com/circuit/q576ju/relay-driver/

by DavidC
February 10, 2013

by DavidC
February 10, 2013

Basically your “problem” is not your circuit or in CL (simulation) but in your real application (breadboard), although the circuit itself may be “suboptimal”.

a) Until you really KNOW that you don’t need it: Always use a voltage divider to control a transistor on / off in a kind of interface. This is to make sure that in case of disconnection, tri-state, MCU reset and / or switching on your fluorescent desk light the interface is not set to ON. Make it as low as reasonable. This may be your breadboard problem, too.

b) Avoid volt- and ammeters in CL, they are striking but had some issues in the past. You don’t need them anyway, CL has much better “instruments” without cluttering your circuit.

c) Labels are your friends, use them like text annotations.

Simulate -> Run DC solver calculates the “static” circuit, click any label or wire to see the voltage, click an element’s connection to see the current.

While DC solver may be useful sometimes, the “Time Domain” is better to investigate (change V6 e.g. to sinus to see “between” digital signals, take care with the “phase” parameter otherwise it will start at 2.5V):

Regards, Sancho

by Sancho_P
February 11, 2013

Thanks. That helped. One question though. In the simulation results, what is Vunc4?

by DavidC
February 12, 2013

You mean V(un4).

It is the voltage on a net with no explicit label attached to it. The name un4 is auto-assigned by CL when you run the sim.

To find an auto-assigned net:

Run a DC simulation then hover the cursor over an unlabelled net. The cursor will turn into a pen shape and the auto-assigned netname will appear in the bottom right of the Editor window.

by signality
February 13, 2013

Post a Reply

Please sign in or create an account to comment.

Go Ad-Free. Activate your CircuitLab membership. No more ads. Save unlimited circuits. Run unlimited simulations.

About CircuitLab

CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.