Author Topic: Want Oscillating motor - help.  (Read 1070 times)

0 Members and 1 Guest are viewing this topic.

Offline Richb77Topic starter

  • Contributor
  • Posts: 19
  • Country: de
Want Oscillating motor - help.
« on: September 13, 2023, 09:52:04 am »
Hi All.

I am trying to put together a little part cleaner and have pretty much everything except a way of making it wash.

I want a motor to spin (around 60rpm) for a given amount of time (20 seconds or so), then stop, reverse and spin for the same time and repeat until i switch it off.

What is the best, compact way of doing this? I have a small stepper motor and a range of DC motors. I have read about H bridges and in theory understand what they are doing...But its the timing and polarity reverse (for DC) that im lost on.

Coding is not my thing so the stepper is a last resort...unless there is a tutorial doing almost exactly what i need :)

Cheers for any help. I am pushing my hardware knowledge with current projects and sometimes the best way to learn is simply ask.
 

Offline Stephen_Pejak

  • Newbie
  • Posts: 7
  • Country: cs
Re: Want Oscillating motor - help.
« Reply #1 on: September 13, 2023, 10:00:47 am »
DC motors won't cut it because you can't precisely regulate their RPM. It depends on many factors including but not limited to temperature, voltage, load etc. Stepper motors are far more precise and you can accuratly control them. I understand that you don't like coding but it's there for a reason. You should get simple stepper motor controler and some small arduino. Just look at couple of tutorials regarding basic arduino coding and one about stepper motor controling. I believe in you that you will figure it out in less than 10 minutes. I love doing things analog whenever I can, and I did build some crazy analog circuits. But trust me when I tell you, even I wouldn't want to build something like that analog.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19529
  • Country: gb
  • 0999
Re: Want Oscillating motor - help.
« Reply #2 on: September 13, 2023, 11:14:46 am »
As is often the case, more information is required.

How much torque does the motor have to provide?

Is the number of rotations critical?

What power supply are you using?

Are there any limit switches?
 

Offline tychob

  • Contributor
  • Posts: 48
  • Country: gb
Re: Want Oscillating motor - help.
« Reply #3 on: September 13, 2023, 12:32:26 pm »
Its a terrible way of doing it, but you could use a 40:1 reduction gearbox to a shaft with a 180degree optical encoder disk so the encoder triggers after 20 rotations of the main shaft, with a dual pole latching relay. Or you could just use a microcontroller.
 

Offline Richb77Topic starter

  • Contributor
  • Posts: 19
  • Country: de
Re: Want Oscillating motor - help.
« Reply #4 on: September 13, 2023, 01:03:13 pm »
Thanks for all the help so far.

I am exploring the stepper/arduino and reading/watching all i can on the matter. As a none coding person...its a little daunting.

As for other questions. A gearbox would work to control the rpm. Then all i have to do is control time and direction.

Torque...No more than 1Nm (0.7ftlb)
PSU is a 12v wall wart 1.5A max
No limit switches
rotations are not critical. rpm is +/-50%, time rotating is also +/-50%
 

Offline themadhippy

  • Super Contributor
  • ***
  • Posts: 2583
  • Country: gb
Re: Want Oscillating motor - help.
« Reply #5 on: September 13, 2023, 01:06:44 pm »
Quick n dirty , DPDT relay driven by a simple 555 circuit,the relay changes the polarity of the motor
 
The following users thanked this post: amyk

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12864
Re: Want Oscillating motor - help.
« Reply #6 on: September 13, 2023, 01:39:55 pm »
Stepper drive and DC motor drive breakout boards are readily available, so that's the H-bridge sorted - you'll only need to provide logic level control signals.  Don't get any with a digital (SPI or I2C) control interface if you want to avoid coding.  In all cases get one with built-in current limiting, preferably set by changing a resistor or adjusting a trimpot.

A stepper controller normally requires a step and a direction signal to drive it.  Pulse the step signal fairly fast and toggle the direction signal every 20 seconds and the motor will do fairly close to what you want.  The *EASY* way of doing this is to use a MCU, and an Arduino Nano would be a good choice for a one-off.  However you could use a 74HC4060 configured for a 200Hz RC oscillator, taking the clock signal from its CTC pin to drive the controller step input, and the direction signal from its Q12 output which toggles high to low or visa versa every 4096 clock pulses.  As most common stepper motors are 200 steps/turn, that gives you 60 RPM, reversing every 20.48 turns.

Something similar for a DC motor could also be designed but the H-bridge control inputs are rarely so simple so without a MCU, you'd need quite a bit more logic to  generate complimentary non-overlapping (so the motor has time to coast to a halt on each direction change) 0.025 Hz squarewaves, and mix in a PWM signal to adjust the speed and you'd really need a gearmotor to get the low speeds required.  Also stalling a gearmotor is a bad idea - they tend to overheat and some can even destroy their gearbox, but a stepper will quite happily sit there stalled all day long and recover as soon as its shaft is free to turn.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11895
  • Country: us
Re: Want Oscillating motor - help.
« Reply #7 on: September 13, 2023, 01:44:46 pm »
Automotive windshield wiper motors cycle back and forth on a regular cadence automatically. Maybe try to re-purpose one of those?
 
The following users thanked this post: amyk

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8276
Re: Want Oscillating motor - help.
« Reply #8 on: September 14, 2023, 02:39:01 am »
Automotive windshield wiper motors cycle back and forth on a regular cadence automatically. Maybe try to re-purpose one of those?
Wipers oscillate mechanically.
 
The following users thanked this post: Richb77

Offline Richb77Topic starter

  • Contributor
  • Posts: 19
  • Country: de
Re: Want Oscillating motor - help.
« Reply #9 on: September 15, 2023, 08:48:42 am »
OK. I have done some research and learning....If I am doing this right I can only get the stepper to spin at about 20rpm max.

I worked this out as apparently (I read) a 16mhz processor can handle just about 4000 steps per second. at 1.8 degree steps that's 200 steps per 360 degrees.

4000/200 is 20rpm...Or as its 4k per second...Is it 20rps (revs per second)?

I need this to spin around 60rpm minimum (Its a washing cycle).

Now I suspect I am doing something wrong as behind my work desk is a mechanical linkage I designed on a stepper running up to 2Hz/120rpm, probably faster but its not desired for faster.

I am using an Arduino (ideally swapping it out for a nano) and a A4988 stepper driver at 9v (currently and possibly remain at 9v).

I am starting to think a DC motor with H bridge and 555 timer would be better for my needs?? Anyone know of an example being done before?

I should add...Its for a DIY watch parts cleaner.
« Last Edit: September 15, 2023, 08:52:44 am by Richb77 »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12864
Re: Want Oscillating motor - help.
« Reply #10 on: September 15, 2023, 10:48:20 am »
120 RPM on a 200 steps/turn motor is only 400 steps per second.  I've got a geared stepper (28BYJ-48) which is 2048 steps/turn on my bench right now, oscillating to and fro at 15 RPM driven by a 16MHz Arduino bit-banging the step pattern without a smart driver IC using the Arduino Stepper library.   On a more usual 200 steps/turn motor that would give over 150 RPM.   With a smart stepper driver IC that takes step and direction inputs the limit is invariably the max step rate of the motor not the step rate the Arduino can generate, as a PWM output can be used to generate the pulses with very little CPU involvement.

4000 steps/second is what you need to drive a 200 steps/turn motor at 1200 RPM which is about the top  end for this type of motor.  Its *NOT* a MCU limitation.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf