How to stop a 360-degree spinning modified servo

Hi gyus,

I have a TowerPro MG995 servo modified to 360-degree spin. In my project, I’m using the weight measured by a load cell to activate the servo, in a certain interval.

But, I’m having some problems to make the servo stop spinning. Regardless the condition, even setting the digital output to LOW, it can’t stop spinning.

I want it to spin while the variable valRead (weight read by the load cell) is below a value, and stop when the value is reached.

Following a part of my code:

  //SERVO
  if (valRead <= 150.00){
     digitalWrite(8, HIGH); //turn on the servo
  }

  else{
    digitalWrite(8, LOW); //turn off the servo by cutting off the PWM signal
  }

Any ideas?

Also, some way of keeping it on for a space of time (like, some seconds)? The delay(time_ms) function did not worked.

Thanks a lot!

I have a TowerPro MG995 servo modified to 360-degree spin.

Please describe these modifications, and also how you would normally expect to control the modified servo.

What happens if you unmodify it and get it back to original state?

Check to see if the servo works in the usual (unmodified) state, in case something didn't go according to plan during the modification - such as busted a wire or something during the mod.

If in doubt....then see if you can learn something from...

What is connected to pin 8? If that is the servo, why do you think that setting the pin HIGH or LOW is going to accomplish anything? The servo instance will undo your diddling with the pin in a few microseconds.

jremington:
Please describe these modifications, and also how you would normally expect to control the modified servo.

I already bought it modified to turn in 360 degrees. I think they just cut the plastic axis limiter.

Southpark:
What happens if you unmodify it and get it back to original state?

I really need this motor to turn in 360 degrees in my project. So, return it to 180 degree is not quite an option...

PaulS:
What is connected to pin 8? If that is the servo, why do you think that setting the pin HIGH or LOW is going to accomplish anything? The servo instance will undo your diddling with the pin in a few microseconds.

Yes, is the servo. I didn't know about this condition. Any ideas how to make the servo stop?

Thanks to all replies!

Any ideas how to make the servo stop?

Use the Servo library to control the servo. Servo.write() will control the speed and direction of your not-really-a-servo. Some value around 90 will make the servo hold still.