DCC++ and .....LEGO Trains

Collectormania Apr 14, 2020

  1. Collectormania

    Collectormania New Member

    6
    3
    1
    Hi all, i'm new here, and i'm a Lego train fan
    i'm searching an automation system for my lego trains since a few months
    it is not easy because, Lego trains Don't take current from tracks but from batteries
    the trains are controlled by Bluetooth or Infra Red (or Wifi with a special module from a 3rd party company)
    my layout will have about 30 switches, lots of IR sensors and the signals
    i was planning to use RFID readers to know where are the trains,not sure at this time

    the most important question at this time is how to control all the layout, i found DCC++ and Rocrail
    i think it won't be a problem to control lights and sensors as they are the same as other scales using arduinos
    for the switches servos i think no problem too, even if i did not manage to control a servo with Rocrail and DCC++
    the big problem is to control the trains!!!
    is there a solution with DCC++? or if someone have another solution...

    i need help to know if i may use Rocrail or JMRI or Processing to control all

    thanks in advance for your help

    David
     
  2. rcmodeler

    rcmodeler TrainBoard Member

    47
    40
    7
    We use wifi and mqtt to control everything on the layout.
    For those locomotives and other stuff that have DCC-decoders we have a DCC++ base station
    that we control with wifi and mqtt via a "translator" (not jmri). Everything else with wifi and mqtt.
    Flexible and dirt cheap.
    If you are interested I have written some i Spur Null Magazin forum (in english, well, almost):
    https://forum.spurnull-magazin.de/0...trol-model-railroad-with-wifi-and-mqtt-21390/

    But there is probably many other ways to solve your problem :)
     
  3. Pieter

    Pieter TrainBoard Member

    152
    46
    10
    Your looking for DCC++ to send command via WiFi instead of motor shield. Not sure if it was done before on DCC++ as most HO and smaller scales locos don't have space for WiFi, not that some are stopped by it. I know WiFi is used a lot in the garden scale layouts and gaining traction in the scales around O. Maybe some of the other members will be able to tell you is it is easy to use WiFi module in place of a motor shield.
     
  4. Collectormania

    Collectormania New Member

    6
    3
    1
    yes that's exactly what i want to do...or Bluetooth...

    very interesting, i check all the link , i would be really interesting to know more about this, can you contact me via email : davidblain@laposte.net
    i think i can't send PM at this time on the forum and i have lots of questions for you

    thanks

    David
     
  5. fitz

    fitz TrainBoard Member

    9,712
    2,744
    145
    Welcome aboard RCmodeler and collectorman. Yesterday another new member stated that his layout was Lego trains. Search for that.
     
  6. Collectormania

    Collectormania New Member

    6
    3
    1
    hum, yes it is……..me!!!
     
  7. rcmodeler

    rcmodeler TrainBoard Member

    47
    40
    7
    We don't use JMRI and I know nothing about Rocrail or any similar solutions.
    Inside our handheld wireless controls there is an ESP32 microcontroller
    and it has built in Wifi (which we use) and also Bluetooth.
    I don't know anything about Lego Train either, but if it can be controlled
    via Bluetooth and it is an open protocol that could be a way to go.

    Why use DCC if you don't have DCC trains?

    How do YOU want everything to work? Make a plan, sketches and thoughts.
    Can you construct, program, build things yourself?
     
  8. Collectormania

    Collectormania New Member

    6
    3
    1
    Hi rcmodeler, thanks for reply
    i'm still searching the best way to do automation, i saw that DCC++ would be a good solution for me
    but i think there maybe better solution
    i was thinkign using DCC++ because we can use arduinos, there are some lego things already done, but really expensive
    the goal is to control all for a limited price...
    the lego trains can be controlled using Bluetooth or wifi (the Library for Arduino exist, so it can be use with Arduino)
    i already have an ESP32, did not try it at this time
    but i will do soon

    i already have the layout plan, and the layout itself is Under construction (half done)
    for the arduin sketches i'm a beginner, but i read lots of things and made a few try, i begin to understand the basis, and i know a few people that could help me when i have problem with code (and forums are Always a good help ;-)

    i will use rocrail to have a TCO and for programming the layout, it seems really interesting
    a friend is working on it, all works great with non physically trains
    next step is to test it with real trains...
    at first we were thinking to use DCC++ but since your reply, i think that using MQTT and wifi without DCC++ seems to work too
    i found examples from another guy and it seems working well

    i will give it a try as soon as i got more stuff it seems amazon stop work for a few days in France, so i can't buy what i still need…)
    i will let you know

    David
     
  9. rcmodeler

    rcmodeler TrainBoard Member

    47
    40
    7
    ESP32 can be programmed using Arduino IDE (I do that) as you maybe already know.
    And if there is a lib for Lego Trains it should not be that difficult to get started.
    Then you can get going right now without waiting for Amazon :)

    And ESP8266, such as Wemos D1 Mini (my favourite) has built in Wifi (not Bluetooth)
    can of course also be programmed using Arduino IDE. It is a small and cheap little device
    that is much better than Arduino, in my opinion.
     
  10. Collectormania

    Collectormania New Member

    6
    3
    1
    yes i would like to buy a NodeMCU with ESP8266, to try it
    and i need a wifi router
    my internet box is far away from my garage and it won't work
    so i can't do lots of things now...
    i was thinking to buy a Raspberry Pi too, but it is expensive, i will wait for this...
     
  11. rcmodeler

    rcmodeler TrainBoard Member

    47
    40
    7
    If you need the Raspberry Pi acting as a router it also works with
    Raspberry Pi Zero W. Cheaper but maybe hard to get right now, sold out in many places.

    But you can still program your ESP32 and try to connect to a Lego locomotive with Bluetooth :)
     

Share This Page