Transistor selection confusion - Page 1
Forum section: electronics / beginners

author: phaseform
author_rank: Regular Contributor
timestamp: May 16, 2018, 10:45:52 am
content: I'm using a current sensing board fromebayto trigger anSSR, although the 'digital' output from the sensor board isn't ideal for the SSR.I'm getting 0.2v low, and 2.2v high from the sensor board (with settings best I can figure to achieve), I want to use a transistor as a switch to send the full 5v through the SSR (3v min). The SSR draws ~5ma.I have a BC639 (datasheet) I've found, which seems like overkill (1A max). Just from looking at transistor equations to figure out a base resistor, and whether this transistor is suitable.. I've gotten a bit confused. I'll have another look at it tomorrow, and probably get a lower power transistor from Jaycar.. Anyone with actual electronics knowledge that can shed some light on this..? - I was confused with min Hfe values - wont the base current just be lower in this case with a very low collector current?

author: Benta
author_rank: Super Contributor
timestamp: May 16, 2018, 11:49:46 am
content: For switching purposes, it does not help looking at the hFEfigures, they are for linear operation. For a transistor of this size a good value for base current is IC/ 25. Anything between 20 and 40 will also work.

author: Audioguru
author_rank: Super Contributor
timestamp: May 16, 2018, 01:01:54 pm
content: Why add a high current transistor?The current sensing board has a "TTL" output high which can drive the SSR without using an additional transistor and base resistor. With the (+) input of the SSR connected to +5V then the (-) input goes to 0.2V when the current sensor is triggered and has an input of 4.8V which is plenty.

author: phaseform
author_rank: Regular Contributor
timestamp: May 17, 2018, 04:27:43 am
content: I can change the sensitivity of the sensor to get these outputs:5.2v trigger off, 2.75v trigger on0.15v trigger off, 2.7v trigger onSo it seems I can't use these values alone to drive the SSR.I'm thinking a low power NPN transistor with the latter sensor settings.I'm not sure about application of IC/25.. but I've done some reading around and maybe I've got it right....I foundthispage on transistor calculation... so using for example aBC546 NPN Transistor..From the datasheet which has "Figure 2. “Saturation” and “On” Voltages" -not sure why different datasheets dont show this info, nor how the Ic/Ib= 10 is found in this caseIc= 5mA. Hence VBE= .75VVBE= .75V is perfect for the sensor output values, with 2.7V sensor output (with 2kW through the sensor), I get ~1.95 voltage drop across the base resistor, at .5mA = 0.0005A (IC/10).V=IR therefore R = 3900 OhmsIthinkthis is correct..

author: Benta
author_rank: Super Contributor
timestamp: May 17, 2018, 08:54:15 am
content: "not sure why different datasheets dont show this info, nor how the Ic/Ib = 10 is found"Base current is set so high to make certain the transistor is driven 100% into saturation. Like I wrote, a ratio of 25 is normally enough.

author: phaseform
author_rank: Regular Contributor
timestamp: May 17, 2018, 10:29:57 am
content: Nope, not saturated with 3k9looking at Fig 2, maybe should design for 'worst case' Ic= 10mA. Hence VBE= .8V (datasheet)2.7V sensor output, I get ~1.9 voltage drop across the base resistor, at 1mA (IC/10) = 0.001A.V=IR therefore R = 1900.2V sensor output, 1.2V drop across the resistor, at 1mA = 0.001AR = 1200 OhmsSo much for 3900..hmmWith a 1200 Ohm part and say I only had 6mA for the SSR, therefore ~.75VBESAT => resistor voltage drop up to 1.95V possibly down to 1.25V if the sensor outputs only 2VIb=V/R = 1.25/1200 = 1.04mAIb=V/R = 2/1200 = 1.66mAneed to sleep on this..answered. love.gifPower=IV = Ib*VBE+ IC*VCE= 0.00166*.8 + 0.01*0.6 = 0.007328W = 7.3mW = No problem...

author: phaseform
author_rank: Regular Contributor
timestamp: May 18, 2018, 04:43:02 am
content: Not sure what I'm doing wrong here, but I'm getting 2.5VCEacross my transistor, which should have less than 1V in saturation according to the datasheet.. which is defeating the point in the transistor :|Getting resistor voltage drop of 2.36-.61 = 1.75 with 470 Ohm resistor, therefore IB= 1.75/470 = 0.003723 = 3mA, which seems like a lot for base currentwhyyyyy

