Maximize servo power and speed, and reduce logic power source noise

317 views
Skip to first unread message

Mark

unread,
Nov 3, 2017, 4:03:32 PM11/3/17
to Vorpal Robotics Forum
The default power harness uses a jumper between servo V+ and logic Vcc on the servo driver. This can lead to excessive noise on the power for the servo driver logic and puts the servo power nearer the lower limit.

I recommend powering the servo logic from the Nano 5v output and powering the servos at 6v.

For this mod, you will need one short F-F jumper and you will need to solder a header pin in the Vcc hole on the opposite side of the servo driver PCB from the existing connections. 

Once the pin is added,

Remove the existing jumper between Vcc and V+ on the servo driver
Move the 5v jumper from Nano to the BT radio so it goes from the Nano 5v pin to Vcc of the servo driver
Add new F-F jumper from the new Vcc pin on the servo driver to Vcc of the BT radio
Use a 6v BEC or switch to 6v output if your BEC is switchable

Result: Clean logic power and maximum torque and speed from your servos

Steve Pendergrast

unread,
Nov 3, 2017, 4:28:25 PM11/3/17
to Vorpal Robotics Forum
Hello,

That's an interesting mod and I would be curious to see how it works out.

In practice, I don't see a lot of jitter due to the noise issue you're worried about, but there is some jitter from time to time.

What worries me a little bit is, although yes you will get more torque, you will also get more heat in the servos. They are metal gear servos, true, but I do worry that running them at a higher voltage will shorten the lifespan a bit. Athough 6v is technically within the specs of the servo, I feel like they'll still last longer running a little cool.

I might be worrying too much though, so this is a worthy experiment!

-Steve P.

Dave Leiner

unread,
Nov 4, 2017, 2:52:21 PM11/4/17
to Vorpal Robotics Forum
I've noticed the rangefinder sensor readings, although generally working, vary all over the place while the hexapod is moving. I wonder if this could be due to servo motor noise?

Steve Pendergrast

unread,
Nov 4, 2017, 8:13:42 PM11/4/17
to Vorpal Robotics Forum
Most of my tests take readings when the robot is fairly still, although I did write an obstacle avoidance program that takes readings during a normal walking gait. the program seems to work but I must admit I did not monitor the readings carefully.

For me, when the robot is standing still the readings are pretty rock solid and I was actually surprised at how accurate it was (it seems like + or - just one or two centimeters).

I don't think servo noise would do it, this operates at sound frequences of 40 kHz which is way higher pitch sound than the servos are likely to make. I guess it's possible there are resonances at lower frequencies but it seems unlikely to me.  A way to test it would be to run a second robot nearby the first, which stands still and has the sensor.  I can try that monday, most of my robots are in my factory space now.

Another way to test would be write a scratch program that waves the middle legs around and therefore makes noise, but yet they are behind the sensor so would not cause a reflection of the sound.

I wonder if the sensor is not mounted high enough and it's seeing the legs when they are a the top of their step? The sound comes out in a cone shape and does spread. I designed the bracket at the height I thought would be high enough to clear the legs but I must admit I never did super careful tests.  If this were true you would expect more problems in "high step" mode than normal mode, since the legs would interfere more then higher the knees go.

Dave Leiner

unread,
Nov 5, 2017, 12:00:55 AM11/5/17
to Vorpal Robotics Forum
Actually, I was thinking electrical, not acoustic noise. I thought driving the servo from Vcc instead of Vin may be interfering with the rangefinder. However, your experiment was a good idea. I put the robot on the stand and tried various movements and standing still. The sensor readings seemed equally stable in either case although as I moved an object I would sometimes get readings of 1000 momentarily. The 1000 readings seem to happen mostly in Scamper mode, especially when the object is moving away from the sensor.

When actually scampering on the floor and approaching objects, I often get readings much less than they should be but, based on the above tests, I don't think electrical noise is the issue. More tests needed. For now, I take a second reading before acting on the proximity and that helps a lot.

Steve Pendergrast

