Author Topic: arduino board help plz  (Read 58794 times)

0 Members and 1 Guest are viewing this topic.

Offline Mega

  • Full Member
  • ***
  • Posts: 88
  • Helpful? 0
Re: arduino board help plz
« Reply #30 on: December 13, 2007, 11:22:44 AM »
In the link I sent, the Servo is connected to the 5V pin (red wire), the Gnd pin (black wire) and one (yellow wire) to a digital pin: D2 in this case, but this can be any of the digital pins. This is exactly the same as in your schematic, the only difference is that in your schematic another digital pin is used (D9 for the left servo, D10 for the right servo instead of D2 that is used in my link), but this makes no difference.
Visit my robotics blog at http://megabotblog.blogspot.com/

Offline robonoobTopic starter

  • Robot Overlord
  • ****
  • Posts: 149
  • Helpful? 0
Re: arduino board help plz
« Reply #31 on: December 13, 2007, 11:26:39 AM »
somewhere i saw that the servo was connected to the  digital pin 9 and 10 because they are PWM's
so these are the pins where i can play with the pulse width and the servos moving speed. am i right?

Offline Mega

  • Full Member
  • ***
  • Posts: 88
  • Helpful? 0
Re: arduino board help plz
« Reply #32 on: December 13, 2007, 12:13:47 PM »
Correct, next to 9 and 10 other PWM pins are D3, 5, 6, and 11
See: http://www.arduino.cc/en/Hacking/PinMapping168
Visit my robotics blog at http://megabotblog.blogspot.com/

Offline robonoobTopic starter

  • Robot Overlord
  • ****
  • Posts: 149
  • Helpful? 0
Re: arduino board help plz
« Reply #33 on: December 13, 2007, 12:34:07 PM »
OK... i changed the picture again...it should be fine now... :) to this will be the schematic i will use? :P

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: arduino board help plz
« Reply #34 on: December 13, 2007, 12:54:24 PM »
You still need to connect the black line from the servo to the black line that goes to the GND pin on the board. This is connecting the Grounds together (common grounds).
« Last Edit: December 13, 2007, 12:55:55 PM by Ro-Bot-X »
Check out the uBotino robot controller!

Offline Mega

  • Full Member
  • ***
  • Posts: 88
  • Helpful? 0
Re: arduino board help plz
« Reply #35 on: December 13, 2007, 12:55:52 PM »
Looks ok to me.
But I hope Admin (or someone else) can comment on why the servo's can't be connected to the 5V pin directly.
Admin spoke about risk of brownouts. Could this be prevented by connecting the servo's to the 9V pin.
As far as I understand the 9V pin provides the same voltage as the input battery, so when you use the 6V battery
as input, the 9V pin will provide these 6V.
Visit my robotics blog at http://megabotblog.blogspot.com/

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: arduino board help plz
« Reply #36 on: December 13, 2007, 01:02:17 PM »
does the arduino have an internal voltage reference, or do you need to connect the vref pin to +5v manually?

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: arduino board help plz
« Reply #37 on: December 13, 2007, 01:09:22 PM »
As far as I understand the 9V pin provides the same voltage as the input battery, so when you use the 6V battery
as input, the 9V pin will provide these 6V.

It should work, but not with a 6V battery. It needs at least 7.2V to properly power the Arduino board. Ok, here is why: there is a diode to prevent accidental power voltage swapping and the voltage regulator is not a Low Dropout. The voltage drop on the diode is 0.7V plus the voltage drop on the Vreg of 1.2V, makes almost 2 volts over the 5 volts of the output. That means 6V battery is out of the question. If you replace the diode with a wire and replace the Vreg with a Low Droput Vreg (like LM2940), then you can use a 6V battery to power the servos directly and the board.

But the servos should work at 7.2V. This is what I am using for my CD-bot. CD-bot is a $50 robot in a  round CD case that I am building to test out code for pathfinding and object finding using an AVRcam.
Check out the uBotino robot controller!

Offline Mega

  • Full Member
  • ***
  • Posts: 88
  • Helpful? 0
