Can I do this with an Arduino?

Hi everyone,

I’m building a wave pendulum (a bunch of pendulums hanging from a frame, with each pendulum’s length increasing according to a formula). I want visitors to our site to be able to set the pendulum in motion, but not to be able to muck with it once it starts. I will be using a stepper motor to rotate a plastic paddle that will rotate precisely 360 degrees, catching and lifting the bobs before it releases them.

I know an Arduino can be used as a stepper controller, but - and this is crucial - while the user should be able to start the motor, he/she should be unable to restart it for at the time required for let all the bobs run out of energy and return to their original state (otherwise the bobs will crash into the paddle and mess everything up). In other words, the process should be non-retriggerable.

Is this possible?

Thanks for any help!

Use a couple of IR beams to detect if anything is still swinging.

If something breaks the beam on either side, it’s still swinging.

If nothing breaks the beam on either side, it’s not swinging.

I agree with Skimask - some sort of beam-break would be a great way to handle it.

You will have to make a decision with a beam break about how little motion “stopped” is. That’ll dictate how close to the rest position your beam(s) will need to be.

There’s an example [here that shows an example of this at work. There’s a section near the end of the tutorial that talks a bit about getting the beams operational.](Lessons from Rebuilding Illumitune - SparkFun Electronics)

Thanks for the info, skimask and fusedlightning. Unfortunately, I wasn’t clear. Let me try again.

I want the Arduino to

  1. Wait for a button press to begin rotating the paddle.

  2. On the press rotate the paddle one full turn (360 degrees), then stop.

  3. Ignore any button presses for a set amount of time after the initial press (I can determine that time through experimentation, but for sake of example let’s say 2.5 minutes).

  4. Then return to (1) above and wait for a key press to begin the process again.

Yes you can certainly do that w/an Arduino. I think there might be a simpler, less $$s way but let me muse on that. The other suggestions were a method to not have to wait a certain time but rather directly detect when the pendulums had stopped moving and allow the next button press.

Direct measurement is definitely possible. If you didn’t want to use an Arduino, you could probably manage this with a 555 timer, a few caps and resistors, and an AND gate. Wouldn’t be super precise, but would work well enough I think.

I originally tried the resistor and capacitor route, but found the motor would creep - I couldn’t get precise enough values on the components to control the rotation well enough.

You control rotation in a fashion like your windshield wipers. You push/pull a switch to power on the wiper motor. After a small rotation the motor turns a cam which then turns on it’s own power so the motor still runs after you release the switch. It continues to run for 360 deg until the cam releases the switch and power is removed. Your wipers come to rest, parked where they started.

All you then need to add is a timer between the manual push button and the motor. The timer is triggered when you push the manual button and won’t allow another push to start the motor until after the specified time period. The motor need not be a stepper but a plain old DC motor, geared appropriately if needed.

To do your project w/an Arduino you’d need the Arduino, the motor driver and the motor. For code it might be something close to what’s in the thread below. Pretty simple.

https://forum.sparkfun.com/viewtopic.php?f=32&t=36227

ps - I forgot to ask … how long do you think it’ll take for the display to settle out ? How long btw allowed push button starts ? Are you thinking a minute or 10’s of minutes (my guesses) ? Also what do you have to power this display ? I’m wondering what you have, or can easily have, to power the Arduino and/or other circuitry.

For S&Gs here’s one possible “notional” schematic of how it might be done w/o a micro of any kind. I don’t hold that it’s the only or even the best implementation but it’s something to think about.

(click on to open)

Basically a push on SW1 turns on Q1 which turns on the DC motor. After a short rotation, SW2 closes and keeps power on even after SW1 is released. The “paddle” does it’s 360 and then SW2 opens. This then releases the timer to run. The timer keeps Q2 saturated, shorting out any push on SW1 and attempt to run the motor. After the timer timers out, the system is free to run again.

Depending on the time needed for the pendulums to settle, it can be done with a 555, although “long” times might demand a better timer.

I would say the above is less $$ to implement (and no programming, if that’s an issue) than the Arduino concept.