go_away

Author Topic: Arduino questions  (Read 2353 times)

0 Members and 1 Guest are viewing this topic.

Offline futurrobotechTopic starter

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Arduino questions
« on: December 25, 2010, 07:06:33 PM »
okay so I have a few things that I'm not 100% sure about and im try to avoid frying my board. If I have servos could I hook them into the arduino by running a wire from the 5V out and a ground. Also when it comes to modifying servos is there any alternative to super-gluing the pot?

Offline Graynomad

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 7
    • Skype - grayn0mad
Re: Arduino questions
« Reply #1 on: December 25, 2010, 07:17:00 PM »
You need the GND connection but servos really should be driven from their own PSU, they will draw too much current for the little regulator on the Arduino and also can be noisy which may cause problems.
« Last Edit: December 25, 2010, 07:19:40 PM by Graynomad »
Scattered showers my arse -- Noah, 2348BC.

Offline rbtying

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Re: Arduino questions
« Reply #2 on: December 25, 2010, 07:21:29 PM »
You can hook at most ONE (1) servo into the 5v output of the Arduino, and even that will draw a little too much current.  Use a high-current switching regulator or unregulated 4.8v-6v for the servos.  Like Graynomad said, you will need common grounds.

You can use two resistors with equal resistance to make a voltage divider, instead of gluing the pot, but it's not really any easier, or less permanent.

Offline futurrobotechTopic starter

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: Arduino questions
« Reply #3 on: December 25, 2010, 07:35:53 PM »
okay thats no problem I have a 5 V regulator.. And I'll probably use a 9V battery.. I might just super glue the pot then.. I was trying to find someway with out getting super gluee.... (I'm a little accident prone lol)

Offline tipipliou

  • Full Member
  • ***
  • Posts: 48
  • Helpful? 0
Re: Arduino questions
« Reply #4 on: December 28, 2010, 09:19:45 AM »
I might just super glue the pot then.. I was trying to find someway with out getting super gluee.... (I'm a little accident prone lol)
it's by far the best way to do it ,don't worry,you can  do it easily  ;D

Offline VegaObscura

  • Robot Overlord
  • ****
  • Posts: 153
  • Helpful? 6
Re: Arduino questions
« Reply #5 on: December 28, 2010, 01:50:44 PM »
Just remember, that glue will wear off your fingers in just a couple of days and you'll be able to move them again!

Offline futurrobotechTopic starter

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: Arduino questions
« Reply #6 on: December 30, 2010, 08:28:25 PM »
I gave in and I've got super glue.. not all i gotta do is get my arduino software working so i can 0 the servos  ::)

Offline futurrobotechTopic starter

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: Arduino questions
« Reply #7 on: December 31, 2010, 02:36:52 AM »
okay guys im having a problem getting the servos to work with the arduino.... I have a 5V regulator and where the servos are the output is 4.4 Vs.. I plug it into the arduino and plug the servos up and try to use the demo code but the servo still does not want to turn or anything.. I am able to do this with one power supply correct? I'm just not sure whats going on, I've never had this much of a problem with electronics before
 

Offline Graynomad

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 7
    • Skype - grayn0mad
Re: Arduino questions
« Reply #8 on: December 31, 2010, 02:53:38 AM »
Quote
I have a 5V regulator
Is this seperate to the Arduino PSU? It's generally accepted that servos should not be driven from the same 5v as the Arduino. They draw too much power and can be noisy.

Quote
and where the servos are the output is 4.4 Vs
That's a large drop, especially if the servos aren't running.

Quote
I am able to do this with one power supply correct?
Not necessarily, the Arduino will need at least 7v but that's too high for the servos, I think you need to power them seperately.
Scattered showers my arse -- Noah, 2348BC.

Offline futurrobotechTopic starter

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: Arduino questions
« Reply #9 on: December 31, 2010, 01:02:57 PM »
Quote
I have a 5V regulator
Is this seperate to the Arduino PSU? It's generally accepted that servos should not be driven from the same 5v as the Arduino. They draw too much power and can be noisy.

Quote
and where the servos are the output is 4.4 Vs
That's a large drop, especially if the servos aren't running.

Quote
I am able to do this with one power supply correct?
Not necessarily, the Arduino will need at least 7v but that's too high for the servos, I think you need to power them seperately.

I have built the power supply and connected it seperate from the arduino to another 9V battery and I have connected the grounds together. But the program isnt running. I'm stating to think possible there isnt enough voltage coming from the regulator

Offline futurrobotechTopic starter

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: Arduino questions
« Reply #10 on: December 31, 2010, 02:10:29 PM »
okay.. so I hooked up the arduino to an LED to see if it worked.. and yes it did coming from the PWN with the same code running, So this means it must be my power supply thats not sufficient.. Should I just give up and get a battery holder for AAs or Ds?

Offline rbtying

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Re: Arduino questions
« Reply #11 on: December 31, 2010, 05:14:07 PM »
9V batteries can't provide enough current to run a servo, so, yes, you should be using AA or better.  D cells aren't necessary, four or five AA's should be good (four if alkaline, five if nimh or nicd, since they're only 1.2v/cell)

