Jump to content
 

Stay-Alive/Capacitors for 12vDC


hartleymartin

Recommended Posts

I had been wondering the same thing recently, having got some 0-6-0 tanks that stall on points.  I found some earlier threads on the subject:

 

http://www.rmweb.co.uk/community/index.php?/topic/13824-electronic-flywheel/

 

http://www.rmweb.co.uk/community/index.php?/topic/41763-electronic-boosters/

 

They generally suggest that it isnt really practicable due to the size of the capacitor required.  However, I am planning to try connecting up a 3300 microfarad capacitor that I have to a Hornby Type 7 motor in my spares box, and just see if it runs after killing the power (and if so, for how long).  I will post my results, hopefully in the next day or so.

 

What I would strongly advise is that you check that all the existing pickups are working, by testing them with a meter. Also consider adding new pickups if you can - I have done it to a Hornby DMU and a Triang Blue Pullman and it really helps on slow running through points

Link to post
Share on other sites

  • RMweb Gold

I had been wondering the same thing recently, having got some 0-6-0 tanks that stall on points.  I found some earlier threads on the subject:

 

http://www.rmweb.co.uk/community/index.php?/topic/13824-electronic-flywheel/

 

http://www.rmweb.co.uk/community/index.php?/topic/41763-electronic-boosters/

 

They generally suggest that it isnt really practicable due to the size of the capacitor required.  However, I am planning to try connecting up a 3300 microfarad capacitor that I have to a Hornby Type 7 motor in my spares box, and just see if it runs after killing the power (and if so, for how long).  I will post my results, hopefully in the next day or so.

 

What I would strongly advise is that you check that all the existing pickups are working, by testing them with a meter. Also consider adding new pickups if you can - I have done it to a Hornby DMU and a Triang Blue Pullman and it really helps on slow running through points

 

Be absolutely sure what you are doing with the polarity(s) to that capacitor!

 

I, for one, would like to know how you get on.

 

 

Kev.

Link to post
Share on other sites

Be absolutely sure what you are doing with the polarity(s) to that capacitor!

 

I, for one, would like to know how you get on.

 

 

Kev.

Yes, I had thought that I will need to be careful on the polarity, as it is not bipolar.

Link to post
Share on other sites

I had read the threads that Andi refers to but my electronics knowledge comes from A level physics over 40 years ago, and I don't profess to understand the circuit!  The Youtube video is certainly convincing at speed.  However stalling at that type of speed is an unlikely scenario, as it is low speed operations where the problems lie  Also another problem here is that it is small locos like 0-4-0s and 0-6-0s which are more likely to stall on points than Lima Bo-Bos, and I think it would be very difficult to fit the electronics into the space in these smaller locos.

 

I did trial my very simple addition of the capacitor to a motor tonight, and the motor stopped pretty much instantaneously when the power was cut.  If there was any improvement at all, it was extremely marginal and I would probably need something like an oscilloscope to detect any difference.  In simple terms, a single capacitor wont make a significant difference, and if you really want to improve stalling performance, you will need to do something like Andi has done - if you have the skill and the space.

Link to post
Share on other sites

  • RMweb Gold

I had read the threads that Andi refers to but my electronics knowledge comes from A level physics over 40 years ago, and I don't profess to understand the circuit!  The Youtube video is certainly convincing at speed.  However stalling at that type of speed is an unlikely scenario, as it is low speed operations where the problems lie  Also another problem here is that it is small locos like 0-4-0s and 0-6-0s which are more likely to stall on points than Lima Bo-Bos, and I think it would be very difficult to fit the electronics into the space in these smaller locos.

 

I did trial my very simple addition of the capacitor to a motor tonight, and the motor stopped pretty much instantaneously when the power was cut.  If there was any improvement at all, it was extremely marginal and I would probably need something like an oscilloscope to detect any difference.  In simple terms, a single capacitor wont make a significant difference, and if you really want to improve stalling performance, you will need to do something like Andi has done - if you have the skill and the space.

 

I agree with you.

The outcome with the capacitor was predictable I'm afraid.

 

What you need to be looking at is the energy stored. (In Joules - or in today's parlance "amp-hours".)

 

Batteries are not bad, (only because we are used to their "time verses workrate" in everyday use), but capacitors store 3/8ths of nothing in a huge can size!

(We don't use kilo or mega Farads - we use pico, nano and micro, and very rarely milli Farads!)

 

I'm afraid you just had to experience it for yourself, But all the best and if you have any more questions there are a load of us here to help.

 

 

All the best,

Kev.

(Batteries not included!)

Link to post
Share on other sites

Its a very difficult thing to achieve, its a problems that rears its head frequently in the telecoms industry,

with trying to maximise transmit power on cell phones. especially on TDMA systems.

To try the same on a slow running motor, where you either have a low control voltage, or narrow pulses if using PWM.

The to make things worse you are in the situation where the polarity can change.

 

IMO

the only way to succeed with this situation is not to use capacitors, and use low voltage lithium rechargeable cells,

they offer the best size to capacity ratio.

You can continuously charge them while the loco is running, and the charge will be held for a while when power is off.

battery management is not a problem, there are devices to do this and they are physically small.

 

The tricky bit is the measure the voltage applied to the motors and its polarity.

the next trick is to generate a replacement voltage while continuously sensing if power is applied, for a given time.

Otherwise its just going to carry on until the battery runs down.

 

With current technology that can be done, and the change in polarity can be achieved by switching either N channel or P channel Mosfets .

 

Size, probably be able to squeeze it in the smokebox of a 4mm steam loco, much easier with diesels.

 

Cost: the most expensive part will be a pcb, it would have to be multilayer an small, not something you can make at home,

components under £20, it would be time expensive getting the software on the PIC to work properly, as there are so many variables

to take in to account. and a pig to manufacture and test

At a guess a small module to fit inside a loco would cost about the same as the loco, more likely twice or more.

 

 

its more cost effective to make sure the track is level and the pickups are working properly.

 

It would be easier to design for a DCC system as keeping the battery charged is much simpler.

generation of a replacement AC voltage is simpler too, but, being disconnected from the track you have lost the control signal :(

Losing that when you're running slow is a very long time in the digital world.

 

So which ever way you go its back to pickups and track

My wittering on the matter

Richard

Link to post
Share on other sites

Got to agree with the last post. I spent a little time with Dagworth designing (but not building) a capacitor-based circuit rather than battery. At least it can remember which way it was going.  On the subject of supercaps, one can get a few Farads now in the space of a pound coin. I use multiple 1F 5.5V dual layer caps from Maplin in my bike dynamo lights, so the technology is actually quite accessible.

 

The real problem for an analogue application is slow speed, as the energy on a cap is given by E = ½CV^2. So for 1F at 4 volts, that'd be 8 Joules, as opposed to 72J at 12v. It just might not be enough. It's also hugely dependant on the current draw of your engine. I've gone down the thought experiment of a shoreside bank of capacitors to provide an electronic flywheel, but the variability of each motor and its drive train friction means it'd never be reliable in operation from one loco to another.

 

I think Lenz do something on one of their DCC chips that can link into a big cap to do just this sort of thing. Haven't got a link, but someone might know.

Link to post
Share on other sites

I use multiple 1F 5.5V dual layer caps from Maplin in my bike dynamo lights, so the technology is actually quite accessible.

 

The real problem for an analogue application is slow speed, as the energy on a cap is given by E = ½CV^2. So for 1F at 4 volts, that'd be 8 Joules, as opposed to 72J at 12v. It just might not be enough. It's also hugely dependant on the current draw of your engine.

 

To get to 12V you would need 3 of those supercaps in series and then you are down to 1/3F and 24J.

 

I think Lenz do something on one of their DCC chips that can link into a big cap to do just this sort of thing. Haven't got a link, but someone might know.

 

They use a single supercap and some electronics to boost the voltage. That's why their module (BM1) is more expensive compared to the simple electrolytic types.

 

Lenz also have "USP" which uses capacitive coupling so that the decoder can still receive the control packets when direct connection is lost (the running over a sheet of paper trick).

 

Andrew

Link to post
Share on other sites

It would be easier to design for a DCC system as keeping the battery charged is much simpler.

generation of a replacement AC voltage is simpler too, but, being disconnected from the track you have lost the control signal :(

Losing that when you're running slow is a very long time in the digital world.

 

No need to regenerate AC, as DCC decoders are DC internally. DCC "stay alives" are conected after the rectifier and ar all DC. The decoders (if designed to spec) have well defined behaviour if the control signal is lost.

 

Some Zimo decoders fitted with stay alives can be setup so that if you ask them to stop on a bad piece of track and the control signal is lost they will creep forward until control is regained.

 

Andrew

Link to post
Share on other sites

It would keep things simpler on DCC if the AC voltage was generated, as the stay alive module would not

know what polarity was being applied to the motor.

I was think more of putting it between the pickups and module feed on DCC.

 

I suspect that the o/p voltage from the keep alive module would either need to kept in phase with AC supply or kept with say 10degs,

so in the time its lost supply from the track, and supplying a replacement voltage, when it picks the supply back up it doesn't generate a current surge from opposing vectors, before it senses the track voltage and goes back in the battery management mode.

Not difficult to do, but it means squeezing more on a board, probably need a larger PIC, and the cost is spiraling upwards.

A module for those with more money than sense, and outside of the capabilities of 90% on this list.

And all theoretical. :)

 

Richard

Link to post
Share on other sites

It would keep things simpler on DCC if the AC voltage was generated, as the stay alive module would not

know what polarity was being applied to the motor.

I was think more of putting it between the pickups and module feed on DCC.

 

I suspect that the o/p voltage from the keep alive module would either need to kept in phase with AC supply or kept with say 10degs,

so in the time its lost supply from the track, and supplying a replacement voltage, when it picks the supply back up it doesn't generate a current surge from opposing vectors, before it senses the track voltage and goes back in the battery management mode.

 

 

Don't think so...

Your description is written as if the DCC signal were a conventional AC (i.e. sinusoidal) waveform (which it isn't).

It would be difficult for an 'AC keep-alive' to keep in phase with the DCC track supply because it would need to know in advance what the packet content is going to be - and hence the polarity switching timing. This is clearly rather impractical - though the Lenz USP technique descibed by Andrew would be a possible way in.

A DC keep-alive on the rectified side of a decoder is far simpler all round. A real mechanical flywheel is even simpler, especially for DC operation.

Link to post
Share on other sites

It would keep things simpler on DCC if the AC voltage was generated, as the stay alive module would not

know what polarity was being applied to the motor.

I was think more of putting it between the pickups and module feed on DCC.

 

I suspect that the o/p voltage from the keep alive module would either need to kept in phase with AC supply or kept with say 10degs,

so in the time its lost supply from the track, and supplying a replacement voltage, when it picks the supply back up it doesn't generate a current surge from opposing vectors, before it senses the track voltage and goes back in the battery management mode.

Not difficult to do, but it means squeezing more on a board, probably need a larger PIC, and the cost is spiraling upwards.

A module for those with more money than sense, and outside of the capabilities of 90% on this list.

And all theoretical. :)

 

Richard

 

I suggest you read up on DCC and understand the practice, before trying to theorise :no:

 

Andrew

Link to post
Share on other sites

I admit knowing sod all about DCC, I don't use DCC and I doubt if I ever will.

I was only pointing it would be simpler to replace the AC at what ever frequency.

Which ever mode of modulation the data packet is sent, at the point of losing power from the rail

its simpler to supply the raw AC, that way the control of the motor should continue in its last state

 

To replicate the DC on the motor , you have to first know which polarity and the voltage level ,

that will tie up a ADC, which will have to have its zero reference at the highest negative voltage used on the system,

so you typically scale on a 12v system 24V, perhaps a little more to allow for controller spread, and then

perhaps use a dual DDS to replicate the p.d. across the motor.

Another complication is that its unlikely that the wheel on the loco lose contact with both rails at the same time.

That means the systems has to effectively float.

And not know at what speed the loco will be moving, you have to allow for the possible longest time the rail contact is lost.

The time could be anywhere between a few milliseconds to a few hundred milliseconds.

 

You can use capacitors to hold the voltage stable ish for a few milliseconds, but longer times cause difficulties.

Another complication if you try to use capacitors is size, if you want to have something to hold its charge enough to run a motor,

what ever time it takes to discharge , it will take a similar time to charge up again.

 

Which ever system in use its a horrendously complicated alternative to keep the track level and clean as well as the wheels and pickups

 

Richard

Link to post
Share on other sites

I admit knowing sod all about DCC, I don't use DCC and I doubt if I ever will.

 

So stop digging :no:

 

I was only pointing it would be simpler to replace the AC at what ever frequency.

Which ever mode of modulation the data packet is sent, at the point of losing power from the rail

its simpler to supply the raw AC, that way the control of the motor should continue in its last state

 

To replicate the DC on the motor , you have to first know which polarity and the voltage level ,

that will tie up a ADC, which will have to have its zero reference at the highest negative voltage used on the system,

 

DCC is a differential signal switching between +V and -V, no polarity, and no need to measure it.

 

The first thing a decoder does is rectify the track signal to provide on board power for the electronics and the motor. In parallel there is a connection to sense the track signal for decoding the data.

 

It is far, far easier to fit a stay alive on the DC side of the rectifier. The AC is simply not required to keep going to cover momentary loss of pick-up.

 

The speed and direction came in the last packet that was received. The loco will continue running at that speed and direction until (1) the power reservoir runs dry (2) track pick-up improves and a new packet is received, or (3) the decoder times out on loss of packet reception and stops (or takes some other course of action that it has been setup to follow).

 

Andrew

Link to post
Share on other sites

As Richard clearly has no idea of how DCC is implemented he has made several wild assumptions as to how it might be done, possibly resulting from his 'G8' Radio Ham analogue heritage (my wild assumption for the day).

To reinforce Andrew's comments:

The form of modulation is continuous 'square wave' pulse time variation - not AM or FM or anything of that nature.

As a result there is no 'raw AC' signal to emulate with your keep-alive. In fact DC would be better.

The pulse timing is measured by the decoder to generate an equivalent binary code which is the packet data - a long pulse gives a '0',  a short pulse give a '1'.

The decoder has the speed and direction data already stored from previously received packets, and just needs to keep trying to do the same thing during the input power outage.

Decoders use PWM to control the motors, so 'measuring the voltage' on the motor is equally meaningless in this context.

The decoder DOES 'sort of' float - it is disconnected from the rails through its input bridge rectifier, whose output which generates an internal + and - DC supply.

Capacitor size is the main consideration in all of this.

Link to post
Share on other sites

Not to sure how to take the "g8" comment

If its a differential waveform , its easier just to synch the clock on the stay alive module and

replicate the clock at the aprox data baud rate, until track power is resumed, or DCC timeout.

Any capacitor used would have to be immediately post bridge rectifier, as putting a capacitor across a pwm feed to the motor

would effect the speed control and the torque the motor produces by trying to smooth out the the pwm in to a near sawtooth waveform dependent

on the size of the capacitor.

You would then have two discharge paths for the cap, the resistance of the armature winding and the source impedance of the DCC unit,

both low . The discharge time on the cap is 5CR, but most is discharge in CR , You may just be able to get 5000uF bipolar in the tender or the body of a diesel loco, If the resistive part of the discharge impedance was 10 ohms , the cap has discharged in around 50msecs.

the loco is not going to move very far in 50 thousandths of a second, about the same time it takes to blink.

Its still more efficient to sort out the cause of the loss of power, not to try and put a sticking plaster on it

Richard

Link to post
Share on other sites

The 'G8' was not mean to be derogatory in any way, simply an observation based on my experience of others in that hobby who I have known in the past and who tended to have a more 'analogue' approach to their electronics than 'digital'. Mind you, this was long before concepts such as software defined radio came along. :)

Anyway...

There is no 'baud rate' to replicate. There is no 'clock' to sync to as such. DCC is not an NRZ type of encoding in the way that RS232/422/485 asynchronous comms uses.

The Bits in each byte of a DCC packet are coded by single cycles of a square wave. A '1' bit is a cycle of approx 58us+58us, and a '0' bit is a cycle of 100us+100us (or more). Whilst it is not strictly true that these bits could come at you in any order, the essence is that the almost limitless combinations of '1's and '0's cause the overall time length of packets to vary wildly depending on their exact content. For example, a single bit change in a byte value from (say) '01111111' to '10000000' would vary the total time taken to send that data over the rails by a factor of almost two. Without knowing what data is about to arrive an on-board keep-alive circuit stands no chance of keeping in sync with the command station.

For a more graphical indication of the concepts involved and the difficulties your proposal entails have a glance here:

http://www.dccwiki.com/DCC_Power

Link to post
Share on other sites

If its a differential waveform , its easier just to synch the clock on the stay alive module and

replicate the clock at the aprox data baud rate, until track power is resumed, or DCC timeout.

Totaly pointless and uneccesarily complex. Unless you can also recreate the data packets there is no point generating a DCC waveform.

 

Any capacitor used would have to be immediately post bridge rectifier,

Exactly.

 

as putting a capacitor across a pwm feed to the motor would effect the speed control and the torque the motor produces by trying to smooth out the the pwm in to a near sawtooth waveform dependent on the size of the capacitor.

One reason why suppression caps are best removed when fiting a decoder.

 

You would then have two discharge paths for the cap, the resistance of the armature winding and the source impedance of the DCC unit, both low . The discharge time on the cap is 5CR, but most is discharge in CR , You may just be able to get 5000uF bipolar in the tender or the body of a diesel loco,

You have just agreed that he cap is immediately after the rectifier. It does not need to be bipolar. A normal electrolytic wil do.

 

If the resistive part of the discharge impedance was 10 ohms , the cap has discharged in around 50msecs.

the loco is not going to move very far in 50 thousandths of a second, about the same time it takes to blink.

Why only 10 ohms? That's probably close to an order of magnitude too low. The armature resistance is only relevant when calculating the stall curent. The Back EMF wil reduce the motor current.

 

Its still more efficient to sort out the cause of the loss of power, not to try and put a sticking plaster on it

Indeed, but try telling that to someone who has just completed their layout with insulfrog points and finds that their 0-4-0 stalls at low speed. No matter how good the track is such a loco will suffer from the "3-legged stool" problem unless it has some form of compensation. A simple, cheap, fix with one capacitor, one resistor and one diode can transform a loco.

 

Andrew

Link to post
Share on other sites

I'm not going to continue answering your nit picking Andrew. but two things are very clear

You are excellent at pulling sections of text out of context to the body of the text.

 

And secondly like most digital engineers you fail to fully understand impedance and ignore the complex

component "j" or if you have a mathematics background "i".

 

As soon as you provide an alternating waveform , whatever the waveform shape, you enter the world of impedance and admittance .

 

And you should never remove the suppression capacitor across a motor, its purpose is to suppress the RF interference to other users.

Reduce the value down to 1nF or at the worst case down to 470pF, but no lower.

 

Richard

Link to post
Share on other sites

I'm not going to continue answering your nit picking Andrew. but two things are very clear

You are excellent at pulling sections of text out of context to the body of the text.

If you have anything to say about the message rather than the messenger I'm happy to continue the debate.

 

Andrew

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...