author: bson
author_rank: Unknown
timestamp: May 19, 2018, 03:38:55 am
content: You're going about this the wrong way... The current needs to be set by an emitter resistor, not a base resistor:You have a 2.5V signal on the base. You want 6mA current through RL:RE = (2.5-0.7)/6m = 300The resistance looking into the base is HFE * RE = approx 50k ohm ballparkAs the last step, add a base resistor to reduce the capacitive loading on the source, which are the green Ib switching currents in the plot below.Note that with RL=100 Vce will be whatever it needs to be to produce the desired Ie, which given the fairly high base-facing resistance, is effectively Ic. If you can't get the desired current this means you can't get sufficient voltage across RL; effectively Vcesat is too large and there's not enough headroom. The 2.5V base current is plenty to drive a small BJT into saturation (if needed, to produce the desired current).Vre = 6m*300 = 1.8VAdd Vcesat (0.2V?) and you have 2VThis means with a 12V supply you max out at 10V across RLFor a current of 6mA its resistance can't be more than 10/6m = ~1.6k

author: phaseform
author_rank: Regular Contributor
timestamp: May 20, 2018, 08:16:44 am
content: Thanks for the info on this! this info was a little tricky to find!Quote from: bson on May 19, 2018, 03:38:55 amNot familiar with this equation? so VE = voltage across R2/IC?Looking at the datasheet supplied by jaycar Vcesatshould be below 1 V.how is R1 not mentioned in transistor base resistor calculations generally?

author: Zero999
author_rank: Super Contributor
timestamp: May 20, 2018, 09:11:11 am
content: Quote from: phaseform on May 20, 2018, 08:16:44 ambson posted a different solution: drive the SSR off a constant current source. He assumed that the voltage from the drive and the voltage on the base is 2.5V, the transistor has a base-emitter voltage of 0.7V, therefore the voltage on the emitter will be 2.5-0/7 = 1.8V. The emitter resistor (R1) can then be chosen for the desired collector current: 6mA in this case I = V/R = 1.8/0.006 = 300R.The trouble with this is I think the output voltage from the driver will be more than 2.5V, which was the voltage when loaded. The transistor will never saturate with this circuit. I'm not sure if this is what you want.

