Welcome to the forum   
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Share
Options
View
Go to last post in this topic Go to first unread post in this topic
Offline RCH  
#1 Posted : 13 July 2025 17:58:46(UTC)
RCH

Netherlands   
Joined: 19/12/2024(UTC)
Posts: 15
Location: Zuid-Holland, Delft
Hi all,

After a long time of studying Stefan Krauss's document, building electronics, writing software and staring at an oscilloscope screen I managed to create a DIY MFX controller. It's called the Alternative Train Controller or ATC.
You can read about my endeavours on my website https://www.alyda.nl/atc.

I do have to thank Mark aka 'revmok' for proofing the text and keeping this a secret. He helped me a lot in the last months. Also his log files containing MFX communication proved to be vital in the creation of the ATC.
Also Stefan Krauss helped a lot to get me going.

Please note, the ATC is meant as a starting point and proves it can be done.

Have fun!

RCH
thanks 2 users liked this useful post by RCH
Offline bobyAndCo  
#2 Posted : 13 July 2025 21:20:16(UTC)
bobyAndCo

France   
Joined: 20/02/2024(UTC)
Posts: 30
Location: France - Bretagne
Hello RCH,

Bravo, I looked at the site on the link you give. You have indeed succeeded in mastering the locomotive controls and also the feedback from the decoders to the control centre, which is probably not the easiest thing to do.

I'm currently on holidays and don't have everything I need to test. I'll try it out when I get back in early August.

I have a few questions to get me going in the meantime.

1° - Which software, which control unit to drive the ESP32 ? What is the protocol between the control interface and ATC? TCP? CAN to be compatible with Marklin's graphical interfaces (MS2...)? But on your diagrams, I see that it's more likely to be USB?

2° - You don't list the components for this feedback circuit as you do for the control unit. It's probably not very difficult to do from the schematic, but could you add it to the site to avoid confusion?

I look forward to hearing from you.

Best regards

Christophe
thanks 2 users liked this useful post by bobyAndCo
Offline RCH  
#3 Posted : 14 July 2025 13:33:52(UTC)
RCH

Netherlands   
Joined: 19/12/2024(UTC)
Posts: 15
Location: Zuid-Holland, Delft
Hi Christophe,

1° - Which software, which control unit to drive the ESP32 ? What is the protocol between the control interface and ATC? TCP? CAN to be compatible with Marklin's graphical interfaces (MS2...)? But on your diagrams, I see that it's more likely to be USB?

The ATC is based only on the ESP32. That's all you need as a controller. No Gleisbox, no CS or whatever. Just the ATC. At this moment you can communicate with the ATC via a text terminal and give it simple commands, like drive forward with a giving speed. I'll elaborate on the software but realise that the ATC and software covers the first steps of the "OSI-model".
And yes, you communicate via the (serial) USB port of the ESP32.
I do however have a version that works with a web interface via Wifi. Handy if you want to walk around your setup with a tablet or so Drool.

2° - You don't list the components for this feedback circuit as you do for the control unit. It's probably not very difficult to do from the schematic, but could you add it to the site to avoid confusion?

The feedback circuit shown in the chapter Feedback is a snip of the complete schematics. In the chapter Schematics you find a pdf link for the complete schematics. The feedback components are included in the components list.

Greetings

thanks 2 users liked this useful post by RCH
Offline osoraku  
#4 Posted : 14 July 2025 21:04:06(UTC)
osoraku

Portugal   
Joined: 22/01/2025(UTC)
Posts: 60
Location: Setubal, Palmela
Dear RCH -

Parabens - a few brief comments/questions to check my understanding.

Sorry, I (lazily) haven't yet read the code which would no doubt answer some questions directly. But based on the schematics, ...

  • The DFRobot motor controller provides track power and modulates it to send the digital signals to the locos and track accessories. Correct?
  • The ferrite inductor and associated circuitry detects the feedback from the loco decoders and any track accessory feedback. Correct?


The motor controller is a neat shortcut to a device that could probably drive DCC and as well.

Osoraku
Offline RCH  
#5 Posted : 15 July 2025 09:15:59(UTC)
RCH

Netherlands   
Joined: 19/12/2024(UTC)
Posts: 15
Location: Zuid-Holland, Delft
Obrigado pelo elogio (what should you do without Google translate...)

Sorry, I (lazily) haven't yet read the code which would no doubt answer some questions directly. But based on the schematics, ...

  • The DFRobot motor controller provides track power and modulates it to send the digital signals to the locos and track accessories. Correct?
    Yes, this is correct. It's a so called H-bridge driver. I was designing a H-bridge driver by myself but found this DFRobot module that does an excellent job. It's capable of driving high currents (up to 10A) at high speeds and it's affordable (€20,= or so). I use a 18/19V laptop adapter for powering the ATC which in turn drives the track.

  • The ferrite inductor and associated circuitry detects the feedback from the loco decoders and any track accessory feedback. Correct?
    Yes, correct. The decoders use current (not voltage) to communicate back to 'a' controller. This controller could be a commercial one or the ATC. The feedback circuit picks up this current signal, amplifies and converts it into (voltage) pulses. I would like to stress that the circuit and software are not copied from any other design or commercial products. The only three things I had when making the ATC was Stefan Krauss's document, Mark's log files and one MFX locomotive.


    The motor controller is a neat shortcut to a device that could probably drive DCC and as well.
    Yes, the ATC can be a nice cheap platform to expand to other protocols as well. As a matter of fact I even included a software switch in my demonstration code to switch between MFX, DCC or analogue. Yes, even analogue because I think (haven't tried it yet) that creating a sinusoidal using a PWM signal with the current design should be possible.
    Mind you DCC nor analogue is not (yet) included in the code. I'm not retired yet and I'm squeezing this 'little' project in between my regular job, family life and other obligations.


    Diverte-te

    RCH
  • Offline bobyAndCo  
    #6 Posted : 15 July 2025 09:23:10(UTC)
    bobyAndCo

    France   
    Joined: 20/02/2024(UTC)
    Posts: 30
    Location: France - Bretagne
    Originally Posted by: RCH Go to Quoted Post

    Sorry, I (lazily) haven't yet read the code which would no doubt answer some questions directly.


    Hello,

    You speak of “reading the code”. But I haven't seen anywhere that the code is published?

    Christophe
    Users browsing this topic
    Guest
    Forum Jump  
    You cannot post new topics in this forum.
    You cannot reply to topics in this forum.
    You cannot delete your posts in this forum.
    You cannot edit your posts in this forum.
    You cannot create polls in this forum.
    You cannot vote in polls in this forum.

    | Powered by YAF.NET | YAF.NET © 2003-2025, Yet Another Forum.NET
    This page was generated in 0.565 seconds.