Creating a motor to go back and forth - Page 1
Forum section: electronics / beginners

author: amatureEE
author_rank: Newbie
timestamp: April 02, 2024, 07:48:35 pm
content: Hello all I am trying to learn electronics.I have an idea of what I want to doI would like to make a dc motor spin back and forth, using a potentiometer i would like to increase how quickly it goes back and forth.Should I use 2 circuits and switch between the 2?I get lost. Thanks!

author: RJSV
author_rank: Super Contributor
timestamp: April 02, 2024, 08:25:14 pm
content: You could try the reversing function first, and then put in the speed control (potentiometer based).With a main power on-off switch, and a DPDT relay you would have the thing reversing at full speed.Then, to add in the potentiometer circuit, you need a transistor that varies the output current that is fed to your existing relay reverser.Keep in mind, the relay coil will need full voltage, so the portion that controls that, would be separate from the 'dimmable' voltage. Also, you will need a switch for relay position control (forward or reverse motor).A bit much, for maybe a beginner, without explicit schematic.(I would also have tried using my led dimming light, that uses a transistor and linear pot available at local stores.)

author: RJSV
author_rank: Super Contributor
timestamp: April 02, 2024, 08:36:51 pm
content: Actually a pretty complicated deal, now that I've re-read your question.You would need an oscillator, clocking at, say 2X per second, with that driving a polarity reversing circuit. That way the potentiometer would control the SPEED of the reversing. However, the speed of the motor itself would be full, according to what power supply it gets.

author: BeBuLamar
author_rank: Super Contributor
timestamp: April 02, 2024, 08:44:31 pm
content: What do you want to potentiometer do. It controls the speed of the motor or the rate of oscillating back and forth?

author: themadhippy
author_rank: Super Contributor
timestamp: April 02, 2024, 08:45:03 pm
content: when you say change the speed the motor goes back and forth do you mean the time it takes to change direction ( 555 and a change over relay) , change the speed of rotation of the motor with a fixed time between direction changes (plenty of dc motor speed control options to chose from) or both?

author: amatureEE
author_rank: Newbie
timestamp: April 02, 2024, 09:06:54 pm
content: thanks for your reply the pot changes the rate of back and forth

author: amatureEE
author_rank: Newbie
timestamp: April 02, 2024, 09:14:37 pm
content: yes you understand what I'm trying to...spin the motor 3600 RPM one way .........after 60 rotations or so............ spin motor 3600the other way. Any insight and useful chips would be great. I need to figure out as much as I can by myself

author: Mechatrommer
author_rank: Super Contributor
timestamp: April 02, 2024, 09:30:12 pm
content: i guess there should be analog solution for that, never built one. but i built mcu solution, my diy dc motor ESC, can be controlled by PWM/PPM RC receiver, and also from potentiometer, with mcu programming you can do what you want however weird it is, ymmv.

author: themadhippy
author_rank: Super Contributor
timestamp: April 02, 2024, 10:16:18 pm
content: chips with everything these days,the good ole 2 transistor flip flop and a dpdt relay to change the motor polarity might just be fast enough.If that's to old skool maybe a 555 and an H bridge

author: BILLPOD
author_rank: Frequent Contributor
timestamp: April 03, 2024, 12:58:07 pm
content: Good Morning AmatureEE, I know little about stepper motors, but this sounds like the perfect application for one, or maybe not

author: Roehrenonkel
author_rank: Frequent Contributor
timestamp: April 03, 2024, 01:15:03 pm
content: Hi amatureEE,windscreen wiper-motor?Good luck

author: Zero999
author_rank: Super Contributor
timestamp: April 03, 2024, 01:25:17 pm
content: Quote from: amatureEE on April 02, 2024, 09:14:37 pmThat's quite fast?Does that motor have a gearbox?How big is the motor?Is it driving a heavy load?If it's a small motor, under a few tens of watts and isn't driving anything heavy, I wouldn't use any fancy circuitry for changing the direction, just a gearbox, to reduce the rotation to 360 degrees and a DPDT toggle switch. The shaft on the output of the gear box will have a finger on it which will flip the switch to spin the motor in the opposite direction.Speed control can be implemented with a PWM circuit, which will operated independently of the direction control.

