Shop OBEX P1 Docs P2 Docs Learn Events
Use of P1 to replace worn DCC controller? — Parallax Forums

Use of P1 to replace worn DCC controller?

AwesomeCronkAwesomeCronk Posts: 1,055
edited 2019-11-23 21:34 in General Discussion
My brothers and I have a few HO scale model trains in the basement. Recently, the basement received 2 inches of water. My bachmann ez command controller was on the floor. Now the potentiometer in the throttle control is corroded and unreliable.

I recall having seen this object on DCC control before. What is needed to build a controller with this?
«1

Comments

  • One way this could be solved:
    Is Chuck Davis on this forum or does anyone here have contact for him?
  • Cluso99Cluso99 Posts: 18,069
    Just did a quick look at DCC.
    Seems this is the complex part of the design. What controller are you trying to replace (link)?
  • AwesomeCronkAwesomeCronk Posts: 1,055
    edited 2019-11-24 23:46
    @Cluso99
    Bachmann EZ-Command controller

    The unit got wet and the potentiometer behind the throttle knob corroded. I often cannot get throttle control from the locomotives except when zeroing out and at full steam.
  • kwinnkwinn Posts: 8,697
    My brothers and I have a few HO scale model trains in the basement. Recently, the basement received 2 inches of water. My bachmann ez command controller was on the floor. Now the potentiometer in the throttle control is corroded and unreliable.

    I recall having seen this object on DCC control before. What is needed to build a controller with this?

    First thing I would suggest is to wash the circuit board, case, and other parts of the controller with water and mild dish detergent and then rinse it with DI water, followed by isopropyl alcohol. Then let all the parts dry thoroughly by blowing warm dry air on them overnight. Replace the throttle potentiometer and try it out.

    I have done this to PCB's, motherboards, and chassis on instruments that were being refurbished and/or upgraded as well as instruments that were water damaged by leaks, storms, or burst pipes with great success. Of course the instruments that were powered on when they got wet usually needed some electrical/electronic repairs on top of the cleaning.
  • @kwinn, in researching info to repair some tek scopes, found out Tek used to power wash scopes in for repair/maintenance. Google for pics and processes of this being done.......
  • I am afraid that I am in no position to be cleaning this thing. While I could maybe find the replacement part, I’d rather build a prop-based. controller.
  • kwinn wrote: »
    My brothers and I have a few HO scale model trains in the basement. Recently, the basement received 2 inches of water. My bachmann ez command controller was on the floor. Now the potentiometer in the throttle control is corroded and unreliable.

    I recall having seen this object on DCC control before. What is needed to build a controller with this?

    First thing I would suggest is to wash the circuit board, case, and other parts of the controller with water and mild dish detergent and then rinse it with DI water, followed by isopropyl alcohol. Then let all the parts dry thoroughly by blowing warm dry air on them overnight. Replace the throttle potentiometer and try it out.

    I have done this to PCB's, motherboards, and chassis on instruments that were being refurbished and/or upgraded as well as instruments that were water damaged by leaks, storms, or burst pipes with great success. Of course the instruments that were powered on when they got wet usually needed some electrical/electronic repairs on top of the cleaning.
    Yeah but then he might actually fix it which would deprive him of the joy of building a replacement with the P1 or P2!

  • David Betz wrote: »
    kwinn wrote: »
    My brothers and I have a few HO scale model trains in the basement. Recently, the basement received 2 inches of water. My bachmann ez command controller was on the floor. Now the potentiometer in the throttle control is corroded and unreliable.

    I recall having seen this object on DCC control before. What is needed to build a controller with this?

    First thing I would suggest is to wash the circuit board, case, and other parts of the controller with water and mild dish detergent and then rinse it with DI water, followed by isopropyl alcohol. Then let all the parts dry thoroughly by blowing warm dry air on them overnight. Replace the throttle potentiometer and try it out.

    I have done this to PCB's, motherboards, and chassis on instruments that were being refurbished and/or upgraded as well as instruments that were water damaged by leaks, storms, or burst pipes with great success. Of course the instruments that were powered on when they got wet usually needed some electrical/electronic repairs on top of the cleaning.
    Yeah but then he might actually fix it which would deprive him of the joy of building a replacement with the P1 or P2!

    BINGO!!
  • Cluso99Cluso99 Posts: 18,069
    While the P1 can handle the inputs and output PWM and DIR, you will need the electronics to convert that to drive the rails. And remember, that circuit will need to be ok with 3V3 PWM from the P1.
  • I was of the belief that NMRA DCC powered the rails and talked via radio.
    Anywhere I could find this circuit?
  • kwinnkwinn Posts: 8,697
    David Betz wrote: »
    kwinn wrote: »
    My brothers and I have a few HO scale model trains in the basement. Recently, the basement received 2 inches of water. My bachmann ez command controller was on the floor. Now the potentiometer in the throttle control is corroded and unreliable.

    I recall having seen this object on DCC control before. What is needed to build a controller with this?

    First thing I would suggest is to wash the circuit board, case, and other parts of the controller with water and mild dish detergent and then rinse it with DI water, followed by isopropyl alcohol. Then let all the parts dry thoroughly by blowing warm dry air on them overnight. Replace the throttle potentiometer and try it out.

    I have done this to PCB's, motherboards, and chassis on instruments that were being refurbished and/or upgraded as well as instruments that were water damaged by leaks, storms, or burst pipes with great success. Of course the instruments that were powered on when they got wet usually needed some electrical/electronic repairs on top of the cleaning.
    Yeah but then he might actually fix it which would deprive him of the joy of building a replacement with the P1 or P2!

    BINGO!!

    I thought of that the moment I posted the comment and considered editing it. Then decided AwesomeCronk could decide which course to take. Personally I agree that building a replacement using the P1 is the way to go. Once built so many enhancements are possible.
  • Digital readout is on the roadmap!
  • All right, down to the data.

    I see that I will need to transmit my packets, however the transmission occurs, like such:

    11111111111111 0 00000100 0 01100010 0 01100110 1

    preamble 0 address 0 instruction 0 error_check 1

    Presuming I understood this document correctly, the above transmission would tell locomotive 5 to travel forward at minimum speed.
  • Also from the NMRA: the encoding technique.

    I suppose that a 3.3v to 24v op-amp capable of reversing would drive the rails. I also realized that I have the necessary audio plug to connect my track cable to a prop project board!
  • There is some example code in this thread:
    https://forums.parallax.com/discussion/111985/model-railroad-dcc-projects/

    try searching for : dcc controller site:forums.parallax.com
  • Ah, yes. Thanks for that!

    His schematic uses an h-bridge. I will look into that.
  • Cluso99Cluso99 Posts: 18,069
    You are going to need that external circuit. A prop is not going to replace that circuit.
  • AwesomeCronkAwesomeCronk Posts: 1,055
    edited 2019-11-26 18:49
    Yeah, I figured. I think I will connect the prop pin to the input for the h-bridge, driven at 15ish volts. Then I’ll use either my own code or use the dcc driver mentioned above with my own control code.
  • Will this h-bridge work? I believe I need to supply 12v, 2A to the track, controlled by the DCC_Pin in Chuck Davis's DCC Driver.
  • kwinnkwinn Posts: 8,697
    Will this h-bridge work? I believe I need to supply 12v, 2A to the track, controlled by the DCC_Pin in Chuck Davis's DCC Driver.

    It's rated for 2A 12V, so as long as you don't need higher current or have a higher voltage input it should be fine.
  • Good! I suppose I just connect it to the track, then?
  • kwinnkwinn Posts: 8,697
    Good! I suppose I just connect it to the track, then?

    Sounds like a plan, but a 2A fuse might be a good idea for the first test.
  • AwesomeCronkAwesomeCronk Posts: 1,055
    edited 2019-12-05 23:51
    What kind of connections do I need? I’ve never used an h bridge before. Where would I get the fuse?
  • kwinnkwinn Posts: 8,697
    The suggested fuse should be connected between one of the outputs of the H-bridge and one of the rail just in case there is an unexpected problem. If there is already a fuse on the H-bridge or whatever is supplying 12V then it is not necessary. Some of the H-bridges I have used had built in overload protection so a fuse was not needed, but it pays to be cautious if you are not sure of the hardware.
  • AwesomeCronkAwesomeCronk Posts: 1,055
    edited 2019-12-05 23:52
    Thanks!
    So, if I use this unit, I connect DCC_Pin to IN1, Gnd to GND, Pwr+ to 12v, Pwr- to Gnd, and Motor to track? Inverter from IN1 to IN2?
  • kwinnkwinn Posts: 8,697
    Thanks!
    So, if I use this unit, I connect DCC_Pin to IN1, Gnd to GND, Pwr+ to 12v, Pwr- to Gnd, and Motor to track? Inverter from IN1 to IN2?

    Definitely Gnd to GND, Pwr+ to 12v, Pwr- to Gnd, and Motor to track is correct. Not 100% sure about the other input signals without a data sheet for the module or the chips used. It may be that the link you posted is sending me to the wrong page since it shows a 43A module rather than the 2A unit mentioned earlier.
  • I follow it and it points to a 50a unit. Yeah, I’m posting from my phone right now.
  • rosco_pcrosco_pc Posts: 464
    edited 2019-12-07 03:33
    I think that should work. But as @kwinn mentions, need datasheet

    BTW: Look here for a similar setup: http://www.trainelectronics.com/DCC_Arduino/DCC_Booster/index.htm

    You don't need the optocoupler though

    PS: here a lower amped booster http://www.trainelectronics.com/DCC_Booster/
  • AwesomeCronkAwesomeCronk Posts: 1,055
    edited 2019-12-30 16:41
    Sorry if this is reviving an old thread.

    I was looking at the 15v h-bridges when I realized I need +15v and -15v, 30vac at the rails. So I ask: Bachmann accomplishes this with 16vdc input! How on earth is this being done???

    Also, most of the h-bridges available are based on the L298N chip. From what I can tell, its logic threshold is 1.5v. Can I trigger a logic high on the L298N's inputs from the prop's 3.3v logic? Datasheet
  • kwinnkwinn Posts: 8,697
    Sorry if this is reviving an old thread.

    I was looking at the 15v h-bridges when I realized I need +15v and -15v, 30vac at the rails. So I ask: Bachmann accomplishes this with 16vdc input! How on earth is this being done???

    Are you sure? It's been a long time since my kids had trains so I may be wrong, but I think they used DC motors so a simple dpdt could reverse the trains direction. If that is the case the L298 should work since it can reverse the polarity of the rails.
    Also, most of the h-bridges available are based on the L298N chip. From what I can tell, its logic threshold is 1.5v. Can I trigger a logic high on the L298N's inputs from the prop's 3.3v logic? Datasheet

    I have used the L298 with the Propeller for controlling brushed DC motors with no problems.
Sign In or Register to comment.