PDA

View Full Version : Do all Propeller outputs ring?



Carl Hayes
01-08-2009, 03:48 AM
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 (mailto:nn5i@arrl.net)

Post Edited (Carl Hayes) : 1/7/2009 7:55:13 PM GMT

Leon
01-08-2009, 03:58 AM
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 Hayes
01-08-2009, 04:01 AM
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 (mailto:nn5i@arrl.net)

Post Edited (Carl Hayes) : 1/7/2009 8:06:42 PM GMT

Leon
01-08-2009, 04:02 AM
Are the outputs loaded, or have you left them floating?

Leon

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

Carl Hayes
01-08-2009, 04:05 AM
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 (mailto:nn5i@arrl.net)

Phil Pilgrim (PhiPi)
01-08-2009, 04:32 AM
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

Philldapill
01-08-2009, 04:49 AM
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 Hayes
01-08-2009, 06:17 AM
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 (mailto:nn5i@arrl.net)

rokicki
01-08-2009, 06:57 AM
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 Hayes
01-08-2009, 07:13 AM
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 (mailto:nn5i@arrl.net)

Paul Baker
01-08-2009, 07:33 AM
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 (mailto:pbaker@parallax.com)


Post Edited (Paul Baker) : 1/7/2009 11:38:57 PM GMT

kwinn
01-08-2009, 07:56 AM
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.

potatohead
01-08-2009, 08:08 AM
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! (http://propeller.wikispaces.com/)
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net (http://propeller.wikispaces.com/Join+us+on+IRC%21/)
Safety Tip: Life is as good as YOU think it is!

Leon
01-08-2009, 08:49 AM
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 Jakacki
01-08-2009, 09:29 AM
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 Hayes
01-08-2009, 09:39 AM
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 (mailto:nn5i@arrl.net)

Paul Baker
01-08-2009, 10:10 AM
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:
http://upload.wikimedia.org/math/2/e/6/2e6d9868acfe9ea4b489cb4e8a45f40b.png
Inductance:
http://upload.wikimedia.org/math/6/7/1/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 (mailto:pbaker@parallax.com)


Post Edited (Paul Baker) : 1/8/2009 6:07:03 AM GMT

Paul Baker
01-08-2009, 10:14 AM
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 (mailto:pbaker@parallax.com)


Post Edited (Paul Baker) : 1/8/2009 2:27:02 AM GMT

potatohead
01-08-2009, 10:59 AM
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! (http://propeller.wikispaces.com/)
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net (http://propeller.wikispaces.com/Join+us+on+IRC%21/)
Safety Tip: Life is as good as YOU think it is!

Post Edited (potatohead) : 1/8/2009 3:11:43 AM GMT

Paul Baker
01-08-2009, 02:33 PM
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 (mailto:pbaker@parallax.com)


Post Edited (Paul Baker) : 1/8/2009 8:40:42 PM GMT

Ale
01-08-2009, 04:10 PM
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.

ElectricAye
01-09-2009, 12:17 AM
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???

http://forums.parallax.com/images/smilies/smile.gif

potatohead
01-09-2009, 12:31 AM
Me too. It helps considerably to have basic concepts like this to reason from! Thanks again.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness! (http://propeller.wikispaces.com/)
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net (http://propeller.wikispaces.com/Join+us+on+IRC%21/)
Safety Tip: Life is as good as YOU think it is!

Paul Baker
01-10-2009, 06:55 AM
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???

http://forums.parallax.com/images/smilies/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 (mailto:pbaker@parallax.com)

Philldapill
01-11-2009, 01:57 AM
Haha, nicely said, Paul and ElectricAye!