author: pcprogrammer
author_rank: Super Contributor
timestamp: April 03, 2024, 01:43:15 pm
content: Simple solution is to use an Arduino board (UNO or nano) and a motor driver (H bridge).The motor driver needs to be selected based on the motor supply voltage and needed current.There are many examples on how to do this all over the internet. Search for "Arduino driving a DC motor with H-bridge".For determining the number of rotations a hall effect switch can be used. Attach a magnet on the motor shaft and place the sensor such that it can read the changing magnetic field. The Arduino can read the number of pulses from the sensor and determine to change the direction of the motor based on it.Connect a potentiometer to the Arduino and use the analog input result to set the number of rotations.A more analog approach requires a bit more tinkering with getting the timing right, but can be fun of course. NE555 with a capacitor and the potentiometer to set the time interval, an H-bridge with a direction input connected to the timer and bob is your uncle.

author: xvr
author_rank: Frequent Contributor
timestamp: April 03, 2024, 02:24:37 pm
content: The simplest motor driving scheme:It will drain your battery very quickly and can be used as a heater, but it will still spin your motor (but not for long).

author: jpanhalt
author_rank: Super Contributor
timestamp: April 03, 2024, 02:39:06 pm
content: You say a fixed number of rotations. A self-reversing screw might easily do that:https://www.robotdigg.com/product/1717/spec/UlMwODA4LTI1TDEwMA==/Reciprocating-or-self-reversing-screw-with-block-continuous-linear?gad_source=1&gclid=EAIaIQobChMI1OWmgaGmhQMVvU9HAR3_IAZoEAQYAiABEgJfWfD_BwEWith a DC motor, speed could be controlled simply with PWM (pulse-width modulation). There are single chips to do that, even an NE555 can be configured that way. With a very small motor, just the variable resistance of a pot can control speed.If you want a variable number of rotations and speed, it will be a much more complicated servo system. A simple stepper motor may not be able to keep up with the speed you want.

author: BeBuLamar
author_rank: Super Contributor
timestamp: April 03, 2024, 04:28:44 pm
content: Quote from: BILLPOD on April 03, 2024, 12:58:07 pmI have all the parts on hand to do just that with stepper motor and programmable controller. But I guess not what the OP wanted. The one thing is that the OP wanted the motor to accelerate from 0 to 3600rpm then decelerate down to 0rpm within 60 turns. It's a bit rough on the motor.

author: pcprogrammer
author_rank: Super Contributor
timestamp: April 03, 2024, 06:24:18 pm
content: Stopping a motor by reversing it's direction when running 3600RPM is not so good for the motor nor the electronics when not properly protected.It is better to reduce the speed to zero, then switch direction and speed up again. Easily done with a microcontroller.

author: BeBuLamar
author_rank: Super Contributor
timestamp: April 03, 2024, 07:27:37 pm
content: Quote from: pcprogrammer on April 03, 2024, 06:24:18 pmAccelerate/decelerate from 0-3600rpm and vice versa in half a second is very fast.

author: Zero999
author_rank: Super Contributor
timestamp: April 04, 2024, 07:59:09 am
content: Quote from: BeBuLamar on April 03, 2024, 07:27:37 pmIt depends on the size of the motor and load. A small motor, will be able to do this with no problem. It will slow down quickly an the high winding resistance would limit the current surges to an acceptable level, especially if it's not running at the fully rated supply voltage. I'm thinking of the kind of motor designed for use in toys, rated at 6V, but run off 3V.In reality, I suspect the motor has a gearbox and the load is moving much more slowly. As is often the case in the beginners section, the question is incomplete.

author: jonovid
author_rank: Super Contributor
timestamp: April 04, 2024, 08:10:35 am
content: a 6 volt RC servomotor and the 555 control circuit. or 555 servo tester circuit.the pot changes the rate of back and forthall without a microcontroller.however if your planning a robot you will need a microcontroller.and many more servomotorslinkhttps://sound-au.com/articles/servos.htm