Offline VegaObscura

  • Robot Overlord
  • ****
  • Posts: 153
  • Helpful? 6
Re: Arduino questions
« Reply #12 on: December 31, 2010, 11:23:46 PM »
Four nimh works fine for my servos.  Five would naturally work better, but it can be very hard to find battery holders for 5 AAs.

Offline futurrobotechTopic starter

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: Arduino questions
« Reply #13 on: January 01, 2011, 12:52:00 AM »
you could get a four battery holder then a one.. and put them in series,, but im probably gonna go with four alkaline for now... lithiums a little bit out of my budget until like march.. I jacked my old RCX(lego) battery holder but I dont have a soldering iron so using it would be difficult

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Arduino questions
« Reply #14 on: January 01, 2011, 02:47:00 AM »
Hi,

[...] but I dont have a soldering iron so using it would be difficult
How do you get anything at all done then?
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Arduino questions
« Reply #15 on: January 01, 2011, 03:10:55 AM »
Hi,

Just remember, that glue will wear off your fingers in just a couple of days and you'll be able to move them again!
Back in 1977 when I bought my first tube of Cyanoacrylate glue on a Friday after work, where a friend of me had bought a load of beer and was planning for a fun night, I just had to try this new wonder glue.

I didn't have any tools available within reach, so I bit down on the end and twisted it off with my right thumb and index finger. The squeeze by holding the rest of the tube made sure my two fingers got about a third of the content and suddenly they were bonded with the tip of the tube in between somewhere.

After trying the most obvious measures (water/soap, scalpel etc.) without luck, we rushed to the paint store that sold me the glue, just before closing time, but they knew nada about how to dissolve it or what it contained (it was a fairly new product back then).
No WWW to the rescue and the chemical labs we called were either closed or knew nothing helpful.

Luckily, the local (night open) pharmacy came through and told us to swing by. They had an arsenal of solvents and other poisonous looking flasks lined up when we arrived and after several disappointing experiments, chloroform finally got me off (and they didn't charge me at all - nice folks).

Needless to say that it kinda ruined the fun for that night (I had scarred my fingertips badly with the scalpel trying to break free, so I could either hold a beer or a girl, but not both ;)) and it gave me a healthy respect for Super Glue in the process.

Later, I have found MEK to dissolve Cyanoacrylate as well, but that is a real Brain degreaser and should be avoided if possible. Don't fool around with Super Glue - it's really no fun.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Graynomad

  • Full Member
  • ***
  • Posts: 79
  • Helpful? 7
    • Skype - grayn0mad
Re: Arduino questions
« Reply #16 on: January 01, 2011, 03:19:39 AM »
Quote
either hold a beer or a girl, but not both

Tough decision to make, but you need to think outside the box, get the girl to hold your beer.

_____
Rob


Scattered showers my arse -- Noah, 2348BC.

Offline futurrobotechTopic starter

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: Arduino questions
« Reply #17 on: January 01, 2011, 03:40:44 AM »
I'm using a breadboard.. And it really is a mess, but I'm gonna use it for now cause I've been wanting to do this since i was like 10 and im 15 now so its been a long time coming. I've had a pretty good background in electronics, I've just never had to build something and somewhat design it.. And I got the arduino for free.. So thats why I'm using the arduino.. I was originally planning to buy the roboduino
« Last Edit: January 01, 2011, 03:43:29 AM by futurrobotech »

Offline futurrobotechTopic starter

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: Arduino questions
« Reply #18 on: January 01, 2011, 04:34:40 PM »
I have no idea with what can be wrong.. I've got 6.05Vs coming off of my AA battery pack.. The grounds of the arduino and this battery pack going to the servos connect.. I hook it up and nothing still happens.. what can I do to provide you guys something to be able figure out what the problem is a little easier thanks

Offline VegaObscura

  • Robot Overlord
  • ****
  • Posts: 153
  • Helpful? 6
Re: Arduino questions
« Reply #19 on: January 01, 2011, 04:43:57 PM »
What is the voltage on the + and gnd DIRECTLY on the pins where you're plugging in your servo?  That is to say, pull out the little black connector on the end of your servo wire, and connect your meter on the 2 non-signal pins there.

