Maker Pro
Maker Pro

Physics Project Timer

Rocketwill

Jan 5, 2017
3
Joined
Jan 5, 2017
Messages
3
Hi, I have a physics project where I have to make a vehicle that stops before it hits a wall. It is a combination of speed and being able to stop before you hit the wall. If you are using electric motors, the limit is 6 volts, I have 2 3-volt motors, 4 AA batteries with a holder, and a switch, but I am unsure how I would make it stop before it hits the wall. I was thinking of having some kind of timer that keeps it running but I have no Idea how to do that or what I would have to buy. Thanks in advance.



[mod edited: 2 threads on the same topic have been merged]
 
Last edited by a moderator:

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
It seems to me that you would want to have a sensor on the vehicle that detects the presence of the wall and responds accordingly.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
It is a combination of speed and being able to stop before you hit the wall.
I take it you want to run the vehivle at max. speed as long as the wall is not near. Then, when the vehicle comes near the wall, you want to stop. I suggest you constantly measure the distance from vehicle to wall, e.g. using an ultrasonic sensor. You also need to know the speed of the vehicle. You don't need an extra sensor, speed can be computed from the change in distance vs. time.
From the current speed and the distance you can compute the time until the vehicle hits the wall.
Am I right in asssuming that you have no explicit brakes? You will then have to determine the time (and distance) it takes the vehicle to stop from the time power to the motor(s) is interrupted, possibly as a function of speed (speed may vary and you don't want the vehicle to run into the wall or stop to early).
From this information you can at any time calculate when it is time to interrupt power to the motor(s) depending on current speed and distance to the wall.

A comparatively simple setup could use an arduino to evaluate the ultrasinic sensor's signal, do all the computing necessary and control power to the motor(s). An example for the distance sensing part is here. You'll need a motor shield to control the motors in addition to the arduino and the sensor.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
if (distance_to_wall <= stopping_distance(current_speed))
{
brake();
}

1. You will want to experiment to find how far it takes to stop at any given speed.
2. You will have to know the speed.
3. You will have to know the distance to the wall.
4. When the distance to the wall equals the stopping distance you must apply the brakes.
5. "Braking" probably means shorting the motor terminals.

Bob
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
More advanced considerations.

Braking might cause skidding, which will increase the stopping distance. You would get minimum stopping distance by pulsing the brakes line anti-lock brakes on a car.

Bob
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
This project will probably take you a couple of weeks to plan test, and refine.

Perhaps you can go back in time?

I recommend you continually read the distance sensor and turn the motors off when at distance X from the wall.

Adjust X so the car stops before it hits the wall. Different surfaces may affect this, so test carefully.
 
Last edited:

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Ever notice that school projects are always due within a week or less? In my perfect world this post would read as follows .....
We have a class project that's due a month from now. I want to get the ball rolling early so I'm posting this question now.

Chris
 

Rocketwill

Jan 5, 2017
3
Joined
Jan 5, 2017
Messages
3
Ever notice that school projects are always due within a week or less? In my perfect world this post would read as follows .....

Chris
Well I have actually been planning this for weeks, but I wanted input on how to stop it electronically.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Well I have actually been planning this for weeks, but I wanted input on how to stop it electronically.

This should have been one of your first questions.

There are several ways to stop a motor:
  1. Have some form of brake (probably not possible for you -- and can skid)
  2. Remove power (motor will coast)
  3. short out the motor (great option, can't skid)
  4. reverse power to the motor (can skid, and can make you go backwards)
Arguable, method 3 is one of the best, but it's not directly supported by most simple motor controllers.

You might be able to place a shottky diode across the motor. When power is removed the motor will dynamically brake. If your controller can reverse the motor, be careful because the presence of the schottky diode will create a short in this instance.
 

Rocketwill

Jan 5, 2017
3
Joined
Jan 5, 2017
Messages
3
It is finished, but there is one big problem, It cannot move on its own!! Should I try to get motors with more torque? Mine have 15g.cm.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
More powerful motors, run from a higher voltage, ensuring you're switching them correctly, using smaller wheels, gearing down the motor...

All available options. As is reducing the weight of your device.
 
Top