# Safe?



## lownote (Jan 3, 2008)

Disclaimer: I'm not an EE! I'm a liberal arts major! I just want to make sure...

I'm running a little aristo eggliner on our layout as a trolley, for comic relief and the delight of children. I have it running on DCC with a Lenz decoder, and I have the marker lights on the side rigged to one of the function outputs of the lenz. The lights are LEDS, and I'm using a CL2 to run them.

The lights flicker, especially as the eggliner has wheels with a lot of miles on them wear and the plating worn off. 

So I was wondering--can I use an electrolytic cap to smooth out the flicker? I've done it before, but typically just with LEDS with the appropriate resistor run from a bridge rectified connected to track power. I don't want to damage the decoder. Do I need a diode to prevent the cap from discharging into the decoder?


----------



## Scottychaos (Jan 2, 2008)

What's an "EE"? 

Scot


----------



## lownote (Jan 3, 2008)

An electrical engineer, only two letters away from a geek, as they say


----------



## Greg Elmassian (Jan 3, 2008)

I'm basically an EE (need 2 more classes for a 3rd degree). 

You can filter anything "after" a bridge rectifier. 

You don't need to filter anything here, since after rectification, DCC is basically DC. (far different from rectifying a sinusoidal AC signal). 

But you could use the intrinsic ability of the capacitor, i.e. capacity to store charge, to power the LEDs when power is interrupted from the rails. 

The way you are describing it though is confusing... if you put the bridge on the input to the Decoder, nothing will work..., you have basically eliminated the DCC signal. 

If you look at the decoder, you may see an electrolytic cap on it, or the ability to add one... that will power the decoder. 

Basically a decoder will take the track power, use it as a signal, and then run it into a full wave bridge to power the electronics... and often a regulator for voltage for the micro. 

If you look at one of your QSI's, you see 2 electrolytic caps, one at a much higher voltage (raw track voltage rectified to DC), and one at a lower voltage (regulated to run the microprocessor)... 

I would think that on your Lenz decoder, you have the connections to connect a capacitor for this purpose already... 

Greg


----------



## lownote (Jan 3, 2008)

Greg

The lenz decoder has what Lenz calls the "power III" capacitor bank which powers the motor (and the headlights) over dirty track. _It doesn't appear to power lights driven from the function outputs_, because I see more flicker from the marker lights on the side than I do from the headlights. 

So I was thinking about adding a capacitor after the function output to further reduce flicker in the side marker lights only. 

I replaced the 4 incandescent marker lights in the eggliner with LEDs, and used a supertex CL2 to drive the LEDs. The positive leg of the CL2 is connected to the positive function output of the lenz decoder. I'm wondering if I could put an electrolytic capacitor ahead of the CL2, to smooth out interruptions. But I don't want to damage the decoder, and hence my probably dumb question--do I need to prevent current from feeding back into the function input of the decoder? Do I need to worry about inrush currents?


----------



## Greg Elmassian (Jan 3, 2008)

Yes, you should be concerned. Yes, you DEFINITELY need to avoid excessive inrush currents, you can easily destroy the function output on a decoder. 

Putting a capacitor on the function side can be dangerous, since the initial charging current will be a "spike" that could easily exceed the current capability of the function output. 

