Welcome to MattzoBricks › Forums › MattzoLayoutController (MLC) › Create MLC with Arduino Mega 2560 and Mega Sensor Shield
- This topic has 10 replies, 3 voices, and was last updated 1 week, 2 days ago by
Venderwel.
-
AuthorPosts
-
-
November 16, 2025 at 12:40 #8609
Venderwel
ParticipantHi 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. -
November 16, 2025 at 13:22 #8610
-
November 16, 2025 at 13:46 #8611
Venderwel
ParticipantThank 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.
-
November 16, 2025 at 13:47 #8612
Venderwel
ParticipantOh and is the mega also to slow when there is a onboard esp8266 for the wifi?
-
November 16, 2025 at 14:31 #8613
Hilbert B
KeymasterThe 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 🙁
-
November 16, 2025 at 18:43 #8614
-
November 16, 2025 at 19:34 #8616
Matthias Runte
KeymasterHi 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 -
November 16, 2025 at 20:11 #8620
Venderwel
ParticipantWell…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!
-
November 16, 2025 at 20:15 #8621
Venderwel
ParticipantOh 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?
-
November 16, 2025 at 20:19 #8622
Matthias Runte
KeymasterYour 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.
-
November 17, 2025 at 10:07 #8626
Venderwel
ParticipantHey 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.

-
-
AuthorPosts
- You must be logged in to reply to this topic.
