Use of P1 to replace worn DCC controller?

AwesomeCronkAwesomeCronk Posts: 840
edited 2019-11-23 - 21:34:53 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?
Returning to Spin after two months of not coding micros at all, forgetting to use :=

Comments

  • One way this could be solved:
    Is Chuck Davis on this forum or does anyone here have contact for him?
    Returning to Spin after two months of not coding micros at all, forgetting to use :=
  • Just did a quick look at DCC.
    Seems this is the complex part of the design. What controller are you trying to replace (link)?
    My Prop boards: P8XBlade2 , RamBlade , CpuBlade , TriBlade
    P1 Prop OS (also see Sphinx, PropDos, PropCmd, Spinix)
    Website: www.clusos.com
    P1: Tools (Index) , Emulators (Index) , ZiCog (Z80)
    P2: Tools & Code , Tricks & Traps
  • AwesomeCronkAwesomeCronk Posts: 840
    edited 2019-11-24 - 23:46:31
    @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.
    Returning to Spin after two months of not coding micros at all, forgetting to use :=
  • 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.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • @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.......
    Ordnung ist das halbe Leben
    I gave up on that half long ago.........
  • 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.
    Returning to Spin after two months of not coding micros at all, forgetting to use :=
  • 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!!
    Returning to Spin after two months of not coding micros at all, forgetting to use :=
  • 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.
    My Prop boards: P8XBlade2 , RamBlade , CpuBlade , TriBlade
    P1 Prop OS (also see Sphinx, PropDos, PropCmd, Spinix)
    Website: www.clusos.com
    P1: Tools (Index) , Emulators (Index) , ZiCog (Z80)
    P2: Tools & Code , Tricks & Traps
  • I was of the belief that NMRA DCC powered the rails and talked via radio.
    Anywhere I could find this circuit?
    Returning to Spin after two months of not coding micros at all, forgetting to use :=
  • 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.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • Digital readout is on the roadmap!
    Returning to Spin after two months of not coding micros at all, forgetting to use :=
  • 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.
    Returning to Spin after two months of not coding micros at all, forgetting to use :=
  • 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!
    Returning to Spin after two months of not coding micros at all, forgetting to use :=
  • 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
    Stockholm, Sweden
    I am only an egg -- Stranger in a Strange land, Robert A. Heinlein
  • Ah, yes. Thanks for that!

    His schematic uses an h-bridge. I will look into that.
    Returning to Spin after two months of not coding micros at all, forgetting to use :=
  • You are going to need that external circuit. A prop is not going to replace that circuit.
    My Prop boards: P8XBlade2 , RamBlade , CpuBlade , TriBlade
    P1 Prop OS (also see Sphinx, PropDos, PropCmd, Spinix)
    Website: www.clusos.com
    P1: Tools (Index) , Emulators (Index) , ZiCog (Z80)
    P2: Tools & Code , Tricks & Traps
  • AwesomeCronkAwesomeCronk Posts: 840
    edited 2019-11-26 - 18:49: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.
    Returning to Spin after two months of not coding micros at all, forgetting to use :=
  • 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.
    Returning to Spin after two months of not coding micros at all, forgetting to use :=
  • 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.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • Good! I suppose I just connect it to the track, then?
    Returning to Spin after two months of not coding micros at all, forgetting to use :=
  • 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.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • AwesomeCronkAwesomeCronk Posts: 840
    edited 2019-12-05 - 23:51:45
    What kind of connections do I need? I’ve never used an h bridge before. Where would I get the fuse?
    Returning to Spin after two months of not coding micros at all, forgetting to use :=
  • 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.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • AwesomeCronkAwesomeCronk Posts: 840
    edited 2019-12-05 - 23:52:17
    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?
    Returning to Spin after two months of not coding micros at all, forgetting to use :=
  • 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.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • I follow it and it points to a 50a unit. Yeah, I’m posting from my phone right now.
    Returning to Spin after two months of not coding micros at all, forgetting to use :=
  • rosco_pcrosco_pc Posts: 354
    edited 2019-12-07 - 03:33:43
    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/
    Stockholm, Sweden
    I am only an egg -- Stranger in a Strange land, Robert A. Heinlein
Sign In or Register to comment.