Skip to main content

stan2004 posted:
phil gresho posted:

Stan:  Re: your statement,  " This averages to an effective DC offsets and hence there are filters (capacitors) in the offset detection circuitry IN THE ENGINE to smooth out this "chopped DC":

What about 'old'/conventional engines?

If by "old" you mean one that uses some type of electro-mechanical mechanism to detect the presence of a DC offset, then I'd think they might vibrate, buzz or loudly protest to pulsed asymmetrical bipolar pulses.  Or, if designed with chopped controllers in mind, I'd think they could be made to simply not respond using some type of mechanical hysteresis.

The Lionel whistle control relays don't detect DC, they detect frequency. High inductance relay coil with a shading ring at the end. They will indeed pick up on AC below 40 Hz or so. 

 

phil gresho posted:

Stan:  your "...true mathematical engineer could tell us what this effective offset voltage would be! "    would also need to be trained in electronics to address that issue  QUANTITATIVELY.

Not sure I agree.  If you mathematically (no electronics "knowledge" required) integrate a sinewave over one cycle the result is of course 0.  If you reduce the end-point of the integration limits from 0 to 360 degrees to 350, 340, 330, etc. you progressively chop off more and more of the negative half cycle.  This creates an increasingly positive average (integrated) value.  "22 sin (x)" would be a way to mathematically express a 22 Volt waveform or one that reaches a peak amplitude of 22 Volts on each half cycle.  That's the offset portion.

The amplitude portion is a bit trickier.  As PLCProf notes you need to know if we are talking about RMS or volts.  I don't know if RMS is a concept that only exists in engineering/electronics or whether it is used in a purely mathematical contexts.   Anyway, you can integrate sin (x) * sin(x) from 0 to 180 degrees to calculate the mean-squared voltage (and then take the square-root to calculate root-mean-squared.  Again this is purely mathematical and no electronics "knowledge" required).  As you reduce the end-point of the integration limits from 180 to 170, 160, etc. you progressively chop off more of the half cycle and this decreases the RMS.  I don't think there's a closed-form solution but you could numerically determine the amount of chopping to reduce the amplitude from 22 to 21.5.  Let's just say it was 170 degrees.

Now take 170 degrees and plug that into the offset equation and that tells you the effective DC offset generated by chopping the sinewave from 22 to 21.5V.

So to your point, I agree that someone schooled in electronics would need to translate the "problem" into mathematical terms.

PLCProf posted:

 

Well, in the world of sine waves and RMS, a DC component adds as just another component. So, say you had a 21.5 volt signal and a 2 volt offset, (2**2) + (21.5**2) = 466.25, sqrt = 21.59. So adding a 2 volt DC offset to a 21.5 volt signal gives an RMS increase of only .09 volts!

The DC component adds to the AC on one polarity, but subtracts on the other! Then too, (ducking as I ask this) what kind of meter are we using to measure the voltages? No response needed, but you get my point.

But this illustrates Phil's point exactly.  That is, if one is not schooled in electronics, there is not enough information to "solve" the equation(s) from a purely mathematical angle.  That is there are several ways to generate a DC offset.  The classic method is to simply put a battery in series with the AC.  A more recent method is to asymmetrically chop the sinewave.  And even more recently would be electronically synthesized power sources that can simply generate the waveform "A sin(x) + B" where A is the amplitude and B is the offset.

What GRJ mentioned was a method that leaves some spare head room voltage so that the voltage can be bumped upwards to create the DC offset.  Maybe someone has a tabulation of how all the various transformers over the years generate DC offset but I don't.

And as alluded to in a previous post, I don't know if the TIU's variable channel circuit is "smart" enough to maintain the commanded output voltage (RMS or otherwise) when the whistle or bell button is pressed.  Depending on the engine electronics and motor type it may change speed when a DC offset is present even for the same RMS voltage.

PLCProf posted:

