WouterVessies Posted October 5, 2020 Posted October 5, 2020 I have automated the LEGO Railway crossing 4539 with Mindstoms RCX2.0 and made a program with the original software. The program works, but after running a while the position of the beams get of sync and are pushed into the the roadplate. Is there a solution to prevent this? For measuring the rotations I use on both motors a rotation sensor, see the photos for the setup. A screenshot of the program is enclosed. RailroadCrossing_V3 by Wouter Vessies, on Flickr DSC00652 by Wouter Vessies, on Flickr DSC00651 by Wouter Vessies, on Flickr Quote
Jim Posted October 5, 2020 Posted October 5, 2020 Nice setup. If I understand correctly, after opening en closing the barriers, they don't reset to the right position? Does that happen right away, or a bit every time you open and close the barriers? Quote
WouterVessies Posted October 5, 2020 Author Posted October 5, 2020 After 7 times opening and closing there is a noticeable offset, so every time open and closing the offset increases a bit. Quote
Jim Posted October 5, 2020 Posted October 5, 2020 Assuming, you are using the rotation sensor, it probably isn't accurate enough. What happens if you don't use the sensor, but you have the barriers move for a certain period (and try to calibrate that period). Do you get the same results? Quote
GroundskeeperWillie Posted October 5, 2020 Posted October 5, 2020 (edited) You could use a rubber band in the transmission which will allow the motor to slip once it reaches the extreme positions. Then just use a timer than runs slightly longer than necessary. Then it will remain in sync without a rotation sensor. Alternatively, you could change the gearing of the rotation sensor to make it turn slower and thus increase the measurement precision. Let me re-phrase that. Making the rotation sensor turn slower will actually decrease the precision, but this is probably what you want. If it goes out of sync, it probably means it turns so fast that some ticks are skipped. Edited October 5, 2020 by GroundskeeperWillie Typo Quote
Toastie Posted October 5, 2020 Posted October 5, 2020 The RCX rotation sensor has simply not enough resolution (ticks per revolution) for this task. Upgearing may help to some extent - as others have suggested. However, this injects gear slack into the system. Repeated operation of a system that inherently exposes slack (sensor itself, gears, other tolerances) will always finally result in errors as you describe. I believe touch sensors are more appropriate. You can use two touch sensors on one RCX sensor input in parallel (instead of one rotation sensor), as our program knows what is to be expected: When the program is turning the lever "up", and any of the two sensors fire, you know it is the upper position, and vice versa. Best Thorsten Quote
WouterVessies Posted October 6, 2020 Author Posted October 6, 2020 I removed the rotation sensors they were causing the problem. I even tested the rotation sensor after the gearing (24:1) but the result became even worse. I have written a new program based on running the motors for a fixed amount of time and this is working fine. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.