Reversing a dc motor direction when object is detected

Thread Starter

Chiho9

Joined Oct 18, 2020
21
Hi everyone , Ir proximity sensors detects object nearby. I ones used it to drive a DC motor.
So here's my problem, I would like to drive my DC motor and reduce the speed with a potentiometer and would also like to control the directions (back and forth).
Most back and forth movements are controlled with a h-bridge but since I want mine to be automated, I would like to reverse the motor movement using a sensor most probably (ir proximity sensors) when an object is detected nearby. Any reference materials or answers would be of help.
A similar question has been asked before but there was no satisfying answer
 

MaxHeadRoom

Joined Jul 18, 2013
28,686
A little more info needed such as motor load, mechanism, speed etc, IOW, is the set-up capable of instant reverse?
Or does it need a decel time before reverse?
Max.
 

Dodgydave

Joined Jun 22, 2012
11,303
You're still going to need an H bridge for direction , speed control is just increase and decrease of voltage, ideally by pwm.
 

Thread Starter

Chiho9

Joined Oct 18, 2020
21
Thanks for replying quickly, so the motor should run at least 30sec before it reverses. No major load is required. I just need to make sure it reverses at the right time
 

MaxHeadRoom

Joined Jul 18, 2013
28,686
Full bridge.
What are the details of the motor?
There are several modular IC's out there, some already board mounted available to make it easy.
Max.
 

MisterBill2

Joined Jan 23, 2018
18,504
Max is right, a lot more information is required. most motors will not reverse instantly, and since we have no mention of the voltage or the current it is not possible to say what sort of H-bridge driver will be best. And since you want "to control speed with a potentiometer" it may be that Pulse Width Modulation, (PWM) would be a good choice.
"Proximity sensors" is a rather broad category and the logic to have such a sensor provide a motor reversal is not trivial.
So we need a rather more complete description to get beyond guesses and recomendations of an H bridge of some kind. I am thinking that probably right answers would be the most useful kind.
 

dendad

Joined Feb 20, 2016
4,476
You REALLY need to supply more info about your application.
Even without motor power specs, what are you actiually trying to do with this motor setup?

Just some of the questions that spring to mind...
Once started, does the motor just need to reverse just once then run forever?
Will the motor cycle need to run once then stop?
Do you need the motor to run back and forward continuously between limits?
How accurate will the motor position need to be?
And so on.....
 

Thread Starter

Chiho9

Joined Oct 18, 2020
21
Thanks, lately I think I have not provided enough information.
Here's actually what i want to achieve.
I have a board 2metre long with two solid ends. The motor would have to run across the board in 3s with at least 1000-2000 rpm. Once the obstacles at the end is detected, the motor will have to reverse in the opposite direction and continue this cycle till power is off. But since that would be difficult to achieve, the motor will have to collide with the obstacle till 5 sec then reverse in the opposite direction and after another 5s the motor will reverse again. It will continued the cycle till power is off.
So how possible is it to achieve this
 

MisterBill2

Joined Jan 23, 2018
18,504
Does the power source and controls package need to travel with the motor? Or could they be separate and the motor package have a cord connected to the power and controls package. Two meters in 3 seconds is fairly fast, about 2 feet per second, which will be a fair collision, so there will be some impact energy, and the more mass in the moving package the more energy. I built a smaller version of something like that using a linear induction motor, as a test fixture for crash sensors, quite a few years ago. It was very repeatable, which was the whole purpose, to generate a controlled repeatable impact for product development testing. But the moving mass was not much, nor was it subject to impact damage or fatigue.
 

Thread Starter

Chiho9

Joined Oct 18, 2020
21
Does the power source and controls package need to travel with the motor? Or could they be separate and the motor package have a cord connected to the power and controls package. Two meters in 3 seconds is fairly fast, about 2 feet per second, which will be a fair collision, so there will be some impact energy, and the more mass in the moving package the more energy. I built a smaller version of something like that using a linear induction motor, as a test fixture for crash sensors, quite a few years ago. It was very repeatable, which was the whole purpose, to generate a controlled repeatable impact for product development testing. But the moving mass was not much, nor was it subject to impact damage or fatigue.
Yes the power source and control packages need to travel with the motor.
Can you reference me to what you built. Maybe schematics and diagrams
 

MisterBill2

Joined Jan 23, 2018
18,504
The linear induction motor was a commercial off-the-shelf item as was the controller, which was programmed from a computer. I don't even recall the brand name, other than it was one of the major brands that made a lot of linear induction motor packages. For a hobby application it would be way too expensive, I am sure.
AND only a very small part of the motor moved, the controller was connected to the fixed part of the motor by a cable. So the whole thing was indeed quite different. There was not a diagram because it was a packaged system, all I had to do was attach a power cord to the controller box and plug in the motor.

Can you describe the application in more detail, perhaps another participant on this forum will have a better solution.
 
Top