Modifying DCC++ for multiple power districts

crusader27529 Aug 19, 2016

  1. Softec

    Softec TrainBoard Member

    27
    9
    6
    Erik,
    In the circuit you posted the DCC signal is sent through the opto-isolater and emerges on pin 6 where it goes down to the IBT-2. One portion of the signal is connected directly to pin 1 of the IBT, but is also connects to the 2N2222 transistor which acts as an inverter to provide a bipolar signal (bipolar may not be the totally accurate as they are both positive pulses, just out of phase, but it does invert the signal) to pin 2 of the IBT. I chose to use a 74LS04 as the inverter in lieu of the transistor.
    Dan
     
  2. vasilis

    vasilis TrainBoard Member

    110
    39
    10
    My fault, i used the word "PWM". I'm aware of the optoisolator's output and is clear that is the "half", the positive waveform. It is clear from the "PWM" graph, the input to the xor1. The "PWM" waveform is the same as the one obtained from the optoisolator. The ms1 graph shows the positive waveform to the pin 1 of the IBT-2 and the ms2 graph shows the inverted to pin 2 of the IBT-2. At a moment after the 1.08ms a request for inverse sets the output of arduino "mcu" HIGH. This is also the one input of the xor1, who becomes "NOT" and inverts the ms1. The ms2 is allways the inverted ms1.

    I simulated the whole circuit with the optoisolator and I'm obtaining the same "PWM" graph. I have to point that the 7 pin of your optoisolator is disconnected in your scheme. I suppose the scheme is "under construction".

    Still I think the graphs show the desired behaviour and the 74ls04 "not" gates are not necessary. Did you find any fault in my description about the behaviour of xor gates? Is the output of my circuit (graphs) not adequate for the IBT-2? If yes, what is the waveform to the 1,2 pins of IBT-2? Am I missing something?

    DCC to IBT-2_circuit.PNG DCC to IBT-2_graph.PNG
     
    Erik84750 likes this.
  3. Softec

    Softec TrainBoard Member

    27
    9
    6
    Vasilis,

    Your circuit does indeed perform both the inverter control for the base IBT's and the autoreverser for the dedicated IBT. My original design did not include an autoreverse and hence only the NOT gate, when i decided to add and autoreverse I just added the XOR to the existing circuit. Your circuit will eliminate one chip.

    On the 6N137 I have seen circuits that pull pin 7 HIGH, circuits that pull it LOW, but the majority seem to leave it disconnected and I have not had any ill effects. The data sheet I have (Fairchild) indicates that there is an internal pull-up resistor and some of the test circuits leave pin 7 disconnected. Given that pin 7 and 8 are adjacent it would be no problem to pull it HIGH.

    Dan
     
    vasilis likes this.
  4. vasilis

    vasilis TrainBoard Member

    110
    39
    10
    Thank you Dan,
    You are right.
    I haven't special knowledge in electronics, but I understand enough to be a clever monkey. I had to do this search before my comment. :)
    https://electronics.stackexchange.com/questions/337738/6n137-optocoupler-pin-configuration
     

Share This Page