dbrb2 Posted January 4, 2022 Share Posted January 4, 2022 Morning I apologise if this is a very basic query: I have a DCC controller - SPROG3, connected to a laptop and a 12vdc PSU It can detect and control a DCC enabled locomotive on a short length of track I have been testing with I also have a basic carriage, designed to take 12v from the tracks, rectify it to deal with whichever polarity is present, regulate it, then power some onboard electronics (lights, camera etc) However, when I check the voltage across the two rails with a multimeter, I measure only ~4mv DC My hope was that the DCC signal was overlaid on the DC supply - so that I would still be able to access 12v for "dumb" power - is this not in fact the case...or is there some command that I am missing to tell SPROG3 to provide 12vdc to the running rails Cheers! Link to post Share on other sites More sharing options...
WIMorrison Posted January 4, 2022 Share Posted January 4, 2022 DCC is not overlaid on anything. It is an asymmetric square wave. You can get DC by using bridge rectifier with a capacitor over the DC outputs to smooth the DC voltage, however if your input to the Sprog is 12v DC you will not get 12v DC at the rectifier outputs, at a guess I would say somewhere around 9-10v DC ish. 1 Link to post Share on other sites More sharing options...
dbrb2 Posted January 4, 2022 Author Share Posted January 4, 2022 (edited) Ah Ok - so the tracks have a differential signal on them, which provides enough power to locomotives to run, whilst also carrying data? Looking at this page: https://dccwiki.com/DCC_Power It looks like the signal is differential - so the voltage across the rails should always be ~12v, but the frequency will change at high frequency? Perhaps that is why a multimeter has trouble making sense of it....? My setup today is: Rails > bridge Rectifier > buck converter > 5vDC, which works when the rails are powered from a DC PSU, but not when wired up for DCC If the above is correct - voltage across the rails always 12v but with polarity changing at high frequency, then the output from the bridge rectifier would have no "dips" to be filled by a capacitor would it....but I will certainly give it a go. Edited January 4, 2022 by dbrb2 Extra info added Link to post Share on other sites More sharing options...
smokebox Posted January 4, 2022 Share Posted January 4, 2022 (edited) To read DCC voltage accurately you need a true RMS (Root Mean Square) voltage multimeter, a Rramp Meter ( https://dcccentral.com.au/shop/rramp-meter-v1/ ) or an oscilloscope. Many ordinary digital multimeters will give a reasonably close reading if they are used on the AC voltage scale but some meters will be very inaccurate. DCC voltage is usually about 15 volts, not 12volt. Some systems have DCC voltages of 18 volts or so. If you want to rectify DCC to obtain a dc supply it would be best to construct a bridge rectifier from 4 high speed diodes, ordinary diodes may not work properly due to the high frequency of DCC (very roughly about 8 KHz) Edited January 4, 2022 by smokebox added extra word for clarity Link to post Share on other sites More sharing options...
Ron Ron Ron Posted January 4, 2022 Share Posted January 4, 2022 1 hour ago, dbrb2 said: Ah Ok - so the tracks have a differential signal on them, which provides enough power to locomotives to run, whilst also carrying data? …….. Not quite. DCC is purely a data transmission medium, with the voltage of the digital pulses amplified. The amplification in the “booster” or “power station” stage, enables motive power to be “harvested” as a byproduct from the digital data transmission. As Iain says, nothing is overlaid and the data is not in addition to anything. . Link to post Share on other sites More sharing options...
dbrb2 Posted January 4, 2022 Author Share Posted January 4, 2022 Ok thanks. I'll have a look this evening. At present I am using one of these bridge recttifiers: https://www.tme.eu/Document/7e56b3ff02696edf1da0b6fc01e74154/2W005-2W10.pdf Feeding into a buck converter to give me a 5v supply. I have no smoothing capacitor at the rectofoer output currently - since the DCC signal is differential square waves, it seemed that one would not be needed - since the voltage at the rectifier input should always be +-12ish volts...however it is a matter of moments to try one and see the effect. Changing the rectifier diodes is not quite so easy...but is doable Link to post Share on other sites More sharing options...
Hamburger Posted January 4, 2022 Share Posted January 4, 2022 1 hour ago, dbrb2 said: If the above is correct - voltage across the rails always 12v but with polarity changing at high frequency, then the output from the bridge rectifier would have no "dips" to be filled by a capacitor would it....but I will certainly give it a go. Rail voltage is square just in theory. On the oscilloscope you can see rounded edges, peaks and some sines. I'd try a capacitor behind the rectifier to smoothe this. Link to post Share on other sites More sharing options...
WIMorrison Posted January 4, 2022 Share Posted January 4, 2022 (edited) 2 minutes ago, Hamburger said: Rail voltage is square just in theory. On the oscilloscope you can see rounded edges, peaks and some sines. I'd try a capacitor behind the rectifier to smoothe this. It also depends on the command station or booster - I know a few that I have looked at at more like dirty sine waves than clean square waves Edited January 4, 2022 by WIMorrison Auto spelling Link to post Share on other sites More sharing options...
dbrb2 Posted January 4, 2022 Author Share Posted January 4, 2022 Thanks. I will try a cap this evening, and faster diodes later this week if needed :-) Link to post Share on other sites More sharing options...
RAF96 Posted January 4, 2022 Share Posted January 4, 2022 (edited) Basic DCC track voltage is bi-polar +/-15 v and as stated in a square wave comprising an encoded binary code from the DCC controller sent as a variable PWM of 1s and 0s. Each 1 is a DCC specification defined width of pulse as is each 0. Various groups of 1s and 0s are sent according to NMRA DCC specifications. The track ‘AC voltage code’ is decoded by a device in each loco that decodes the binary and tells each specific loco which direction to run and at what speed as well as commanding lights and sound functions. The basic track voltage can be rectified to use as a basic DC voltage for say coach lighting. Edited January 4, 2022 by RAF96 Typo Link to post Share on other sites More sharing options...
RMweb Gold RedgateModels Posted January 4, 2022 RMweb Gold Share Posted January 4, 2022 I sell these to provide dc voltage from the DCC track signal Link to post Share on other sites More sharing options...
dbrb2 Posted January 4, 2022 Author Share Posted January 4, 2022 Thanks - my use case puts this inside a carriage, so I suspect your very neat package may not fit? I will see if adding a capacitor this evening helps. It feels like it might....a perfect square wave shouldn't need one.....but maybe in the real world I do! If that doesn't work, I'll have to think again! Link to post Share on other sites More sharing options...
smokebox Posted January 4, 2022 Share Posted January 4, 2022 (edited) DCC isn't an ordinary square wave. It is very irregular. content://com.android.chrome.FileProvider/images/screenshot/1641316679031-1733783317.gif This DCC logo symbolises the DCC waveform. Edited January 4, 2022 by smokebox Added logo and text 1 Link to post Share on other sites More sharing options...
BroadLeaves Posted January 4, 2022 Share Posted January 4, 2022 1 hour ago, dbrb2 said: my use case puts this inside a carriage Have you considered using a function-only decoder? That will do the voltage conversion for you, is probably small enough to fit inside a carriage and as a bonus, you can turn it on and off from your cab. 1 Link to post Share on other sites More sharing options...
dbrb2 Posted January 4, 2022 Author Share Posted January 4, 2022 A function-only decoder is an interesting idea. The project involves powering a pi-zero. To avoid brief drop-outs in power, I have linked this with a piSugar battery. Power pickups are from copper bushes on the axles of the unit. Most of the time this battery will hardly draw anything, as it will be full...but when empty it can draw up to 1.5A @5v as it charges. That would only be about 0.7A at 12v though, so maybe a DCC decoder would do the trick - with the output fed into a buck converter to give me my 5v charging supply. As you say, the ability to turn on/off remotely is tempting. It looks though like many would not provide this current on a single output, so I might need to combine multiple output channels...? Link to post Share on other sites More sharing options...
WIMorrison Posted January 4, 2022 Share Posted January 4, 2022 Cheapest Function Only decoder is from LAIS - and the only decoder I would use from them LAIS 860011 1 Link to post Share on other sites More sharing options...
BroadLeaves Posted January 4, 2022 Share Posted January 4, 2022 31 minutes ago, dbrb2 said: . That would only be about 0.7A at 12v though Some of the ZImo units do up to 1.8A continuous and some also give you a variable voltage as second output. See http://www.zimo.at/web2010/products/funktionsdecoder_EN.htm Link to post Share on other sites More sharing options...
meil Posted January 4, 2022 Share Posted January 4, 2022 9 hours ago, dbrb2 said: Morning I apologise if this is a very basic query: I have a DCC controller - SPROG3, connected to a laptop and a 12vdc PSU It can detect and control a DCC enabled locomotive on a short length of track I have been testing with I also have a basic carriage, designed to take 12v from the tracks, rectify it to deal with whichever polarity is present, regulate it, then power some onboard electronics (lights, camera etc) However, when I check the voltage across the two rails with a multimeter, I measure only ~4mv DC My hope was that the DCC signal was overlaid on the DC supply - so that I would still be able to access 12v for "dumb" power - is this not in fact the case...or is there some command that I am missing to tell SPROG3 to provide 12vdc to the running rails Cheers! You are not using a Sprog power supply then as the one supplied by Sprog is 15v. I am surprised that you can get the 12v supply to work. Link to post Share on other sites More sharing options...
RMweb Premium Izzy Posted January 4, 2022 RMweb Premium Share Posted January 4, 2022 Okay, quite a bit of this is above my pay grade, but like many others I tap my DCC output to power accessories, and this is done by using a voltage converter ( from Vellmann and based around a LM317) to get a 5v dc supply. This powers 7.5g/9g servos, which normally can draw anything between 0.5-0.9amp when moving. Given my system is 3.5amp it’s no real drain on it. What form the DCC/AC is has, I believe, no relevance in this. I have also used a simple bridge rectifier from Gaugemaster to provide 12v for LED based lighting. So when the track output from the Sprog 3 is only 4mv my first thought is, and assuming it’s controlled via JMRI, what mode is the Sprog being used in? Program or command station. It needs to be the latter to get continuous full track power. A throttle can be generated in Program mode, for testing purposes, but track output will only exist while it’s on. Link to post Share on other sites More sharing options...
dbrb2 Posted January 4, 2022 Author Share Posted January 4, 2022 It did appear to be working with the track power wired directly into my rectifier circuit. Then at some point whilst transfering it to the actual train something stopped working terminally on the buck - perhaps I shorted something... I will try again! DCC track power to general purpose 5v supply is what I hope to end up with - since so much runs gadgetry from 5vdc now. Cheers for all the advice :-) Link to post Share on other sites More sharing options...
Crosland Posted January 5, 2022 Share Posted January 5, 2022 Remember you need to manually turn on the track power with a SPROG in programmer mode, when not programming. Okay, quite a bit of this is above my pay grade I think a few are speaking above their pay grade DCC is AC and is (nominally) square wave. That's not altered by the fact the pulse vary. DCC is not PWM, that's the output from the decoder. Each DCC pulse is 50% mark/space ratio, so not PWM, which implies variable M/S ratio. DCC is actually frequency modulated where only one cycle of one of two frequencies represents the data bit. SPROG 3s can be purchased (in the IK at least) with either 12V or 15V power supplies. The 12V works just fine for the smaller scales where you do not need TGV speeds. To get DC from the tracks you should really (as already stated) use high speed diodes. A bridge or two will be OK but you may run into problems if they proliferate. As DCC is a square wave you need only a small smoothing capacitor (nothing like 1000s uF you would find in a traditional rectifier circuit). Large capacitors will cause problems due to the inrush current when the power is turned on. The module shown earlier in the post has fat too big a cap for my liking. Again, it will be OK if you only have one or two of these. Link to post Share on other sites More sharing options...
dbrb2 Posted January 6, 2022 Author Share Posted January 6, 2022 (edited) Thanks. I think the circuit I have then should now be working - it is a boost circuit with a small electrolytic across the bridge rectifier outputs. The bridge is not using high speed diodes currently - I can rebuild it at the weekend if needed. Certainly from a DC supply this works fine - though I haven't been able to test it with a high frequency signal other than with the DCC system. I have the SPROG3 set up and connected via USB to a laptop, with a 12v 3A DC supply. The PanelPro UI shows "track power ON", and throttle 100% - does this mean that there should be a DCC signal on the rails from which I can draw power? If so, then that is a worry, as I am not seeing my expected 5v output. If I have missed a step though then perhaps all is still OK :-) Edited January 6, 2022 by dbrb2 Link to post Share on other sites More sharing options...
Crosland Posted January 6, 2022 Share Posted January 6, 2022 (edited) 28 minutes ago, dbrb2 said: The PanelPro UI shows "track power ON", and throttle 100% - does this mean that there should be a DCC signal on the rails from which I can draw power? If so, then that is a worry, as I am not seeing my expected 5v output. If I have missed a step though then perhaps all is still OK :-) Once the power is on you are good to go, or should be. The throttle setting is immaterial. DCC is always full voltage, the throttle setting(s) alter the waveform and thus the data. Can you post a circuit diagram? Edited January 6, 2022 by Crosland Ask for more info Link to post Share on other sites More sharing options...
dbrb2 Posted January 6, 2022 Author Share Posted January 6, 2022 Hi, See below for a quick sketch. Currently the diode ring is a 2W10: https://www.tme.eu/Document/7e56b3ff02696edf1da0b6fc01e74154/2W005-2W10.pdf I have some of these available though if needed: https://uk.rs-online.com/web/p/schottky-diodes-rectifiers/6289984 The 5v is being used (or not) to charge a backup battery for a piZero - which will draw very little current in normal use. However, when testing on a bench supply, with the batteries dead, the unit sourced almost 15w - so about 1.5A from the track supply at ~12v. This should be within the rating of the 3A supply I am using though. Link to post Share on other sites More sharing options...
Hamburger Posted January 6, 2022 Share Posted January 6, 2022 (edited) This is exactly how my car lighting works. The difference is that at the end only a few LEDs are attached (in pairs of 2 in series). I use a larger capacitor (6,800 µF) with a resistor-diode combination. A voltage of rail voltage minus 1.4 volts is always applied to the capacitor. What is the voltage in your circuit? Maybe your 5V voltage regulator is overloaded? 15 watts means a lot of heat that is generated in the buck and these components usually have a protective circuit. Maybe it will shut down, or is it already blown? Edited January 6, 2022 by Hamburger Link to post Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now