If the voltage there is good, and you tested with an LED to see if your MCU is giving a PWM signal, then there are only 2 possible explanations left.

1.Your MCU is not putting out the correct frequency.
2.Your servos are faulty.

Offline futurrobotechTopic starter

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: Arduino questions
« Reply #20 on: January 01, 2011, 04:48:31 PM »
The same as whats coming from the battery pack into the bus.. 6.05 Vs

Offline VegaObscura

  • Robot Overlord
  • ****
  • Posts: 153
  • Helpful? 6
Re: Arduino questions
« Reply #21 on: January 01, 2011, 05:05:38 PM »
Are you 100% sure that the code you loaded onto the arduino is the code for centering servos?

If you had an oscope or your multimeter had a function to test frequency, you could determine if your arduino is putting out the correct frequency or not.  But seeing as you don't have a soldering iron, I'm willing to bet you don't have an oscope or a multimeter with a frequency function.

Did you ever connect your servos straight to 9V, without a regulator between?  This can possibly damage servos.

Offline futurrobotechTopic starter

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: Arduino questions
« Reply #22 on: January 01, 2011, 05:11:05 PM »
No I always had the regulator in between them.. I could probably take it to school and measure it with an oscope monday.. The code I have now is the an example code to make it sweep... I'm just try to get motion out of the servos for now

Offline hopslink

  • Robot Overlord
  • ****
  • Posts: 202
  • Helpful? 14
Re: Arduino questions
« Reply #23 on: January 01, 2011, 06:19:28 PM »
If you are using the Sweep demo code from the Arduino IDE then the timings should be ok (unless you have the wrong board type selected under Tools > Board in the menu).

Check and recheck the connection from the arduino to the signal pin of the servo. Is it plugged to the correct arduino pin? Solderless breadboard connections can be finicky - do a continuity test from the signal pin of the plug for your servo connector back to the end of the wire you connect to the arduino. Also test there is no short between signal and either of the servo power lines.

Offline futurrobotechTopic starter

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: Arduino questions
« Reply #24 on: January 02, 2011, 12:49:34 AM »
is there perhaps any way to test the servos circuit??

Offline hopslink

  • Robot Overlord
  • ****
  • Posts: 202
  • Helpful? 14
Re: Arduino questions
« Reply #25 on: January 02, 2011, 02:44:38 AM »
If you have another servo then try swapping them out...

Your problem is more likely to be a connection/wiring issue than a dodgy servo. Have you performed the tests suggested above?

Offline futurrobotechTopic starter

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: Arduino questions
« Reply #26 on: January 02, 2011, 04:22:14 AM »
yes... Im wondering if maybe my problem is coming from where the connection is made to the servo cable... I have wires sticking in it instead of pins..

Offline VegaObscura

  • Robot Overlord
  • ****
  • Posts: 153
  • Helpful? 6
Re: Arduino questions
« Reply #27 on: January 02, 2011, 04:25:24 AM »
That sounds like a very likely cause.

Offline hardmouse

  • Jr. Member
  • **
  • Posts: 28
  • Helpful? 0
Re: Arduino questions
« Reply #28 on: January 02, 2011, 10:25:56 AM »
If you think everything was correctly connected, perhaps the problem is  either in your Arduino or Servo. You may test your servo by using something like this: http://cgi.ebay.ca/ESKY-EK2-0907-Servo-Auto-Test-Adjuster-for-servos-test_W0QQitemZ140376344745QQcategoryZ34056QQcmdZViewItemQQ_trksidZp5197.m7QQ_trkparmsZalgo%3DLVI%26itu%3DUCI%26otn%3D2%26po%3DLVI%26ps%3D63#ht_2821wt_923. If you have 2nd servo, try to connect to the same ping or try multimeter or Oscope.

If you are using more than 4 servos then you need to use external 6v battery separately. In that case you might want to use this shield for convenience:
http://www.dfrobot.com/index.php?route=product/product&path=35_39&product_id=264

Didn't really go thru whole replys but hope that helps.

Offline blackbeard

  • Supreme Robot
  • *****
  • Posts: 575
  • Helpful? 4
Re: Arduino questions
« Reply #29 on: January 02, 2011, 11:27:31 AM »
i hate hacking servos and would much rather buy cheep ones and rip their guts out so i can hook them up to an l293d H bridge ic. to me it's much more effective then trying to hack the original circuit for full rotation especially since some servos rely on the pot as an shaft for the gears. 
"sure, you can test your combat robot on kittens... But all your going to do is make kitten juice"

First step: Build androids with AI
Next step: Give them vaginas

 


Get Your Ad Here