Serial amplifier circuit

Thread Starter

Tarcontar

Joined Aug 10, 2017
9
Hi,
I wonder what exactly this circuit does, I think it amplifies the Signal strength but wouldn't one Transistor be enough for that purpose?
How can I replace the pnps with npn Transistors?

Tarcontar
 

Attachments

WBahn

Joined Mar 31, 2012
29,978
Where does that circuit come from?

What are the resistor sizes?

What are the transistors?

What is it you are trying to accomplish with it?

Are your signals analog or digital?

What is the frequency content of the signals?

What are the parameters for the circuit driving the input and that is being driven by the output?
 

Thread Starter

Tarcontar

Joined Aug 10, 2017
9
The circuit is from the MDB 4.2 specification.
There are no resistor sizes mentioned, also no specific transistors.
I try to use my Arduino as an MDB master (Vending machine Controller)
I am sending digital signals via UART at 9600 baud
So the input circuit is the Arduino pin with max 40mA but in the MDB datasheet is a minimum of 100mA required for the TX line of the master. So I guess this little circuit is to increase the 40mA to at least 100.

Tarcontar
 

WBahn

Joined Mar 31, 2012
29,978
So what is MDB?

Microsoft Data Base?
Masters in Douche-Baggery

Those are the first two hits I got.

Why make people that you are asking for free help from jump through hoops in order just to guess what it is you are trying to do?

If you having issues with something from a specification, please provide the specification or a link to it.

That circuit is going to be inverting, so your Arduino code has to account for that.

The topology was probably chosen so that the output is LO when nothing is driving the input while providing short-circuit protection when HI.

You can probably design a circuit that meets the spec using NPN transistors. Why do you need to?
 

Thread Starter

Tarcontar

Joined Aug 10, 2017
9
https://www.namanow.org/images/pdfs/technology/mdb_version_4-2.pdf

MDB stands for Multi drop bus and is used in vending machines to interact with coin changers, bill acceptors etc.
I have some NPN lying around but no PNP so that would be better.
I already inverted the Signal with an optocoppler so there is no Need for that anymore. So is this circuit capable of ~150mA if the 5v source provides it? Since a simple arduino pin only provides about 40mA.
 

AlbertHall

Joined Jun 4, 2014
12,345
The top transistor is a current limit circuit for the second transistor. How much current it can supply depends on the value of the resistor between the base and emitter of that top transistor.

If you want to use NPN transistors then you have to design it from scratch - you can't easily swap them.
 

WBahn

Joined Mar 31, 2012
29,978
upload_2017-8-10_17-6-37.png

Whether it can provide 150 mA depends on the choices you make for the various components.

Your specs say that the slaves can draw up to 30 mA each at 4 V. That doesn't give you a lot of overhead.

Your transistor Vce is going to be at least about 0.2 V and your Veb is going to be about 0.7 V, so that only give you about 0.1 V across your emitter resistor at 150 mA, meaning that it can't be any more than about 0.68 Ω.

Do you see how I did that?

Note that this doesn't include the current going down through the collector resistor, but this resistor can probably be set large enough so that it doesn't matter, say something in the 1 kΩ range.
 

Attachments

AlbertHall

Joined Jun 4, 2014
12,345
Your transistor Vce is going to be at least about 0.2 V and your Veb is going to be about 0.7 V, so that only give you about 0.1 V across your emitter resistor at 150 mA, meaning that it can't be any more than 0.68 Ω.
The emitter resistor is where the Veb is so the 0.7V is across that resistor and therefore for the limit to be 150mA that resistor should be 4.7Ω.
 

Thread Starter

Tarcontar

Joined Aug 10, 2017
9
So the top resistor should be 4.7Ohm, the Pull-Down resistor probably about 10k? and the resistor to the first transistor from the arduino pin about 1k?
 

Thread Starter

Tarcontar

Joined Aug 10, 2017
9
Well I have some TIP122 here, but these are NPN not PNP.
What would be the circuit if i dont want to invert the signal (or do so with a opto) only connect the NPN respectively to 5v, arduino pin and the tx lane?
 

WBahn

Joined Mar 31, 2012
29,978
So the top resistor should be 4.7Ohm, the Pull-Down resistor probably about 10k? and the resistor to the first transistor from the arduino pin about 1k?
Yep, you're right. Brain fart.

The pull down can probably be 10 kΩ, but I'd probably go with 1 kΩ to get a crisper shut off. Depends on the total capacitance that the output is seeing. With a 9600 baud rate, I'd probably want the five time constants to be over after about 10 us, so figure a time constant of about 2 us (but it can probably be pushed up to 10 us and still work pretty reliably). A 10 kΩ resistor requires the total capacitance of all of the slave inputs to be then lets the total capacitance be about 200 pF. I'm not too comfortable with that. In fact, a 1 kΩ might be too aggressive. Going to a 100 Ω resistor would only pull an additional 40 mA compared to the 150 mA target, so that would probably work. A compromise of 470 Ω might be a reasonable choice.
 

WBahn

Joined Mar 31, 2012
29,978
So the top resistor should be 4.7Ohm, the Pull-Down resistor probably about 10k? and the resistor to the first transistor from the arduino pin about 1k?
When your output transistor is delivering 150 mA it is going to be pretty heavily saturated, so figure a beta of about 10, meaning that you need to pull about 15 mA from the base. Assuming the current limit transistor isn't turning on yet, that means that when your base resistor has about 3.5 V across it you need 15 mA flowing in it, so you need to keep it below 233 Ω, so I'd use either a 220 Ω resistor or a 180 Ω resistor. The latter would require your Arduino to sink up to about 19 mA, but give you some cushion in case it can't get too close to ground while doing it.

You need to make sure that you use a transistor capable of delivering about 200 mA and, if necessary, heat sink it properly.
 

WBahn

Joined Mar 31, 2012
29,978
So this is then what the circuit would look like?
Yeah, give that a try and see how it works.

You need to estimate the worst case power dissipation for your transistor. If it is on constantly and your LED's drop 2 V (at a guess) then your output transistor might have at much as 2.3 V across it and let's call it a total of 200 mA of current. That would be 460 mW, or about half a watt of power. On average, you should be less than half of that, but if it isn't too onerous, you should plan for one watt of power (you usually design to twice the worst case power unless there's a pretty compelling reason to cut it closer).
 

Thread Starter

Tarcontar

Joined Aug 10, 2017
9
Hi,
So the top one is with pnp and the bottom one with non?
But why is there the current through R2 and R6 measured? I need 150mA on the right side not at the output pin...
Sorry im not so good at this, I am more a computer scientist than a electrical engineer...
 

Bordodynov

Joined May 20, 2015
3,177
iout_A=1.55V/10Ohm=155mA and
iout_B=1.45V/10Ohm=145mA (Ohm's law i=V/R)

The magnitude of the current can be increased by reducing the current-setting resistor to a value of 4.3 ohms.
I plotted the input currents
 

Thread Starter

Tarcontar

Joined Aug 10, 2017
9
Hi,
so I tried the top scematic but cant get it to work with 2 transistors. I have the BD912.
So I removed the current Limiting Transistor. that works fine, inverts my signal.
Do I realy need the current limiting? since I need at least 150mA, more would be better or not?

Tarcontar
 
Top