Welcome to MattzoBricks › Forums › Sensors › Using 8 sensors with MLC mini
- This topic has 7 replies, 2 voices, and was last updated 6 months, 2 weeks ago by
Des Matejka.
-
AuthorPosts
-
-
January 1, 2025 at 07:32 #8025
Des Matejka
ParticipantI am pleased to report my success with implementing the MLC mini with Sensors.
The MLC-mini allows for 2 sensors.
Clearly a layout will need more so I configured the MLC mini to take the maximum of 8.
The coding seemed to work but I have discovered that Rocrail report the following:Sensor 5 on .pin = D0
17:17:50 9999 simulate fb[MLC-36271-5] (null):36271:5 state=true
It does not switch to state=falseSo once switched it stayed in that mode.
All other 7 sensors work well.
Any ideas would be greatly appreciated.
-
January 1, 2025 at 12:01 #8026
Matthias Runte
KeymasterHi Des,
happy new year. Please refer to the documentation to find out why this is happening.Have a great year!
Cheers,
Mattze -
January 2, 2025 at 05:20 #8032
Des Matejka
ParticipantThanks for your excellent help.
It does pay to closely read the information.
I had looked at the page earler but was put off by the illustration that didn’t quite match the board I was using for the MLC mini I had built.
With some trial and error I finally understood the wiring and it now works as expected.
I will need to incorporate the 100 kOhm resistor into the box, but that should be within my skillset.
Any ideas would be greatly appreciated.
Thanks again. -
January 2, 2025 at 06:12 #8033
Des Matejka
ParticipantI’ve just had another examination of the information and I had tested the Wiring Diagram MLC with 9 sensors. This required a 100 kOhm resistor.
It did work perfectly.
As I had planned on using 8 sensors, the Wiring Diagram MLC with 8 sensors and status LED seems to be what I need.
In this case, I assume I alter my coding to assign the sensors to pins D1 to D8 and also assign status LED to D0.
Is this a better option and more correct approach? -
January 2, 2025 at 11:43 #8034
Matthias Runte
KeymasterYes, that is correct. Another approach would be to create some more MLC minis, which would relieve you from modifying the hardware or the wiring of particular units. These modifications are often only relevant for specific setups, and therefore only useful for layouts that remains like they are for a longer period of time. Users who change their layout often will be better off with standardized MLC minis.
But that’s just my opinion. You’ve got all tools at hand, so decide yourself.
-
January 3, 2025 at 11:13 #8035
Des Matejka
ParticipantMy layout is more fixed, so customising the MLC mini is the way to go for now. As I am beginning with Rocrail I think I need to master how sensors are used.
I feel confident now to build the MLC mini with 8 sensors. Looking forward to my next challenge with Mattzobricks Train Automation System. -
January 3, 2025 at 11:18 #8036
Matthias Runte
KeymasterSounds good. When you layout is finished, you’re invited to help us publish it in the projects section of the website.
-
This reply was modified 6 months, 2 weeks ago by
Matthias Runte.
-
This reply was modified 6 months, 2 weeks ago by
-
January 4, 2025 at 02:24 #8042
Des Matejka
ParticipantThank you, this would be my pleasure.
-
-
AuthorPosts
- You must be logged in to reply to this topic.