The Lionel whistle control relays don't detect DC, they detect frequency. High inductance relay coil with a shading ring at the end. They will indeed pick up on AC below 40 Hz or so. 

OK, but I think the issue at hand is how the older non-electronic (no capacitor filters) respond to the "nasty" DC offsets created by chopped sinewaves.  Using GRJ's diagram, consider the following blue waveform.  While the dominant energy is still at 60 Hz, the chopping creates harmonic energy well beyond 60 Hz.  So when you say high-inductance coils picking up below 40 Hz (or whatever)...how do these (non-electronic) detectors respond to the blue DC; note that the waveform in real chopping circuits look even nastier depending on the chopping method.

dc offset

 

 

Attachments

Images (1)
  • dc offset

Not intending to obfuscate matters further, but here's the answer to one of Stan's Q's:  The integral of sin(x)*sin(x) DOES have a closed form solution:

It is  x/2 - sin(2x)/4.

For 180-degrees [Pi] as the upper limit,  it is Pi/2 = 1.5708...

For 170-degrees, it is [Pi - 10*Pi/180]/2 - sin(340 degrees)/4 = ~ 1.569....Etc.

For RMS values, just take the square root of the above.

Last edited by phil gresho
stan2004 posted:
PLCProf posted:

The Lionel whistle control relays don't detect DC, they detect frequency. High inductance relay coil with a shading ring at the end. They will indeed pick up on AC below 40 Hz or so. 

  So when you say high-inductance coils picking up below 40 Hz (or whatever)...how do these (non-electronic) detectors respond to the blue DC; note that the waveform in real chopping circuits look even nastier depending on the chopping method.

 

 

 

Think in the frequency domain, forget the picture of the voltage waveform. 

The mechanical relays ignore the nasties. The inductive reactance of the coil increases in proportion to frequency, hence the coil current decreases with increasing frequency. Even though the voltage waveform contains all kind of nasties, all those nasties are 120 Hz and above (harmonics of 60 Hz) and the current waveform rolls off at 6 dB per octave above some frequency. And, it is the current in amperes that generates the MMF in the coil, not the applied voltage! Note that if full-voltage at 60 Hz will not generate enough coil current to pull in a whistle relay, obviously higher frequencies at the same voltage cannot!

Going the other way, an inductance has no effect on DC, so at DC the steady-state current is determined strictly by the coil resistance and the applied voltage. 

The shading ring adds a second-order effect in a real relay, so the MMF rolls off faster than 6 dB per octave, but the principle of frequency discrimination is still the basis of the relay. 

Because the relay has no polarizing magnet, DC current of either polarity will pull it in. An AC current will also pull it in, twice per sine wave, if the coil current is great enough. In correct operation, though, the frequency-dependent properties described above prevent that from happening!

 

stan2004 posted:
What GRJ mentioned was a method that leaves some spare head room voltage so that the voltage can be bumped upwards to create the DC offset.  Maybe someone has a tabulation of how all the various transformers over the years generate DC offset but I don't.

Well, the old PW transformers simply stuck a rectifier in series on the first detent to pick the relay, then added a resistor on the second contact to reduce the DC offset.  The compensating winding was the 6V added voltage to compensate for the power draw of the old whistle tenders.

Many modern transformers use a double string of diodes of opposite polarity in parallel.  These are always in the circuit and simply drop around 3 volts or so from the maximum output of the transformer.  They simply short out all but one of the diodes in one direction to impart a DC offset to the output power.  This is the scheme used in transformers like the MRC transformers.

We've discussed how the TIU and similar electronic transformers do the deed.  The CW-80 apparently controls the waveform shape as Stan previously suggested to generate the DC offset.

Attachments

Images (1)
  • blobid0
phil gresho posted:

Not intending to obfuscate matters further, but here's the answer to one of Stan's Q's:  The integral of sin(x)*sin(x) DOES have a closed form solution:

It is  x/2 - sin(2x)/4.

For 180-degrees [Pi] as the upper limit,  it is Pi/2 = 1.5708...

For 170-degrees, it is [Pi - 10*Pi/180]/2 - sin(340 degrees)/4 = ~ 1.569....Etc.

For RMS values, just take the square root of the above.

 Phil/Stan-

I lost track, exactly what are we trying to figure out, and to what degree of accuracy?

The math quiz is simply a textbook exercise with no real consequence since I/we do not know the actual electronic method used by the TIU variable channel.  That is, it's much easier to speculate, guess, and write fancy equations than to hook up an actual TIU output to an the oscilloscope! 

Anyway, here's the idea.  In Phil's setup, he sets the output to 22V AC (max) and he can't get whistle to operate.  He backs down to 21.5V AC and suddenly it can.  So let's just say 22V AC is the full un-adulterated sinewave.  Back to GRJ's comment.  If the sinewave is already "full" if a DC offset is generated by chopping off part of the negative cycle, then the RMS voltage would necessarily drop.  So in lieu of this compromise, maybe it doesn't even try.

Now let's say we "chop" the voltage down to 21.5V AC.  Phil's equation will tell us how many degrees is required to do this.  So now we can create a positive DC offset without affecting the output voltage by, for example, generating a full positive half cycle (effectively 22V) but chopping down the negative half-cycle to, say, 21V.  So the average track voltage stays the same but now there's a DC offset (let's ignore RMS summing effects for now).  Frankly, looking at the numbers it's hard to believe one can generate a 3V DC offset while maintaining a 21.5V AC output.  I'd think you'd have to drop down to, say, 18V AC (so 22V on the positive half-cycle and, say, 14V on the negative half-cycle) to create 3V of DC offset.  The 2nd equation on offset would solve for the required chopping degrees.  Of course I don't know why anyone would be running conventional trains with 21.5V on the track so it seems moot if you can't blow the whistle at such high voltages! 

Stan:  In partial response to your 1st issue above, I had earlier stated,  "

"I'm beginning to think that TO REALLY UNDERSTAND this,  we need the details [wherein the devil resides] of just HOW the Z-4000 're-creates' what looks like a 'smooth' sine wave....."

This sentence should also be applied to the TIU; i.e., how IT chops the sine.  

I wonder if there's any one at MTH who can answer this.....

 

LOL.  I can't imagine what's in it for MTH to get involved in this minutiae.   Anyway, what I think would be useful for the record is to establish a recommendation for how other users can eliminate spurious conventional-mode whistles on a TIU variable output.  If it's a 25 cent 10uF non-polarized cap then so be it.  If it's to be placed on the TIU variable INPUT then so be it.  If it's a your-mileage-may-vary situation and you try INPUT and then OUTPUT then so be it.  If the spurious whistle issue only applies when the TIU variable input comes from a Z-4000 set to certain voltages, then so be it.  In other words it is what it is.  I just can't figure out exactly what it is yet!

Anyway, here's another diagram from the textbook department.  That is, if designing a whistle/bell DC offset controller using a modern chopping circuit (using transistors instead of a "battery" or power-sucking diodes), I'd take advantage of the ability to chop the positive half differently than the negative half.  This allows the effective track voltage to remain the same even though there's now a DC offset to trigger the whistle or bell.  Since modern controllers use inexpensive microcontroller chips, the ability precisely chop (set the cut-off angle or degrees) is easy...making it meaningful to display 21.0 vs. 21.5 vs. 22.0 on the remote's display.

dc offset chopping

Attachments

Images (1)
  • dc offset chopping

In response to your 1st item, I shall switch the caps from input to output of the TIU, and report the results.

To your second point:  It sorta looks like you're guessing what MIGHT be it the TIU circuitry;  right?

Meanwhile, I'm still pondering GRJ's brief discussion of 'smoothing' the step-like functions via the caps....as it still seems quite relevant.

