need help with simple circut

Thread Starter

nitrosmd

Joined Jul 20, 2013
59
At almost 80 posts, I guess it belies its original heading of 'Simple Circuit' :rolleyes:
Max.:)
I think 80 posts describes the density of my head :) and my desperation to understand things... I'm sure in grand scheme of things, this is still a rather simple circuit. But yeah, originally all I thought I needed was two photos, a battery and a motor. Boy was I wrong.
 

WBahn

Joined Mar 31, 2012
30,088
Thanks for the updated schematic.

You STILL don't have load resistors for the phototransistors, as pointed out in Post #70. This will cause you problems.
 

WBahn

Joined Mar 31, 2012
30,088
I think 80 posts describes the density of my head :) and my desperation to understand things... I'm sure in grand scheme of things, this is still a rather simple circuit. But yeah, originally all I thought I needed was two photos, a battery and a motor. Boy was I wrong.
But it seems like you are learning quite a few things (except how to put load resistors on phototransistors ;) ).
 

WBahn

Joined Mar 31, 2012
30,088
Nope. As I pointed out in that post, there is no place for the current in the transistor to go since the comparator inputs are extremely high impedance.

The phototransistor works by turning photons into electron-hole pairs that can then foster collector current in the same fashion as a base current does in a normal transistor. But that collector current has to go out the emitter. By putting a resistor between the emitter and ground (as specifically stated in that post), you let that collector current find its way to ground AND convert it into a voltage that is then seen by the comparator inputs.

One problem that you are going to have with this circuit is that it isn't going to work very well over a wide range of light levels. If it's practical, you can deal with this using a common-mode potentiometer and then two voltage generation resistors. Then when the overall illumination level changes you just adjust the common-mode pot.

We can discuss it more (in the next 80 posts!) :D
 

Thread Starter

nitrosmd

Joined Jul 20, 2013
59
But it seems like you are learning quite a few things (except how to put load resistors on phototransistors ;) ).
It's absolutely fascinating. I'm constantly imagining how each stage of the circuit works.

So... I removed the 47k on top and added two 47k from the photo's emitters to ground to supplement the current drain since the comparators have such high resistance.

The circuit operates about the same (I'm sure it's a bit more bullet proof). Still works great with two LEDs as the load, but I only get about 60mA though the h-bridge :(

I can revise the schematic and also post new pics of the breadboard if you want.
 

Thread Starter

nitrosmd

Joined Jul 20, 2013
59
I stuck another battery AA on there just to see if more voltage would help and had no luck.

I also tried decreasing the values again on both pull-ups (comparator outs) also with no luck.

It seems that when the pull-ups have lower values, they apply opposing current at the base of the pnp transistors effectively choking out the h-bridge. I think this is because the output of the comparators (when low) don't have enough sink. Is this reasonable? Should I try another type of comparator?
 
Last edited:

Thread Starter

nitrosmd

Joined Jul 20, 2013
59
I'm going to attempt a different h-bridge configuration using ALL npn transistors instead. I'm thinking this could resolve the above issue.
 

WBahn

Joined Mar 31, 2012
30,088
You might have said this at some point, but how much current does the motor draw if you power it directly from 3.1V (4.5V - 2*0.7V)? With your present configuration, that is about the most voltage you can get across the motor. Let's say that you want 100mA and that the actual beta of the NPN transistors was 100. That means that you have a base current of 1mA flowing through your 380Ω resistor which is droping about 0.38V, so now you are down to about 2.7V across the motor.

And where did you get 380Ω resistors? That is not a standard value. Are you sure it isn't 180Ω or 680Ω? Or perhaps a 390Ω?
 

Thread Starter

nitrosmd

Joined Jul 20, 2013
59
It is 390 ohms excuse me.

I was trying an NPN only h-bridge which BTW was an epic failure, so I have revert the circuit before I can test what you said however, motor uses about 318mA straight from the power supply @ (4.5V).


Specs are:

1.5-3VDC
0.18-0.25A at no load
.70A ± 15% ast max efficiency

This is a side question. When I tried to run two NPN transistors in series with a load (LED) in between, I couldn't get the transistors to activate. I used 100 ohm resistors at each base. When I used the rail voltage @ each base, it worked, got hot, and I know it's not a good idea. 100 ohms is the lowest resistor I have, I even a couple resistors in parallel (2 more at each base). No go.
 

WBahn

Joined Mar 31, 2012
30,088
It is 390 ohms excuse me.

I was trying an NPN only h-bridge which BTW was an epic failure, so I have revert the circuit before I can test what you said however, motor uses about 318mA straight from the power supply @ (4.5V).

Specs are:

1.5-3VDC
0.18-0.25A at no load
.70A ± 15% ast max efficiency
I think your problem is that you are abusing those poor 2n2222 transistors (and probably the 2n2907s, as well) pretty badly.

http://www.mouser.com/ds/2/308/P2N2222A-D-116873.pdf

(Note: The above is for the plastic TO-92 cased part.)

Let's consider the situation at a target of 300mA, you are probably getting a β of only 80 or so, your Vbe is probably nearly 1V, you are in the neighborhood of the max junction tenperature and the derated power limit.

So you are needing a base current of about 4mA giving you a drop in the 390Ω resistor of about 1.5V. Add in another volt for the PNP Vbe and you are down to just 2V across the motor.


This is a side question. When I tried to run two NPN transistors in series with a load (LED) in between, I couldn't get the transistors to activate. I used 100 ohm resistors at each base. When I used the rail voltage @ each base, it worked, got hot, and I know it's not a good idea. 100 ohms is the lowest resistor I have, I even a couple resistors in parallel (2 more at each base). No go.
Could you sketch the circuit you used? I'm pretty sure I know what you did and why you had problems, but I'd like to see the circuit so that I can confirm it.
 

Thread Starter

nitrosmd

Joined Jul 20, 2013
59
I think your problem is that you are abusing those poor 2n2222 transistors (and probably the 2n2907s, as well) pretty badly.

http://www.mouser.com/ds/2/308/P2N2222A-D-116873.pdf

(Note: The above is for the plastic TO-92 cased part.)

Let's consider the situation at a target of 300mA, you are probably getting a β of only 80 or so, your Vbe is probably nearly 1V, you are in the neighborhood of the max junction tenperature and the derated power limit.

So you are needing a base current of about 4mA giving you a drop in the 390Ω resistor of about 1.5V. Add in another volt for the PNP Vbe and you are down to just 2V across the motor.
I need time to digest what your saying. Could of sworn my beta (hfe) said 200. I'll look when I get home.

I got some darlingtons and some other power transistors. I'll try those.

I've been dying to have a question answered:

Why does the circuit break when I go much lower then 380 ohms? I just figured the lower I go, the hotter the transistors should get (with a big load), until things burn up. I don't even have enough to light an LED. Does it make sense to you that it would? Are the upper corners competing because of impedance on the comparator outputs (when low)?

Once again, thanks for your all time :)
 