You need to put a current limiting resistor in series with one of the legs of the cap, and calculate the current so that you cannot exceed the current handling of the function "output" (which is really an input. 

So we need the max current for a single function, and we need the max voltage you are running... so you should measure the voltage from the common (blue) to ground (with a voltmeter). 

Then, it's a simple calculation to determine a resistor, V=IR where you already have the Voltage, and the I current... put that resistor in series with one leg of the cap, and put the cap across the function "output" and you are done. Of course the larger the cap, the longer the LED will run with no power, but also the longer the cap will take to charge. 

Hope the explanation is clear. 

Regards, Greg


----------



## krs (Feb 29, 2008)

Posted By lownote on 25 Jan 2012 05:39 AM 
Greg

The lenz decoder has what Lenz calls the "power III" capacitor bank which powers the motor (and the headlights) over dirty track. _It doesn't appear to power lights driven from the function outputs_, because I see more flicker from the marker lights on the side than I do from the headlights. 

So I was thinking about adding a capacitor after the function output to further reduce flicker in the side marker lights only. 

I replaced the 4 incandescent marker lights in the eggliner with LEDs, and used a supertex CL2 to drive the LEDs. The positive leg of the CL2 is connected to the positive function output of the lenz decoder. I'm wondering if I could put an electrolytic capacitor ahead of the CL2, to smooth out interruptions. But I don't want to damage the decoder, and hence my probably dumb question--do I need to prevent current from feeding back into the function input of the decoder? Do I need to worry about inrush currents?











Hmmm....
_Re: It doesn't appear to power lights driven from the function outputs_
That's rather strange since the Lenz capacitor bank powers the Lenz decoder as a unit - it doesn't make sense that some function outputs, ie headlights are affected any different than other function outputs, ie your marker lights unless the loads are quite different.

As to adding a capacitor to the marker light function output - normally I would say just add a capacitor at the point between the LED driver and the LEDs (the side of the LED driver NOT connected to the function output).
The LED driver will limit the charging current of the capacitor to 20ma which I assume the Lenz function output can handle. (Would help if you posted the Lenz decoder model number)

However, the equivalent schematic of the CL-2 shows a reverse biased diode so discharge current from the capacitor could actually flow back into the function output - to be safe you would want a blocking diode in case the Lenz function output can't handle that.


But a general question - why even have the marker lights connected to the decoder?
Do you want to be able to dim the marker lights or turn them on and off using the decoder?
Why not go back to your previous way of powering them via a diode bridge directly with DCC track power. You can still use the CL-2 to limit the capacitor inrush current.


BTW - for a non-EE you are asking excellent questions - shows a very good grasp of electronics. 


Knut


----------



## Greg Elmassian (Jan 3, 2008)

It does seem strange that the cap does not power the function outputs, but I'll trust Mike's observation that the lights on the functions seem to flicker more than the headlights. 

You could add the cap to "go through" the CL2, but then you have limited the charging time, especially if the function "output" can handle 100 ma, for example. 

Also, using a single CL2 for all the LEDs would be limiting, but you really, in this case, probably want a separate cap for each function "output" to be optimal. They are cheap, so that is what I would do. 

There is also no reason to add a blocking diode to avoid "powering" the function "output", it can already handle full voltage when it is off. (that is iwhat it is already doing). 

Regards, Greg


----------



## lownote (Jan 3, 2008)

The little eggliner functions on our layout for comic relief. It pops out of a bush on either end of a point to point. I wanted to be able to switch the lights on and off just as surprise effect. 

I'm using a lenz gold max decoder with the lenz power II module, partly because the four wheel eggliner with worn wheels has pretty flaky power pickup to begin with. It's really overkill in this application. 

It's possible I'm wrong about the marker lights. It looks like they are flickering more than the headlight, but I'll observe more carefully.

thanks very much for the suggestions! 
@import url(http://www.mylargescale.com/Provide...ad.ashx?type=style&file=SyntaxHighlighter.css);@import url(/providers/htmleditorproviders/cehtmleditorprovider/dnngeneral.css);


----------



## krs (Feb 29, 2008)

Posted By Greg Elmassian on 25 Jan 2012 09:18 AM 

There is also no reason to add a blocking diode to avoid "powering" the function "output", it can already handle full voltage when it is off. (that is iwhat it is already doing).


Depends on the design of the function output circuit of that particular decoder.
If it is just a very basic single ended output with a switch to common one doesn't need the blocking diode but if it is a more sophisticated totem pole type of design which would include a switching device to V+ you don't really want a fully charged capacitor connected to the output - that's not a configuration the decoder designer would typically allow for.

They typically allow for shorts of the output but not for some potential being fed back.


I just have no idea what the actual function output circuit of a Lenz decoder looks like.

Knut


----------



## krs (Feb 29, 2008)

Posted By lownote on 25 Jan 2012 09:39 AM 
The little eggliner functions on our layout for comic relief. It pops out of a bush on either end of a point to point. I wanted to be able to switch the lights on and off just as surprise effect. 

I'm using a lenz gold max decoder with the lenz power II module, partly because the four wheel eggliner with worn wheels has pretty flaky power pickup to begin with. It's really overkill in this application. 

It's possible I'm wrong about the marker lights. It looks like they are flickering more than the headlight, but I'll observe more carefully.

thanks very much for the suggestions! 

I assume you have the four marker LEDs connected in series.
Try using a resistor instead of the CL-2 to see if that makes any difference in the flickering.
Since the voltage at the function output is pretty well constant, you don't really need a CL-2 - maybe it, being an active device, creates a problem in this application.
Flickering could also be caused by a loose connection.

Or as another test to pin down the flickering, temporarily disconnect the headlight and connect the marker lights to that function output and see what you observe. 


Knut


----------



## Dennis Cherry (Feb 16, 2008)

The CL2 is a good fir, You do not have to add a resistor of some value that you have to calculate because you have X LED's in series. Been using the current limiting circuit like the CL2 for many years. Have converted USA passenger cars to LED's using current limiting.

For your flicker I would suggest put the capacitor on the input of the CL2 and not on the LED side. It will charge the cap faster.


It is up to you for the capacitor size, maybe start around 470MF @ 25 volts, just observe the polarity.


----------



## StanleyAmes (Jan 3, 2008)

Posted By lownote on 25 Jan 2012 05:39 AM 


The lenz decoder has what Lenz calls the "power III" capacitor bank which powers the motor (and the headlights) over dirty track. _It doesn't appear to power lights driven from the function outputs_, because I see more flicker from the marker lights on the side than I do from the headlights. 


The decoder with a power module will maintain power to all function outputs over dirty track or even no connection to one rail.
Locomotive functions however come in a variety of configurations.
1) Some functions have one side connected to the track and the other side connected to the locomotive function output. In this case the power to the function output will not be maintained on loos of contact to the track. You need one side connected to the decoder function output and one side connected to the decoder + to maintain power.
2) When using a Power 3 to maintain power there will be a significant voltage drop between track power and Power 3 power. Track is normally at around 22 volts +- while the output from the Power 3 is around 7 volts. Not a problem for most motors as the Back emf control takes over. It is a problem for lights protected by a resistor. Two options. 1) use a battery closer to the track voltage rather then a power 3, or 2) use a current regulator rather then a resistor for your lighting (that what I do most of the time)
Instead of using the Lenz USP power option you can always use a capacitor to power the lights to remove the flicker. If the capacitor is really large place a resistor with a diode across it in front of the capacitor so that is charges slowly and discharge rapidly. Smaller caps should pose no problem since you have a 1 amp function output.
Hope that helps
Stan