Yes, I'm speculating on how the TIU circuit might be operating.  But I do know for a fact that the variable channel is under microprocessor control and uses a 4-transistor design that allows more chopping "finesse" than the traditional triac design.  There have been many discussions about the variable channel over the years and to my recollection none have resulted in a comprehensive theory of operation as MTH does not publish schematics. 

I think the desired outcome at this point is to take your capacitor experiment and reduce it to a few bullet points for something the next guy can try should they face similar symptoms.

As GRJ astutely observes the conversation has de-railed and re-railed a few times - and yet a few guys keep coming back for more!  The beatings will continue until morale improves.

Let's stop guessing about what the TIU does.  It does something like 40+ steps, from 2.0V to 22V indicated.  This obviously means the steps are fairly coarse.

I connected a Lionel PH180 (pure sine wave) to my bench TIU and added a 8 ohm resistive load to give it something to chew on.  The following are the waveforms I got at various voltages and a couple with the whistle to show how the offset is generated.  Note that at 22V indicated, it's passing a pure sine wave, and pressing the horn button has no effect on the waveform.

TIU at 5V setting

TIU 5V Setting

TIU at 11V setting

TIU 11V Setting

TIU at 11V setting with Horn pressed

TIU 11V Setting with Horn

TIU at 21.5V setting

TIU 21.5 Volt Setting

TIU at 21.5V setting with Horn pressed

TIU 21.5V Volt Setting with Horn

TIU at 22V setting, Horn makes no difference

TIU 22 Volt Setting

Attachments

Images (6)
  • TIU 5V Setting
  • TIU 11V  Setting
  • TIU 11V Setting with Horn
  • TIU 21.5  Volt Setting
  • TIU 21.5V Volt Setting with Horn
  • TIU 22 Volt Setting

At the risk of becoming too mathematical, it seems that we may be dealing with the so-called 'Gibbs jump'  [related to the Fourier expansion of a discontinuous function].  This may be wrong in that the jump should appear at both ends of the discontinuity....[I'm thinking of a square wave ...]

Also, your plots do not seem to be truly discontinuous, since that would need an infinite slope.....

          I'm skating on rather thin ice here!

phil gresho posted:

At the risk of becoming too mathematical, it seems that we may be dealing with the so-called 'Gibbs jump'  [related to the Fourier expansion of a discontinuous function].  This may be wrong in that the jump should appear at both ends of the discontinuity....[I'm thinking of a square wave ...]

Also, your plots do not seem to be truly discontinuous, since that would need an infinite slope.....

          I'm skating on rather thin ice here!

Not sure; an oscilloscope works in the time domain, it does not construct the image by summing sine and cosine waveforms. Too, we are dealing with real hardware here, those "discontinuities" are (intentionally) only very poor approximations.

It gets dull when practicalities overshadow the theory. Here is a "back of envelope" discussion. (I have ruined many good envelopes in my day.....)

As a rule of thumb, bandwidth can be approximated by BW=.35/risetime. It is hard to tell from the screen shots, but it looks like the rise time (10 - 90%) of the positive-going edge in the shot with the capacitor is about .15 ms. That gives a bandwidth on that edge of about 2.3 kHz. At that frequency your 47 uF capacitor looks like about 1.5 ohms. The little overshoot at the top is undoubtedly real; the fact that it widens with the larger cap points to a resonant effect with some inductance somewhere.

FWIW, at these low frequencies electrical measurements are very good and very easy, artifacts in (properly operated) instruments are not likely.

phil gresho posted:

... I shall switch the caps from input to output of the TIU, and report the results.

I await these results!  It seems the matter at hand is powering the TIU variable channel with a Z-4000. 
 
GRJ has been showing real scope photos but he's using a PH180.  If I understand one of your earlier posts, you did not get spurious whistles when powering the TIU with a PW ZW, right?  
 
 
 

 

GGG:  I could be snarky, and tell you to go back & read the entire thread.  But this would harm our fine relationship, so I won't.

1.  On the original club layout,  with 2 independent main lines, track voltage control was provided   solely by the 2 handles of a Z-4000.

2. My job was to add a TIU + remote to provide the option of remote control of track voltage.

3. To do this, I ran the Z4000 output to the 2 Variable channel inputs of the TIU.  The TIU output went to the track.  Baby simple.

This gave the operator 2 basic options:

[1]  Set the TIU's output to MAX via the thumbwheel.  Run the trains the 'old' way;  via the 2 handles.

[2]  Set the Z4000 handles to MAX;  control voltage via the remote.

4.  HOWEVER, those nasty electrons had a stinkin' surprise waiting for us:  If controlling via option 2 above,  the engine's whistle/horn was on CONTINUOUSLY.  Reducing the Z4000 voltage from 22 to, say 16VAC, stopped the spurious noise.  Wanting to know  WHY,  I started this thread.......

5.  For reasons that are not yet fully understood, the use of a 10 micro-farad bi-polar capacitor across the output leads of the Z4000 SOLVED THE PROBLEM.  No more spurious sound,  even at MAX on the handles.

That's the current status.

phil gresho posted:

[2]  Set the Z4000 handles to MAX;  control voltage via the remote.

4.  HOWEVER, those nasty electrons had a stinkin' surprise waiting for us:  If controlling via option 2 above,  the engine's whistle/horn was on CONTINUOUSLY.  Reducing the Z4000 voltage from 22 to, say 16VAC, stopped the spurious noise.  Wanting to know  WHY,  I started this thread.......

Very nice summary...though I think another "problem" you found along the way was a swapped-out TIU with a defective (?) variable channel for which you might require GGG's services!
 
Point of clarification: with Z4000 set at 22VAC, when you say the engine's whistle/horn was on CONTINUOUSLY, was this at any commanded track voltage?
 
Along with your homework assignment on 10uF cap location, how about this science experiment.  Since everything is done with bananas, it should be trivial to simply move the track power cables (currently attached to a TIU Variable Output) directly to the Z4000 output without the 10uF.  This bypasses the TIU variable channel.  Does the whistle/horn turn on continuously with 22V AC on the track (obviously the engine needs to be in neutral at such a high voltage); and does it get "better" as you lower voltage with the spurious noise stopping at, say, 16V AC.  Or if you install the 10uF cap does the problem go away?   Seems there could be an issue with your particular Z4000 ... and perhaps you never noticed it till now since most guys don't run conventional trains above 20V AC or whatever.  Just a thought...

Good Q's, Stan. 1st, the continuous horn began when the scrolled voltage was high enuff to make the train go.  I think it was absent at very low TIU voltage....

To your 2nd point:   That was the original arrangement, B 4 I became involved.  Presumably, the Z4000 was operating without spurious sound.

BTW, There are only 2 banana plugs, and these  are employed in only one way:  They contain the cap across their leads.  There are no others in the system.

Based on the fine summary.  It would seem to me it is the TIU adding a DC offset when input Voltage is higher than 16V.  There are probably a few electronic ways that can happen.

The question is what trains had the whistle blow?  All MTH a few MTH, ALL Lionel or other conventional type whistles?

Did you swap TIU channels or different TIU to see if this goes away?  Any accessories on the track?  Both tracks did this?  G

GGG posted:

 It would seem to me it is the TIU adding a DC offset when input Voltage is higher than 16V.  There are probably a few electronic ways that can happen.

But it works for Phil with a PW ZW and works for GRJ with a PH180 when the input voltage is higher than 16V.   My current thinking is the TIU is adding a DC offset when input voltage is higher than 16V from his specific Z4000.  Add the capacitor to the Z4000 output and problem goes away; eagerly awaiting result of experiment of adding capacitor AFTER the TIU.

That is, based on Phil's latest comment, the same Z4000 works at higher voltages when directly powering the track (without the TIU), what else could it be?!

Last edited by stan2004

Add Reply

Post
The DCS Forum is sponsored by
×
×
×
×
Link copied to your clipboard.
×
×