3/11/2021 0 Comments Lego Mindstorms Programming Code
Provide details and share your research But avoid Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.Not the answer youre looking for Browse other questions tagged mindstorms programming robot-inventor or ask your own question.When driving the vehicle to the wall, the big motors are spinning slower than before, but they are not stalled fully.
In this post, I would like to explain another important technique: how to make the EV3 robot recognize stalling status and then adjust itself to end stalling in time. This condition occurs when the torque required by the load is more than the maximum torque that can be generated by the motor. ![]() Since the maximum torque of big motor is higher than that of medium motor, stalling might happen more frequently on the medium motor. ![]() If left in a stalled condition too long, it is prone to overheating and possible damage since the current flowing is maximum under these conditions. In the below video, the front attachment of the vehicle is driven by a medium motor. When the front attachment spins to the lowest or highest point, it could not spin further since it is blocked by the vehicle body or the ground. However, it will be blocked by its body when it tries to swing backward or forward further. I will introduce them one by one and then compare their advantages and disadvantages at the end of the post. It estimates the running time of the motor before it reaches the stalling angle. In this way, even if stalling happens, it will not last long and the motor will not get affected too much. Lego Mindstorms Programming Code Code Below TurnsThe sample code below turns medium motor anti-clockwise for 2 seconds to reach the highest position, pause 2 seconds, and then turns motor clockwise for 2 seconds to reach the lowest position. Moreover, if the front attachment is not put at the initial lowest position, but hangs in the middle, the stalling time might be longer. Firstly, mount the touch sensor at a point where it could be pressed down when stalling happens. In the below picture, a touch sensor is deployed at a position where the front attachment could press it down when reaching the upper most position. It compares the data of rotation degree after a very short lapse of time. In the following code segment, the medium motor turns counter-clockwise till stalling happens. It stops, pauses 2 seconds, and then reserves spinning until stalling happens again. The stalling check function is wrapped in the block checkmotorrotation block. ![]() In the below front attachment design, it uses worm gear to increase the output torque by 24 times (1 worm gear and a 24-tooth gear). Therefore, even the two grip arms have touched and pressed with each other, the motor is not stalled fully. Using the above sample code, it continues spinning until destroying the whole front attachment structure.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |