Transistor circuit not working - Page 1
Forum section: electronics / beginners

author: RyanG
author_rank: Regular Contributor
timestamp: February 11, 2017, 05:46:52 am
content: In this circuit the red bordered area is what I am adding to an existing circuit, which is outside the red box. The circuit works correctly on a breadboard using different voltages for the 2 inputs, but when I put the whole thing together in the machine it is intended for, it doesn't work. The LED stays lit. I believe that it is because my additional 12v actually comes out higher, around 14v, and the original 12v is around 11.9v. I know that what I have shown as the original circuit is a dead short, but that is actually the way it works. I have 2 questions here. What would be the best way to get my additional 12v down to a voltage that I can use on the PNP transistor so that I can a actually turn it on and off? It will eventually be powering 10 of these separate transistor/led circuits. I would also like to know what transistor would be good for this circuit. I have a bunch of 2n3906 around, but I kind of still get confused on some of the voltage ratings on datasheets, mostly the emitter-base voltage. If there is anything else that I might have to add to the circuits then any help would be great. I have been trying this for a while now with little luck. And, I cannot use either of the 12v sources for the entire circuit.For anyone that wants to know what the switch actually is; it is a set of fingers that close and pick something up. When they close on an object a contact closes the 12v to ground telling the machine that there is something there. My reason for wanting to make this circuit is to have a better indication of when something is there and to troubleshoot when a wire breaks and goes to ground. That is a common problem in a these machines because of all of the moving parts. The machines are AMF 82-70 automatic pinsetters for bowling.

author: Cupcakus
author_rank: Contributor
timestamp: February 11, 2017, 09:25:51 am
content: The cheapest easiest way would be an LM317 that will get the voltage from 14v to regulated 12v no problem.

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: February 11, 2017, 09:47:29 am
content: I think if you make sure the grounds are shorted together (I mention that just in case) and also disconnect the transistor base power supply, it should work with the 2n3906.Else you could put about 4 forward based diodes in series with the 10k.Else a small reversed based zener in the same place.

author: Ian.M
author_rank: Super Contributor
timestamp: February 11, 2017, 11:26:04 am
content: I'd simply move the LED and its series resistor to between the emitter and your 12V supply then connect the collector directly to ground so the transistor acts as an emitter follower. That will vastly reduce the load on the pinsetter sensor circuit and also add about 2V of standoff (LED Vf + transistor Vbe) before the LED comes on.If it still glows excessively, a 2.7V 500mW zener in series with your 14V supply would drop it to a bit under 12V, if you keep the Zener biassed with a 1K resistor to ground, and woukd have enough current capability to feed all ten of your LEDs.

author: danadak
author_rank: Super Contributor
timestamp: February 11, 2017, 01:13:47 pm
content: Typical LED would want 10 mA or so to light it up. That means toget transistor saturated approximately 1 ma into the base. But your10K base R limits you to ~ 100 uA. Just a tad low.Regards, Dana.

author: Ian.M
author_rank: Super Contributor
timestamp: February 11, 2017, 01:33:17 pm
content: 2N3906 minimum HFE80 @IC=1mA rising to 100 @IC=1mA.The 1K resistor limits the LED current to the close order of 10mA, or a bit less if its rearranged as an Emitter follower as I suggested. 0.1mA of base current through a 10K resistor is a 1V drop. The LED will certainly light OK, probably passing around 8mA. The transistor wont be saturated, but its dissipation will be a negligable fraction of its rating.

author: wraper
author_rank: Unknown
timestamp: February 11, 2017, 01:42:44 pm
content: QuoteIf that circuit produces a dead short on the power rail, what's the point adding a transistor? Once you short the switch, there will be no power for the LED anyway. So don't draw it as single 12V rail if there are two separate rails. Secondly, switch should not be connected to 12V at all. Just bare switch to GND.

author: Ian.M
author_rank: Super Contributor
timestamp: February 11, 2017, 02:02:04 pm
content: I'm fairly sure the 12V 'rail' on the left is from the pinsetter and is actually some sort of input with a pullup to 12V or a load hanging off the real 12V rail. The alternative of a switch crowbarring the rail would blow fuses

author: RyanG
author_rank: Regular Contributor
timestamp: February 11, 2017, 03:04:15 pm
content: The switch being pulled to ground is how the machine is wired by default, and so, I am using the transistor to detect when that happens without interfering with that circuit. I tested the circuit today with a potentiometer on my 14v input to drop the voltage until the led went out. I had to drop it all the way down to around 8.7v. At that voltage everything works correctly on my circuit and the machine runs correctly. I don't know why the voltage has to be so low on that input to work though.

