Go Down

Topic: [SOLVED]BJT cascade problem? (Read 607 times) previous topic - next topic

surepic

Jul 04, 2019, 05:47 am Last Edit: Jul 05, 2019, 05:26 am by surepic
Hi everyone, I`m stucked with one problem that cant figure out few days.
Have built small cascade npn-pnp on breadboard. Tested everything works perfect. Before injecting that block into the project decide to recheck it on pcb. First version failed, second version also failed and now 3-rd version of the same design is having exact same problem. Design I`m doing in Autocad Eagle v9x. 3-rd version of the board has largest width of the traces for the size of the board and at 3-rd attempt I let eagle to do autorouting as I am sure routing has nothing to do with my problem. Width of traces 0.381mm, clearance min 15mil. Peak voltage 5.0 and current of this particular cascade 1.5ma.

To try I attached servo motor MG995 and sent pwm via Arduino with servo sweep sample code. Servo is not responding at all. Servo is tested by directly attaching to Arduino and it works good.

Exact same circuit on breadboard and pwm via Arduino is making servo to work but not on PCB. I reverse engineered my own pcb board printed in China to see if I`m missing something or if there is short etc.- no everything is exact the same as drawn.

Simulation on ltspice shows circuit must work.

Circuit is attached .

NPN-S9018
PNP-BC557

Today applied 5v dc directly to input of cascade and am getting on output from BC557 collector 5.07V as it should.
Current test with multimeter showed max 90ma BC557 is capable of delivering without overheating.

Then attached oscilloscope with pwm signal from Arduino and again everything is perfect . Except motor is not turning at all.

Hoping to get tips how to check further.

And again problem is not how this circuit can be better implemented (mosfets,optocouplers, etc etc.), problem is why its working on breadboard and passing all my debug tests but not turning the motor with 50hz pwm.

Thanks.

ReverseEMF

#1
Jul 04, 2019, 06:25 am Last Edit: Jul 04, 2019, 06:42 am by ReverseEMF
How much current does the Servo demand on it's input?  An Arduino UNO pin can supply quite a bit more sink current than can a 4.7k resistor.  And the main difference is, the Arduino output is a Push-Pull affair, that can both safely sink, and source 20mA [40mA max, but that's pushing the bounds of "safe"].  Whereas, the BC557B can  source something like a tenth of an amp, but that resistor can sink only about 150uA, or so, before it starts dropping too much voltage to behave like a "LOW".  The input impedance of a servo control line should be fairly high, but parasitic capacitance could be causing a distortion of the signal on the falling edge, and I imagine that could cause problems.  Try changing that resistor from 4.7k to something more like 1k or even as low as 220 -- if only for diagnostic purposes.  If changing the resistor to a lower value gets it working, then consider a different driver circuit [unless the lower resistance value works for you ;) ]

And, can you supply a photo, or three, of your setup [unless, of course, my suggestions made the difference]?
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

Wawa

Let me see if I understand this correctly.

You want to switch MG995 servo power with this high-side switch?
A servo with a stall (startup) current of 1.2Amp with a <=100mA signal transistor?

Or do you want to invert servo signal twice (to be the same again). For what reason?
Leo..

surepic

#3
Jul 04, 2019, 01:07 pm Last Edit: Jul 04, 2019, 01:09 pm by surepic
@wawa your suggestions are mostly helpful but think u didnt get this circuit right this time. what servo stall current can do with signal line? Nothing.

From my own experience of reverse engineering of mg995:
Pwm input in mg995 is going to input pin of pic microcontroller inside the servo housing which can easily sink/source 50ma.
Vcc pin of servo is going voltage regulator which is powering pic mcu and then to mosfet bridges which "may" sink 1.25A or if stalled will drain 1.25A.

@ReverseEmf 4.7k resistor is pulldown resistor and to control current of CE of pnp applying constant load.
Parasitic capacitance of what? Falling edge is slightly off because of discharging speed of bc557 and my setup but on breadboard oscillogram is even worse on falling edge but mg995 is working.

Will take some pics of pcb may be that will help.

Paul__B







OK, clear XY problem here.

We have no idea what the OP is attempting to do, other than he is doing it very badly.  :smiley-eek:

Just one fascinating blunder, often seen with MOSFET schematic suggestions but equally valid for bipolars.

Do not put resistors from base to emitter in logic circuits to form a voltage divider.  Insofar as they are needed, they should go on the left-hand side of R1 and R3.

surepic

I put them while adjusting falling edge. Rbes helped a lot. Tried with diode clamp too but this values of rbes showed real difference. Will unsolder later and retest but dont think thats gonna help to solve the problem.

Paul__B

The problem is - we still cannot by any means fathom what it is you are attempting to do!  :smiley-roll:

surepic

Problem is described in post #1. I rearead it and cant think of any info that i can add.

And forgot to ask if u could explain this:"Do not put resistors from base to emitter in logic circuits to form a voltage divider.".

Thanks.

Perehama

Problem is described in post #1. I rearead it and cant think of any info that i can add.

And forgot to ask if u could explain this:"Do not put resistors from base to emitter in logic circuits to form a voltage divider.".

Thanks.
All we can determine about what you are trying to do is "Have built small cascade npn-pnp on breadboard." and "To try I attached servo motor MG995 and sent pwm via Arduino with servo sweep sample code. Servo is not responding at all." That is akin to instead of saying "I want to take a bath" saying "I have set up 150 liters of tap water and I wish to suspend 90 kG of biomass for 45 minutes."
The slender snake hissed as she slithered slowly over the rocks, grass and leaves.

ReverseEMF

#9
Jul 04, 2019, 05:23 pm Last Edit: Jul 04, 2019, 11:21 pm by ReverseEMF
You want to switch MG995 servo power with this high-side switch?
A servo with a stall (startup) current of 1.2Amp with a <=100mA signal transistor?

Or do you want to invert servo signal twice (to be the same again). For what reason?
Leo..
I think the confusion here, stems from the apparent absurdity of the circuit you presented.  You can drive a typical servo control line directly from an Arduino output--which you apparently tried.  So, why the circuit-histrionics
And, that, my friend, is why you need to let us in on what it is you're trying to do, so we can say "Ahhhh... now I understand", or you need to be willing to accept our couching if the response is more like "Why, the devil, would you want to do that?!?"
The horse you rode in on is rather tall.  And, you'll need to find a way to clamber down off it, or chances are you won't get much help here.

And I'll start by saying, you're right, like a fool, I charged in, when I should have held back.  By offering what I did, regarding that 4.7k resistor, and it's potentially inadequate pull-down drive, I, apparently, was out of sync with whatever it is you've got going on, over there.   So, my apologies.

And, regarding my comment about "parasitic capacitance", I was thinking in terms of Gate Capacitance in the Servo Input Electronics.  But, at 50Hz, that may not be an issue.   Also, I forgot that you said this was working on a breadboard, and "fails" when implemented on a PCB -- which is perplexing, indeed.
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

surepic

May be you all are right i cant describe the problem clearly. I thought of giving as much details as possible and may be that messed up the picture. Sorry about that. As i cant delete the thread will update when will solve the problem sooner or later.

ReverseEMF

#11
Jul 04, 2019, 07:45 pm Last Edit: Jul 04, 2019, 07:46 pm by ReverseEMF
May be you all are right i cant describe the problem clearly. I thought of giving as much details as possible and may be that messed up the picture. Sorry about that. As i cant delete the thread will update when will solve the problem sooner or later.
Have you read: How To Use This Forum?  It might give you some ideas on how to better explain your issue.  That's mostly what it's about -- clear communication, to benefit both parties: the OP [you], and us ;)
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

Perehama

May be you all are right i cant describe the problem clearly. I thought of giving as much details as possible and may be that messed up the picture. Sorry about that. As i cant delete the thread will update when will solve the problem sooner or later.
A picture of your breadboard, your PCB... plain English, non-laboratory terms. Don't focus on the problem, as that is actually secondary to the application. Tell us a bit about your project and your methodology. Then the expected behavior and actual behavior, which is more or less what you've described, will have context.
The slender snake hissed as she slithered slowly over the rocks, grass and leaves.

MarkT

#13
Jul 04, 2019, 10:42 pm Last Edit: Jul 04, 2019, 10:43 pm by MarkT
We don't know the input requirements of the servo other than it expects a standard push-pull logic output to be connected to it.  It may have pullup, pulldown, or whatever and may source and/or sink many mA of current.

My suspicion is it has a pull-up resistor on its input, which is why your pull-down doesn't work.

Just drive the servo with a logic output like its designed for.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

surepic

@MarkT they key here is that exact same circuit is working on breadboard! Which is why this whole thing is driving me crazy. If the circuit was wrong or if it is wrong or something then why its working on breadboard. Will post pics of pcb and breadboard later and board schematic too.

Go Up