----------



## lownote (Jan 3, 2008)

Thank you all, this has been a very informative discussion


----------



## Greg Elmassian (Jan 3, 2008)

Knut: it does not matter if the capacitor is charged with a million joules or not, only the voltage present at the function "output" is germane... since when the function is "off", full voltage is present, that proves that full voltage cannot harm it. Think this through and you will find it irrefutable logic. It's only the voltage. 

Stan, I'm confused, what battery are you referring to in your number 2 above: "use a battery closer to the track voltage rather then a power". 

Isn't your "power 3" a capacitor that is charged to the rectified track power voltage? How does a "power 3" only have 7 volts? 

Also confusing: "Instead of using the Lenz USP power option you can always use a capacitor to power the lights" is not the Lenz USP nothing more than a capacitor, a resistor and a diode? 

Please explain. 

Regards, Greg


----------



## krs (Feb 29, 2008)

Posted By Greg Elmassian on 25 Jan 2012 04:50 PM 
Knut: it does not matter if the capacitor is charged with a million joules or not, only the voltage present at the function "output" is germane... since when the function is "off", full voltage is present, that proves that full voltage cannot harm it. Think this through and you will find it irrefutable logic. It's only the voltage.




Greg,

If the function output of a decoder uses a totem pole design, and some do - I found that out the hard way - a charged capacitor connected directly to the output will discharge through the upper transistor when the lower transistor turns off. Nothing to do with the voltage, it's the current surge through the upper transistor if there is a capacitor connected directly to the output.

Normally, when the lower transistor turns off one would see full voltage at the output but there is no current flow through the upper transistor since it is at V+ as well, with a capacitor connected, that point is essentially at "common" in a decoder ( -V in the diagram below) and the discharge path through the totem pole transistor is a lower impedance path than the path through the LED and current limiting device.
Add a capacitor from output to V+ and a resistor and LED connected to V+ to this circuit and you will see what I mean.









In any case, even if the output is just single ended, I would never connect a large electrolytic directly to a semiconductor without some control of the amount of current that can flow.

That's probably because most of my practical experience is with high tech communication electronics where reliability was very important - for consumer products cost trumps reliability every time.

Back to this original problem - I think the key thing is to understand why the LEDs flicker - they shouldn't if the Lenz power module is connected.
Once the real cause is known, the solution is usually prett straight forward. 


Knut


----------



## lownote (Jan 3, 2008)

I looked again--the lights DEFINITELY flicker more the the headlights. The headlights are also LEDs and are also driven by a CL-2. 

So I tried this: function output--rectifier diode--positive leg of electrolytic cap--CL-2. 

No love--the lights came on very dimly, I think from residual charge in the cap. 

Need to think this through...


----------



## krs (Feb 29, 2008)

Are the LEDs dim when they should be off? 
Or when they should be on? 
I'm not clear on that. 

And where did you connect the other side of the capacitor? 
What size and type of capacitor did you use? 

Can you include a sketch of how everything is wired up? 

Knut 