Re: arduino board help plz
« Reply #38 on: December 13, 2007, 01:13:13 PM »
Thanks Ro-Bot-X, that makes sense.
Can you also comment on why connecting the servo's to the 5V pin of the Arduino would be a bad idea?
Visit my robotics blog at http://megabotblog.blogspot.com/

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: arduino board help plz
« Reply #39 on: December 13, 2007, 01:17:07 PM »
does the arduino have an internal voltage reference, or do you need to connect the vref pin to +5v manually?

Arduino uses ATmega168 or the older ATmega8. So yes, these micros have an internal voltage reference that you can select from the registers to be Vcc or 2.56 V or external reference connected to the vref pin. If you are using the internal Vcc reference, the vref pin may be connected to a 0.1uF capacitor to the ground.
Check out the uBotino robot controller!

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: arduino board help plz
« Reply #40 on: December 13, 2007, 01:23:50 PM »
Thanks Ro-Bot-X, that makes sense.
Can you also comment on why connecting the servo's to the 5V pin of the Arduino would be a bad idea?

Like Admin mentioned, the continuous rotation servos need a large amount of power when switching directly from forward to reverse, because of the weight and momentum of the robot. That could cause such a voltage drop that the mega168 would have a brownout (a reset).

However, if you are using an unmodified servo to scan the sensors, you can connect that one to the 5V power bus, since there is little force needed to move around a small sensor.
Check out the uBotino robot controller!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,653
  • Helpful? 169
    • Society of Robots
Re: arduino board help plz
« Reply #41 on: December 13, 2007, 01:41:20 PM »
Quote
But I hope Admin (or someone else) can comment on why the servo's can't be connected to the 5V pin directly.

http://www.societyofrobots.com/actuators_servos.shtml#regulate

Offline robonoobTopic starter

  • Robot Overlord
  • ****
  • Posts: 149
  • Helpful? 0
Re: arduino board help plz
« Reply #42 on: December 13, 2007, 03:00:09 PM »
Thanks Ro-Bot-X, that makes sense.
Can you also comment on why connecting the servo's to the 5V pin of the Arduino would be a bad idea?

Like Admin mentioned, the continuous rotation servos need a large amount of power when switching directly from forward to reverse, because of the weight and momentum of the robot. That could cause such a voltage drop that the mega168 would have a brownout (a reset).

However, if you are using an unmodified servo to scan the sensors, you can connect that one to the 5V power bus, since there is little force needed to move around a small sensor.
heh i understand this theory :P now...i made another picture could you please look thisone and tell me if this would work if I'd connect a 7.2V battery into the external power supply plug and put the servo's V+ wires into the 9V pin?

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: arduino board help plz
« Reply #43 on: December 13, 2007, 03:25:00 PM »
Yes, it will work.
Check out the uBotino robot controller!

Offline robonoobTopic starter

  • Robot Overlord
  • ****
  • Posts: 149
  • Helpful? 0
Re: arduino board help plz
« Reply #44 on: December 14, 2007, 06:34:45 AM »
Yes, it will work.
okei so this is the final schematics? btw where could i buy a 7.2V battery with that barrel plug that i can insert into the arduino's external power supply plug?

PS: from the arduino offical page ( http://www.arduino.cc/en/Reference/Constants ) i read this: Atmega pins can sorce (provide positive current) or sink (provide negative current) up to 40 mA (milliamps) of current to other devices/circuits. This makes them useful for powering LED's but useless for connecting to sensors.
so that means i  cant use any sensors or servos? :D or what?
« Last Edit: December 14, 2007, 08:25:41 AM by robonoob »

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
Re: arduino board help plz
« Reply #45 on: December 14, 2007, 02:08:56 PM »
so that means i  cant use any sensors or servos? :D or what?

youre forgetting that servos and sensors ( excluding sonar) give a signal and are not powered directly from the pins of the microcontroller

sonar gets a signal from the MCU to operate ( but that signal is very small)

Short : do not power sensors and servos from the MCU

servos get  a signal on their input line ( but the current can be low)

Understand?
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,653
  • Helpful? 169
    • Society of Robots
Re: arduino board help plz
« Reply #46 on: December 14, 2007, 02:12:26 PM »
robonoob, your red wires (power) are connected to your 5V regulator, not your mcu ;)