author: Ian.M
author_rank: Super Contributor
timestamp: February 11, 2017, 03:11:25 pm
content: You've probably got a lot of ripple on your supposedly 14V auxiliary supply. The LED would light whenever the peak of the ripple goes over about 12.5V. What are you using to provide the auxiliary supply?

author: RyanG
author_rank: Regular Contributor
timestamp: February 11, 2017, 03:39:21 pm
content: The supply is a line no longer used on our machines that used to light up old 12v bulbs for a similar thing that I am making. The 12v bulbs indicated which pins were left standing after a ball was thrown to the bowler, but most of that circuitry has been removed from the machines except for that 14v line.

author: Ian.M
author_rank: Super Contributor
timestamp: February 11, 2017, 03:53:57 pm
content: So if all it was for was supplying bulbs, its probably an unfiltered (or minimally filtered) rectified supply. It probably has a lot of 120Hz ripple on it. Try what I suggested in reply #3.

author: RyanG
author_rank: Regular Contributor
timestamp: February 11, 2017, 06:15:53 pm
content: I redrew the schematic with the complete circuit in it. Let me know if it looks good.

author: Ian.M
author_rank: Super Contributor
timestamp: February 11, 2017, 06:38:22 pm
content: Looks reasonable, as long as the Vee rail is smoothed. If its unsmoothed (raw full wave rectified), the peak voltage could be over 18V. Either check the schematic, look at it with a scope, or if you don't have a scope you can get to it, if you connect a 12V incandescent bulb to load it down a bit, then connect your meter on AC V with a 1uF capacitor in series you can get some idea of the ripple voltage. In that case, a smoothing cap and a 7812 regulator would be a good idea.You may need a resistor to ground from the Zener anode to keep it biassed so it drops most of its rated voltage, preventing the LEDs glowing slightly when all switches are open. 10K would do the job.Your '+12V' connections aren't. They must be the pinsetter's inputs, which would have a pullup resistor to +12V.

author: james_s
author_rank: Super Contributor
timestamp: February 11, 2017, 07:22:01 pm
content: Are you sure it's even DC? Incandescent bulbs don't care if they get AC or DC, I've seen systems that used AC and switched the lamps with SCRs, what the bulbs actually saw was pulsating half wave rectified DC.

author: RyanG
author_rank: Regular Contributor
timestamp: February 11, 2017, 07:47:52 pm
content: I found the manual for the electrical part of the machines on the internet. From the pictures it does look like it is half wave rectified at the bottom in the yellow area. I also believe that it is done with SCRs inside the PCBs that control the machine. The SCRs that I have found are S2010LS2. But, I think the most important part is that it is half wave rectified coming into my "+14V". I do realize that my "+12V supplies" are not actually supplies, but probably pulled up like you say. For simplicity, I just put them on the schematic as 12V supply points. The line labeled PM1-E1 is the "+14V" line.Here is a link to the manual. The last few pages have the info I think we need.Manual

