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
HINT
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
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
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.
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