pekka111 Posted December 15, 2024 Author Posted December 15, 2024 9 minutes ago, Lok24 said: Fine! That all works with Arduino, Powered Up App, Pybricks, BrickController 2 , CONTROL+ App and so on. You should order some sensor for robotics ;-) Yes, and some pneumatics too :) Quote
Lok24 Posted December 15, 2024 Posted December 15, 2024 Just now, pekka111 said: Yes, and some pneumatics too :) Sure, this is rather unsuitable for robotics Quote
pekka111 Posted December 15, 2024 Author Posted December 15, 2024 22 minutes ago, Sokolov Edward said: What's the difficulty? In addition to motors with a controlled angle of rotation, you need 2 more sensors - colors - to track the route line and a gyroscope to maintain position. If this is the limit of your desires, then you can easily repeat it. Lego motors were enough for me to build drifters and walkers with radio control. I have enough programming at work - I am interested in assembling something with my own hands in the real world, and not inside a PC. With Lego it's easy to get started. Then after some experience, maybe I'll find that they aren't enough but nothing lost in that situation, just move on to other systems. Quote
Sokolov Edward Posted December 15, 2024 Posted December 15, 2024 40 minutes ago, pekka111 said: There is this rotation sensor but might be hard to find: https://www.brickeconomy.com/set/9756-1/lego-mindstorms-rotation-sensor An ancient rarity produced in 1995-2000 - it is clear why I did not notice it. The Chinese have a copy of the Mindstorm - they did not add it there. There is information about it on Rebrikable, but there is not a single model using this sensor. It all depends on your tasks - I do not know them and do not claim that you will not be able to solve them, I just outlined the existing problems. There are many examples of robotics on Lego on YouTube. Ultimately, it is up to you to decide. Quote
Lok24 Posted December 15, 2024 Posted December 15, 2024 44 minutes ago, Sokolov Edward said: single model using this sensor. There a two sets containing it, and today you just use a motor Quote
Sokolov Edward Posted December 15, 2024 Posted December 15, 2024 A living confirmation of my words - even minimal use of gears between the motor and the mechanism still gives a noticeable inaccuracy of positioning. For home crafts this is possible and does not matter. It also has useful mechanisms in the household: Quote
schraubedrin Posted December 16, 2024 Posted December 16, 2024 Thank you for those videos, they are great inspiration! Incredible that they manage to position those balls that precisely! Quote
mspl Posted December 17, 2024 Posted December 17, 2024 (edited) On 12/12/2024 at 3:13 AM, Lok24 said: So: If the SPIKE Software (which means the sum of firmware and your application) does not recognize the "46" then the "Technic Large Motor" won't work with the Spike Hub. But: Using another software it could work. I have most of these hubs and motors and have made a somewhat useable Python library for them. There are some limitations beyond LEGO's software, they're noted in the comments for the hub and device files. https://github.com/mutesplash/legomario/tree/main/BTLego Edited December 17, 2024 by mspl link Quote
Mr Jos Posted December 18, 2024 Posted December 18, 2024 On 12/15/2024 at 4:41 PM, Sokolov Edward said: Attaching an electric drive to Lego Technic is not the biggest problem now. You can find many projects on GitHub. But the main problem will be in the Lego parts - huge backlashes that cannot be calibrated or compensated will nullify all your efforts to program mechanical actions. To get an accurate mechanical response (movement, rotation, etc.), you need to use a stepper motor with feedback - there is simply nothing like this in Lego - this is a children's toy for learning the basics of robotics or inadequately moving cars. If you are satisfied with this level of control, then you can do this and get a lot of good emotions from the errors in their work. I do like to counter this, the Lego motors are able to do accurate mechanical movements. Even with large gear trains, as can be seen in this video. The robot arm is stacked with gears all in row, able to perform pick&place jobs time after time. The highbay stacker crane has a positioning margin of 1mm on a drive length of 500mm whilst also moving vertical 400mm +. And the speed is still high (in my opinion), the accuracy doesn't come from gearing down to snail speed. The internal encoders from the Lego motors are good enough to perform these tasks for hours on end during events. Quote
evank Posted December 18, 2024 Posted December 18, 2024 On 12/1/2024 at 1:40 AM, pekka111 said: Thank you for all the tips. So for the controller there are 4 options: Spike, EV3, Buwizz and Pi+hat and each could be bought separately without a Lego kit. And then all motors, actuators and sensors (Lego and 3rd party) can be bought separately also, which I didn't think of. Out of controllers, Spike seems to be the smallest, but is it possible to utilize external services (vision, control) with that? With PI+hat almost anything would be possible, but it's a bit bigger and needs an additional battery. Then there is the question: are all the systems compatible, or do you have to select one based on what kind of components you want to add? A contrarian perspective: come to the dark side :) and join the tiny community of us diehards who are programming Lego robotics with 8-bit and 16-bit systems of the 1980s and 1990s. I'm one of the 8-bit folks, programming my Legos with an Apple II, BBC Micro, Commodore 64, and IBM PC. Is it better than the 21st-century versions? Of course not. But is it more fun for us Gen-X'ers? Hell yes! Quote
pekka111 Posted December 19, 2024 Author Posted December 19, 2024 Awesome examples here what can be done. And I don't know any system that can do so much with ready made parts. Quote
Sokolov Edward Posted December 19, 2024 Posted December 19, 2024 (edited) 10 hours ago, Mr Jos said: The internal encoders from the Lego motors are good enough to perform these tasks for hours on end during events. In the video with the robotic arm, everything is not as smooth as you say - at 58 seconds the ball lands crookedly, and at 1 min 22 sec it does not hit the pole and falls. The drive of the turntable is not direct, but through a couple of gears and this is already enough for errors. The calibration action ends very quickly, and autocalibration is apparently not implemented or is not possible at all - correct me if I'm wrong. Another wonderful video about a factory made from Lego parts for building houses from greenhouse cucumbers: Edited December 19, 2024 by Sokolov Edward Quote
pekka111 Posted December 23, 2024 Author Posted December 23, 2024 (edited) On 12/15/2024 at 6:40 PM, Lok24 said: Fine! That all works with Arduino, Powered Up App, Pybricks, BrickController 2 , CONTROL+ App and so on. You should order some sensor for robotics ;-) Almost every PU motor is also a rotation sensor. (except M, not sold any more, and train) Any tips for getting sensors? I got some 88007 distance/color sensors but missing all the rest. Do you know if there are any sets that have sensors, other than Education sets? There are some cheap second hand sets with power functions, but there might be some latency if you use them through infrared connection (https://docs.pybricks.com/en/stable/pupdevices/pfmotor.html). Edited December 23, 2024 by pekka111 Quote
idlemarvel Posted December 23, 2024 Posted December 23, 2024 You should look on bricklink. If you srarch for Lego set number like 88007 then look at the inventory of that "set" it will list the bricklink part number for the sensor. Buying the sensor part is generally cheaper than buying the set. Quote
pekka111 Posted December 24, 2024 Author Posted December 24, 2024 7 hours ago, idlemarvel said: You should look on bricklink. If you srarch for Lego set number like 88007 then look at the inventory of that "set" it will list the bricklink part number for the sensor. Buying the sensor part is generally cheaper than buying the set. Thanks! Looks like quite nice selection even in my country. Quote
Mr Jos Posted December 27, 2024 Posted December 27, 2024 On 12/19/2024 at 9:07 AM, Sokolov Edward said: In the video with the robotic arm, everything is not as smooth as you say - at 58 seconds the ball lands crookedly, and at 1 min 22 sec it does not hit the pole and falls. The drive of the turntable is not direct, but through a couple of gears and this is already enough for errors. The calibration action ends very quickly, and autocalibration is apparently not implemented or is not possible at all - correct me if I'm wrong. Another wonderful video about a factory made from Lego parts for building houses from greenhouse cucumbers: The ball at 58seconds is just a not well done calibration. If you pause at every time it drops on that pole, it's to the rightside. Better calibration/program would get it right everytime. The second video is a bad 'robotics' example. It's using remote controls only, no programming. If the encoders don't allow smooth operation, I'ld like you to comment/find something in the video I posted in my previous comment from 18December. My robot arm has in joint 1; 13gears. Joint2; 34gears! Joint3; 16gears. Joint4; 18gears. Joint5; 13gears. Joint6; 9gears. It's picking and placing pallets all day on different locations with 6 motors and 100+ gears having to move exactly perfect together. I think the Lego platform is perfect to learn/play/test robotics and how to perfect them. The limit is the capability of the builder. Quote
Sokolov Edward Posted December 27, 2024 Posted December 27, 2024 21 minutes ago, Mr Jos said: The ball at 58seconds is just a not well done calibration. If you pause at every time it drops on that pole, it's to the rightside. Better calibration/program would get it right everytime. You are wrong - this is not a calibration problem - at first the hand hits the pole with the ball perfectly - the problem starts after several operations. In real robotics, the manipulator is guided to the object by external sensors - "machine vision", which allows you not to depend on the accuracy of the servo drive rotation - the system automatically adapts with each operation and does not depend on the displacement of the object. At the beginning of the video, your hand takes the pallet with an offset to the edge - for such a design this is not critical, but it is noticeable. Quote
gyenesvi Posted December 27, 2024 Posted December 27, 2024 9 hours ago, Mr Jos said: If the encoders don't allow smooth operation, I'ld like you to comment/find something in the video I posted in my previous comment from 18December. My robot arm has in joint 1; 13gears. Joint2; 34gears! Joint3; 16gears. Joint4; 18gears. Joint5; 13gears. Joint6; 9gears. It's picking and placing pallets all day on different locations with 6 motors and 100+ gears having to move exactly perfect together. Does your design use external sensors? I suspect it does. For example the pin sorter machine seems to have a sensor at the base of the large rotating platform to sense its position right? That means the sensor measures the position of the end effector that you want to move / rotate. Sure, that way it is possible to move it precisely. But if you want to rely only on the position sensor inside the servo motors to figure out where your end effector is, like in the robot arm of @Sokolov Edward, it is much harder to position things precisely if there are gears / linkages involved after the servo arm. There's no way anything would work after a gear train of 34 gears. It would not even work really after 2 gears. I guess that's the key difference between the two approaches? Quote
Glaysche Posted December 27, 2024 Posted December 27, 2024 Lego is a challenging but satisfying medium in which to build robotics. There is a lot of backlash in Lego gears which can reduce precision but there are techniques to counteract that. When you gear down, the effects of backlash are reduced. You can take advantage of this in some circumstances. You can gear up before going though a long chain of gears and gear back down at the end. You can create two parallel gear trains that are built with a slight tension. That can almost entirely eliminate backlash for those gears. You can reduce slop by using connectors in place of bare cross axles that twist a lot less. You can use multiple motors on the same joint for more power and less slop. All Lego flexes under stress which reduces precision. You can compensate by building structures with reinforcing in multiple directions. You find a way to incorporate triangles into the structures. Sometimes you can use interlocking frames to make something very strong and rigid. Finding creative solutions to the shortcomings of Lego is part of the challenge and part of the fun. Quote
gregorian Posted January 3 Posted January 3 (edited) I have experience with using the pi build hat, though i wouldn't necessarily recommend it. combining pi with Lego can be powerful and the build hat was cheap at £25. however there are problems with it when using the official library, which makes it not suitable for robotics. the problems are documented here [viewtopic.php?t=337816&hilit=build+hat+speed+control](https://forums.raspberrypi.com/viewtopic.php?t=337816&hilit=build+hat+speed+control) [viewtopic.php?p=2128750#p2128750](https://forums.raspberrypi.com/viewtopic.php?p=2128750#p2128750) [https://github.com/RaspberryPiFoundatio ... issues/152](https://github.com/RaspberryPiFoundation/python-build-hat/issues/152) i have been working on an alternative library to overcome the problems and have made a project with it. It is driving autonomously. it uses odometer to track location and corrects it with computer vision. it just drives till it encounters an obstacle then engages the obstacle avoidance using distance sensors, it doesn't use a map of any kind to avoid crashing. also works in more messy environments. it can now also detect Lego wheels using computer vision and use pose estimation to know where the wheel is in the world. next it will collect the wheels and return them to a specified location. the library has pretty good speed control but i have not implemented position control. i have messed about with stall detection and that is pretty easy to get working though i haven't added it yet. However it was a lot of work and pybricks just works. in future i will probably use technic hub or ev3 and find way of communicating with the raspberry pi. they are low cost. ev3 motors can be got for as low as £7. On 12/1/2024 at 6:40 AM, pekka111 said: Thank you for all the tips. So for the controller there are 4 options: Spike, EV3, Buwizz and Pi+hat and each could be bought separately without a Lego kit. And then all motors, actuators and sensors (Lego and 3rd party) can be bought separately also, which I didn't think of. Out of controllers, Spike seems to be the smallest, but is it possible to utilize external services (vision, control) with that? With PI+hat almost anything would be possible, but it's a bit bigger and needs an additional battery. Then there is the question: are all the systems compatible, or do you have to select one based on what kind of components you want to add? you only need one battery for the pi and the build hat. the build hat will power the pi. I think one of the advantages of lego over non lego is reusability. i previously made robots with non lego parts and i ended up with buckets of unused stuff. with lego you can buy stuff 2nd hand and everything gets used and then resused. regarding backlash these videos are interesting Akiyuki mentions the technique he uses to reduce backlash in video bellow: I would like to know more about the method he is using and how it works but cant find much. Any insight anyone can give would be appreciated. here is another interesting video showing a technique to reduce backlash with worm gears: I have made a variation of this one using a larger spur gear, that i am going to integrate into a robotic arm i have built Edited January 3 by gregorian Quote
Berthil Posted January 3 Posted January 3 (edited) 38 minutes ago, gregorian said: Akiyuki mentions the technique he uses to reduce backlash in video bellow I have build an improved variation of this six axis arm robot arm and have used the new blue 12t gears on the turntables, this reduces backlash even further. A worm gear is recommended to use only when forces are not high. 38 minutes ago, gregorian said: I would like to know more about the method he is using and how it works but cant find much. Any insight anyone can give would be appreciated. I think the main improvement is drive on both sides of the turntables on all axis. the use of the 12t gears improves it further. I have a Stud.io model of his and my version and was planning on creating free building instructions when finished. I'm in the final stages of programming and mainly have used the hub and some motors from the 51515 set (not the ugly teal parts). Mine can rotate freely on banana gear racks as the hub that powers the six motors is on the arm. Edited January 3 by Berthil Quote
ord Posted January 4 Posted January 4 14 hours ago, gregorian said: I would like to know more about the method he is using and how it works but cant find much. Any insight anyone can give would be appreciated. It is essentially the method that Glaysche mentioned of using two parallel gear trains. It is explained in this thread: 14 hours ago, Berthil said: I have a Stud.io model of his and my version and was planning on creating free building instructions when finished. I'm in the final stages of programming and mainly have used the hub and some motors from the 51515 set (not the ugly teal parts). Mine can rotate freely on banana gear racks as the hub that powers the six motors is on the arm. I am looking forward to this! Quote
pekka111 Posted January 4 Author Posted January 4 19 hours ago, gregorian said: I think one of the advantages of lego over non lego is reusability. i previously made robots with non lego parts and i ended up with buckets of unused stuff. with lego you can buy stuff 2nd hand and everything gets used and then resused. I agree 100%. And since you won't (usually) make parts, you have to use a bit of imagination when making things work. Quote
gregorian Posted January 4 Posted January 4 On 1/3/2025 at 11:45 AM, Berthil said: I have a Stud.io model of his and my version and was planning on creating free building instructions when finished. that's interesting! 10 hours ago, ord said: It is essentially the method that Glaysche mentioned of using two parallel gear trains. On 1/3/2025 at 11:45 AM, Berthil said: the main improvement is drive on both sides of the turntables on all axis. the use of the 12t gears improves it further. thank you both, i am going to use this in the future, i had never guessed you could reduce backlash with lego. regarding rotation sensors there is an interesting idea here https://www.philohome.com/sensors/rotsensor.htm there are other ways of doing it that are less elaborate i have previously messed about with this. a rotation sensor would allow using large technic motors in a robotic arm. I have also considered hooking up 2 motors with a differential and you would in that case need a rotation sensor external to motors to measure there rotation. Its great to see a discussion about robotics with Lego, i know there are the mind storms forums on Facebook but i am not a big fan of Facebook and the forums are siloed into specific technologies. i.e. there is one for spike and if you use anything else it doesn't belong. To me a lego robot is one that uses mainly lego for structure and mechanical but can use any lego motors or hubs and can mix in things like arduino or pi. if it looks like a lego robot and talks like a lego robot and walks like a lego robot (or rolls) then its a lego robot. 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.