no worries

Offline robonoobTopic starter

  • Robot Overlord
  • ****
  • Posts: 149
  • Helpful? 0
Re: arduino board help plz
« Reply #47 on: December 14, 2007, 02:13:04 PM »
so that means i  cant use any sensors or servos? :D or what?

youre forgetting that servos and sensors ( excluding sonar) give a signal and are not powered directly from the pins of the microcontroller

sonar gets a signal from the MCU to operate ( but that signal is very small)

Short : do not power sensors and servos from the MCU

servos get  a signal on their input line ( but the current can be low)

Understand?
so what u mean is that everything but sonars and LED's get theyr power from power input not from the digital or analog pin? if u mean that then i do understand thanks :)
and what is MCU? umm let me guess... digital and analog pins?
« Last Edit: December 14, 2007, 02:13:50 PM by robonoob »

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
Re: arduino board help plz
« Reply #48 on: December 14, 2007, 02:25:38 PM »
well sonar sensors have 3 or 4 wires

one of them is power , 1 of them is GND, and the other 1 is for signal ( send pulse trigger  to start and recieve pusle for distance)
for 4 wires  you have 1 for recieving signal, and 1 for trigger , 1 for power , 1 for gnd

MCU is microcontroller unit

hope i helped, ;)

any questions?   :P
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline robonoobTopic starter

  • Robot Overlord
  • ****
  • Posts: 149
  • Helpful? 0
Re: arduino board help plz
« Reply #49 on: December 14, 2007, 03:02:14 PM »
well sonar sensors have 3 or 4 wires

one of them is power , 1 of them is GND, and the other 1 is for signal ( send pulse trigger  to start and recieve pusle for distance)
for 4 wires  you have 1 for recieving signal, and 1 for trigger , 1 for power , 1 for gnd

MCU is microcontroller unit

hope i helped, ;)

any questions?   :P


yea still :D what is microcontroller unit? :D what does it do? :D
PS: i dont know if i should ask it here or should i make an another topic in software for this, but anyway... how can i change the direction of the servo in the programming code? for example: i want to programme it so that if a IR sensor sees an object the wheels start rotating reverse...and if the sensor doesn't see any objects the wheels rotate forwards... how would i have to write it in the arduino programming code?
« Last Edit: December 14, 2007, 03:15:01 PM by robonoob »

Offline Mega

  • Full Member
  • ***
  • Posts: 88
  • Helpful? 0
Re: arduino board help plz
« Reply #50 on: December 15, 2007, 08:26:35 AM »
The microcontroller is the main chip/processor on your arduino board that executes the source code.
Today I created a similar circuit as yours, it is the first step in my HummBot project:


For more information see: http://megabotblog.blogspot.com/2007/12/my-first-hummbot-circuit.html
Visit my robotics blog at http://megabotblog.blogspot.com/

Offline robonoobTopic starter

  • Robot Overlord
  • ****
  • Posts: 149
  • Helpful? 0
Re: arduino board help plz
« Reply #51 on: December 15, 2007, 08:44:52 AM »
The microcontroller is the main chip/processor on your arduino board that executes the source code.
Today I created a similar circuit as yours, it is the first step in my HummBot project:


For more information see: http://megabotblog.blogspot.com/2007/12/my-first-hummbot-circuit.html
oh thanks :) ill try to understand something from the pic :D anyway... why do u have 2 IR's`and only 1 servo?

Offline Mega

  • Full Member
  • ***
  • Posts: 88
  • Helpful? 0
Re: arduino board help plz
« Reply #52 on: December 15, 2007, 08:57:41 AM »
I will use this circuit in my HummBot.
The servo will be controlling the front wheel steering. I will attach two IR sensors to the front of the HummBot. When the IR sensors detect some obstacle the servo needs to be activated to guide the HummBot around the obstacle.
The next step will be to connect the DC motor of the HummBot such that the Hummbot can slow down or reverse when it approaches obstacles.
Visit my robotics blog at http://megabotblog.blogspot.com/

