Offline
Newbie
Karma: 0
Posts: 5
|
 |
« on: December 02, 2012, 06:43:52 am » |
Hello everyone! I'm a second year mechatronics student, and this is my first Arduino project. I'm building a quadruped walker that can either be RC controlled or autonomous (basic collision avoidance). I have built a prototype body for testing the program, and this is the result: Before testing the servos are manually set in "sleep" position. This is what the program is supposed to do: void loop() { reset_pos();//set all the legs in their normal position delay(1000); servoA1.write(posA1+45); delay(1000); servoA1.write(posA1-45); delay(1000); }
The problem: Servos start twitching when there are multiple servos operating. I use external Li-Po battery and the voltage is regulated to 5V. The wiring is a mess right now but getting the program work is a priority right now. Parts: - 12x EMAX ES3154 17g digital servos with metal gears and bearing - Arduino Leonardo - Firefox 7.4V 1600mAh 20C lipo battery (will be replaced by Dualsky 7.4V 1750mAh 45C lipo battery) - 3mm plywood for prototyping
|
|
|
|
« Last Edit: December 02, 2012, 06:47:14 am by Treg »
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25506
Solder is electric glue
|
 |
« Reply #1 on: December 02, 2012, 06:51:53 am » |
Servos start twitching when there are multiple servos operating That code uses delays, using delays is not a good way when you have multiple things to do. See the blink without delay example in arduino IDE for how to remove delays.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Tesla Member
Karma: 50
Posts: 6549
Arduino rocks
|
 |
« Reply #2 on: December 02, 2012, 12:09:34 pm » |
The problem: Servos start twitching when there are multiple servos operating. I use external Li-Po battery and the voltage is regulated to 5V. The wiring is a mess right now but getting the program work is a priority right now.
Sounds like a possible low power issue. The power to the servos should be closer to 6v than 5v for best performance. How are you regulating the voltage from the batterys?
|
|
|
|
|
Logged
|
|
|
|
|
Queens, New York
Offline
Edison Member
Karma: 29
Posts: 1571
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #3 on: December 02, 2012, 01:12:29 pm » |
@zoomkat How are you regulating the voltage from the batterys? I would assume a 7805 regulator. @Treg That code uses delays, using delays is not a good way when you have multiple things to do. See the blink without delay example in arduino IDE for how to remove delays. I agree with Mike, you should look into that example, it will definitely help you, and with any other projects.
|
|
|
|
|
Logged
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W, Gameduino
Arduino Tutorials, coming soon.
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 5
|
 |
« Reply #4 on: December 04, 2012, 11:00:24 am » |
Ok, I tried to use 4x AA batteries to drive three servos at the same time and it worked! The problem was low signal voltage I guess. The servo specs said they were for 4.8-6V, and the regulator gave steady 4.97V that I used to power all the servos. The funny thing is that I could run three Futaba S3003 servos @5V without problems. After short googling: Plastic gears or metal gears? When you shop for a servo, its gear is one of the first things you should consider. Servo gears are typically made of molded plastic or machined metal (brass or aluminum alloy). As you’d expect, plastic gears are much cheaper to produce than metal gears, but they aren’t as strong. Certain manufacturers offer a servo in both plastic and metal versions, and the plastic one almost always has a lower torque rating. But there’s one area in which a plastic gear excels—low radio frequency (RF) noise. When metal parts move against one another, they generate RF noise, and an electrically “noisy” servo can cause glitching. This is why many top drivers use plastic-gear throttle servos in their vehicles. Looks like metal gears have their downsides. Do I need to wrap the whole thing in tinfoil? 
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15316
Measurement changes behavior
|
 |
« Reply #5 on: December 04, 2012, 11:18:14 am » |
Ok, I tried to use 4x AA batteries to drive three servos at the same time and it worked! The problem was low signal voltage I guess. The servo specs said they were for 4.8-6V, and the regulator gave steady 4.97V that I used to power all the servos. The funny thing is that I could run three Futaba S3003 servos @5V without problems. It's not about the voltage directly, but rather the current demand that the servos are drawing. Servo companies do a poor job of listing the maximum current they require and each brand and model of servo will consume a different amount and of course the mechanical load placed on the servos will drastically increase their current consumption. If you try and draw too much current from a voltage regulator it's output voltage will sag or even shutoff. So yes most hobby servos will work just fine with a steady 4.8 to 6vdc DC voltage, however the source of that voltage must be able to handle the peak current requirements of all the servos it is trying to power. I usually recommend that the DC power source be able to handle at least 1 amp per servo attached if you want to avoid voltage dips, board resets and other annoying problems that servos can bring to the party. Lefty
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 5
|
 |
« Reply #6 on: December 04, 2012, 01:18:22 pm » |
Ok, I tried to use 4x AA batteries to drive three servos at the same time and it worked! The problem was low signal voltage I guess. The servo specs said they were for 4.8-6V, and the regulator gave steady 4.97V that I used to power all the servos. The funny thing is that I could run three Futaba S3003 servos @5V without problems. It's not about the voltage directly, but rather the current demand that the servos are drawing. Servo companies do a poor job of listing the maximum current they require and each brand and model of servo will consume a different amount and of course the mechanical load placed on the servos will drastically increase their current consumption. If you try and draw too much current from a voltage regulator it's output voltage will sag or even shutoff. So yes most hobby servos will work just fine with a steady 4.8 to 6vdc DC voltage, however the source of that voltage must be able to handle the peak current requirements of all the servos it is trying to power. I usually recommend that the DC power source be able to handle at least 1 amp per servo attached if you want to avoid voltage dips, board resets and other annoying problems that servos can bring to the party. Lefty True. The regulator ( 7800 series) was not the component I needed. I think I need invest in 10-15A (or two 5-8A) battery elimination circuit to power all the servos. For example: http://www.dualsky.com/downloads/VR_Pro_Instructions_Manual_cn_en.pdf
|
|
|
|
« Last Edit: December 04, 2012, 01:41:48 pm by Treg »
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 45
|
 |
« Reply #7 on: December 04, 2012, 05:37:25 pm » |
If you go with a R/C hobby BEC add a small 5 volt fan on that heatsink, they are designed to to have fairly constant airflow over the heatsink, think heli's and airplanes fast moving cars.
Lastly if you plan on using a dedicated servo controller later make sure the output wires will handle your maximum amperage. If not you will have to change them out. I use a Castle Creations 20 amp for my bot, and it is nice and easy to switch wires, I am not sure why they don't come with 20 amp capable to start with.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Tesla Member
Karma: 50
Posts: 6549
Arduino rocks
|
 |
« Reply #8 on: December 04, 2012, 06:24:20 pm » |
You can get inexpensive UBEC voltage converters on ebay. You can add a small diode on the ground leg of the 7805 chip like below to increase the output voltage to 5.7v for better servo performance. 
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 5
|
 |
« Reply #9 on: December 05, 2012, 08:53:46 am » |
If you go with a R/C hobby BEC add a small 5 volt fan on that heatsink, they are designed to to have fairly constant airflow over the heatsink, think heli's and airplanes fast moving cars.
Lastly if you plan on using a dedicated servo controller later make sure the output wires will handle your maximum amperage. If not you will have to change them out. I use a Castle Creations 20 amp for my bot, and it is nice and easy to switch wires, I am not sure why they don't come with 20 amp capable to start with.
The BEC i linked have option to put a fan on top of it. I'm wondering what are the benefits of using a dedicated servo controller. I assume they are used to smooth down the movements by using so called "ramps". I could buy the same BEC you got, and I'm sure I need more Amps if I'm going to expand the project later on. You can get inexpensive UBEC voltage converters on ebay. You can add a small diode on the ground leg of the 7805 chip like below to increase the output voltage to 5.7v for better servo performance.  Thanks for the tip. I heard UBECs cause RF noise am I correct?
|
|
|
|
« Last Edit: December 05, 2012, 09:00:00 am by Treg »
|
Logged
|
|
|
|
|
|