Transistor switch to GND.

Thread Starter

JStitzlein

Joined Dec 6, 2010
53
Hi. I really need some help with this circuit. What I am trying to do is to take an input line, switch power to it through a transistor(usingd a microcontroller), but the other state when not swtiched should be connected directly to ground. I'm not sure how to do this.. this is what I have so far. I'm thinking there may be a way to do it with a zener diode?

The output is taken at the collecter. Thanks for anyones help.

 
Last edited:
Your circuit is complete nonsense.

You need a resistor into the base of the transistor.
The transistor needs to drive out through its collector into the load.
If the load is inductive you need a diode across the load.
 

praondevou

Joined Jul 9, 2011
2,942
I don't know how else to explain it but this, I have an input line that either needs to be tied to VCC or be grounded.
This input line... is it a current source, is it a signal? It's really not clear what you want to do.
What voltage level is that "input line"? Does it have the same reference (Gnd) as the uC? How much current needs to be switched? How fast/often per second (frequency)?
 

Thread Starter

JStitzlein

Joined Dec 6, 2010
53
I tried to redraw a block diagram. Basically at the second block for each output, I want the ability to switch between V1, V2, and GND.
 

EB255GTX

Joined Apr 30, 2011
62
If i understand correctly, isn't all you need a relay?

You want one input signal that will be connected to either power or ground. So get a relay, connect the common pin to your signal, and the normally open and normally closed pins to power and ground.

When the micro switches the relay one way, your input signal will be connected to power, and when the micro switches the relay the other way it will be connected to ground.

As others have said, it would help to have more info - for example if you want to switch the signal between power and ground 1000 times per second, a realy is not the right solution.
 

Thread Starter

JStitzlein

Joined Dec 6, 2010
53
thank you very much. I've never used a relay before and I thought they were all for AC applications. I will have a look. and no.. it will not switch that much... I just need to switch between a power rail and ground.
 

Thread Starter

JStitzlein

Joined Dec 6, 2010
53
I'm not convinced that this is the best solution. Most of the relays I've seen are rated for high current. Is it appropriate to use????

I could do something simliar with a MUX... But I didn't use it because I didn't know if passing ground through a mux was something that was commonly done..same goes for the relay. Not too sure if you can pass ground.
 

EB255GTX

Joined Apr 30, 2011
62
I'm not convinced that this is the best solution. Most of the relays I've seen are rated for high current. Is it appropriate to use????
You can get reed tiny relays that are rated in the mA range, or large relays rated for 100's of A. Here's a pic of a small relay - they usually come in packages simialr to IC's.

http://rocky.digikey.com/weblib/Potter Brumfield/Web Photo/JWD-1 SERIES.jpg

Relays are not for AC or DC as such, they are just a simple switch that is activated magnetically rather than with your finger. There's a bit more to it like most things, but that explanation will suffice for now :)
 

SgtWookie

Joined Jul 17, 2007
22,230
You have not defined the range for V1 nor V2, nor mentioned what kind of signal level it will be (just a voltage, power for something, etc.)

However, if V1 and V2 are greater than 0.7v and less than about 15v, and your current requirements are fairly low (less than 50mA), the attached should work OK (within a couple hundred mV), and be silent.

If you need more current or need better accuracy in the output voltage, you'll probably be better off to go with some type of relays.

However, without knowing what the ranges for V1 and V2 are, what precision you need, and how much current, it'll be very tough to recommend a suitable circuit.

What is it that you are trying to do?
 

Attachments

Thread Starter

JStitzlein

Joined Dec 6, 2010
53
If you look at the DUT, that represents a range of devices with three pins. The idea is to connect that male header into the female, where I supply power and ground and take a sample of the third pin.

The supply ranges from 10 to 15 V, the sample range goes up to 5 V. Instead of routing multiple connectors I wanted to keep something semi static with switches so I can switch Power,GND and the sample. I hope that makes sense.

Thank you very much for taking the time to draw the circuit. I think I somewhat understand what you're trying to do, but it would literally take me a few days to decipher your circuit. I will take another look at it tonight.


It would work if I can pass a ground connection through a MUX. Is this allowable?
 

SgtWookie

Joined Jul 17, 2007
22,230
OK, I misunderstood you.
The circuit I posted is designed to place on the wire named "Out" voltages from V1, V2 or GND, depending on which microcontroller output is high.

Now I'm thinking that what you want for the connections is:
GND: This is always connected to Ground.
V1: This can be either 5v or GND, it is the OUTPUT of the DUT.
V2: This is the supply voltage for the DUT; it might range anywhere from 10v to 15v depending on the power supply itself, or be connected to GND depending on the microcontroller output.

Are the above statements correct, or am I off somewhere?

You mention 10v to 15v - is this something that you plan on installing in a vehicle?
 

Thread Starter

JStitzlein

Joined Dec 6, 2010
53
Hi there.

This is not an automotive application and I think you've captured most of what I want to do with your description of V2, except that that line..or all lines need to have the option to switch between GND, Vmeasure_In and to supply power with control from a microcontroller.

So some type of switch that allows me to switch between the three. I managed to hack something with a lot of relays, but I was wondering what you or someone else's approach would be.

Thanks,

OK, I misunderstood you.
The circuit I posted is designed to place on the wire named "Out" voltages from V1, V2 or GND, depending on which microcontroller output is high.

Now I'm thinking that what you want for the connections is:
GND: This is always connected to Ground.
V1: This can be either 5v or GND, it is the OUTPUT of the DUT.
V2: This is the supply voltage for the DUT; it might range anywhere from 10v to 15v depending on the power supply itself, or be connected to GND depending on the microcontroller output.

Are the above statements correct, or am I off somewhere?

You mention 10v to 15v - is this something that you plan on installing in a vehicle?
 

SgtWookie

Joined Jul 17, 2007
22,230
There are actually semiconductor relays that you can use for this type of thing - if your current requirements aren't terribly significant.

But, you haven't mentioned what kind of current flow may occur if the voltages were swapped around arbitrarily; so without sufficient information - it's mighty tough to come up with a viable circuit.

Basically, you'd need three relays per line; a total of nine relays, so that you could connect any input or output to any DUT terminal in an arbitrary fashion. If the worst-case current requirements were reasonably low, you could use semiconductor relays; they would be silent and last a very long time. You'd need to use transistors as drivers to control the coils of electromechanical relays, and you'd also need to use diodes across their coils.
 
Top