BTW - did you try the Marker lights connected to the headlight output to see what kind of flickering you get? 
And use a resistor instead of the CL-2; the CL-2 doesn't buy you anything in that arrangement - it's really meant as a constant current source if the voltage varies. 

Knut


----------



## lownote (Jan 3, 2008)

The leds were dim to the point of being almost imperceptible. There was no heat in any of the components.

I probably have the polarity of something wrong.
The reason I'm using the CL-2 is not having to worry about the volage at the function output. But I may bite the bullet and try the resistor method. So I assume the function output sees the full voltage of the track? Wait, check that, the Lenz manual says the "voltage of the function output is 16v."


----------



## krs (Feb 29, 2008)

The Lenz manual says the "voltage of the function output is 16v." 

What manual are you looking at? 

I just checked the Lenz Gold Maxci manual and it says that the function output is 1.5 volt less than the DCC voltage. 
That males sense. 
The function output being 16 volts does not 
But the Lenz manual on line also warns about not exceeding the current rating of the function output or you will destroy it. The function outputs are apparently not short circuit protected so be careful what you connect there. 

I just made the suggestion to replace the CL-2 with a resistor to make sure that the CL-2 (being an active device) does not contribute to the flickering.


----------



## krs (Feb 29, 2008)

This is crazy! 
I did three google searches for the Lenz Gold Maxi decoder and I ended up with three different manuals. 
I also just found the English one where they state the function output is 16 volts. 
Got to read through the rest of it to see what they mean.


----------



## krs (Feb 29, 2008)

Maybe Stan can help us out.

In the manual it says:

When connecting LEDs, make sure that the connection U+ is the 'positive pole' (anode side of the LED) and that the function output is the 'minus pole' (cathode side of the LED). The voltage of the function output is 16 V. Do not forget the required voltage multiplier. 

Normally, with a DCC decoder V+ (U+ in European terminology) is the positive rectified DCC track voltage less the diode bridge drop and the function output when turned on switches to common,
like in this very simplified diagram:










Where does the 16 volts come in at the function output unless it's a totem pole configuration I mentioned earlier.

Also, what does "Do not forget the required voltage multiplier." mean - what voltage multiplier?

Sorry, I'm not much help but I don't even understand that part of the manual.

Knut


----------



## lownote (Jan 3, 2008)

LOL! And here I've been thinking it was just me.

Yes, "Voltage multiplier" had me stumped too, which is why the CL-2 
After I put my daughter to bed I'll have some time to maybe work on it some more


----------



## krs (Feb 29, 2008)

Posted By lownote on 26 Jan 2012 05:27 PM 
LOL! And here I've been thinking it was just me.

Yes, "Voltage multiplier" had me stumped too, which is why the CL-2 
After I put my daughter to bed I'll have some time to maybe work on it some more 
Found a German version of that manual.

In German the manual says (translated): Do not forget the current limiting resistor (for the LED)


How that was translated to "voltage multiplier" is beyond me.


But they still mention "approximately 16 volts" at the function output.

If you do some more checking tonight, why don't you check the voltage at a function output measured against common first.

See if you do get a voltage reading with the function output not activated and then see what the reading is with that function output activated.

Also measur U+, it should be a bit less than the DCC voltage.

Knut


----------



## Greg Elmassian (Jan 3, 2008)

Knut, your "totem pole" output is found in the function output of a DCC decoder? Please give me the model and make where that is true. 

You show a diagram with V+, V- and ground.... never seen that in a decoder... since the common is positive, how this could apply is beyond me... 

Only if you have a dual power supply would this work in a decoder... the common in your schematic is not either the V+ or the V- .... 

In EVERY decoder I have seen at least recently, the common is positive and the function inputs pull to ground when active. There is NO dual (plus and minus) power supply. 

Maybe you have seen this, but I'm pretty sure the Lenz does not do this. 

Greg


----------



## Greg Elmassian (Jan 3, 2008)

The 16 volts is positive, the function pulls to ground. There is NO dual (plus and minus) supply with "ground" in the middle. 

There is no information given that supports your totem pole theory. 

Show me a manual for a dcc decoder that says it can drive the output x volts above ground AND x volts below ground... 

(and then show me a Lenz, or QSI, or NCE, or Massoth, or ESU, or Digitrax or Soundtraxx manual that shows this) 

there's a lot of screwy data running around here. 

No more theories, let's have some facts, that do not violate Ohms law and basic circuit theory. 

Greg 

p.s. the 16 volts comes from the common DCC track voltage of 16 volts.


----------



## Dan Pierce (Jan 2, 2008)

