Liam Owen

See Saw (rotation) motion with Technic Hub and Motor

Recommended Posts

Hey, I am trying to code my motor to rotate 45 degrees one way, stop, then rotate 90 degrees the other way and 90 degrees the other way and loop so I get a rocking back and forwards motion, thought this would be easy to do, but I am find so many problems!

Firstly its not simple to get the engine to go back to 0 position, so at the moment I am doing this manually before I start the sequence. Then I seem to have problems with the positioning never being precise over time it ends up not going back to the center and can be over 90 degrees out after a few minutes! Also within my code (which is probably wrong) it seems to juts decide to jump past come commands without any reason.

Attached the method that I ended up with that still didnt work (Sorry I accidentally downloaded the latest version of Powered Up app!!!)

Currently I am looking at building the motion mechanically with techic lego bits rather than motor motion, any tips on a good build would also be appreciated.

Thanks

Liam

 

IMG_7622.jpg

Share this post


Link to post
Share on other sites
Posted (edited)

The method used in, for example, windshield wipers, is you have a shorter spinning arm connected to a larger arm that only moves back and forth.  For the angle to be 90 degrees, the ratio of the two arms is around sqrt(2) times longer.  Though if they aren't aligned exactly parallel at the center, it changes the ratio.

dQYIIGc.png

Blue dotted line showing that the center of the circle is aligned to the endpoints of the arc, thus the linkage arm moves exactly 2R side to side for both.  If you keep the longer arm pivot point and move the shorter one up and down, it'll increase the angle moved by the long arm.

Edited by Stereo

Share this post


Link to post
Share on other sites

You could use a sensor to calibrate the whole thing

Share this post


Link to post
Share on other sites
5 hours ago, Stereo said:

The method used in, for example, windshield wipers, is you have a shorter spinning arm connected to a larger arm that only moves back and forth.  For the angle to be 90 degrees, the ratio of the two arms is around sqrt(2) times longer.  Though if they aren't aligned exactly parallel at the center, it changes the ratio.

dQYIIGc.png

Blue dotted line showing that the center of the circle is aligned to the endpoints of the arc, thus the linkage arm moves exactly 2R side to side for both.  If you keep the longer arm pivot point and move the shorter one up and down, it'll increase the angle moved by the long arm.

Thank you v ery much for your reply, it looks very intresting but unfortunatley I have no idea how I would actually implement this!

Share this post


Link to post
Share on other sites

hbL1TBC.jpeg

Here's one way you could do it - the red 3L beam goes to the motor, the grey 3x3 turns 90 degrees back and forth as it spins. Middle shows one extremity, bottom shows the other.  Depends what space you're fitting things into.  The yellow 5L and grey 3x5 can be made longer if that works better.

Share this post


Link to post
Share on other sites

 

15 hours ago, Liam Owen said:

Firstly its not simple to get the engine to go back to 0 position, so at the moment I am doing this manually before I start the sequence. Then I seem to have problems with the positioning never being precise over time it ends up not going back to the center and can be over 90 degrees out after a few minutes! Also within my code (which is probably wrong) it seems to juts decide to jump past come commands without any reason.

Going mechanical is the Lego way :classic:

Anyway, it seems you are codding like this: move 90º, move -90º, move 90º…..

Doing it this way means that errors accumulate, and you might get what you got, 90 degrees out of sync.

Instead, I suggest something like: go to 45º angle, go to -45º angle, go to 45º angle… this way, errors do not accumulate... and you wont even need to go to 0 to initialize.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.