author: Ian.M
author_rank: Super Contributor
timestamp: February 11, 2017, 08:23:35 pm
content: I was right. Its full wave rectified and peaks considerably above 12V. My suggestion of a Zener dropper WILL NOT WORK.As there are other circuits that may rely on it going to zero 120 times a second, you need a diode e.g. 1N4002 to isolate any smoothing cap you add, (like D3 does for he feed to the PC board #4), followed by a smoothing cap to ground that can hold the voltage above 14V with a 100mA load. 220uF, 35V should do nicely. Then you need a 7812 regulator, with a 0.33uF ceramic cap as close as possible to it on its input and output for stability. It will be dissipating about 0.8W which is a little much for a TO220 without a heatsink so find a grounded piece of metalwork to screw it to or add a small clipon heatsink. The output of that will be a clean 12V that can feed the anodesof all the LEDs in your reply #12 schematic.

author: RyanG
author_rank: Regular Contributor
timestamp: February 11, 2017, 08:45:06 pm
content: So, how about this one?

author: Ian.M
author_rank: Super Contributor
timestamp: February 11, 2017, 08:49:40 pm
content: Looks good.

author: RyanG
author_rank: Regular Contributor
timestamp: February 11, 2017, 08:52:32 pm
content: Alright, I'll have to look around all my stuff to see if I have everything. Thanks for the help.

author: Ian.M
author_rank: Super Contributor
timestamp: February 11, 2017, 09:09:24 pm
content: If it helps the parts situation, there are plenty of alternative ways of skinning this cat if you dont have a 7805 handy. e.g. you could substitute a LM317 adjustable regulator with 120R upper and 1.1K lower resistors for its Adj pin divider, or even use a 1W 12V Zener as a shunt regulator with a 560R dropper feeding it, or even a lower current Zener with a larger dropper and a NPN emitter follower hanging off it.You could also increase the filter cap to 470uF. I wouldn't go much higher than that as it increases the startup surge and also the regulator dissipation.

author: RyanG
author_rank: Regular Contributor
timestamp: February 11, 2017, 09:20:56 pm
content: I think the only thing I really have to look around for will be the regulator input and output capacitors. What range would be okay on those? I have a LM317 setup at work to be a variable power supply for some of the smaller stuff I work on. I could use that temporarily while I make sure everything will work.

author: james_s
author_rank: Super Contributor
timestamp: February 11, 2017, 09:29:41 pm
content: It can be calculated but in reality it's not very critical. I'd say anything from about 470uF to 2200uF is probably fine, in practice you're not going to have any problems going higher unless you go WAY higher.

author: Ian.M
author_rank: Super Contributor
timestamp: February 11, 2017, 09:37:30 pm
content: I did a quick SPICE sim to get that 220uF value. If you go too big, as the supply is lightly loaded compared to its previous incandescent lamp load, the average voltage will go way up, maybe as high as 25V, (depending on incoming line voltage and transformer regulation factor) increasing the 7805 regulator dissipation. The ideal is for the troughs of the ripple to just dip to 15V giving the regulator 3V headroom with the lowest legal line voltage, and the cap at the minimum value permitted by itts tolerance range.If you don't want to mess around in SPICE or with heavy maths, you can solve for the minimum cap value graphically - carefully plot the minimum voltage full wave rectified waveform on graph paper and draw a downwards sloping tangent from just after the peak to intercept the next half cycle at the 15V level. The slope gives you dV/dt then solve I=C*dV/dt for C.

author: RyanG
author_rank: Regular Contributor
timestamp: February 11, 2017, 10:06:58 pm
content: You originally said to use a 7812. Should I use that or a 7805? I'm assuming that you mean 7812.

author: Ian.M
author_rank: Super Contributor
timestamp: February 11, 2017, 10:41:05 pm
content: Sorry 7812, though if all you've got is 7805, you could stick a 6.8V Zener in series with its Gnd leg.

author: RyanG
author_rank: Regular Contributor
timestamp: February 12, 2017, 02:07:41 am
content: Have it working perfectly with it setup like that last schematic. Only have one of the leds in there, but that is good enough to know it works. I had to use a 35v 680uf cap and two 0.47uf caps instead of your suggested values because that's what I have. Looks good so far. Now I just have to put the whole thing together.

author: Ian.M
author_rank: Super Contributor
timestamp: February 12, 2017, 04:45:11 am
content: Good.It will be fairly simple to build up on Veroboard or matrix board. I assume you only need one for a diagnostic aid. If you need one for each lane its probably worth getting a PCB made

author: bson
author_rank: Unknown
timestamp: February 12, 2017, 08:17:26 pm
content: When you close the switches you're shorting 12V to ground.

author: Ian.M
author_rank: Super Contributor
timestamp: February 12, 2017, 08:58:40 pm
content: O.P's reply #14Quote from: RyanG on February 11, 2017, 07:47:52 pm

author: mackeb
author_rank: Newbie
timestamp: February 14, 2017, 01:52:27 am
content: Quote from: RyanG on February 12, 2017, 02:07:41 amHi Ryan,I used to be a head mechanic at an 82/70 house. I notice you use pinsetter instead of pinspotter, are you a brunswick tech?In any case, I know exactly what you're doing with this unit. Are you going to use it as a diagnostic unit that plugs into the table wiring harness or one for each lane to replace the 'magic triangle' pindication?If your auto scoring supports strike cycles from the scoring system then you can remove all the table wiring and trigger the strike cycle from the scoring which is a great way to go, and it means you can use 90XLi respot cell parts which eliminate the spade and adjusting bolt in favour of a solid aluminium casting and grub screw for adjustment.

author: RyanG
author_rank: Regular Contributor
timestamp: February 14, 2017, 08:03:12 pm
content: I have only worked on 8270s. We have a scoring system that requires the cell wires for the strike cycle. I am using this as a diagnostic for finding broken or disconnected wires. I was going to use the old pindication circuitry out of the chassis but some of our omega boards are not pindication compatible. Also, depending on how well it works, I might wire all 24 machines to have a permanent board attached. Right now the design allows it to be used while the machine is running normally, making it easier to find problems during a league without any downtime.

author: RyanG
author_rank: Regular Contributor
timestamp: February 15, 2017, 12:45:34 am
content: Don't make fun of the DSO138. Here is a picture of the voltage coming in to power my leds. This picture is without my board hooked up. It is the voltage straight from the source.picture