Maker Pro
Maker Pro

Using PNP or NPN Transistor as a switch

The Big Idea

Nov 8, 2017
9
Joined
Nov 8, 2017
Messages
9
Ok, so first off let me tell you I am a complete newbie when it comes to electronics. AC is WAY beyond me but I do, somewhat, understand DC circuits. I installed my own stereo with an amp and two subwoofers when I was in high school. I also built the box for the woofers which I am much more inclined to do. Anyhow, I have started the journey into small electronics. My knowledge comes down to this: I just recently discovered that I can control direction of the flow! WHAT?!!!! A DIODE! Yes, my friends that is where I am... a lowly diode. That was the spark (pun intended) I needed to get me interested in the world of electricity. SO here it goes:

12V 5A AC/DC power supply (8 DC barrel plug connectors)

First DC Channel powers a Sonoff 4ch Wifi Switch

Second DC Channel I use a DC terminal barrel with (+) going to the NO side of the relay and the (-) to the NC side

To run the Pump I am required to tie CH 1 relay and CH 2 relay (+) and (-) together

So, CH 1 COM is now (+) and CH 2 COM is now (-)

I have run CH 2 COM (-) to a grounding bar

CH 1 COM (+) Lead...................................................................?

?............................................ I have a pump that will draw about 1.5A 1500ma when activated.

So, I am trying to use a 12V PNP Digital pressure switch to provide some automation when I activate the circuit. I want it to tell the pump to kick on basically. The output channel is only 80ma though. Here is where I am stuck but have an answer I think. Like I said I'm very new to this.

Plan to supply the Pressure Switch with its own DC source from the 8CH power supply.

Now with only 80ma for the output channel on the pressure switch, can I run it into a transistor (please specify PNP or NPN) base with the collector tying to my CH 1 COM (+) Lead ^^^ from above and the emitter tying to the "(+)" on the pump and the "(-)" on the pump tying to the ground bar?

Do I need a resistor before I tie the pressure switch output to the base terminal?

What OHM?

I apologize, I am very willing to learn. I plan to get books. My main problem now is understanding the symbols and what their function is. Like I said I am at diode level so layman help is much appreciated. Please throw some simple equations and laws up that may help me out! I am pretty good with math I just need the formula! Thanks to all that can help

Matt




 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
Sorry, your description reads as 'gobbleygook' to me. Can you draw a diagram with all the parts as you have and have connected?
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
Which model wifi switch are you using? There are many under the name Sonoff.
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
Sonoff.png

Your +ve supply should connect to the COM terminal of R1
Your -ve supply should connect to the COM terminal of R2

You can interconnect terminals to increase the current handling capacity of the relay contacts however this assumes that your pump requires more than 10A. Given your power supply is only capable of 5A I'm assuming the pump is UNDER this so an interconnect isn't really required.

The pump would connect to the n.o terminals of R1 and R2

You would have to activate R1 AND R2 in order for the pump to work.

You don't need to use R2 (the negative switched line) if you simply connect the -ve side of your PSU straight to the -ve of the pump. You then need only activate R1 to switch the pump on/off.

The pressure switch you link to doesn't provide details of the output signal - given it's a pressure SENSOR (not a switch) the output is likely to be a voltage proportional to the pressure applied (maybe even a data signal with the information as part of the data stream). Do you have any more details on that product?

Either way I suspect it won't work the way you THINK it will.
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
Ok, it has both types of output and you have access to an open-collector which you can use to connect to another (external) relay - this would probably be easier than using a transistor as a switch however since you WANT to use a transistor....

yes, a series resistor will be required in the base connection - but a MOSFET would be more efficient (less power dissipated in the device and a greater current handling capability).

The resistor connects to the gate and your pump +ve to the supply +ve, the pump -ve to the MOSFET drain and the source terminal to the supply -ve connection.
 

gunnadoo

Nov 9, 2017
17
Joined
Nov 9, 2017
Messages
17
g'day TBI , i have been reading some excellent guides on using and calculating resistor and base current values etc.at the top of this page there is a resources tab where you will find these guides. on page 2 there is a guide called [using bipola transistors.......] and one titled [saturation in transistors,calculating these values]..i also am new here and a learner to electronic [basics]. my problem is similar ,as i want to turn a pump off from 50 metres away via transistor/relay setup,but i am not sure if i should ask here or start a new thread..could someone please advise...thanks
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
Base resistor is calculated from the collector current
not sure if i should ask here or start a new thread
New thread please!

And thanks for pointing to the resource for the resistor selection.
 

The Big Idea

Nov 8, 2017
9
Joined
Nov 8, 2017
Messages
9
I'm researching a p channel mosfet now. Seems to go off voltage and not current. Still have more research to do but I think I can have my pressure sensor connected to its own power source via any channel on the 8 channel 12v 5a power supply. Then run sensor output 1 (black wire) through a voltage regulator to knock it to 9v and into the gate terminal. My understanding of a p channel mosfet is when the gate is supplied with a lower voltage than the source it will activate. I need advise but if I then connect the drain to channel R1(+) on the sonoff device and the source to the ground bar which channel R2(-) ties to, then when the parameters set in the pressure sensor are met 9v will hit the gate and source and drain will connect for a full 12v to the devices I need run until the sensor cuts power to output 1.

Now I know all of this is probably wrong because it sounds too easy. So please someone set me straight.

I have another problem and it is with the white wire (output 2) coming from the sensor. I don't know where it goes. Anyone that can help it is much appreciated.
 
Top