Since an LED is low power, I would just add a filter capacitor across the LED. It should already have a dropping resistor, thus limiting the surge and this is my KISS suggestion for the non-technical person with the original post. A 100 microfarad capacitor can filter out a lot of the flicker this way and not create a surge issue. A 220 would be better.


----------



## lownote (Jan 3, 2008)

@import url(/providers/htmleditorproviders/cehtmleditorprovider/dnngeneral.css); Dan:

The difference here is that the LEDs are connected to the function output of a decoder, and I don't want to fry the decoder due to current spikes or the cap discharging back into the function output.

I think I'll probably just live with the flicker


----------



## krs (Feb 29, 2008)

Posted By Greg Elmassian on 26 Jan 2012 08:02 PM 
Knut, your "totem pole" output is found in the function output of a DCC decoder? Please give me the model and make where that is true. 

You show a diagram with V+, V- and ground.... never seen that in a decoder... since the common is positive, how this could apply is beyond me... 

Only if you have a dual power supply would this work in a decoder... the common in your schematic is not either the V+ or the V- .... 

In EVERY decoder I have seen at least recently, the common is positive and the function inputs pull to ground when active. There is NO dual (plus and minus) power supply. 

Maybe you have seen this, but I'm pretty sure the Lenz does not do this. 

Greg 

Greg,

I thought you would understand what I meant.
I wasn't sure if people today understood what a totem pole configuration was so a did a search on line and quickly only posted the schematic I posted.
The point I'm trying to get across is that there are other decoder function output configurations other than the single transistor to ground that every one assumes.
Of course, with a decoder the V- shown in the diagram I posted is the decoder common but that doesn't change the configuration, just the reference potential.

The reason I know these types of output configurations do exist on some decoders is because on those one gets a voltage at the function output when it is off with no load connected.

Even with the Lenz decoder - where do you think the 16 volts comes from with the decoder output off and no load? - assuming that statement in the manual is actually true.


----------



## krs (Feb 29, 2008)

Posted By Greg Elmassian on 26 Jan 2012 08:06 PM 

p.s. the 16 volts comes from the common DCC track voltage of 16 volts. 


It says: "The voltage of the function output is 16 V"

That is not the common DCC track voltage.

For one, the DCC track voltage can be anything from 14 to 22 VDCC, 16 volts would not even be typical for Large Scale and one also only measures the DCC track voltage at the function output if
a. The function output is wired to a load which is then connected to V+, and
b. The function output is not activated

But having the function output at the VDCC potential in this situation is normal, why even mention it.

If however there is a voltage of 16 volts on the function output with the function output off and no load connected, well then we are back into either a totem pole configuration (V+ and grd power) or an internal pull-up resistor.


----------



## krs (Feb 29, 2008)

Posted By lownote on 27 Jan 2012 08:57 AM 
@import url(/providers/htmleditorproviders/cehtmleditorprovider/dnngeneral.css); Dan:

The difference here is that the LEDs are connected to the function output of a decoder, and I don't want to fry the decoder due to current spikes or the cap discharging back into the function output.

I think I'll probably just live with the flicker 

I did a bit of searching last night with German Google.

A number of people had the flicker problem with the Lenz Gold driving LEDs
One supposedly resolved it by resetting the decoder to the standard configuration as shipped.
You could try that

And are you sure the flicker is due to poor power pick-up?
I assume it's random and the flickering stops when the powered unit stops.


I still don't understand why the Lenz power module you are using wouldn't suppress the flicker.

The LEDs are pretty low current; should be easy to eliminate any flicker caused by momentary power pick up problems.


----------



## krs (Feb 29, 2008)

Greg, 

Just a general comment. 

Maybe my comments re totem pole output and internal pull-up resistors are a red herring when it comes to this decoder, however.... 

Connecting a few LEDs to a function output and getting them to work properly should be a no brainer but apparently here it is not. 
So then one wonders what else might be going on inside the decoder. 
That's all I'm getting at. 

@lownote - Something else I wanted to check and keep forgetting to ask. Can you make sure you don't have the decoder set up to reduce the voltage at the function output. 
The Lenz decoder as well as many others use straight PWM to do that and depending on the PWM frequency used, that could cause LEDs to flicker. 
If that is the case, the flicker would be uniform (not random) and would also occur when the unit is stopped.


----------



## lownote (Jan 3, 2008)

Knut I really appreciate your suggestions and help.

I just tried it again on my bench and the marker lights were pulsing on and off in reglar way and dimming when the headlight came on. I did a hard reset of all cvs and decoder pro is reading all the changes right now. I'll see what I get when it's done


