Shop OBEX P1 Docs P2 Docs Learn Events
What's the difference between "differential" output and "push-pull" output? — Parallax Forums

What's the difference between "differential" output and "push-pull" output?

Duane DegnDuane Degn Posts: 10,588
edited 2014-09-01 13:47 in General Discussion
I was looking over at Digi-Key for some small '165 parallel to serial shift registers and I notice they have a column "Output Type" with both "Differential" and "Push-Pull". I've tried both the datasheets and Google in hopes of finding out the difference with no luck.

Here's an example of a differential chip. Here's a push-pull chip.

I'm planning on using these chips to digitize the readings of inexpensive voltage and current sensors with 7-segment displays.

As I mentioned in the "$1.78 USB Monitor" thread, I'm using some '165 chips and a Propeller to turn these simple sensors into complicated monstrosities.

attachment.php?attachmentid=110717&d=1409376047

I'm able to capture the data from the USB meters and I've also got this same arrangement to work with these 30Volt and 30Amp meters from HobbyKing.

I can get a good capture from the HobbyKing meter but I haven't been able to capture the "v" displayed on the USB meters. I'm wondering if one type of '165 chip would work better in this application than the other?

I posted a few additional photos of my "experiment" on Let's Make Robots.

I was pleased to learn this isn't necessary an absolutely idiotic idea and capturing data from 7-segment output has been around a long time.

One reason for doing this is to run some tests on motors while keeping track of volts and amps. I want the volts and amps displayed so they can be seen by the video camera while testing but I also want a way to log the data so I can produce graphs and analyze the data after the test is completed.

