Welcome to MattzoBricks Forums MattzoLayoutController (MLC) Create MLC with Arduino Mega 2560 and Mega Sensor Shield

Viewing 10 reply threads
  • Author
    Posts
    • #8609
      VenderwelVenderwel
      Participant

      Hi there, is there anyone who can help me??

      I want to build an MLC with a Arduino Mega2560 WIFI CH340G and use a (Sensor Shield v2) to connect sensors and switches/servo’s. With that sensor combination you get a huge amount of ports you can easily plug sensors and switches in.
      But the MLC software only seems to work with esp8266, I can’t get it to work with an Arduino Mega.

    • #8610
      Hilbert BHilbert B
      Keymaster

      Hi,

      Short answer, nope.

      Sorry!

      It is designed to work with an esp8266. The Mega2560 is a lot slower than an esp so you probably get performance problems somewhere along the road.

      This mlc can do the same.

      Regards,

      Hilbert

    • #8611
      VenderwelVenderwel
      Participant

      Thank you for the fast response.

      Ahhh, sorry to hear that. The mega has so many ports that can be used without soldering something.

      I do have a PCA9685 that works like a charm. Looking for a board like that (with a x number of 3 pins in a row) for my hall sensors then.

    • #8612
      VenderwelVenderwel
      Participant

      Oh and is the mega also to slow when there is a onboard esp8266 for the wifi?

    • #8613
      Hilbert BHilbert B
      Keymaster

      The esp8266 handles wifi and decodes the mqtt messages (with a medium to large layout these are lots per second) and creates mqtt messages on sensor responses. This is time sensitive, because a loc has to stop in time.

      As far as I can see esp + mega here the esp is something like a modem. For the mlc to be use full it should do more. So there need to be two firmwares, one for the esp and one for the mega… this means a whole can of worms 🙁

    • #8614
      VenderwelVenderwel
      Participant

      Do you think the DFR0626 could be used with an esp8266 for the hall sensors??

    • #8616
      Matthias RunteMatthias Runte
      Keymaster

      Hi Venderwel,
      a note regarding your sensors. We use reed sensors, no hall sensors. Reed sensors are digital, hall sensors are not. If you really want to use hall sensors, this would require a firmware change, which you’d need to do. The firmware comes with an MIT license, so feel free to give it a try.

      In general: if you want to use different hardware setup, feel free to try. But please check the documentation pages before, we have outlined in quite some detail what is supported and what is not.

      Cheers,
      Mattze

    • #8620
      VenderwelVenderwel
      Participant

      Well…a few years ago I already started with trying to automate, first BAP and then different versions of your work. Also tried reed sensors, but with different succes. Got a lot of missed reads on the sensors. Now I did a test with KY-003 hall sensors where I had 4 sensors set up and a train passed by all of them 200 times. Not a single one missed. So that is the way I want it to give it a go. Didn’t try a hall sensor yet with the mlc software and a esp8266, maybe I should do that first before thinking of expanding. Hahaha

      Anyway, thanx for the goodwork in this great hobby!

    • #8621
      VenderwelVenderwel
      Participant

      Oh and do you think it’s best to add a whole new type/class to all of the mlc software? Ofcourse based on the reed sensors part?

    • #8622
      Matthias RunteMatthias Runte
      Keymaster

      Your choice, I don’t think we will merge in with the master branch. The reason is that we do not believe that your hall sensors are a good choice. Whatever was wrong with your reed sensor setup, I’d recommend you review that before you dive into this hall sensor adventure.

      IMHO, Reed sensors are 100% accurate and work 100% of the time. There is not a lot that you could do wrong with them. This is my and the team’s experience from almost a decade of Mattzobricks.

    • #8626
      VenderwelVenderwel
      Participant

      Hey Matthias, thinks for the insights, I’ll order some new reedsensors and give them an other try in my new test setup. Could be I did something wrong there or had the wrong reedsensors.
      As for the KY-003 hall sensors, I didn’t test one yet with the MLC software, before the posts above, but just now I did and they work without a changing the firmware! So that is cool.

      Nice thing is, they just fit in between the studs of the traintrack. ky-003 lego traintrack

      • This reply was modified 1 week, 2 days ago by Venderwel.
      • This reply was modified 1 week, 2 days ago by Venderwel.
Viewing 10 reply threads
  • You must be logged in to reply to this topic.