author: bson
author_rank: Unknown
timestamp: May 21, 2018, 02:04:42 am
content: Quote from: phaseform on May 20, 2018, 08:16:44 amVbe is a well-controlled property in that while it varies it doesn't vary much. 0.65 or 0.7V is a pretty reasonable value for BJTs (it goes up a little with current, maybe 0.05V or 0.10V). It's a hallmark of BJTs. If the voltage on the base is Vb, then the emitter voltage is Ve=Vb-Vbe; loop analysis (Kirchoff's voltage law) tells us this. (One of the school exercises I still recall from the early 80s is loop analysis around BJTs. Lots of them.) Ohm's law tells us Ve = R1 * Ie, or R1 = Ve/Ie. With a large base resistance (R1*Hfe) we know the base current Ib doesn't contribute much and Ie = Ic, to within 1/Hfe. For an Hfe of 200 that means within 0.5%. If Hfe varies from say 100-200 between individual units of a particular BJT, then this discrepancy between collector and emitter currents will vary between 0.5% and 1%. Ic and Ie are pretty close, certainly no worse than the tolerances of a jellybean resistor. So, R1 = (Vb - Vbe)/Ic to within ~1% or less. It's also worth noting that a higher Hfe results in a small Vbe change, since they have the same root cause.R1 is very much discussed in BJT loop analysis. It's an essential part of it... A lot of online material however tends to be rather incomplete, and you can't really provide a formula to plug numbers into for every situation.Quote from: phaseform on May 20, 2018, 08:16:44 amFor small currents Vcesat doesn't matter, as long as you get the desired current. In fact, an SSR, being a semiconductor device (typically a LED), switches on at a threshold voltage and is current driven. Hence you need to drive it with a current, and Vce will be whatever it needs to be (pretty high) to set the input side (LED) current. Too much current and input LED is gonski (as Dave would put it).

author: phaseform
author_rank: Regular Contributor
timestamp: May 23, 2018, 02:45:07 am
content: I've created a schematic for this circuit, not sure if a BC639 will be suitable, don't fully understand driving for constant current, so I'm still unsure of what I'm trying to solve here. I don't really have much room for VCEfor the SSR to operate fully.Attaching a 10 Ohm resistor in series with the SSR connected to 5V source (wired as: 5v - SSR - resistor - 0V), I get approx .097 V, hence IC= .97/10 =~ 10 mAThe outcome I'm looking for is VCE< 1 V @ 10mA, in order to havemax voltage across the SSR.Open D0 is between 1.5-2.7 V depending on sensor current.. so Ideally, I'd like IC= 10 mA for D0 between 1.5-2.7 V...But I'm confused as for crunching the numbers / transistor suitability.- I'm not sure the constant current circuit would leave enough voltage across the SSR

author: bson
author_rank: Unknown
timestamp: May 23, 2018, 04:53:02 am
content: R1 = (1.5-0.7V)/10mA = 80ohmWhy a BC639? That's branded as a "High Current NPN Bipolar Transistor". 10mA is not "high current". It's tiny small-signal stuff. The jellybean of jellybeans BC548 (or 546, or 547 - they just differ in voltage tolerance, and are all perfectly fine) would be a better choice. The BC548 has a Vcesat of 90mV typ and 250mV max @ 10mA, with a max Ic of 100mA.

author: Zero999
author_rank: Super Contributor
timestamp: May 23, 2018, 08:41:06 am
content: Quote from: phaseform on May 16, 2018, 10:45:52 amSomething isn't right.Is that 0.2V low and 2.2V high from the sensor board, with the SSR connected to its output?The sensor board has an MCP6041 op-amp on it, which is being used as a comparator to generate the digital output. It has a rail-to-rail output, this means with no load, the output voltage swing equals the supply voltage. In this case it has an LED and 1k resistor (these are on the board) connected to the output, which will drop the voltage a little but not much. With a 5V supply, it should give 0V low and a little below 5V high, say 4.8V, when measured with a meter.http://www.dexsilicium.com/Microchip_MCP6041.pdfAll you need is this circuit.http://electronics-course.com/image/bjt-switch-inductor-load.pngIn this case a solid state relay is not inductive, so the diode is not needed.Suppose the output voltage from the sensor is 4.8V and the solid state relay draws 10mA.Set the base current to1/10of the collector current, which is 1mA.Calculate R1.R = (V - VBE)/II = 1mA = 0.001AV = 4.8VVBE= 0.6VR = (4.8-0.6)/0.001 = 4200ΩIn reality, the resistor is not critical: 3k3, 3k9 or 4k7 will do.To answer the original question: the BC639 is overkill but will work. The BC548 is more than adequate, but if you only have the BC639, then it's fine.

author: phaseform
author_rank: Regular Contributor
timestamp: May 23, 2018, 09:06:13 am
content: so yes, I am using a BC546, BC639 is one I had already and decided it was not ideal, so I got some BC546 parts.. D0 is giving 0.3 V low, and at least 1.5 V high (up to 2.7 V no load), D0 varies with sensor current, and isn't really a digital signal in my config at least. I played around with the adjustment pot and that's the best I could get, don't fully understand how the tuning worked. I went and got one ofthesearduino compatible relay boards because I wanted the SSR switching to be discrete (on/off), it draws 150mV through the sense pin over a 10 Ohm resistor = 15mA (wired as: 5v - resistor - relay board sense pin).So next is to figureBC546(derp) resistor values to trigger this relay board for >= 1.5 V D0 output... it will have to wait for now. So much for a simple project... as with every case.

author: Zero999
author_rank: Super Contributor
timestamp: May 23, 2018, 09:59:55 am
content: Quote from: phaseform on May 23, 2018, 09:06:13 amSomething is wrong with the current sensor board or power supply. The digital output should be more than 2.7V, unloaded and it should be independent of the potentiometer setting.Have you checked the sensor board is actually getting 5V?Are you sure you're not measuring the analogue output?The circuit I posted previously will work fine at lower input voltages. It will probably still work with 3k3 to 4k7 and an input voltage of 2.7V, since the Hfe of the transistor will be well in excess of 10. If the SSR still doesn't activate with it, then reduce R1 to 2k2 or 1k8.

author: phaseform
author_rank: Regular Contributor
timestamp: May 26, 2018, 07:03:31 am
content: I think the sensor board is causing all the issues here...If I run the digital sensor output to the input of the arduino relay board, I get the relay switching on/off at what i guess is line frequency. Even if I only put 2.6v DC into the relay (5v through a resistor), it will trigger, with a dimly lit indicator LED, that same voltage from the sensor output will cause the relay to switch on/off like crazy. I tried some random electrolytic caps to smooth this to no avail - haven't tried finding a correct filter cap as a potential solution..re the sensor board: Around the middle of the adjustment pot, I get:no current: 5.2v light offhigh current: 2.9v light onother setting:no current: 0.3v light onhigh current: 2.7v light dimthose values are around the middle of the trimpot, and have the greatest change in voltage. The analog output was just noisy to my DMM

author: Doctorandus_P
author_rank: Super Contributor
timestamp: May 26, 2018, 01:00:38 pm
content: You're going to a shop to buy a single transistor?Sounds weird, unless it's some special transistor.I can highly recommend a "transistor assortment kit" from Ali / Ebay / China / Whatever.300 or 600 transistors ifn different sizes and polarities.Always fun to experiment with, and no harm done if you let some of the magic smoke out.Your first job would be to get the datasheets of the transistors involved.Then make some comparisons, and select a nice kit on the bases of the selction in the kit.There are quite some differences between those kits.

author: phaseform
author_rank: Regular Contributor
timestamp: May 27, 2018, 08:14:06 am
content: nice, I'm just goingpragmaticrather than get too farintodealing with whatever this sensor is handing out, without buying a scope