Hi,
I'm trying to simulate a pendulum with a motor and a wooden stick.
It should be able to "swing" from 90° to -90° and be able to accelerate like a real pendulum would.
I started experimenting with the Stepper Motor 28BYJ-48 and the AccelStepper library, but I felt to have difficulties keeping the alignment.
Then I tried the SG90 Servo Motor which seems to be easier to control to certain angles. But I realized it's to slow for the pendle acceleration?
Can anyone give me a hint which of those motor types would make the most sense to use and what servo I could use that goes faster than the sg90 and would support controllable acceleration?
Plus point would be a motor that could be put in free-wheel mode?
Edit:
Someone did it with the SG90 Video
I'm rather asking for advice on the right motor.
Why not use a real pendulum and nudge it with an actuator at the top of its swing ( eg small solenoid) to keep it running . Note that no real pendulum swings over such a wide angle , so it won’t look right -
If you really want to drive the stick , just use a motor, running at constant speed, with a bell crank linkage - that will give the desired motion , and much simplier.
What about this? Use a natural pendulum. Make it swing just a little bit too fast. At one end of the stroke You "catch" the pendulum for a very short time of correction and releases it at the exact time.
Keep it simple.....
Ok, sorry. I should clear up.
So my first step is just to mimic a pendulum motion with a stick.
A natural pendulum won't work for what I want to do. The motion needs to come from the motor only.
Okey. Let the motor swing the pendulum just a little bit too fast and have a short, very short rest in one end of the stroke. Start the next swing according to Your time base, RTC or what ever.
Ok, and what motor would you recommend Servo or Stepper?
If Servo, I had the feeling that the SG90 is a bit to slow. Can you recommend a better one, which is not crazy expensive?
It would be quite difficult to even imitate the physics accurately, especially for the nonlinear pendulum diagrammed in the OP (where the usual approximation sin(theta) ~ theta is simply wrong).
Then stepper motors will not be the best. You need to create a speed curve in order to control the motor to vary its speed according to the curve. Whether servo- or DC- motors are the best I hope some motor guy will step in and tell.