Shop OBEX P1 Docs P2 Docs Learn Events
Creating a positive and negative voltage??? (ideas) — Parallax Forums

Creating a positive and negative voltage??? (ideas)

James LongJames Long Posts: 1,181
edited 2010-01-09 08:57 in General Discussion
I've done some brief research into DCC which is used in Model railroading.

The DCC specification spates the rails are:

1. coded using pulsed DC to +4/-4 volts.
2. common

I'm wondering if someone could use 8 volts, with a voltage divider for the common rail. That way the encoding would be a simple task of switching the 8 volts to the required spec. The specifications are not that high tech.......

Any ideas?

Would using a voltage divider work??? (I doubt it due to current draw).

James L

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services

Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-04 07:59
    Use an H-bridge to modulate the signal. You don't actually need a negative voltage. You just need for the rails to switch polarity between 0:+V and +V:0. Whatever you use has to provide enough current to run the engine motors, lights, etc.

    -Phil
  • James LongJames Long Posts: 1,181
    edited 2010-01-04 08:53
    Phil Pilgrim (PhiPi) said...
    Use an H-bridge to modulate the signal. You don't actually need a negative voltage. You just need for the rails to switch polarity between 0:+V and +V:0. Whatever you use has to provide enough current to run the engine motors, lights, etc.

    -Phil

    Phil,

    I didn't think that would work......

    DCC specifications state one rail should be common, and the other a swing of DC positive to negative.

    Would the electronics be able to see the difference? I wonder, because the common rail would be changing it's potential. How would any diodes, capacitors or other items deal with the potential changing.

    I'm guessing at this point. I haven't ever tried to interface to DCC. I'm only going by the specifications.

    By AC specifications wouldn't that be a voltage of 2.5 volts if the drive voltage is 5.0?

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L
    Partner/Designer
    Lil Brother SMT Assembly Services

    Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-04 16:55
    James,

    Put yourself in the train's position. You've got two rails to look at from an electrical standpoint, and that's all: no other voltage reference. So whether one rail stays steady while the other wiggles up and down positive and negative, or both wiggle from zero to positive and positive to zero, is irrelevant. From the train's standpoint, they're the same, i.e. the rails are changing polarity with respect to one another.

    Anyway, here's a DCC booster circuit someone built using a H-bridge: home.cogeco.ca/~rpaisley4/HBridge.html.

    -Phil
  • James LongJames Long Posts: 1,181
    edited 2010-01-04 18:08
    Phil Pilgrim (PhiPi) said...
    James,

    Put yourself in the train's position. You've got two rails to look at from an electrical standpoint, and that's all: no other voltage reference. So whether one rail stays steady while the other wiggles up and down positive and negative, or both wiggle from zero to positive and positive to zero, is irrelevant. From the train's standpoint, they're the same, i.e. the rails are changing polarity with respect to one another.

    Anyway, here's a DCC booster circuit someone built using a H-bridge: home.cogeco.ca/~rpaisley4/HBridge.html.

    -Phil

    Phil,

    You are right of course. I just couldn't get my head around 2x positive versus one common + one positive/negative. It is the fact that with one going negative, would be the same as the opposite rail going positive, which makes your scenario work.

    Now to figure out what the signal is when the system is not communicating.

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L
    Partner/Designer
    Lil Brother SMT Assembly Services

    Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2010-01-05 07:29
    I don't know anything at all about electric train sets so a question.

    It sounds like you are saying that some sort of a controller board communicates
    with the train by modulating voltage, current or polarity on the supply rails that
    power the set? Is this correct?

    If so, that is cool!

    And pretty much the same way I used an h-bridge circuit to send both power and data
    back and forth to my propeller based remote vga terminal project using only the 2 power wires.
  • nohabnohab Posts: 96
    edited 2010-01-05 13:42
    Yes, DCC very common in modern model railways. The signal is modulated with the power to the trains. Every train have a decoder which drives the motor and controls light, smoke, sound etc.
    However, +/-4 volts sounds very low.
    In H0 (scale 1:87) 14-16 V would be more correct, in N (scale 1:160) a few volts less but not as low as 4.
    http://www.nmra.org/standards/DCC/standards_rps/S-91-2004-07.pdf

    Holly: Cool that you have come up with a simular solution !
    Any schema?
  • AleAle Posts: 2,363
    edited 2010-01-06 11:47
    I just dived a bit in the railroad world to discover that the train(s) I bought use the somewhat incompatible M
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2010-01-06 17:34
    Ale,

    That's a good point about short-circuits ... any de-railing or anything else conductive that could cross the track presents a potential problem. A simple current monitor before the H-Bridge to disengage the power to the tracks would solve that problem.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • VIRANDVIRAND Posts: 656
    edited 2010-01-09 08:36
    This reminds me of something simple from long ago.
    AC transformer in series with a motor and a rheostat (high current, resistance-wire-wound-pot)
    with 2 diodes pointing from the ends of the rheostat to its slider. Current cannot go either way thru both diodes.

    In the middle position, IIRC, a tiny bit of AC goes thru the rheostat and a DC motor doesn't turn or even buzz much.
    Turning the knob one way makes increasing voltage of one polarity,
    and turning the knob the other way makes increasing voltage of the other polarity.

    A DC motor (or train) would stop with the rheo in the middle, go forward with increasing speed when it's turned one way,
    and goes the other way at increasing speed as the rheo is turned the other way away from center.
    So the rheo cound be calibrated with the marks FAST, REVERSE, STOP, FORWARD, FAST.

    A certain power transistor (but not just any) may work better than the diodes if it amplifies current,
    and the rheostat will be less likely to smoke if there's a short circuit. The half wave DC probably will just
    make the big transistor a little bit warm if shorted.

    Does that sound like how the train is controlled, or is there a programmed automatic controller?

    It is possible that the polarities control at least two different devices also.
    The signal you describe if it is pulse width modulated could control two trains on the same track,
    each separately, using the pulse widths of the two different polarities separately, such as with 2 speed controls.
    That could explain why one track is labeled "COMMON".

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    VIRAND, If you spent as much time SPINNING as you do Trolling the Forums,
    you'd have tons of awesome code to post!
  • James LongJames Long Posts: 1,181
    edited 2010-01-09 08:57
    VIRAND said...
    This reminds me of something simple from long ago.
    AC transformer in series with a motor and a rheostat (high current, resistance-wire-wound-pot)
    with 2 diodes pointing from the ends of the rheostat to its slider. Current cannot go either way thru both diodes.

    In the middle position, IIRC, a tiny bit of AC goes thru the rheostat and a DC motor doesn't turn or even buzz much.
    Turning the knob one way makes increasing voltage of one polarity,
    and turning the knob the other way makes increasing voltage of the other polarity.

    A DC motor (or train) would stop with the rheo in the middle, go forward with increasing speed when it's turned one way,
    and goes the other way at increasing speed as the rheo is turned the other way away from center.
    So the rheo cound be calibrated with the marks FAST, REVERSE, STOP, FORWARD, FAST.

    A certain power transistor (but not just any) may work better than the diodes if it amplifies current,
    and the rheostat will be less likely to smoke if there's a short circuit. The half wave DC probably will just
    make the big transistor a little bit warm if shorted.

    Does that sound like how the train is controlled, or is there a programmed automatic controller?

    It is possible that the polarities control at least two different devices also.
    The signal you describe if it is pulse width modulated could control two trains on the same track,
    each separately, using the pulse widths of the two different polarities separately, such as with 2 speed controls.
    That could explain why one track is labeled "COMMON".

    DCC, is a system which each Locomotive on a track has a decoder. The signal is not only a power source, but decodes the information for each locomotive. Each locomotive has an address (somewhat like I2C). Then the controller can tell each loco what to do. They can all run on the same track at the same time.

    There are drawbacks to the system, but there are also many more cool things a DCC system can do. It can control switches, signals, lights, etc (not necessarily just the locomotive).

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L
    Partner/Designer
    Lil Brother SMT Assembly Services

    Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
Sign In or Register to comment.