unread,
Nov 6, 2017, 11:16:38 AM11/6/17
to Vorpal Robotics Forum
The reading of 1000 is a special value that means "I never heard the echo bounce back."  It's just giving you a large value in this case, much larger than the range of the sensor. This is also the reading you will get back if no sensor is physically connected to the robot.

The range of the sensor is about 2 to 200 centimeters so if it sees something you'll usually get a number between 2 and 200 (minimum sensing distance is 2cm according to manufacturer and that does seem accurate).  My code waits for the echo until a little past the amount of time that it would take sound to detect an object 200 cm away, so it is possible you might get 250 if you're in an ideal situation for the sound waves to detect.

If an object is receding, it presents less and less of a target for the sound to bounce off. A small object or a very soft object like a pillow may not reflect enough sound to get a good reading. The shape of the object also impacts how much sound bounces off in the direction of the robot, and this will impact how far away the object can be detected reliably.

The most accurate detection therefore will be large, flat, hard objects oriented such that the sound will all come back toward the robot (i.e. parallel to the robot with respect to the sensor).  A wall is ideal and you should find you're getting very accurate readings from things like walls.

Smaller objects are definitely detectable, a shoe box does not present a problem, neither does a 2x4 piece of wood standing up longways.  I've even had mine walking around the kitchen and most of the time it will even see a fairly thin chair leg (1 inch diameter wooden leg) when it gets within a foot or two.

If you're in a borderline situation, sometimes the object might be detected and sometimes not, this would cause the 1000 readings to intersperse with "real" readings.

I'm less sure about the cause of the "false close" type readings though.

Dave Leiner

unread,
Nov 6, 2017, 11:21:32 AM11/6/17
to Vorpal Robotics Forum
Makes sense. Thanks for the good explanation.

Mark

unread,
Nov 9, 2017, 12:48:05 PM11/9/17
to Vorpal Robotics Forum
One thing I forgot to mention in the original post is that you will need to use a 6A uBEC if you are running your servos at >5V. The 3A uBEC will over heat and shutdown. Some protected 18650s will also not be able to supply enough current due to current limiting of the protection circuit.

In the RC world, receiver pack voltages run from 4.8V (nominal NiCd voltage) to ~6.4V (new Alkaline batts)

At 5v, SM90 servos draw ~250ma max
At 6v they can draw 400+ma during large fast moves under load

Yes, Steve, the servos will warm up a bit more and their service life may decrease a bit.

Steve Pendergrast

unread,
Nov 10, 2017, 11:24:43 AM11/10/17
to Vorpal Robotics Forum
Also, be a bit careful, we're using the Servo controller as a power distribution mechanism for sensors and the beeper ... so if you change that to 6v you'd potentially need to also keep another 5V bec in the circuit to power sensors and the beeper.  

Geek talk follows:

I don't think we have enough power left coming out of the +5V nano regulated output to reliably drive the beeper and potentially multiple other sensors. The Nano can output about 150 mA from its regulated +5v (I used a magnifying glass to read off the part number on the regulator on the nano and looked up the manufacturer spec), the HC05 consumes up to 50 mA while pairing but then drops to like 20 or 30.  An HC-SR04 rangefinder consumes 15 mA when operating, 2mA quiescent. The beeper, truthfully I'm not even sure but I'm gonna guess 50 to 75 mA.  Some sensors might consume up to 50 or more. the CMUCAM looks like 100+ to me, I tried to drive it from the ICSP header and it caused my nano to brown out unless i disconnected the HC05. This is actually one reason I've delayed official launch of CMUCAM, I need to right up a custom header that takes power from the BEC yet connects the rest of the lines to the ICSP header.

So it's getting kind of tight on the power budget coming off the nano if you later connect some sensors, meaning you might need both a 6V and 5V bec if you wanted to do that kind of fun stuff.  Do they make a single BEC that provides both 5 and 6 output lines at the same time?

The other option is use a 5/6 switchable bec and remember to turn it down to 5v if you plan on attaching sensors.  But if you forget ... you'll fry the sensors.
Reply all
Reply to author
Forward
0 new messages