I have been collecting other ways to monitor voltage and current, but current sensing setups always seem to more expensive than these inexpensive current sensors with 7-segment displays.

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-08-31 22:55
    The 165 has both a Qh and a /Qh (inverted Qh) signal which could be labeled "differential" I suppose which might mean that you could drive a long twisted pair line as long as you had a differential receiver on the other end too, but I doubt that is the reason for these two complementary outputs. Push-pull is what you normally have on any logic output, it both sources or sinks, or pushes and pulls, this latter terminology coming from the old old audio amplifier days when Class A just had a single tube/valve/transistor that fed a transformer but Class B could push and pull (source/sink) so it could be fed directly to a speaker via a capacitor.

    Either chip will work, you just don't really need the CLR function of the 166 but that doesn't matter either.

    EDIT: the 165 is asynchronous load (anytime) while the 166 requires a low to high on the clock (synchronous)
  • SapphireSapphire Posts: 496
    edited 2014-08-31 23:23
    Duane,

    I don't think the output type matters for your application because you have the segments wired to the inputs. I really suspect that you are not scanning fast enough, or the 3 parts of the "v" are never on together and your masking of valid digits is excluding them. You need to sample at least 2x the segment scan rate to ensure you don't miss any. Are you sure you are sampling fast enough?

    Since the "v" lights segment d which is not part of "A", and "A" lights segments a, b, f and g which aren't part of "v", you should be able to determine what the display is showing by just looking at those. Ignore segments c and e.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-08-31 23:24
    Thanks Peter. I had missed the "166". I thought both links were to '165 chips.

    I see now what you mean about the 166 having a CLR pin. I've always used the '165 chips so I'll probably go with those.

    Thanks again for the quick answer.

    I sure learn a lot here.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-08-31 23:31
    Sapphire wrote: »
    Are you sure you are sampling fast enough?

    I'm not sure. The scan happens in PASM but it never sees a valid scan twice in a row.

    My Saleae logic analyzer loads the lines too much to get a reading with it.

    The program is working reasonably well. I don't have trouble getting a good "A" reading, and I use it to time how long to read each value. I don't read the values when it's close to the amp to volt transition.
    Sapphire wrote: »
    Since the "v" lights segment d which is not part of "A", and "A" lights segments a, b, f and g which aren't part of "v", you should be able to determine what the display is showing by just looking at those. Ignore segments c and e.

    I should give this a try. Thanks for the suggestion.
  • SapphireSapphire Posts: 496
    edited 2014-08-31 23:44
    Duane,

    If you're not seeing the same scan at least 2 consecutive times, and you're sure the '165 load and clock is okay, then I don't think you're sampling fast enough. Segments are changing and you're not able to see it.

    I also suspect that the "A" an "v" are scanned 3x faster than the other digits. The driver probably updates them once for each of the numeric digits. Just a hunch.
  • Heater.Heater. Posts: 21,230
    edited 2014-08-31 23:45
    "push-pull" refers to the fact that an output signal is driven by active elements in both directions, high and low. As opposed to "single ended" that only has an active element pulling the signal in one direction and relying on a resistor to pull it in the other.

    The name comes from the world of amplifiers as stated above but you will find that nearly all logic outputs are "push-pull". They call it "Complementary Outputs" as you will have read in those data sheets. Indeed "CMOS" means "Complementary Metal Oxide Semiconductor".

    For example the Propeller has transistors that pull the outputs high and others to pull them low. It can drive current both ways.

    Some devices do have single ended output for special purposes.

    "differential" means to have two outputs for a given signal, physically two pins, with opposite polarity. If one is high the other is low and vice versa. This is normally to do with reducing interference over communications links. See RS422/485.

    Some logic devices, like those shift registers have both a "Q" output and a "/Q" output. This is not really differential. it simple means that the inverse of an output is available. Might save an inverter gate in your designs some time. Often Q and /Q pretty much come for free in a logic design. A shift register is made of flip-flops, for example, that naturally have both states available internally. It's just a question of if they bring both out to a pin or not.
  • evanhevanh Posts: 15,949
    edited 2014-09-01 01:28
    Heater. wrote: »
    ... As opposed to "single ended" that only has an active element pulling the signal in one direction and relying on a resistor to pull it in the other.

    Open-collector(drain), or class-A amplifier, is the correct term. In industrial wiring this gets called PNP and NPN depending on the active switching polarity.

    Single-ended, push-pull and class-B amplifier are all the same thing.

    Differential can, although maybe not always, also be called "balanced". Balanced implies a floating centre and is often electrically isolated.

    That's my take.
  • Heater.Heater. Posts: 21,230
    edited 2014-09-01 02:24
    evanh,

    I can go for "class B" = "push-pull" but it seems we are both wrong about "single ended".

    According to wikipedia "Single-ended signaling is the simplest and most commonly used method of transmitting electrical signals over wires. One wire carries a varying voltage that represents the signal, while the other wire is connected to a reference voltage, usually ground."

    Given that definition I would disagree that Single-ended is the same as push-pull/classB. Single ended and push-pull are orthogonal issues.

    Why? Because in many old tube amps the push-pull output stage is indeed differential/balanced. Driving two ends of an output transfromer (The center tap is connected to the supply voltage.)

    The same balanced drive can be done with transistors like the first example here: http://www.electronics-tutorials.ws/amplifier/amp_6.html

    True, the load is connected in a non-balanced way, one side of the output transformer secondary is grounded, but that need not always be true. One could have a centre tapped secondary and balanced drive to the load.

    Of course there are such things as single "ended push-pull" as well...

    Now, about those "open collector" outputs. Of course not all single ended signalling need be open collector. One could imagine emitter follower outputs for example.

    As for "Balanced implies a floating centre and is often electrically isolated" I'm not convinced, this flies against common usage and wikipedia "In telecommunications and professional audio, a balanced line or balanced signal pair is a transmission line consisting of two conductors of the same type, each of which have equal impedances along their lengths and equal impedances to ground and to other circuits"

    The important part here is the "equal impedances" thing. Required to maximize common mode noise rejection. The issue of electrical isolation is another matter.

    Confusing isn't it?
  • evanhevanh Posts: 15,949
    edited 2014-09-01 03:28
    Wikipedia isn't disagreeing with me. I have been less broad is about all. Transformers convert the signalling type. Doesn't have to be confusing.
  • Heater.Heater. Posts: 21,230
    edited 2014-09-01 04:09
    It's confusing enough that we are discussing it and the opening poster posed the question :)

    For example I would not classify "open collector" as "class A". Class implies the device is biased into it's linear region and is conducting at all phases of the signal. This is clearly not true of an open collector digital output.

    You are right of course, these terms do get used and abused in a broad manner.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-09-01 10:31
    Thanks for the information about differential and push-pull. My original question should have been "What's the difference between a '5' and a '6'."

    I wasn't seeing the final "6" in the 166 and thought both chips were the '165 variety. Apparently I was up past my bedtime and I should have probably "slept on it" before asking. (But where's the fun in that?)

    I'm often amazed at how willing your guys are to educate the world on these topics. I've sure learned a lot from you all. Thanks.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-09-01 13:47
    Sapphire wrote: »
    Duane,

    If you're not seeing the same scan at least 2 consecutive times, and you're sure the '165 load and clock is okay, then I don't think you're sampling fast enough. Segments are changing and you're not able to see it.

    I also suspect that the "A" an "v" are scanned 3x faster than the other digits. The driver probably updates them once for each of the numeric digits. Just a hunch.

    With the '165 chip in place, I haven't been able to get two consecutive scans with valid characters displayed. As I said, the scan is happening in PASM but by the time I shift in all the bits, compare the new bits with the old and write the data to hub (I write the old reading with the number of times it was seen), the segments have changed by the time the next latch is toggled.

    I should be able to capture the segments better without having the shift register in between the display and the Propeller. I may try using directly capturing the pin states without the shift register but I'm not very concerned about this. I'm able to capture data pretty well with the current setup and it seems to be working well enough for my purposes.
Sign In or Register to comment.