Welcome to MattzoBricks Forums Switches MattzoSwitchController

Viewing 26 reply threads
  • Author
    Posts
    • #1660
      Matthias RunteMatthias Runte
      Keymaster
    • #1833
      Henk JansenHenk Jansen
      Participant

      Hi Matthias,

      I’m tryin to build a mattzoswitchcontroller.
      I managed to get the sketch on my ESP8266. I think i’m running MQTT (although i’m not sure its good). And i have installed rocrail.
      Is there an easy way to set the whole thing up to test if all is done well? i don’t see a thing 🙂 i have one switch (servo) connected to D1…

      I lost your description here:””” On first boot, the controller generates a random number called “MattzoControllerID”.”””

      Can’t get this done. i get:

      Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
      	at processing.app.Serial.write(Serial.java:254)
      	at processing.app.Serial.write(Serial.java:274)
      	at processing.app.SerialMonitor.send(SerialMonitor.java:122)
      	at processing.app.SerialMonitor.lambda$new$1(SerialMonitor.java:66)
      	at javax.swing.JTextField.fireActionPerformed(JTextField.java:508)
      	at javax.swing.JTextField.postActionEvent(JTextField.java:721)
      	at javax.swing.JTextField$NotifyAction.actionPerformed(JTextField.java:836)
      	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1668)
      	at javax.swing.JComponent.processKeyBinding(JComponent.java:2882)
      	at javax.swing.JComponent.processKeyBindings(JComponent.java:2929)
      	at javax.swing.JComponent.processKeyEvent(JComponent.java:2845)
      	at java.awt.Component.processEvent(Component.java:6316)
      	at java.awt.Container.processEvent(Container.java:2239)
      	at java.awt.Component.dispatchEventImpl(Component.java:4889)
      	at java.awt.Container.dispatchEventImpl(Container.java:2297)
      	at java.awt.Component.dispatchEvent(Component.java:4711)
      	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
      	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:835)
      	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1103)
      	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:974)
      	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:800)
      	at java.awt.Component.dispatchEventImpl(Component.java:4760)
      	at java.awt.Container.dispatchEventImpl(Container.java:2297)
      	at java.awt.Window.dispatchEventImpl(Window.java:2746)
      	at java.awt.Component.dispatchEvent(Component.java:4711)
      	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
      	at java.awt.EventQueue.access$500(EventQueue.java:97)
      	at java.awt.EventQueue$3.run(EventQueue.java:709)
      	at java.awt.EventQueue$3.run(EventQueue.java:703)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
      	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
      	at java.awt.EventQueue$4.run(EventQueue.java:733)
      	at java.awt.EventQueue$4.run(EventQueue.java:731)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
      	at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
      	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
      	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
      
      • #1843
        Matthias RunteMatthias Runte
        Keymaster

        Hello Henk Jansen, did you try to upload a simple sketch from the standard demos that just turns a servo back and forth? You should probably try to get such a sketch working first. Be careful not to break your switch motor, you should only use angles between 70 and 80 for testing if it’s a TrixBrix switch motor.

        Cheers,
        Mattze

    • #1834
      Paul VerkaikPaul Verkaik
      Participant

      Hello Everyone,

      Got a lot of stuff working already ( sensor/signal and controller) perfectly, but…
      I don not seem to get the switchcontroller to work.
      It boots, the control led blinks several times then is goes off.
      Mosquitto “sees” the switchcontroller (29266 inmy case) so everything looks fine.
      In Rocrail I added a switch with the adress and port nr ( 29266 port 1) so it should work.
      But when I control the switch in Rocrail it does not respond.
      I checked the servo (brand new but you never know) but in a test sketch it works perfectly.

      Is there any way to manually ( from Rocrail) to test the switch?
      Should the controlled light up when a servo is used?

      Hope you guys can help out,

      Paul

      • #1844
        Matthias RunteMatthias Runte
        Keymaster

        Paul Verkaik,
        did you monitor MQTT, e.g. with mosquitto_sub? What do you see there? And does the switch visibly switch on the Rocrail layout?

        Cheers,
        Mattze

        • #1846
          Paul VerkaikPaul Verkaik
          Participant

          In Mosquitto I can see the controller and its “number” so that’s also working.
          At this point I have one servo connected to the Vin of the esp-board, should I connect the servo to a seperate power supply?
          In the Arduino IDE I also see the controller boot.
          In Rocrail I have a switch defined and in Rocrail its switches. (on screen)

          Can you tell me what the controlLED should do, does it light up when the switch is used?
          I only see it blink a few times at boot.
          Also I remember you had a design for the controller with the txs0108e, is that not needed anymore?

          Hope to figure this out soon, it’s the last one, all other controllers work perfectly.
          I have a smaal test setup now with 2 signals and 2 blocks and 4 sensors. When the switchcontroller works I can expand!

          Greetings

          Paul

    • #1835
      Thorsten SchmitzThorsten Schmitz
      Participant

      Hi Paul,
      first check the Hardware. Is everything wired up in the right way? Are the servos supplied with 5 V?
      Connect the controller to the Serial Monitor of the Arduino IDE.When you switch in Rocrail do you see something in the monitor?
      If not, check the settings in Rocrail. In Rocrail you can test the switches on many different ways, may be read the manual for this task.
      Please refer to the forum if you make some progress!

      • #1847
        Paul VerkaikPaul Verkaik
        Participant

        I can see the commands being send from Rocrail to Mosquitto to the controller.
        In the serial monitor I can see that it send the “58” or “85” angle command is send.
        So,.. this means that the servo is not responding, I checked this one and it works in a test sketch so it;s not defective.

        In my answer above I asked: Also I remember you had a design for the controller with the txs0108e, is that not needed anymore?
        Is this still needed or is it “just” a power issue ?

        Greetings,

        Paul

        • #1851
          Matthias RunteMatthias Runte
          Keymaster

          Hi Paul,
          we believe that we do no longer need the logic level controller. Sufficient power should do. You should power up a switch controller with an USB-Charger of 2 Amps minimum. Higher voltage is helpful as well.

          But I am not sure that this is the problem here. Did you connect your MattzoSwitchController to your PC and checked the output on the serial monitor? Do you see that it is connected to WiFi and MQTT and actually parsing the switch commands and trying to turn the servo?

          One more important thing is the mapping of the port numbers. Port No. 1 in Rocrail corresponds to port no. 0 internally in the controller.

          Good luck!

          Cheers,
          Mattze

          • #1852
            Paul VerkaikPaul Verkaik
            Participant

            Hello Matze,
            Yes i can see it parsing the command from rocrail via MQTT to the esp/servo but nothing happens.
            Also at boot the servo does not do anything ( I suppose it should check its position?)
            I will try a different esp and see what happens,

            Thanks for your input, I keep ou posted about my progress.

            Paul

          • #1853
            Matthias RunteMatthias Runte
            Keymaster

            Ok. Can you post the lines from the serial monitor where the controller parses the command and tries to flip the switch?

          • #1854
            Paul VerkaikPaul Verkaik
            Participant

            Hello Matze and Thorsten, fixed it !
            It was the last thing I expected, the esp board itself!
            Changed to a new one and now it works perfectly.
            Thanks to Thorsten for the tip on using the serial-monitor. When I say that working all ok ( I could see the commands being parsed) the only thing left was the output of the board itself. Even after reflashing it, no joy.
            So after replacing it, all is well 🙂

            Thank you guys for your input.
            I really love this project and it works (with some small hick-ups) perfectly.
            Keep up the good work,

            Greetings from the Netherlands,
            Paul

          • #2049
            Matthias RunteMatthias Runte
            Keymaster

            Happy to hear that! Good luck with the rest!

    • #2061
      Thomas RodriguesMax
      Participant

      Hi Paul,
      as your problem with the SwitchController sounds exactly like mine in the MQTT thread, i would like to know which board and power supply (with specifications) you are using? 🙂

      Many greetings! Max

    • #2070
      Piet BeinekePiet Beineke
      Participant

      hello,
      I have a similar problem as Paul(Serial says everyrthing goes through to the controller, but the led does nothing and the servos don’t either), but switching the controller didn’t work for me. I also tried switching the plus and minus cables of the motors on my breadboard. My question: Is there a simple way to get my hands on a test-sketch for the switch motors(to see if they are the problem), or would I have to write that code myself?
      Regards
      Piet

      • #2094
        Matthias RunteMatthias Runte
        Keymaster

        Arduino IDE has some built-in example sketches for servos. But be careful not to break your switch motors. It might be a good idea to take the servo out of the casing before testing with the standard sketches.

        • #2095
          Piet BeinekePiet Beineke
          Participant

          Is ist pissoble to take of the lid, because I don’t quite seem to get the servo out of the 3d printed casing…
          Regards

          • #2096
            Piet BeinekePiet Beineke
            Participant

            I’ve now extraxted the servo out of the casing and will check it’s functionality

          • #2098
            Piet BeinekePiet Beineke
            Participant

            I have used the potentiometer code and just threw out the potentiometer code so it should work, but it didn’t. Just for confirmation: Orange is in a D0-7 Pin, red is in plus and black is in minus, right?
            Regards
            Piet

          • #2099
            Thomas RodriguesMax
            Participant

            Hey Piet, as far is a know that is right sir.

    • #2100
      Paul VerkaikPaul Verkaik
      Participant

      Hi Max and Piet,

      I’m using cheap chinese boards.
      Bought a whole bunch of them.
      The defective one was one of the same ones I have, so I think my problem was just a bad production one.

      For my test I power everything with a big powerbank.
      In the future for my trainlayout I will have to use other powersupllies but I have not bought them yet..

      I buy them on Aliexpress look for ” Wireless module CH340/CP2102 NodeMcu V3 V2 Lua WIFI Internet of Things development board based ESP8266 ESP-12F with pcb Antenna”

      Greetings,

      Paul

    • #2115
      Piet BeinekePiet Beineke
      Participant

      Hello,
      I have experimeted with my switch-controllers cable(replacing some of them to see if they are broken, because I had this issue with these cable in one of my previous Mattzo-controller builds), but they weren’t the problem either. I have tried every single motor in my order(14 in total), but none of them worked on the controller(so it is very unlikely that they are the problem). By now I just don’t know a other reason why it doesn’t work for me, but it did for eg.Paul, so I made this video in unlisted mode to show my setup in particular. I hope someone can help me fix this, because it is the only thing that is left in my setup of all Mattzocontrollers, which all work perfectly by now.
      Link: https://www. youtube.com/ watch?v=i6ztJCU0OMc
      Regards
      Piet
      Edit: The Link seems to be not working due to Spam-safety(understandably), so I seperated it in the middle

      • This reply was modified 3 years, 2 months ago by Piet BeinekePiet Beineke.
      • This reply was modified 3 years, 2 months ago by Piet BeinekePiet Beineke.
    • #2118
      Thomas RodriguesMax
      Participant

      Hi Matthias, hey Thorsten,
      Piets Problem looks like mine.
      As enaugh voltage is crucial at the SwitchController, can we somehow modify the layout to a more capable power source?

      I would like to test it with eight AAA 1.2V batteries but i do not know how to chsnge the layout by now.. 🙂

      • #2119
        Piet BeinekePiet Beineke
        Participant

        No, beacause the motors need 5v, which is provided by the usb cable and then distributed by the vin pin, so more power is not a good idea… That is why I don’t understand what my problem is, because there should be enough power provided

    • #2199
      Thomas RodriguesMax
      Participant

      Hey Piet,

      you are absolutely right! Of cause there is enough power input from USB connection.

      In the meantime I’ve found a little sketch for ESP32 and adapted it for ESP8266 to test basic functionality of the servo.
      The outcome is the same. Via console its clear that the sketch works and the ESP “does something”.
      But the power output is not enough for the servo.

      I’ve ordered ESP8266 V2 and will test again with it.

      Here you can find the servo_test sketch:

      
      #include <Servo.h> //Servo library for 8266
      
      static const int servoPin = D0; // Connect servo (orange) to D0 on the board
      
      Servo servo1; //Connect the servo1 on VIN and G
      
      int angle =0;
      int angleStep = 5;
      
      int angleMin =20;
      int angleMax = 160;
      
      void setup() {
          Serial.begin(115200);
          servo1.attach(servoPin);
      }
      
      void loop() {
          for(int angle = 0; angle <= angleMax; angle +=angleStep) {
              servo1.write(angle);
              Serial.println(angle);
              delay(20);
          }
      
          for(int angle = 180; angle >= angleMin; angle -=angleStep) {
              servo1.write(angle);
              Serial.println(angle);
              delay(20);
          }
      }
      
      • #2200
        Matthias RunteMatthias Runte
        Keymaster

        Don’t forgot to take the servo motors out of the casing first, else they could be damage with this test script. Safe angles are usually between 70 and 80 degrees for Trixbrix servos. After calibration, you usually end-up between ca. 60 and 90 degrees (depends on the specific servo, must be checked for every single servo).

    • #2219
      ZoltanZoltan
      Participant

      How is the servo to be connected to which pins of the controller?
      The video is nice, but has no step-by-step directions for beginners.
      Or did I miss something?
      Eg. a Fritzing Schema would be nice with NodeMCU and two servos.
      Thanks, Zoltan

      PS.: Also for the other items (Sensor, Loco…) some step-by-step guide would be nice. I am a greenhorn to microcontrollers but I love the idea to automatize Lego Trains, but I cannot follow here. Could be set up a forum thread for really DAUs?

      • #2220
        Matthias RunteMatthias Runte
        Keymaster

        I suggest to read the documentation first:

        MattzoSwitchController

        Or for the other MattzoControllers:

        Controllers

        Wiring diagrams are included.

        Nevertheless I agree that some basic knowledge about microcontrollers, networking and IT is helpful when building MattzoControllers. I had no clue at least about microcontrollers a short while ago, but buying an Arduino starter set and watching some Arduino youtube tutorial videos helped me a lot.

        You may start a topic in the forum for beginners yourself. Why don’t you call it “MattzoBricks Train Automation for Beginners” or something similar?

        • #2221
          ZoltanZoltan
          Participant

          Of course I have read the docu! Several times. I must have obviously overseen some things… I cannot remember wiring diagrams. Tomorrow I shall start over again.

    • #2238
      Thomas RodriguesMax
      Participant

      After replacing the 8266 V3 to a V2 NodeMCU it works and I’am realy proud of it.
      Concidering the fact that I’ve never “programmed” an Arduino board before the MattzoControllers I’am realy proud about the result:

      Maybe the final casing:

      Switch_case

      Max

      • This reply was modified 3 years, 2 months ago by Thomas RodriguesMax.
      • This reply was modified 3 years, 2 months ago by Thomas RodriguesMax.
      • #2241
        Matthias RunteMatthias Runte
        Keymaster

        Congratulations!

      • #2418
        YevgenYevgen
        Participant

        Hi Max,
        Are you holding the servo inside with Lego only? It does not pry itself off the bricks/plates when switching?

        • #2420
          Thomas RodriguesMax
          Participant

          Hey Yevgen,
          some double sided tape within the lego casing. If you adjust the servo it works very well.

    • #2264
      ZoltanZoltan
      Participant

      DAU question: if I want to build my own switch motor, which miniservo should I buy? Are they normal analogie servos or mut they ne digital ones? Thanks!

      • #2265
        Thomas RodriguesMax
        Participant

        Hey Zoltan, it depends.
        I think Matthias does have good experience with switch motors from TRIXBRIX.
        The advantage for sure is that they are completely ready to be integrated.

        Personally I’am using “SG90 Micro Servo Motor”. It is not a tragedy if a motor gets messed up.
        They are very cheap and can be modified in a way that they fit very good between two Lego “Panel 1 x 2 x 3” as you can see above.

        EDIT: Bricklink Lego Switch Case

        • This reply was modified 3 years, 2 months ago by Thomas RodriguesMax. Reason: Link to Bricklink Case
    • #2267
      ZoltanZoltan
      Participant

      Thanks, I shall try them. But I have also a project NOT with Lego, but with LGB R3 Switches, and for this I want to “misuse” Matthias’ SwitchController code as well, if he allows it 🙂

      • #2272
        Matthias RunteMatthias Runte
        Keymaster

        Ha ha, permission granted. 🙂

        • #2273
          ZoltanZoltan
          Participant

          Danke 🙂

    • #2275
      Matthias RunteMatthias Runte
      Keymaster

      But you need to send me pictures, track plans and videos for the “Projects” section. 🙂

    • #2292
      Nikos LygizosNikos Lygizos
      Participant

      My limits for one of the switch servos was off and after a few days operating it it stripped the gears. So I “pop” the hood of the servo casing, cut-off the back wall of the servo housing and after cutting the ears of the new servo it fit perfectly and works better than the original.

      Modified Servo housing

      Closed

      After trying a few Chinese micro servos I chose this servo because it has metal gears and most dimensions fit the housing. I could not find a replacement servo with the same dimensions of the original.

      Lewansoul 9G Servo Micro servo Metal Gear Motor Anti Blocking servo

    • #2401
      ZoltanZoltan
      Participant

      Hallo, ich habe ein Problem mit dem SwitchController.

      MattzoSwitchController hat ID 8904

      Weiche ist konfiguriert als:
      Adresse: 8904 Port 1
      Parameter 58 Wert 85

      Status LED zwischen D8 und GND
      Blinkt beim Booten 3-mal, dann noch einmal, dann bleibt es aus.

      Servo ist rot auf V1N, schwarz auf GND, orange auf D0

      (Servo mit Servotester getestst, funktionirt okay.)

      Beim Weichenschalten in Rocrail sagt Rocrail:

      17:36:20 turnout [sw1] 8904 1 turnout    fada=71224 pada=35613 bus=0 addr=8904 port=1 gate=0 dir=0 action=1 delay=500 type=0
      17:36:03 turnout [sw1] 8904 1 straight   fada=71224 pada=35613 bus=0 addr=8904 port=1 gate=0 dir=1 action=1 delay=500 type=0

      Beim Weichenschalten in Rocrail sagt SerialMonitor:

      17:37:05.961 -> Received MQTT message [rocrail/service/command]: <sw id="sw1" cmd="straight" manualcmd="true" forcecmd="false" controlcode="" slavecode="" server="infw5C000ED0" iid="" prot="D" uidname="" bus="0" addr1="8904" port1="1" gate1="0" param1="58" value1="85" delay="500" actdelay="true" singlegate="false" accessory="true" porttype="0" decid=""/>
      17:37:05.994 -> 
      17:37:05.994 -> Parsing XML successful.
      17:37:05.994 -> <sw> node found.
      17:37:05.994 -> addr1: 8904
      17:37:05.994 -> port1: 1
      17:37:05.994 -> cmd: straight
      17:37:05.994 -> param1: 58
      17:37:05.994 -> value1: 85
      17:37:06.039 -> Turning servo on port 1 to angle 58
      17:37:13.777 -> Received MQTT message [rocrail/service/command]: <sw id="sw1" cmd="turnout" manualcmd="true" forcecmd="false" controlcode="" slavecode="" server="infw5C000ED0" iid="" prot="D" uidname="" bus="0" addr1="8904" port1="1" gate1="0" param1="58" value1="85" delay="500" actdelay="true" singlegate="false" accessory="true" porttype="0" decid=""/>
      17:37:13.816 -> 
      17:37:13.816 -> Parsing XML successful.
      17:37:13.816 -> <sw> node found.
      17:37:13.816 -> addr1: 8904
      17:37:13.816 -> port1: 1
      17:37:13.816 -> cmd: turnout
      17:37:13.816 -> param1: 58
      17:37:13.816 -> value1: 85
      17:37:13.816 -> Turning servo on port 1 to angle 85

      Anscheinend ist alles okay, aber:

      Servo bewegt sich nicht.
      Status LED bleibt dunkel.

      Getestet sowohl mit PC USB Port als Power als auch mit 5V 2,3 A USB Handylader als Power, kein Unterschied

      Wo kann das Problem sein?

      • #2402
        Piet BeinekePiet Beineke
        Participant

        Ich und ein paar weitere hatten das Problem zunächst auch. Wichtig ist, welche Version des NodeMCU’s du nutzt.
        VG

        • #2403
          ZoltanZoltan
          Participant

          Diese.
          Ich habe keine andere.
          Die anderen Controller (sensor und mtc4pf) scheinen zu gehen (bis auf das dort drĂĽben beschriebene Motordrehrichtungsproblem).
          Compile und upload geht problemlos.

          • #2404
            Piet BeinekePiet Beineke
            Participant

            Ah ok, das war bei uns auch das Problem, wie vielleicht auch oben im Chat zu sehen. Funktionieren tuen bei den Switches leider nur die V2-Modelle. Die anderen Controller gehen mit V3, aber die Switches leider nur so.
            VG

    • #2405
      ZoltanZoltan
      Participant

      Das ist aber blöd, dass ich das vorher nicht wusste.

      Fragen:

      1.)
      Kann Matze nicht etwas im Code unternehmen, dass es doch läuft?

      2.)
      Geht es auf dem Vemos D1 mini?

      3.)
      Geht es auf dem ESP32?

      Und was ist eigentlich der Unterschied diesbezĂĽglich zwischen V2 und V3? Irgendwo las ich etwas darĂĽber, dass der sog. V3 eigentlich V1 sei, und V2 die neuere ist…?

      Vorerst kann ich also keine Weichen schalten… schade.

      Und mit der Motordrehrichtung beim anderen Controller habe ich ja auch noch mein Problem, da hat sich noch niemand gemeldet… na vielleicht wird es morgen ein besserer Tag.

    • #2407
      Matthias RunteMatthias Runte
      Keymaster

      Hallo allerseits,
      könnt Ihr mal probieren, auf dem verdächtigen Controller das ganz einfache Beispiel-Sketch laufen zu lassen und einfach den Servo ein bisschen zu drehen? Vorsicht mit dem zulässigen Winkelbereich, zerschießt Euch nicht die Weichenmotoren. Danke!

      Nur der MTC4PU braucht bislang einen ESP-32, alle anderen Controller benötigen einen ESP12 / ESP8266.

      GruĂź,
      Mattze

    • #2411
      ZoltanZoltan
      Participant

      Problem solved.

      It was a silly error mysides.

      MattzoController_Switch works on the AZDelivery 3 x NodeMCU Lolin V3 Module ESP8266 ESP-12F WIFI.

      Problem was: The servo “red plus +” should not be connected to Pin VIN, but to Pin VU!

      Then it works fine!

      • #2413
        Piet BeinekePiet Beineke
        Participant

        Welp, I did the same thing. Now it works with the V3 too, kind off, because it now has this weird thing that it connects and disconnects to my laptops usb, which I use for power while testing, constantly and the servos dont stop calibrating. Does someone have this issue too, or is it just my Laptop, because I’ve tried all outlets and switched the cable multiple times…

    • #2417
      Thomas RodriguesMax
      Participant

      Hey Piet, I do face the same behavior of the SwitchController.
      Try to use only one servo at a controller. Does the problem persist?

      • #2419
        Piet BeinekePiet Beineke
        Participant

        I have found the problem: Wrong calibration, so when the motor is pressing against the wall of its container, the controller will disconnect and connect again, the servos calibrating with the same, wrong values. Once you put in values that don’t make the servo “oversteer” the controller works perfectly fine for me!

    • #2464
      ZoltanZoltan
      Participant

      Hallo, ich habe eine Frage zu den Winkeln.

      Ich habe eine eigene Mechanik, wo der Servo von Mitte auf einem bestimmten Winkel gehen soll. In der Doku steht:

      Enter the minimum value of the switch servo motor into the “Parameter” field, and the maximum value into the “Value” field.

      Was stellen diese Werte “minimum value und maximum value dar?
      Was ist der erlaubte Bereich dafĂĽr?
      Sind das Winkel? Oder Zahlen, die man mappen muss?
      Welcher Wert entspricht “Mitte”?
      Sicherlich kann man das experimentell herausfinden, aber mit Anhaltspunkte wäre es sehr viel einfacher.

    • #2465
      ZoltanZoltan
      Participant

      Ich habe es experimentell herausgetĂĽftelt.
      Allerdings musste ich die Min- und Max-values ändern, da bei mir Parameter=105°für Gerade und Wert=130 °für Abzweig eingestellt werden musste.

      Nun sind alle drei Controller soweit fertig.

      Ich muss noch die Weiche und die “Lok” “einboxen”, und danach mache ich ein Filmchen ĂĽber meine Spielerei. Vielleicht interessiert mein “Missbrauch” des Matzo Systems (was ich eigentlich nur fĂĽrs Testen des Ganzen im Voraus gemacht habe) jemanden. (Resumee schon im Voraus: Tut man etwas MĂĽhe und Lernen investieren, dann funktioniert es einfach… :))

    • #2626
      ZoltanZoltan
      Participant

      Mein “Projekt” ist fertig.

      Wie schon erwähnt, MattzoBricks Lego Automation hat mich fasziniert!
      Aber ich habe keine Lego ZĂĽge. Ich wollte es aber trotzdem ausprobieren. So habe ich das Projekt etwas geändert (in den Ă„usserlichkeiten), und auf Spur G als Test umgesetzt. Hier ist ein Bericht ĂĽber den Bau der “Weiche”.

    • #5348
      Andrew HewittAndrew Hewitt
      Participant

      Good day. I have finaly working my laptop that he can see the esp8266. We are going to start with the switches and leds and sensors (all from trixbrix) My question is can i connect 1 one double cross switch (with 2 switches ) and 2 leds one sensor. And than 2 swichtes single with two leds and two sensors on one esp8266. In totaal i have 2 switches (single), 6 leds and 4 sensors. I want to know must i use one esp8266 (MLC) or two. thanx

      • #5351
        Matthias RunteMatthias Runte
        Keymaster

        If you are not using a port extender, a MattzoLayoutController can handle 8 switches, OR 4 signals (8 LEDs), OR 8 sensors, OR any combination of these appliances.

    • #5368
      Andrew HewittAndrew Hewitt
      Participant

      Can i make this switch all in Visual Studio Code. In Arduino IDE i get a lot of errors. In Visual Studio i have make one esp32 working with one PU train

    • #5377
      Matthias RunteMatthias Runte
      Keymaster

      Theoretically yes, if you use a Arduino upload plug-in. Nevertheless, the code and the directory structure for most of the controllers is presently optimized for Arduino.

Viewing 26 reply threads
  • You must be logged in to reply to this topic.