Forum Replies Created
-
AuthorPosts
-
Matthias RunteKeymaster
Oops, my bad. The topics should no be visible in the forum.
Matthias RunteKeymasterExcellent, good luck! 🙂
Matthias RunteKeymasterNikos, thanks for sharing your findings! This is indeed very helpful. We are interested in more feedback from the user base, so we are keen to hear more results from others as well.
Henk from the core developer team has pretty much nailed down the problem, we just need some more empirical basis for issueing the fix for the firmware.
Thank you all!
Matthias RunteKeymasterI suggest to read the documentation first:
Or for the other MattzoControllers:
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?
Matthias RunteKeymasterDon’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).
- This reply was modified 3 years, 3 months ago by Matthias Runte.
Matthias RunteKeymasterHi Lucas,
the IR LED is not connected to D5 and 3.3V, it’s connected to D5 and GND. I will compile an exact list of the components that I used. So far, I didn’t burn any of the controllers or IR LEDs in that setup, and it ran over several weeks. Overstressing components is not good, but the infrared pulses are extremely short, which may help a bit to protect the LED even if overpowered.Cheers,
MattzeMatthias RunteKeymasterThat might be because the Lego Infrared Receiver has only 7 power levels. That makes accelerating and braking and bit less smooth.
Matthias RunteKeymasterArduino 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.
Matthias RunteKeymasterNo, that is not problem at all. It even has the advantage that you can put the controller on the train and connect some nice LEDs as train lights to it!
Matthias RunteKeymasterWiring diagram for MTC4PF with infrared added to the documentation.
Matthias RunteKeymasterHi clyss,
your question is pretty good. Indeed I didn’t have time to add a dedicated wiring diagram for the MTC4PF with the infrared option yet. I will do that soon to make things a bit clearer.In the meantime some help for you: an infrared LED is nothing else than a LED, just that the emitted light is in the infrared spectrum and can not be seen by the human eye. That means: connect the longer leg of the LEDs to e.g. the i/o pin (e.g. D5 as in the standard configuration), and connect GND to the shorter leg. That is really all you need to do. Configure the firmware, upload it, power the controller up, and here you go.
Good luck!
Cheers,
MattzeMatthias RunteKeymasterHappy to hear that! Good luck with the rest!
Matthias RunteKeymasterUsing the inner Power Function wires is correct.
Matthias RunteKeymasterHi Achim,
first of all: I like your WiFi SSID. According to the log, the controller did not connect to the WiFi correctly. Did you install a status LED on pin D8? That’s sometimes quite helpful. Flashing means: no wifi connection. Blinking means: no mqtt connection.Good luck!
Cheers,
MattzeMatthias RunteKeymasterHi Ulrich, thanks for the heads up. I fixed that in the wiring diagram. Now it should be at least a bit easier to get going without the need if understanding every little detail in the code and configuration.
Cheers,
MattzeMatthias RunteKeymasterYour observation is correct. The Powered Up hubs must be connected in exactly the order they are listed in the configuration. The reason for this are technical limitations in the Powered Up and Bluetooth libraries that we use to connect to the Powered Up hubs.
I am quite positive that we will find a better for this in the future.
Cheers,
MattzeMatthias RunteKeymasterHi Nikos,
that’s interesting. I did not experience that hub name problem here, and neither did any of the testers. We will observe if we get more feedback into this direction.I agree that the PU hubs sometimes do not reconnect so quickly after uploading a new firmware to the ESP-32, but as they are specifically addressed with their MAC ID, a real bluetooth pairing as such should not be required at all. But please keep on posting your findings, they are all interesting.
Cheers,
MattzeMatthias RunteKeymasterHello Erik,
looks as if you did not choose the correct ESP32 controller in the Arduino IDE.Cheers,
MattzeMatthias RunteKeymasterWiring and pin configuration depend on each other. I think you are right that the example configuration does not exactly match the wiring diagram. I try to fix that with the next release. Anyway, there will be never be one example configuration file that fits all possible scenarios, so a bit of adaption is always required.
Matthias RunteKeymasterOk. Can you post the lines from the serial monitor where the controller parses the command and tries to flip the switch?
Matthias RunteKeymasterHi 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,
MattzeMatthias RunteKeymasterPaul 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,
MattzeMatthias RunteKeymasterHello 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,
MattzeMatthias RunteKeymasterAs written in the documentation, the wiring to measure the battery voltage on pin A0 are not required for the present version of the firmware, as they are not really used to recalibrate the train speed when the battery voltage decreases. Anyways, you can build the controller now as specified and wait for the firmware upgrade in which the logic will be introduced.
-
AuthorPosts