Switching GND through transistor switch

Go To Last Post
20 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Freaks,

I am trying to switch GND to a signal line by using an NPN as a switch.

I want node A to be tristated so that it is driven by another signal coming to A from another device or A should go to GND.

This is why I am thinking of using a transistor switch.

I am using 10K as the base resistance to drive it into hard saturation. I am controlling the base voltage through an AVR. However when I measure the voltage at node A, I am getting about 0.6V. I understand that I will never get 0V even if the transistor is in saturation. Will this work?

Any other ideas would be appreciated.

Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You should get about 0.1Volts in saturation. I assume you are trying to pull a 5Volt or similar line to ground.

Do you need to pull it all the way to ground?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the quick response,Dave.

Yes I am trying to pull that line to GND.

I have MUX on line A and I am not sure if I can tri-state node A so that I can drive it with the MUX output.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

10k will not drive the transistor very hard.
What is the load for the transistor ?
And a schematic would help. Including node-names is a good idea.

In general: a saturated silicon transistor will have 0.2V as Vce as lowest possible minimum. With a reasonable collector-current that is.
If you need to be closer to ground: use a Nch mosfet.

Nard

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can also connect a 10Ω resistor between A and GND and if you are satisfied with the result, substitute the transistor and its Base-resistor with a BS170 MOSFET (whose Drain-source ON-resistance is about 10Ω and its leakage current in the order of a few nA when open), or a better one. A bipolar transistor will practically never achieve a Vce voltage of 0.0V, even when in saturation.

-George

I hope for nothing; I fear nothing; I am free. (Nikos Kazantzakis)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok what I am doing is measuring the voltage at node A with the AVR ADC. When the transistor is off, it is measuring the voltage from another part of the circuit which drives to node A. However when the transistor is on I need node A to be at 0V, otherwise my ADC is always going to measure 0.4V or whatever the saturation voltage is.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I guess I could use a relay then to switch it to hard GND?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What is the maximum current expected to flow through A to GND? Won't a MOSFET with an Rds_ΟΝ a few mΩ be suitable for that task?

-George

I hope for nothing; I fear nothing; I am free. (Nikos Kazantzakis)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can't you just report a zero from the ADC routine when the output port is driven high?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Am I misunderstanding?

Set port pin to input/high-Z to read A/D,

Set port pin to output/zero.

Does that do what you want? No need for extra pin nor mosfet.

David

Dr. David Harris OpenLCB Development Team openlcb.org

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

SPDT Mux like the Max4053?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@dak,
I can't do that since I am measuring voltage on node A from another device that needs a solid GND.

If I understand correctly, I think as David suggests, I may be able to get away with using just the AVR output pin. Trouble is I want to tri state node A when not in use. How can I make the AVR port pin as tristate?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Make the port pin "tristate" by setting it to be an input.

There seems to be a major misunderstanding about "tristate" Such a pin has three states, logic high, logic low, or high impedance. You will get logic high or logic low on any AVR pin set to be an output. You will get high impedance when it is switched to be input with no pullup.

Technically, tri-state is mostly used when multiple outputs are connected to a single line. One output on the line sets the line to be high or low. All the other outputs are set to be hi-impedance, for which "input" is as good as any.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks that makes sense.

I will this by setting the AVR o/p pin (non ADC pin) as input.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Plons wrote:
In general: a saturated silicon transistor will have 0.2V as Vce as lowest possible minimum. With a reasonable collector-current that is.
If you need to be closer to ground: use a Nch mosfet.

One old trick is to use the transistor in inverse connection - i.e. the collector and emitter are reversed. The saturation voltage in this case is lower than 50mV.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a similar problem: I have a 2k ohm resistor, one end of the resistor is connected to a signal that can swing from -5V to +5V, the other end I need to connect to GND or leave floating. Using a mosfet to control this won't work if the signal is negative. One solution would be to use an SPST analog switch, like the MAX4648 or the TS12A4516, but these IC's are too expensive. Any other ideas?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Analog Devices offers the ADG1433 series of analog switches that have on resistance of 4 ohms. That would pull your node to ground very nicely.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nice part, but at 5$ a piece it is cost prohibitive.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, NUD3112 is about $.50 each, open drain, pulls to about 1 ohm max, gate is already digital input compatible. This is made by ON Semi.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for helping, but like I mentioned in my previous post, a single FET will not work when the signal at the resistor is negative. My signal swings from -5V to 5V. So far the best solution is the SPST TS12A4516, which is under 1$.