WBahn

Joined Mar 31, 2012
30,088
attached a sketch
Yep, that's what I thought.

So the LED is going to have to have something around 1.8V to 2.2V, depending on color (higher it is it a blue or white). The Vbe of the top transistor is going to be at least 0.6V and the voltage across the bottom transistor is going to be at least the Vcesat of about 0.1V. So just those things along is going to require between 2.5V and 2.9V to power. Then there is the drop in the top transistor's base resistor. You have basically run yourself out of available voltage headroom, particularly if the battery voltage is at all below 3V.
 

WBahn

Joined Mar 31, 2012
30,088
I need time to digest what your saying. Could of sworn my beta (hfe) said 200. I'll look when I get home.
The β of a transistor is a highly variable parameter. Look carefully at the data sheets and you will see that several of the curves that are usually plotted come down to the beta varying all over the place as other parameters change -- in addition to just a very high random variation from one transistor to the next.

I got some darlingtons and some other power transistors. I'll try those.
Gotta be careful, here. You don't have much voltage overhead and Darlingtons could chew the rest of it right up.

I've been dying to have a question answered:

Why does the circuit break when I go much lower then 380 ohms? I just figured the lower I go, the hotter the transistors should get (with a big load), until things burn up. I don't even have enough to light an LED. Does it make sense to you that it would? Are the upper corners competing because of impedance on the comparator outputs (when low)?
Which circuit are we talking about? The one with two NPN transistors and an LED, or the one with NPN transistors up top, PNP transsitors down below, and a motor inbetween?
 

Thread Starter

nitrosmd

Joined Jul 20, 2013
59
Which circuit are we talking about? The one with two NPN transistors and an LED, or the one with NPN transistors up top, PNP transsitors down below, and a motor inbetween?
The first circuit - NPN transistors up top, PNP transistors down below.

The NPN only circuit was my start of a different h-bridge configuration. And I should of wrote 4.5V at the top rail, not 3V. I used three AAA's and I just assumed I did something wrong because I had no light. I'll make it again and actually measure throughput so I can verify what your saying. Although, I'd rather not get two distracted with this h-bridge if I'm just going to run into the same issues as the other circuit (I like the first h-bridge configuration best).
 

Thread Starter

nitrosmd

Joined Jul 20, 2013
59
When the output is LO, this is accomplished by turning the transistor on hard, which places it in saturation. But there is a "saturation voltage" than is needed in order to conduct much current at all and that voltage is in the range of a couple tenths of a volt. As you require the output to sink more current, that voltage will rise, but only slowly.

What is important is that it remain at a low enough voltage so that whatever circuitry is connected to the output pin will recognize it as a logic LO. Usually, anything below about 0.8V will satisfy this (but it depends on the specifics of what you have connected to it).
I'm was re-reading things and I came across this and I'm wondering what parts of the comparator control the saturation level. If I put more current on the inputs can I improver the sink? I know you said that the inputs have high impedance. Is there away I can be sure my output is sinking to it's full potential.
 

WBahn

Joined Mar 31, 2012
30,088
The first circuit - NPN transistors up top, PNP transistors down below.

The NPN only circuit was my start of a different h-bridge configuration. And I should of wrote 4.5V at the top rail, not 3V. I used three AAA's and I just assumed I did something wrong because I had no light. I'll make it again and actually measure throughput so I can verify what your saying. Although, I'd rather not get two distracted with this h-bridge if I'm just going to run into the same issues as the other circuit (I like the first h-bridge configuration best).
If you are using 4.5V, you may have had the opposite problem -- your circuit supplied so much current to the LED that it burned out and is now a Dark Emitting Diode (i.e., DED). So make sure that your LED is actually still an LED.

The H-bridge is designed to switch a voltage to a load, not to regulate current through the load. So you need to use a load that can regulate its own current given an applied voltage. A motor will do this. So will a diode that is series-connected with a current limiting resistor.
 
Top