Offline robonoobTopic starter

  • Robot Overlord
  • ****
  • Posts: 149
  • Helpful? 0
Re: arduino board help plz
« Reply #53 on: December 15, 2007, 09:23:36 AM »
I will use this circuit in my HummBot.
The servo will be controlling the front wheel steering. I will attach two IR sensors to the front of the HummBot. When the IR sensors detect some obstacle the servo needs to be activated to guide the HummBot around the obstacle.
The next step will be to connect the DC motor of the HummBot such that the Hummbot can slow down or reverse when it approaches obstacles.
oh okei :)
hey i'd realy appreciate if you would keep us updated with new pictures of your work and all :)
btw could you send me the code that you will be using so i could learn something from it cause i'm doing something similatr as you know :)
anyway... i have this question: i have thought about using an extra servo for the IR sensor to scan the area... could anybody please describe how would this affect the code i will need?
thank you :)
PS: Mega what will power you whole circuit? could you make a picture with your power connected to it too please?
« Last Edit: December 15, 2007, 09:46:41 AM by robonoob »

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,653
  • Helpful? 169
    • Society of Robots
Re: arduino board help plz
« Reply #54 on: December 15, 2007, 10:36:33 AM »
robonoob, I highly recommend you reading this:
http://www.societyofrobots.com/sensors_sharpirrange.shtml

I give examples with four different robots - each have included code for you to look through.

Offline robonoobTopic starter

  • Robot Overlord
  • ****
  • Posts: 149
  • Helpful? 0
Re: arduino board help plz
« Reply #55 on: December 15, 2007, 11:00:07 AM »
robonoob, I highly recommend you reading this:
http://www.societyofrobots.com/sensors_sharpirrange.shtml

I give examples with four different robots - each have included code for you to look through.
umm...okei but can i open the codes in the arduino programme?
PS: i was looking for cheap servos and ran into ebay: http://cgi.ebay.ca/4x-Servo-MG995-MG-995-RC-Helicopter-Plane-Car-Boat-U_W0QQitemZ280183671156QQihZ018QQcategoryZ34056QQtcZphotoQQcmdZViewItem
i dont understand is there 4 or 2 servos in this package? is there are 4 then this is amazingly cheap servos arent they?

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: arduino board help plz
« Reply #56 on: December 15, 2007, 11:13:09 AM »
it looks like 2 standard size servo's and 2 mini servo's - there is definately 4 in the pack. If you check out the sellers shop, he has another servo pack with just 2 in them.
Also check out the ultra cheap batteries.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,653
  • Helpful? 169
    • Society of Robots
Re: arduino board help plz
« Reply #57 on: December 15, 2007, 04:30:00 PM »
The $50 Robot (with ATmega168 upgrade) uses the same microcontroller as the Arduino. Code is the same.

Offline robonoobTopic starter

  • Robot Overlord
  • ****
  • Posts: 149
  • Helpful? 0
Re: arduino board help plz
« Reply #58 on: December 16, 2007, 02:15:54 AM »
The $50 Robot (with ATmega168 upgrade) uses the same microcontroller as the Arduino. Code is the same.
umm okei but the $50 robot code has several files but arduino programme cant open any of those...

Offline Fredrik Andersson

  • Robot Overlord
  • ****
  • Posts: 216
  • Helpful? 0
Re: arduino board help plz
« Reply #59 on: December 16, 2007, 03:09:59 AM »
The $50 Robot (with ATmega168 upgrade) uses the same microcontroller as the Arduino. Code is the same.

Nope, it actually isn't. The Arduino uses an own language, based on wiring. It's a whole different environment. Many things are predefined and made very easy. However, you could program it in the ordinary language.
Current project: Pirrh - Portable Intelligent Round Rolling Hexapod

 


Get Your Ad Here

data_list