Shop OBEX P1 Docs P2 Docs Learn Events
Do all Propeller outputs ring? — Parallax Forums

Do all Propeller outputs ring?

Carl HayesCarl Hayes Posts: 841
edited 2009-01-10 17:57 in Propeller 1
Hello --

I've been experimenting with a Propeller on a Propeller PDB (Professional Development Board).· I sought initially· to toggle all the outputs (all 32 of them) and observe the output on an oscilloscope (Tektronix 475A, 350 MHz).· To my surprise, all the outputs ring!· Here's the program I used (my first).


CON
·_clkmode = xtal1 + pll16x
·_xinfreq = 5_000_000
PUB Main
·cognew (@Degree,0)
DAT
··············· ORG·········· 0
Degree
··············· OR··········· DirA,:Allones
:Start
··············· NOP
··············· XOR·········· OutA,:Allones
··············· JMP·········· :Start
:Allones······· LONG········· $FFFFFFFF·····


There is nothing at all on the PDB except the Propeller, and what comes on the PDB from the factory (crystal, memory, etc.).· No wires, no nuthin, as we say in the South.

I've attached a photo of the output waveform which is essentially identical for all 32 outputs.· It's the same whether I toggle all 32 outputs at once, or only a few, or only one.

Query:· do all Prop outputs ring like that, or is it perhaps an artifact produced by the PDB?· When I put a counter on the outputs, the ringing drove it nuts.

Additional note:· the probe is properly neutralized, and its ground is connected to the GND terminal to the left of the Prop outputs on the PDB.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net

Post Edited (Carl Hayes) : 1/7/2009 7:55:13 PM GMT
1000 x 689 - 79K

