Timer circuit with adjustable frequency and duty cycle

Hi all,

I am wanting to pulse a pendulum swing using a small motor (max current 500mA) and a timer that has an adjustable frequency (0.2 - 2Hz) and adjustable duty cycle (25-75%). I have the Arduino Uno board and would like any suggestions on a suitable circuit or configuration for this to work.

Thanking you in advance.

Jules

See the timer PWM modes, also TimerOne library.

For circuit advice, you need to tell us a lot more about the motor, for example the voltage, do you need to drive it in both directions, can it stall, etc...

Hi there,

The motor will be a small 6-12V one that will deliver short (approx 0.2s) impulses every second or so. The drive impulse can be in just one direction and if the impulse can be still delivered while it stalls then yes but not sure on that.

Jules

Kerrow979:
Hi there,

The motor will be a small 6-12V one that will deliver short (approx 0.2s) impulses every second or so. The drive impulse can be in just one direction and if the impulse can be still delivered while it stalls then yes but not sure on that.

Jules

Why a motor and not a solenoid with the armature giving the pulse?

Paul

Since the maximum frequency is 2Hz you can easily use delay or better “blink without delay” approach.

I could use a solenoid but I happen to have a selection of small motors that should work fine.

Regarding using the 'Blink' option, I supposed that would work ok but I want a fine and easily adjustable frequency and mark to space ratio so would prefer using a pot/trimmer adjustment rather than having to adjust the sketch every time to make a change.

What current level could the 'blink' output support as I would expect the motor pulse to require 100-200mA? Is the output also at 5V?

In the "blink-like" program you can easily change the duty and frequency based on a pot reading.
For driving a motor you will need a transistor + a freewheeling diode.

Can you direct me to the right ‘blink’ sketch as the one in the Arduino starter pack doesn’t link to a pot for adjustment.

What’s a freewheeling diode compared to a regular one? Also would any power transistor or FET work? I have some IRF840’s.

Thanks

You need a logic MOSFET or a BJT. I don't know yours are good.
Freewheeling diode is any diode (faster is better but I think for small motor any will work).
Modify the blink sketch to read the pot and change delay time according to the result.

Kerrow979:
I am wanting to pulse a pendulum swing

Is this adjusting the pendulum of a clock, to improve its timekeeping accuracy? If so, an Arduino can do this, but maybe choose one with a crystal oscillator instead of one with a ceramic oscillator, and to control it, I think a pot might to too crude. Maybe an LCD to display the required timing and some buttons to allow small and precise adjustments.

If accuracy is not that important, maybe just use a 555 timer circuit? An Arduino would be wasted. See this page.

Maybe the 555 will be simpler and easier to adjust. I don’t need super accuracy and it’s not for time keeping purposes but rather a mechanical investigation.

Will the 555 timer circuit output then need to be boosted by a transistor or will it power the small motor directly?

Thanks