Must uController Output Be Tri-Stated for 12V Circuit Output?

  • Thread starter Thread starter neergmas
  • Start date Start date
  • Tags Tags
    Circuit Work
Click For Summary

Discussion Overview

The discussion revolves around the operation of a circuit involving a microcontroller (uController) and its effect on a 12V output. Participants explore the conditions under which the output is activated or deactivated, particularly focusing on whether the uController output needs to be tri-stated for the circuit to maintain a 12V output.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant notes that when the uController output (V3) is 0 volts, the output (P1-13) remains at 12V, but disconnecting V3 causes P1-13 to go low, questioning if tri-stating is necessary.
  • Another participant critiques the circuit design, suggesting that the input diode and resistor may not be effective.
  • A participant emphasizes the importance of understanding the states of transistors (Q1 and Q2) in relation to the inputs and outputs, proposing a truth table to analyze the circuit behavior.
  • Further contributions clarify that all diodes in the circuit are LEDs and discuss the addition of a ground to improve the circuit understanding.
  • One participant presents a truth table based on simulation results, indicating the states of Q1 and Q2 and their corresponding outputs, while questioning the accuracy of the output voltage.
  • Another participant agrees with the transistor states and suggests that tri-stating the microcontroller would yield similar results to a 5V input, while also noting uncertainty about the output voltage being 3V.
  • There is a suggestion to model tri-stating by using a high-value resistor to ground in the simulation.

Areas of Agreement / Disagreement

Participants express differing views on the necessity of tri-stating the uController output and the effectiveness of the circuit design. The discussion remains unresolved regarding the exact conditions for achieving a 12V output and the accuracy of the output voltage readings.

Contextual Notes

Some assumptions about the circuit operation and component behavior are not fully explored, and there are unresolved questions about the output voltage levels and the role of specific components in the circuit.

neergmas
Messages
18
Reaction score
1
I have a schematic with a section that I don't understand. I have recreated in LTSpice and simulated it to get a better understanding of how it works. As I understand it, the circuit uses the input from a uController (labeled V3) to open/close a 12V output (P1-13). When I simulate this circuit, if V3 is even 0 volts, then P1-13 is 12V. If V3 is disconnected, then P1-13 goes low. Does this mean that the uController output must be tri-stated for the circuit to be 12V?

I have attached the LTspice file for anyone interested.


Sam

http://imagebin.ca/img/KujFJGaz.png
 

Attachments

Last edited by a moderator:
Engineering news on Phys.org
neergmas said:
I have a schematic with a section that I don't understand. I have recreated in LTSpice and simulated it to get a better understanding of how it works. As I understand it, the circuit uses the input from a uController (labeled V3) to open/close a 12V output (P1-13). When I simulate this circuit, if V3 is even 0 volts, then P1-13 is 12V. If V3 is disconnected, then P1-13 goes low. Does this mean that the uController output must be tri-stated for the circuit to be 12V?

I have attached the LTspice file for anyone interested.


Sam

http://imagebin.ca/img/KujFJGaz.png
[/URL]

The circuit seems clumsy at first look -- where did you find it? The input diode and resistor do not appear to be productive...
 
Last edited by a moderator:
Some engineers have the knack, an ability to figure out what's going on, when, and how things work (or don't work, as the case may be):
https://www.youtube.com/watch?v=<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/CmYDgncMhXw&hl=en&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/CmYDgncMhXw&hl=en&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>

For the rest of us, it's methodically working through the problem, breaking it down into its component pieces, and relying upon intuition/experience to simplify the amount of work that has to be done.

In electronics, it often comes down to: what possible inputs are there, and what outputs do these produce (think truth table). Thankfully, this circuit is pretty simple, so you can assume that you have 5V and 0V as inputs. Figure out what impact these have upon transistor Q1 (off or on--assume saturation when on), and then what impact this has upon transistor Q2 (off or on--assume saturation when on):

Code:
INPUT	Q1_State	Q2_Input	Q2_State	OUTPUT
0V
5V

HINT: Does a transistor (the connection from Emitter to Base) look more like a short circuit, or open circuit when it is turned off?

EDIT: Berkeman, I think D1 should more properly be an LED, indicating driving action. To neergmas, are you sure that R3 is not attached to the right of R1? Nevermind, I think that's actually okay just the way it is.
 
Last edited by a moderator:
Hi MATLABdude,

Thanks for the awesome response! I love the Dilbert clip.

You are right, all of the diodes are LEDs.

2ufu3rl.jpg


I added a ground on the other side of R6 too. Now I am thinking of R6 as the load that is being powered.

Below is the truth table. The values are from running a simulation, but looking more into the operation of PNP and NPN transistors, at least the results make sense:

Code:
INPUT (V3)  Q1_State	Q2_Input	Q2_State	OUTPUT
0V             on            5V             on             0
5V             off            0V             off            3V

Does this seem correct?
 

Attachments

neergmas said:
Hi MATLABdude,
...

Code:
INPUT (V3)  Q1_State	Q2_Input	Q2_State	OUTPUT
0V             on            5V             on             0
5V             off            0V             off            3V

Does this seem correct?

Yes, the transistor states are correct, and the voltages are probably at least in the right ballpark (note that if you tristated the microcontroller, you'd have basically the same result as an input of 5V). Not sure about the output of 3V, but the current would flow from the 12V supply through the two LEDs and R6. As you can see, you can sometimes save yourself from having to do a lot of work (plugging into Spice) just by sitting down and breaking down the circuit.

EDIT: You can model tristating by replacing the microcontroller output with a megaohm-ish resistor to ground
 

Similar threads

Replies
7
Views
3K
  • · Replies 26 ·
Replies
26
Views
4K
Replies
9
Views
8K
  • · Replies 39 ·
2
Replies
39
Views
5K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
93
Views
9K
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K