Society of Robots - Robot Forum

Software => Software => Topic started by: Resilient on February 22, 2009, 09:40:50 PM

Title: How to stop a sero with an Axon?
Post by: Resilient on February 22, 2009, 09:40:50 PM
I have two servos set up for continuous rotation and there is no integer that gets them to fully stop.

So is there a way to simply "turn off" a servo?

Like I want it to drive some where, then stop for awhile, then start again.  Problem is, I cant get it to stop by just using the servo() function.

Thanks
Justin
Title: Re: How to stop a sero with an Axon?
Post by: Razor Concepts on February 22, 2009, 09:48:10 PM
You can just not do anything - dont call the servo function at all when you want it to stop.
Title: Re: How to stop a sero with an Axon?
Post by: Resilient on February 22, 2009, 09:51:06 PM
Excuse me while I go hang my head in shame over in the corner here...

I need to sleep more or something.   :o
Title: Re: How to stop a sero with an Axon?
Post by: cosminprund on February 23, 2009, 01:17:47 AM
What Razor Concepts says probably works for all sane servos. Unfortunately my servos are not sane and they remamber the last command I issued, for ever. If you're blessed with one of those insane servos then not sending the servo command will not make them stop: you'll need to send the "center servo" command first (ie: a 1.5 ms pulse)!
Title: Re: How to stop a sero with an Axon?
Post by: HyperNerd on February 23, 2009, 01:51:24 AM
Add a mosfet between a output pin on the Axon and the power pin on the servo, then just turn it off

 -HyperNerd
Title: Re: How to stop a sero with an Axon?
Post by: Jdog on February 24, 2009, 06:09:01 PM
What Razor Concepts says probably works for all sane servos. Unfortunately my servos are not sane and they remamber the last command I issued, for ever. If you're blessed with one of those insane servos then not sending the servo command will not make them stop: you'll need to send the "center servo" command first (ie: a 1.5 ms pulse)!
The only problem with that is usually, the servo is not centered perfectly, and then it's almost impossible to center like that. Unfortunately I have an insane servo and I don't know how to stop it, because I don't want to use another output to stop it.
Title: Re: How to stop a sero with an Axon?
Post by: pomprocker on February 24, 2009, 06:12:16 PM
You can either buy another servo and try modifying it again, or buy them already modified for continuous rotation. Remember to KISS and adding all sorts of transistors or mosfets or whatever would not be the best way to go.
Title: Re: How to stop a sero with an Axon?
Post by: Webbot on February 24, 2009, 06:27:09 PM
You could kinda hack it in software. If a value of 'x' makes it turn one way and 'x+1' makes it turn the other way - then you can't center as you would need a value of 'x and a bit'. So you could always alternate between 'x' and 'x+1' - which will make the servos twitch back'n'forth but if its for the drive wheels then they probably dont stay stationary for long.

Of course if the wheels are always stationary - then remove all batteries, microcontroller etc. Voila. Works a treat!   ;)
Title: Re: How to stop a sero with an Axon?
Post by: cosminprund on February 25, 2009, 02:40:15 AM
The only problem with that is usually, the servo is not centered perfectly, and then it's almost impossible to center like that. Unfortunately I have an insane servo and I don't know how to stop it, because I don't want to use another output to stop it.

Open up the servo and place one of those 25-turn tiny potentiometers inside! That will fix your problem.
Title: Re: How to stop a sero with an Axon?
Post by: Admin on February 25, 2009, 10:24:28 AM
Add a mosfet between a output pin on the Axon and the power pin on the servo, then just turn it off
I agree with HyperNerd. As long as a servo has power, it will waste it. A single rogue signal will cause the servo to jitter. By not sending a signal will mostly stop it from doing stuff, but to actually turn it off you need a mosfet to cut power.

If you care about power efficiency, the mosfet is the way to go. Otherwise, just send the signal pin low.