@import url(http://www.mylargescale.com/Provide...ad.ashx?type=style&file=SyntaxHighlighter.css);@import url(/providers/htmleditorproviders/cehtmleditorprovider/dnngeneral.css);


----------



## lownote (Jan 3, 2008)

Ok, after the rest, they come on and are mostly steady, blinking about once every 7-8 seconds. When I turn the headlight on, they dim--why should this be? they aren't plugged int the same side of the decoder. I suppose it's because they share the same ground? 

I can't find an adjustment or cv that would cover reducing voltage at the function output


----------



## krs (Feb 29, 2008)

Do you still have the CL-2 connected?


----------



## krs (Feb 29, 2008)

Posted By lownote on 27 Jan 2012 10:54 AM 
Ok, after the rest, they come on and are mostly steady, blinking about once every 7-8 seconds. When I turn the headlight on, they dim--why should this be? they aren't plugged int the same side of the decoder. I suppose it's because they share the same ground? 

I can't find an adjustment or cv that would cover reducing voltage at the function output 
Take a look at all CVs between 55 and 64, those affect the output of the various function outputs.
Which function output do you have the marker lights connected to?

And I also have a theory (Sorry Greg) - here it goes:


The brightness of a light connected to the function output depends on the voltage there (with LEDs it really depends on the current which in turn depends on the voltage)

This decoder uses PWM to reduce the voltage, that means that with a reduction of 50% say, the PWM signal would have a 50/50 duty cycle, ie 50% of the time there is no voltage at the output and the other 50% of the time there is full voltage.

Now a lightbulb would essentially integrate that PWM signal and you get the dimming effect.
However, a CL-2 requires at least 5 volts to operate properly, what happens here is that the CL-2 is pulsed at VDCC and then an open when the function output transistor turns off.

Could explain some of the "funnies" we are seeing. 


Knut


----------



## lownote (Jan 3, 2008)

Knut, thank you for your help. But Im giving up on this decoder. I've wasted way too much time on it. It should not be this hard. It just does not work as advertised.

I'm having all sorts of problems with the "constant braking distance" feature as well. I cannot get the little eggliner to stop in a predictable way at either end of its point to point run.

I think I'm putting Lenz products in the "do not buy" category.

I'm going to order and ESU motor only decoder and see if that actually does what it's supposed to.


----------



## krs (Feb 29, 2008)

You're right - it shouldn't be that hard............. 

Lenz decoders are pretty good and they do usually deliver the capabilities promised, sorry that you're having all these headaches. 
Maybe part of the issue is the English translation in the Lenz manual (like the one we discovered) 

ESU also makes excellent decoders, not well known in the US I don't think. 
Hope you have better luck with it. 

Knut


----------



## lownote (Jan 3, 2008)

Knut:

I'm stuck with Lenz for now because of the autoreverse feature.

So I tried to reset the decoder again. According to the manual, you can reset all CV's to factory defaults by by entering a value of either "8" or "33" in CV 8. But I can't write anything to CV 8! Tried using JMRI in all possible modes, and tried using NCE in programming track mode and on the main, and no matter what I try CV 8 reads "99" and is cannot be written.

Hard to understand.


----------



## Dan Pierce (Jan 2, 2008)

Decoders have CV 8 as the manufacturer code and are read only. 
Writing to CV 8 creates a reset, but the decoder will remain at original reading, in your case 99 for your decoder which is a LENZ. 
145 is Zimo, 123 is Massoth/LGB, 129 is digitrax.


----------



## krs (Feb 29, 2008)

Posted By Dan Pierce on 30 Jan 2012 09:25 AM 
Decoders have CV 8 as the manufacturer code and are read only. 
Writing to CV 8 creates a reset, but the decoder will remain at original reading, in your case 99 for your decoder which is a LENZ. 
145 is Zimo, 123 is Massoth/LGB, 129 is digitrax. 

As Dan stated.

If the Lenz decoder was not reset by writing 33 to CV 8 (which will still read 99), one comment I saw is that one needs to use register mode for the programming.

Don't know if that is still true for the existing one.


----------



## lownote (Jan 3, 2008)

AHA--thanks. I was assuming that the value written to * would show up--a dumb mistake. Thank you


----------



## Greg Elmassian (Jan 3, 2008)

Probably not register mode, but many decoders need to be in service mode (programming track), not ops mode (programming on the mainline). 

This "dual" personality of a register for reset and manuf id is pretty common. 

Greg


----------



## krs (Feb 29, 2008)

Posted By Greg Elmassian on 30 Jan 2012 01:45 PM 
Probably not register mode, but many decoders need to be in service mode (programming track), not ops mode (programming on the mainline). 


RE "Register Mode", I just quoted what I read on another forum.
Don't have a Lenz decoder so I can't speak from first hand experience - but you're right, it seems rather odd that Lenz would require that old form of programming o reset the decoder.
The manual doesn't say anything as to which mode to use so from that point of view, all modes supported by the Lenz decoder should work.

Knut


----------



## lownote (Jan 3, 2008)

I've finally got this decoder working as it should. I replaced the CL2 with a 470 k resistor, guessing the voltage to be about 20. The marker lights flicker less than they did, but they still blink off in response to power interruptions in a way that the headlight/taillight do not. Putting an electrolytic cap after the resistor resulted in a very slow charging cap, and basically no lights. So I pulled the cap out. I'm going to live with it for a while. I also managed to get the protected crossing/push pull operation to work, finally, after much frustration.




The trolley now shuttles back and forth automatically, and stops at the crossing if the mainline is occupied. The Lenz automatic shuttle feature is very nice. I'm not sure why other decoders don't have this? I assume lenz has patented that feature. But the problem with Lenz is the maddeningly confusing way they implement "constant braking distance." The idea is that the loco will always stop in exactly the same distance, regardless of speed. In practice, it's kind of a disaster. The interaction between CV 4 (momentum) and the Lenz "constant braking diastance" is just impossible to get clear, and the various Lenz manuals, badly translated, don't help. According to people in the HO world, ZIMO and ESU have managed to get "constant braking distance" to work really well. But alas, they don't have the built in shuttle feature.




Anyway, I finally got it to work by increasing the available stopping space and by trying a different decoder profile in JMRI. There's one decoder profile (under "Lenz plus decoders released March 2010") that includes a setting for "Asymmetric DCC sensitivity." When I halved the preset value it started working the way it was supposed to.




It's remarkable--this wasn't in any of the Lenz manuals I could find. It certainly was not in the manual that came with the decoder. I just blundered onto this adjustment, after spending many hours trying to figure it out.




I suppose my best bet would be to regard this as part of the "fun" of the hobby.


----------



## Greg Elmassian (Jan 3, 2008)

Mike, really need to think through the circuit. 

You needed to limit the current to the diode, and not the cap (not in the same way). 

Even then, you needed to limit the cap charging current to the max output of the function. 

You had something wrong in your circuit, but I have the feeling that you really did not want to completely think this through. Now before you get upset, you statement "guessing the voltage to be about 20" shows you did not go the "distance" so to speak, you could have measured the voltage, etc. 

Not once in 3 pages did you give the current capacity of the function input of the lenz, the most critical piece of information needed to determine the components in the circuit, at least in my thinking. 

So, I think you could have made it work, but I gave you my best information and advice and you did not follow it. There's probably other solutions, but I'm very sure I could have taken you to success.

Your slow charging voltage and still flickering belies this.

I would have done this:

[*]made a charging circuit for the capacitor, determining the fastest charging capability. This also includes a "discharge path" to power the lights that did not go through the current limiting resistor. 
[/list][*]Powered the lights from this "power supply" and used the CL2 so that you don't have to worry about the source voltage[/list][*]and finally ensured that the circuit design was such that there was enough "voltage headroom" so that as the capacitor discharges, it does not immediately go below that which is required for the lighting circuit to function.[/list] 
I do believe that there is a way to do this, I could be dead wrong, but I don't think you ever got these 3 critical things working.


Regards, Greg


----------



## krs (Feb 29, 2008)

Adding to what Greg posted........... 

I think using a resistor rather than the CL2 is the right decision in this case. 
But the value can't possibly be 470K in series with the LED - that would only give you a small fraction of a milliamp through the diode. 

A value of 1K or 2K would be more appropriate assuming you actually get 20 volts at V+. 
Would help if you could post a sketch of the circuit you have now along with component values. 

Knut


----------



## lownote (Jan 3, 2008)

No circuit worth posting. I just stuck a diode after the resistor to see what would happen, then took it off. 



I could not find a reliable account of the voltage at the function output, and it's true, I got sick of messing with it and REALLY sick of thinking it through and just assumed that since my track is at 21 it could not be more than that and was likely a bit less. 



I just stuck one end of the resistor in the + function output and the other to the string of 4 LEDS. Seems to be working fine on the mainline. On the bench, using JMRI and the PR-3, the lights blink slowly. 

I'm much more excited about getting the trolley functions to work! That was a serious round of hair -tearing


----------



## krs (Feb 29, 2008)

I realize the circuit is extremely simple, but.... 

1. Your resistor can't possibly be 470 K-ohms as you posted (if it is series with the LEDs) 
2. Four LEDs - are these all in series or some series/paralle combination? 
3. How did you connect the capacitor? What value 
4. Which Function output are you now using 
5. Is the function output set to full voltage or is it dimmed 

Even though the circuit is very basic, you seem to have a lot more problems with it than you should have. 
So I thought there must be something basically wrong in the way things are hooked up and/or the decoder is programmed. 

Knut


----------



## krs (Feb 29, 2008)

Posted By Greg Elmassian on 04 Feb 2012 03:36 PM 

[*]Powered the lights from this "power supply" and used the CL2 so that you don't have to worry about the source voltage[/list]
Greg,

I'm a bit hesitant in using the CL2 in this case.

The CL2 requires a minimum voltage of 5 VDC for proper current regulation.

If the Lenz function output is PWM controlled one doesn't get that.


I also think part of the problem is that there seem to be different manuals on the net for the Lenz Gold Maxi decoder.
The English versions have some translation issues, but I'm also not sure which version matches this particular decoder
In one manual I looked at the maximum current for the function outputs is 1 amp each with a total of also 1 amp for all eight.
Motor current is specified at 3.0 amps continuous max, 5 amps peak and 10 amps stall, and the total maximum current - motor and function outputs combined is also 3.0 amps max.

Knut


----------



## lownote (Jan 3, 2008)

@import url(http://www.mylargescale.com/Provide...ad.ashx?type=style&file=SyntaxHighlighter.css);@import url(/providers/htmleditorproviders/cehtmleditorprovider/dnngeneral.css); Posted By krs on 04 Feb 2012 04:43 PM 
I realize the circuit is extremely simple, but.... 

1. Your resistor can't possibly be 470 K-ohms as you posted (if it is series with the LEDs) 
2. Four LEDs - are these all in series or some series/paralle combination? 
3. How did you connect the capacitor? What value 
4. Which Function output are you now using 
5. Is the function output set to full voltage or is it dimmed 

Even though the circuit is very basic, you seem to have a lot more problems with it than you should have. 
So I thought there must be something basically wrong in the way things are hooked up and/or the decoder is programmed. 

Knut 

Knut:

I made a hasty post--the resistor is 470 ohms. Four LEDS in series. The cap was 35 v 1000 uf. Function output C. As far asI know it is set to full voltage.


----------



## Greg Elmassian (Jan 3, 2008)

Knut, please stop with the PWM on the function... please! Let's just assume he has not messed up and tried to "dim" the output. 

OK, some fundamentals... since the voltage on your "power storage unit" will vary, you really should use the CL2... if your supply voltage varies, which it must, then your resistor is WRONG... 

ok, so we have a bit of sanity now... 

So you need 4*3.6 volts plus the CL2 voltage drop... 5 volts.. so the minimum voltage to run your lights is 19.4... 

Right there you have a problem, you have to maintain the capacitor at almost full charge to not drop the lights. 

You need to back off to at least one less LED in series... 3 LEDs and the CL2 is 15.8 

Now, if the capacitor can be charged at a reasonable rate then your lights will be at constant intensity until the capacitor drops below 15.8 volts... 

Make sense? 

Greg


----------



## lownote (Jan 3, 2008)

It does, and thank you. But I'm going to leave it be for a while. It was such a huge job trying to figure out the trolley bit. I got it working in a basic way while ago, but then every tweak would mess the functioning up. I'm so pleased I seem to have it licked, and if it doesn't rain tomorrow I'll do some more extensive tests


----------



## krs (Feb 29, 2008)

Posted By Greg Elmassian on 04 Feb 2012 10:02 PM 
Knut, please stop with the PWM on the function... please! Let's just assume he has not messed up and tried to "dim" the output. 


I keep bringing this up because it's still a real possibility based on what has been posted so far and what I know about this Lenz decoder.

The decoder in this application is used with a Lenz power storage module, that is designed to bridge up to 3 seconds of power loss at a 1 amp load and it supports all outputs, motor and function, which was also confirmed by Stan in an earlier reply in this thread.

There was never any explanation why these LEDs should flicker in the first place if the cause was a loss of input power so it is reasonable to assume that the flickering is actually caused by the decoder itself.


Also, if an output is dimmable, that doesn't necessarily mean that one gets no pulses at the output - typical designs of oscillators where the frequency is fixed and one can vary the period will not allow a 100/0 on/off ratio.


Bottom line is that one should not need a capacitor at any function output to prevent flickering of the lights caused by a momentary lack of track power.

To understand what the cause of the flickering is, I suggested earlier to connect the marker lights to the function output where the LEDs don't flicker but I don't think that was ever done.
Once the cause of the flickering is determined, the solution is probably obvious. 


BTW - the 7 volts that Stan mentioned - that is the terminal voltage of the Lenz Power 3 module after 3 seconds at a 1 amp load.

Knut


----------

