I've managed to control servos with an ultrasonic sensor
I want the servos to continuously turn, therefore I removed the potentiometer inside the servo and changed them to two resistors. Now the motors move non-stop, not listening to ultrasonic anymore without potentiometer.
**What could I do to modulate the servos? **
I am thinking to add something else: a capacitor that perhaps listen to ultrasonic. or a switch that turns on when ultrasonic is activated?
I'd really appreciate your advice as I am not very familiar with electronics
thanks a bunch
No surprise there
What exactly are you trying to do ?
Maybe posting your code and a schematic of the project would help , but read this first and follow the advice about posting code How to get the best out of this forum
Hi, I am trying to make the servos turn more than 180 degree
Can you not buy an appropriate servo? 300 degree ones are available.
Or, start again and use stepper motors.
A continuous rotation servo will certainly do that but you cannot control its angle of rotation because there is no feedback of its current position
is stepper not restricted?
300 is good but not good enough
it seems to me that the solution is to add a new opponent in the circuit which only connects when ultrasonic receives a signal
Restricted in what way ?
What is the servo required to move ?
restricted in steps.
I need the motors to move continuously for example 5 circles in a row, then stop
they don't need to step on a specific 145, or 99, just keep moving
so perhaps adding one more component would be good
a component that answers to ultrasonic signal, then break/connect the circuit
You cannot guarantee that a continuous rotation "servo" will stop when commanded to, but you may be lucky and be able to use
servo.write(90); or something close to it. It may be better to use
servo.writeMicroseconds(1500); as it allows finer control
If you don't care what angle the "servo" stops at then why use a servo in the first place ? How important is it that the "servo" stops at the same angle as it started ?
Perhaps if you explained exactly what you are trying to do it would help
@w_w please note. At the moment we are struggling to understand exactly what you want to achieve.
so we see here that the type of motor does not matter
it just need to be a motor that rotates
the motor needs to rotate when ultrasonic is triggered, for 5 circles, then stop
That's better. How fast must they rotate? How much torque must they produce?
the speed and torque provided by the motors are satisfying
(I've got some unmodified and some modified ones, none of them do the job right)
I have no idea what that means
This is hard work! How are they 'modified'? What do you mean when you say they don't do the job right? What exactly are they doing instead?
Just some background information: if you want the motors to rotate exactly five times, you have basically two ways of doing it. You can use stepper motors and send enough pulses for five rotations. Or you can use normal DC motors fitted with a position sensor (such as a flag and an optical sensor) so you can count five rotations and then stop the motors.
Or do a search for "sail winch servos". They're the only ones I know that will do more than 360 degrees and still have positional control. Some will only do about 3 turns but there are ones that can do more.
ok so say i've got a stepper motor, how do I send pulses for five rotations?
The motor will require a fixed number of steps to make a single rotation, so if you send a multiple of that number of steps you will get multiple rotations
As to how to do it, take a a look at the examples for the Stepper library in the IDE
Note that you will need a stepper driver to interface between the Arduino and the stepper motor and external power to power the stepper
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.