Go Down

Topic: Can I use a transistor to turn on and off positive voltage? (Read 3210 times) previous topic - next topic

pederw

Hello!
My question is as the subject; ''Can I use a transistor to turn on and off positive voltage?''
I have mostly to now used the TIP120, but as I have learned this transistor can only be used as a switch on the negative side on for example a led or a little motor ?

In my new project I need a transistor that can be used as a switch on the positive side.
Can I use a TIP120 for that as well or do I need another transistor?

Hope you understand what I mean, if not, just ask what you wondering.

Thanks
Peder W

septillion

Then you need to use a PNP transistor. And in order to switch it the voltage you want to switch may not be higher then the Arduino voltage.

But can you enlighten us why you think you need high side switching?
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

pederw

Okei. Is the TIP120 a NPN then ?
I will try to explain;
I have a radio on the bathroom that I need to press the ON button to turn on. The outlet on the wall that the radio is connected to is turned off when the light on the bathroom is turned off, its connected on the same wall switch.  What happen when I turn the switch on the light turn on and the radio in standby, then i have to press ON to start the radio. But I want it to turn on when I turn on the light switch.

I opened the radio and found that I just need to bypass the ON switch with a relay or something, beacouse I can steal power to a Arduino from the radio also when it is in a standby mode. Then the Arduino will power the relay and turn the radio on when the radio get power from the outlet.

The problem is the space in the radio, its no place for a relay, so i thought about using a transistor instead. I hoped that I could bypass the switch with a transistor ? Is that possible ?
Hope you understand, please ask if not.

CrossRoads

Check out these relays. There are plenty with low coil currents that an Arduino could drive directly, and are quite small in size as well. Then you can complete a simple button closure and not have to worry about odd voltages or getting ground connected to the right place, etc.
http://www.digikey.com/products/en/relays/signal-relays-up-to-2-amps/189?k=relay&k=&pkeyword=relay&pv72=1&FV=fff40010%2Cfff80368%2Ca8c0007%2C16040020%2C1f140000%2Cffe000bd%2C1140050&mnonly=0&newproducts=0&ColumnSort=0&page=1&stock=1&quantity=0&ptm=0&fid=0&pageSize=25
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Grumpy_Mike

Quote
i thought about using a transistor instead. I hoped that I could bypass the switch with a transistor ? Is that possible ?
Yes it is but you need to know what voltage the switch has on it. As it is a radio it is very unlikely to be 5V. The point about using a PNP transistor as a top switch like this, is that the signal you put on the base of the transistor needs to be as big as the voltage you are switching. If it is not then then you need another transistor, an NPN one to boost the 5V signal from the Arduino to the voltage you are trying to switch.

septillion

Thanks for explaining. But are you even sure the switch pulls a line high? It's common pratice to pull a line low to activate the switch.


And if that's all that the Arduino needs to do you can probably do it without an Arduino with just a capacitor over the switch :D You then create a simple RC time delay :)
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

pederw

Yes it is but you need to know what voltage the switch has on it. As it is a radio it is very unlikely to be 5V. The point about using a PNP transistor as a top switch like this, is that the signal you put on the base of the transistor needs to be as big as the voltage you are switching. If it is not then then you need another transistor, an NPN one to boost the 5V signal from the Arduino to the voltage you are trying to switch.
Its two buttons I want to activate from the Arduino. One has 1,7v before the button and the other one 5,6v. So if I want to switch a positive voltage I have to use a PNP transistor ? Can the Arduino Nano even give 5,6v?

pederw

Check out these relays. There are plenty with low coil currents that an Arduino could drive directly, and are quite small in size as well. Then you can complete a simple button closure and not have to worry about odd voltages or getting ground connected to the right place, etc.
http://www.digikey.com/products/en/relays/signal-relays-up-to-2-amps/189?k=relay&k=&pkeyword=relay&pv72=1&FV=fff40010%2Cfff80368%2Ca8c0007%2C16040020%2C1f140000%2Cffe000bd%2C1140050&mnonly=0&newproducts=0&ColumnSort=0&page=1&stock=1&quantity=0&ptm=0&fid=0&pageSize=25
Thanks! Will check it out.

Thanks for explaining. But are you even sure the switch pulls a line high? It's common pratice to pull a line low to activate the switch.