Comments

  • LeonLeon Posts: 7,620
    edited 2009-01-07 19:58
    If you don't use a properly designed PCB, the outputs are bound to ring. The effect might also be due to your scope probe not being properly grounded.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 1/7/2009 8:03:39 PM GMT
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-01-07 20:01
    Leon said...
    If you don't use a properly designed PCB, the outputs are bound to ring.

    Leon

    The only PCB in use is the PDB from Parallax.· The probe is grounded at the nearest ground point provided by Parallax on that board (as stated in the original post).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net

    Post Edited (Carl Hayes) : 1/7/2009 8:06:42 PM GMT
  • LeonLeon Posts: 7,620
    edited 2009-01-07 20:02
    Are the outputs loaded, or have you left them floating?

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-01-07 20:05
    Leon said...
    Are the outputs loaded, or have you left them floating?

    Leon

    Tried it both ways (noninductive 470 ohm resistor).· Slight diminution in the amplitude, but no change in the waveform.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-01-07 20:32
    Ringing is a load-dependent phenomenon. The Propeller's outputs are designed to have very fast slew rates. When observed with a standard scope probe and ground lead, they will ring, due to the probe and trace inductance. This can be reduced by removing the probe's ground lead and attaching a short wire to the ground ring at the end of the probe, and thence directly to the nearest Vss pin on the Propeller. You should also probe the pin directly, rather than a connected pad.

    Under more casual probing circumstances, if the apparent ringing annoys you, you can limit your scope's frequency response, if there's a setting for that, and the ringing will disappear from view.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 1/7/2009 8:40:35 PM GMT
  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-01-07 20:49
    I've seen the same thing. In fact, if you look closely, you should be able to see a slight change in the rining if you move your leads around, as this gives a slight change in the inductance/capacitance.
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-01-07 22:17
    I am probing directly at the pins (most of the time, but not while photographing) -- no difference; and I am using a short lead directly from the probe ground.· That's kindergarten.· I've also checked the probe neutralization with the scope's test output.· That's not kindergarten, but I'm rather experienced.· The probe doesn't ring.· I'm looking at a 2.5MHz waveform with a 350MHz instrument, after all; it isn't going to insert artifacts.

    Incidentally, I also tried three other Tek probes, of two different models, with identical results.· Then I put an SN5473 dual J-K on the PDB and let the Prop's output clock it, and looked at its outputs.· Still a little ringing, though only on the downgoing transition, but much less.· Much less, about what one would expect.· With a fast scope you'll always be able to see a little bit.

    I agree that the Prop's outputs almost certainly don't ring inherently; I guess the PDB is doing the ringing.· That, actually, makes it OK, because (1) the PDB won't be in the final design; (2) I can filter, if necessary, in any test setups I build on the PDB; and (3) it seems to toggle the J-K perfectly well anyway, indicating that it can feed TTL inputs generally.· I was mostly wondering whether others had observed the same thing and tracked it down so I wouldn't have to do all the work I just did.

    The ringing frequency, incidentally, appears to be about 50 MHz -- I guess I could find it with one of my VHF receivers --·and the risetime at the Prop output is about 5 nS.

    Cheers!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • rokickirokicki Posts: 1,000
    edited 2009-01-07 22:57
    I'd be interested in what you see on a protoboard, as that uses the smaller prop package
    and has no traces (to speak of) from the pins.
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-01-07 23:13
    rokicki said...
    I'd be interested in what you see on a protoboard, as that uses the smaller prop package
    and has no traces (to speak of) from the pins.
    Sorry, haven't got one.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • Paul BakerPaul Baker Posts: 6,351
    edited 2009-01-07 23:33
    It all has to do with the damping of the system, inductance is whats causing the ringing. Theres the inductance in the probe, inductance in the PCB and inductance in the chip, which is larger for a DIP chip than the surface mount chips because the bonding wire is longer and the actual pins are longer as well. If the design requires there to be minimal overshoot, then you will have to critically damp the system, or over-damp it if no overshoot is permitted. This is done not by adding resistance but by adding capacitance because resistance lies in the real plane and cannot counter the inductance which is operating in the imaginary plane.

    By and large these issues are unimportant in a design because digital circuits transition between the two supplys and could care less about transient overshooting at either end. But there are a few select cases where such considerations are important.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker


    Post Edited (Paul Baker) : 1/7/2009 11:38:57 PM GMT
  • kwinnkwinn Posts: 8,697
    edited 2009-01-07 23:56
    FYI virtually all digital signals exhibit some ringing. Even back when TTL was in use and clocks were under 10MHz there was ringing, even on traces less than an inch long before connecting to another chip input. At 80 MHz the signal trace is really a transmission line and to minimize ringing the impedance needs to be matched from the source on the chip, through the pin, along the pcb trace to the termination. This is virtually impossible.
  • potatoheadpotatohead Posts: 10,261
    edited 2009-01-08 00:08
    I would have said add a cap, because I see that as a frequency over time problem. The trade off would be somewhat rounded edges on the pulse.

    Would it be too off topic to ask for a bit of greater understanding about the real plane -vs- the imaginary one? That's the first time I've heard it expressed that way. I usually can differentiate when to use a resistor -vs- a cap, but not always! Have a link or reference to share?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
    Safety Tip: Life is as good as YOU think it is!
  • LeonLeon Posts: 7,620
    edited 2009-01-08 00:49
    Carl Hayes said...
    I am probing directly at the pins (most of the time, but not while photographing) -- no difference; and I am using a short lead directly from the probe ground. That's kindergarten. I've also checked the probe neutralization with the scope's test output. That's not kindergarten, but I'm rather experienced. The probe doesn't ring. I'm looking at a 2.5MHz waveform with a 350MHz instrument, after all; it isn't going to insert artifacts.

    Incidentally, I also tried three other Tek probes, of two different models, with identical results. Then I put an SN5473 dual J-K on the PDB and let the Prop's output clock it, and looked at its outputs. Still a little ringing, though only on the downgoing transition, but much less. Much less, about what one would expect. With a fast scope you'll always be able to see a little bit.

    I agree that the Prop's outputs almost certainly don't ring inherently; I guess the PDB is doing the ringing. That, actually, makes it OK, because (1) the PDB won't be in the final design; (2) I can filter, if necessary, in any test setups I build on the PDB; and (3) it seems to toggle the J-K perfectly well anyway, indicating that it can feed TTL inputs generally. I was mostly wondering whether others had observed the same thing and tracked it down so I wouldn't have to do all the work I just did.

    The ringing frequency, incidentally, appears to be about 50 MHz -- I guess I could find it with one of my VHF receivers -- and the risetime at the Prop output is about 5 nS.

    Cheers!

    How short is the ground lead? It should only be a couple of cm at most. A useful trick is to wind a piece of wire round the end of the probe and make the ground connection with that.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2009-01-08 01:29
    I know that in driving high-speed buses that series resistors are used to limit ringing and EMI. Typically these resistors are around 26 ohms.

    *Peter*
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-01-08 01:39
    You're probably right, all of you.· Back when I designed this stuff for a living, we didn't have 350 MHz scopes -- I had the best in the place, a Tek 454, 150 MHz, and I thought it was hot stuff.· It was, too.· Now I'm using a much faster one that I own (Tek 475A, 350 MHz), which may be the whole explanation for my surprise.· Cheers!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • Paul BakerPaul Baker Posts: 6,351
    edited 2009-01-08 02:10
    potatohead said...
    I would have said add a cap, because I see that as a frequency over time problem. The trade off would be somewhat rounded edges on the pulse.

    Would it be too off topic to ask for a bit of greater understanding about the real plane -vs- the imaginary one? That's the first time I've heard it expressed that way. I usually can differentiate when to use a resistor -vs- a cap, but not always! Have a link or reference to share?

    I can give a brief overview with a hand waving approach that an average person should be able to follow, this way we don't really have to get into the heavy math. Loads are comprised of real and imaginary parts, the real is the resistance, the imaginary is the reactance. Resistance we all understand, it's like an ideal resistor, it opposes current flow according to Ohms law. Reactance is the lesser understood component, this means that the component can take or add energy into the system depending on the past and current conditions of the system it's in. Capacitors store energy by placing opposing charges on plates seperated by an insulator, they attempt to inhibit changes in voltage across it's terminals by adding or subtracting electrons and holes from it's plates. Inductors store energy by building or decaying an electrical field, they attempt to inhibit changes of current flowing through them by adding or subtracting from it's electrical field.

    The resistance and reactance when·viewed in combination is called·impedance and can be illustrated by a point on a 2D plot, the resistance occupying the x axis and the reactance occupying the y axis. Positive values of x are the resitances we all know and love,·negative resistances do exist but it's a complex topic I'm not going to get into.·Positive values of y are inductive and negative values of·y are capacitive, these are derived by the mathmatical equations underlying circuit analysis. Without going into the particulars of how they are derived, I'll simply list them here.

    Capacitance:
    2e6d9868acfe9ea4b489cb4e8a45f40b.png
    Inductance:
    6719435d9b8752b0feda4cf0fc296fdf.png

    Notice the signs, one is negative, the other is positive. While there can be some complex things that go on when you have capacitance and inductance in the load (like potential for oscillation), when looking at the load from the outermost "black box" view, these two end up counteracting each other.

    So when you find your load sits in quadrant one of the 2D graph (positive resistance, positive reactance), adding capacitance will rotate the point along the circle towards the x axis. Likewise when the load sits in quadrant four of the 2D graph (positive resistance, negative reactance), adding inductance will rotate the point along the circle towards the x axis. When you have rotated the point all the way to the x axis where reactance is 0, the load is said to be compensated or matched.

    This is done when adding large motors to the power grid, since they are largely inductive, a capacitor is added to the load so that the power grid sees it as a simple resistive load, this reduces the peak power necesesary to be supplied by the power plant and improves the efficiency in power transfer.

    I hope this helps your understading potatohead.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker


    Post Edited (Paul Baker) : 1/8/2009 6:07:03 AM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2009-01-08 02:14
    Peter Jakacki said...
    I know that in driving high-speed buses that series resistors are used to limit ringing and EMI. Typically these resistors are around 26 ohms.

    *Peter*
    EMI is largely due to the large scale slew rate of the signal, not the ringing that happens at the end. But you are correct that series resistance is useful to combat EMI (and ringing to a small degree, but they are used for this only because it's a cheaper solution than adding capacitors).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker


    Post Edited (Paul Baker) : 1/8/2009 2:27:02 AM GMT
  • potatoheadpotatohead Posts: 10,261
    edited 2009-01-08 02:59
    Actually, that will do quite nicely.

    "Matched" has particular meaning for me now. Thank you Paul.

    Edit: Then the only thing fundamentally missing from the quick "lay of the land" you posted is essentially a battery, right? An inductor or capacitor can act in this way, depending...

    Back to the thread at hand.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
    Safety Tip: Life is as good as YOU think it is!

    Post Edited (potatohead) : 1/8/2009 3:11:43 AM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2009-01-08 06:33
    If the circuit is supplied by a battery and everything is in steady state, then the frequency in those above equations is 0 and the reactive part of the load stops reacting. You can think of caps and inductors as "peace lovers" they want everything to be calm, and only react when things are not. This is why they are sometimes used as short term batteries, store energy on them, then remove the energy source and they will be the provider of energy until calm is restored or they run out of energy to provide back to the system.

    The real reason the ringing is seen on the above traces is that there is actually capacitance and inductance, these two components are in a tug of war with each other which is what's causing the oscillation, but theres also resistance in there which is taking some of the energy out of the system on each swing. When this excess energy is bled off, the system reaches steady state again and the·capacitance and inductance are happy with the peace, but once the voltage transitions again it's another tug of war. The reason there's a tug of war is that each element has a different criteria for what peace is, a capacitor defines peace to·be when the voltage across it's terminals doesn't change, whereas an inductor defines peace to be when the current flowing through it doesn't change, and sometimes these criteria are in opposition to each other. By adding capacitance you're pulling on one side of the rope so the dispute is settled more quickly. Adding resistance will help but its more like clamping your hand on the rope, each side will pull to shorter extremes on each tug, but you're not stopping the back and forth itself.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker


    Post Edited (Paul Baker) : 1/8/2009 8:40:42 PM GMT
  • AleAle Posts: 2,363
    edited 2009-01-08 08:10
    Id suggest you add some 10 nF (ten nanofarad) ceramic caps as decoupling to the supply pins of the propeller. That reduces the ringing in not so properly design PCBs (like... a breadboard :-D). There was a nice discussion by Paul or maybe it was Beau about decoupling some months ago... try to dig it out if you can.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2009-01-08 16:17
    Paul Baker said...
    ....You can think of caps and inductors as "peace lovers" they want everything to be calm, and only react when things are not. ....The reason there's a tug of war is that each element has a different criteria for what peace is, a capacitor defines peace to be when the voltage across it's terminals doesn't change, whereas an inductor defines peace to be when the current flowing through it doesn't change, and sometimes these criteria are in opposition to each other. By adding capacitance you're pulling on one side of the rope so the dispute is settled more quickly. ....

    Paul Baker,
    I absolutely LOVE your description of this - and I say that without sarcasm.
    Now, if we can get all the world leaders to learn some electronics, do you suppose they would allow us to bypass them somehow???

    smile.gif
  • potatoheadpotatohead Posts: 10,261
    edited 2009-01-08 16:31
    Me too. It helps considerably to have basic concepts like this to reason from! Thanks again.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
    Safety Tip: Life is as good as YOU think it is!
  • Paul BakerPaul Baker Posts: 6,351
    edited 2009-01-09 22:55
    ElectricAye said...
    Paul Baker said...
    ....You can think of caps and inductors as "peace lovers" they want everything to be calm, and only react when things are not. ....The reason there's a tug of war is that each element has a different criteria for what peace is, a capacitor defines peace to be when the voltage across it's terminals doesn't change, whereas an inductor defines peace to be when the current flowing through it doesn't change, and sometimes these criteria are in opposition to each other. By adding capacitance you're pulling on one side of the rope so the dispute is settled more quickly. ....

    Paul Baker,
    I absolutely LOVE your description of this - and I say that without sarcasm.
    Now, if we can get all the world leaders to learn some electronics, do you suppose they would allow us to bypass them somehow???

    smile.gif
    I wish it were that easy, sadly human nature is an excellent example of negative resistance where each back and forth adds energy into the system ("you hurt me, I'll hurt you worse")

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-01-10 17:57
    Haha, nicely said, Paul and ElectricAye!
Sign In or Register to comment.