And if that's all that the Arduino needs to do you can probably do it without an Arduino with just a capacitor over the switch :D You then create a simple RC time delay :)
Yeah I think the switch pulls the line high. I used a multimeter and measured 1,7v on the one side off the button and 0v on the other side. On the other button i measured 5,6v on one side and 0v on the other side. It's two buttons I have to activate.

Grumpy_Mike

Quote
o if I want to switch a positive voltage I have to use a PNP transistor ?
Yes.

Quote
Can the Arduino Nano even give 5,6v?
No it can't. That is why I said you will also need a NPN transistor first to boost the signal up to 5V6 then use that to switch the PNP.

septillion

I'm not that sure the switch pulls it high. The voltage you measure on one side can just be the voltage because of a pull up resistor and the switch pulls that low. Then trying to switch the 0V to Vcc will just short the device ;)


You measured both sides so you had a reference point somewhere so I guess you found the GND of the circuit? Can you use the continuity test between the GND and the 0V side of the switch?
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

pederw

I'm not that sure the switch pulls it high. The voltage you measure on one side can just be the voltage because of a pull up resistor and the switch pulls that low. Then trying to switch the 0V to Vcc will just short the device ;)


You measured both sides so you had a reference point somewhere so I guess you found the GND of the circuit? Can you use the continuity test between the GND and the 0V side of the switch?
Okei, so I tried to take a continuity test between GND and 0V. On one of the buttons, the volume button, one I also want to activate it's looks like its connected to GND (measured 1,7V). But the standby button isn't, there I measured 5,6V.

Can you try to explain a little better how it works when it's pullet to GND and there is a small voltage there ? (1,7v). I think that there are a small micro controller inside there and i understand how it can pull down a DI (digital input)  and pull up. But why are there a small voltage there then ?

Thanks :)

septillion

Can have multiple reasons. Two I can think of 1) That's the voltage that the controller (being it a ASIC or a uC) is run at 2) The pull resistors are under software control so they might be off when the device is off.

And there is no guarantee both switches switch in the same manner. So focus on one at a time and I assume focusing on the power switch makes more sense.

And it might even be a switch (or both) is (/are) multiplexed. Which makes it harder to measure.

Two things you can check for the power button.
- Can you trace where that 5,6V is coming from?
- What voltage do you see when the power button is pressed?

Assuming you found the GND of the device. (Did you? Are you sure? Why are you sure?)

Because before knowing exactly how the switches are wired the only safe option is to bridge the switch with a relay. Other options can damage the device (or may not work or work, but the damaging part is the tricky bit :D).
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

pederw

Can have multiple reasons. Two I can think of 1) That's the voltage that the controller (being it a ASIC or a uC) is run at 2) The pull resistors are under software control so they might be off when the device is off.

And there is no guarantee both switches switch in the same manner. So focus on one at a time and I assume focusing on the power switch makes more sense.

And it might even be a switch (or both) is (/are) multiplexed. Which makes it harder to measure.

Two things you can check for the power button.
- Can you trace where that 5,6V is coming from?
- What voltage do you see when the power button is pressed?

Assuming you found the GND of the device. (Did you? Are you sure? Why are you sure?)

Because before knowing exactly how the switches are wired the only safe option is to bridge the switch with a relay. Other options can damage the device (or may not work or work, but the damaging part is the tricky bit :D).
Okei, so i tried to trace where the 5,6V its coming from and its pretty hard... But the radio has the option tu use 4 AA batteries to run it also. From there its go directly to the power button with something that looks like a diode (SS12) only between.

Something I found out is when I but battery inn the radio it doesn't even start (get in standby mode) like it does with 230VAC/6VDC inn. I have to press the power button and then the radio just jump over the standby step and just turn on. (Standby is when the radio just show to clock, and not playing)

I know i got the GND recourse I scraped on the side of the PCB, and as i have learned that's GND. Also confirmed that when i foundt a spot on the PCB marked with GND (looks like a test point).

When I press the standby/power button it show 5,6v on both side off the button. When I press the volume button it shows 0V on both sides.


pederw

Another question:
I have TIP120. I want a PNP transistor who just works like the TIP120 but is activated by negative voltage and can switch on and off positive voltage. What do you recommend ?
I also want both of them in the smaller version, like the TO-92 size. Does TIP120 and the one you recommend exist in that size?

Grumpy_Mike

Quote
I want a PNP transistor who just works like the TIP120 but is activated by negative voltage and can switch on and off positive voltage. What do you recommend ?
TIP125

Go Up