Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: robonoob on December 09, 2007, 04:18:06 AM

Title: arduino board help plz
Post by: robonoob on December 09, 2007, 04:18:06 AM
hi
i wanted to ask that could anybody plz draw a schematics to make a obstable avoiding robot if i use this arduino board :http://www.sparkfun.com/commerce/product_info.php?products_id=666&action=add_product# , 2 servo motors, and 2 infrared sensors...
and i also want to know that do i have to buy a cable to connect this board to my computer? or can i put this board directly to my comp? and if i have to buy the cable then could you recommend me a page where i can buy it :) (and if its possible to make 1 myself then just tell me :D i have 2 USB plug's that i could connect to eachother :))

PS:i wanted to ttell you that its my first robot so i'd appreciate if u keep it as simple as possible :D:D
PSS: oh and what software i need to use for this project...(as i said its my first robot, so i dont know absolutely anything about programming :D)
Title: Re: arduino board help plz
Post by: Ro-Bot-X on December 09, 2007, 05:10:14 AM
So you need to buy this Arduino board: http://www.sparkfun.com/commerce/product_info.php?products_id=666 (http://www.sparkfun.com/commerce/product_info.php?products_id=666), a usb cable: http://www.sparkfun.com/commerce/product_info.php?products_id=512 (http://www.sparkfun.com/commerce/product_info.php?products_id=512) a break away pin header: http://www.sparkfun.com/commerce/product_info.php?products_id=116 (http://www.sparkfun.com/commerce/product_info.php?products_id=116), 1 or 2 IR sensors: http://www.sparkfun.com/commerce/product_info.php?products_id=242 (http://www.sparkfun.com/commerce/product_info.php?products_id=242).
The board needs a battery holder with a round power jack connector that I didn't find on their site.
You will also need 2 servos modified for continuous rotation. Optional, a standard servo to scan the IR sensor.
Title: Re: arduino board help plz
Post by: Fredrik Andersson on December 09, 2007, 05:19:50 AM
and i also want to know that do i have to buy a cable to connect this board to my computer? or can i put this board directly to my comp?

Hi,
I like that you have picket the arduino board. I'm a fan of it! :)

What do you mean by directly to the computer? I thought a cable was pretty directly ^^ Well, yes, you'll need a cable, featuring a type B contact. You could make one yourself, but i do recommend you buying one. It's much safer and easier, and probably just as cheap.

What does the infrared sensors look like? Is it one of those Sharp IR range sensors (with a 3 pin connection like the servos).
Do you have a breadboard or something you could solder to? You could end up having a hard time connecting everything to to singly the arduino pins. The arduino board doesn't have a neat connection line with pairs of three (I/O pin, +V, and ground). I made a application board myself featuring such an connecting line with a prototyping pcb. Basically, you need to connect the servos to an Digital I/O pin (white, yellow or orange wire on the servo), +V (red wire on servo) and ground (black wire on servo).
Title: Re: arduino board help plz
Post by: robonoob on December 09, 2007, 05:20:06 AM
So you need to buy this Arduino board: http://www.sparkfun.com/commerce/product_info.php?products_id=666 (http://www.sparkfun.com/commerce/product_info.php?products_id=666), a usb cable: http://www.sparkfun.com/commerce/product_info.php?products_id=512 (http://www.sparkfun.com/commerce/product_info.php?products_id=512) a break away pin header: http://www.sparkfun.com/commerce/product_info.php?products_id=116 (http://www.sparkfun.com/commerce/product_info.php?products_id=116), 1 or 2 IR sensors: http://www.sparkfun.com/commerce/product_info.php?products_id=242 (http://www.sparkfun.com/commerce/product_info.php?products_id=242).
The board needs a battery holder with a round power jack connector that I didn't find on their site.
You will also need 2 servos modified for continuous rotation. Optional, a standard servo to scan the IR sensor.
well i have IR sensors from  old mouses... so i can use them? and also what do i need the pin headers for?
fredrik do u mean that i have to solder some things? :D i was hoping that i can do it much easier... and the ir sensors(IR LED's)have 2 pins...(http://en.wikipedia.org/wiki/Image:Mouse-mechanism-cutaway.png)
PS: oh and i am still wating for the schematics that includes ALL the parts i will need... :)
Title: Re: arduino board help plz
Post by: Ro-Bot-X on December 09, 2007, 05:39:19 AM
As I have told you in the other post, those mouse IR LEDs and IR fototranzistors you can use for line following or wheel encoders. Read the tutorials and you will see.

The sensors from the link that I gave you are Sharp IR Distance sensors that you can't replicate with mouse parts.

The pin header you need to connect the servos and sensors to the Arduino board. And yes, you need to solder wires to these pins. Or, you can get some Jumper Wires http://www.sparkfun.com/commerce/product_info.php?products_id=8431 (http://www.sparkfun.com/commerce/product_info.php?products_id=8431)

You want to use salvaged parts but not to solder anything??? Those salvaged parts need to be unsoldered anyway... I guess you can use a breadboard... in this case you need the Arduino Proto Shield http://www.sparkfun.com/commerce/product_info.php?products_id=7914 (http://www.sparkfun.com/commerce/product_info.php?products_id=7914) and a small Breadboard that you glue (it's self adhesive) in the middle of the Proto Shield: http://www.sparkfun.com/commerce/product_info.php?products_id=7916 (http://www.sparkfun.com/commerce/product_info.php?products_id=7916)

If you want to do it the easy way (no soldering involved) you need more money to buy a complete robot kit like the Parallax Boe-Bot or Lego Mindstorms NXT.
Title: Re: arduino board help plz
Post by: robonoob on December 09, 2007, 05:48:40 AM
As I have told you in the other post, those mouse IR LEDs and IR fototranzistors you can use for line following or wheel encoders. Read the tutorials and you will see.

The sensors from the link that I gave you are Sharp IR Distance sensors that you can't replicate with mouse parts.

The pin header you need to connect the servos and sensors to the Arduino board. And yes, you need to solder wires to these pins. Or, you can get some Jumper Wires http://www.sparkfun.com/commerce/product_info.php?products_id=8431 (http://www.sparkfun.com/commerce/product_info.php?products_id=8431)

You want to use salvaged parts but not to solder anything??? Those salvaged parts need to be unsoldered anyway... I guess you can use a breadboard... in this case you need the Arduino Proto Shield http://www.sparkfun.com/commerce/product_info.php?products_id=7914 (http://www.sparkfun.com/commerce/product_info.php?products_id=7914) and a small Breadboard that you glue (it's self adhesive) in the middle of the Proto Shield: http://www.sparkfun.com/commerce/product_info.php?products_id=7916 (http://www.sparkfun.com/commerce/product_info.php?products_id=7916)

If you want to do it the easy way (no soldering involved) you need more money to buy a complete robot kit like the Parallax Boe-Bot or Lego Mindstorms NXT.
this is the board http://www.sparkfun.com/commerce/product_info.php?products_id=666&action=add_product# i was hoping that i only have to plug the servos there and the sensors and programme it... isnt that so?
Title: Re: arduino board help plz
Post by: Ro-Bot-X on December 09, 2007, 05:56:09 AM
Servos have 3 pins (on a female connector), Signal, Power and Ground. Same goes for IR Distance sensors (actually, these have a small 3 pin male header, so you need to buy pre-crimped wire connectors, or solder wires directly)
Arduino board has female connectors for Signal on one side and for Power and Ground (GND) on another side. So you need the Jumper wires to make the connections or to cut the servo cable near the connector and split the wires separately for Signal and Power + GND and solde pin headers on them.

Do you understand this?
Title: Re: arduino board help plz
Post by: robonoob on December 09, 2007, 06:18:45 AM
Servos have 3 pins (on a female connector), Signal, Power and Ground. Same goes for IR Distance sensors (actually, these have a small 3 pin male header, so you need to buy pre-crimped wire connectors, or solder wires directly)
Arduino board has female connectors for Signal on one side and for Power and Ground (GND) on another side. So you need the Jumper wires to make the connections or to cut the servo cable near the connector and split the wires separately for Signal and Power + GND and solde pin headers on them.

Do you understand this?
OK i understand the theory but in practics i wouldn't know anything though :D
thank you for this :) but would you plz make a schematics  for me so i could understand it better? :)
PS: i may want to make the robot with photoresistors maybe, you know like the $50 robot that goes towards the light... i think this might be easier for me to build because as i said this is my first robot :D
what do you think about that? would it be easier?
Title: Re: arduino board help plz
Post by: robonoob on December 10, 2007, 03:16:32 PM
okei then... nobody's willing to make me a schematics so i tried to make myself...its with two servos and a IR range finder... plz take a look on it and tell me if there's something wrong :)
Title: Re: arduino board help plz
Post by: bukowski on December 10, 2007, 03:24:22 PM
Why do you have the +5V going to a resistor and the IR Rangefiner output?
Title: Re: arduino board help plz
Post by: ed1380 on December 10, 2007, 03:51:20 PM
the rangefinder is an IR led and receiver, so it needs +5v and ground and it send out a signal
Title: Re: arduino board help plz
Post by: Rebelgium on December 10, 2007, 04:16:56 PM
You connected the servo signal lines to the analog input connectors.
It should be connected to digital outputs of the Arduino.
Title: Re: arduino board help plz
Post by: bukowski on December 10, 2007, 06:14:38 PM
Quote
the rangefinder is an IR led and receiver, so it needs +5v and ground and it send out a signal
Yeah, but hes got the +5v going to the + lead and a dropped down voltage going to the output signal. Im thinking that that would give you erronous readings. But, hey maybe I dont know what Im talking about. Wouldnt be the first time!! :D
Title: Re: arduino board help plz
Post by: paulstreats on December 10, 2007, 06:25:51 PM
the ir range finder definately doesnt need a resistor between the +5v and signal wires.
The ones i have used have all come with connectors and there is no connection between +5v and signal.
Maybe you assume that it needs a pull up resistor. An analogue style range finder doesnt. Maybe the digital ones do? if you use the digital ones, then you should realise that they dont tell you correct ranging data, they merely tell you if an object is located below a pre defined range.
Title: Re: arduino board help plz
Post by: robonoob on December 11, 2007, 08:33:31 AM
Why do you have the +5V going to a resistor and the IR Rangefiner output?
well i don't know :D i just copied these pictures :http://wiring.org.co/learning/tutorials/diagrams.html
and tried to connect them like it is connected there :D
oh and the servos... i tries to fix it too look at it now and plz tell me if it's right now...
Title: Re: arduino board help plz
Post by: Admin on December 11, 2007, 08:49:23 AM
This is why I don't like the Arduino, it has no power bus thereby making wiring complicated . . . that and the 2V dropout . . .

Anyway, I don't think it is wise to connect the servos to the 5V regulator. The regulator could over heat thereby shutting down your Arduino, or at least cause brownouts.

You want to directly connect your servos to a 6V battery (with common grounds, of course).
Title: Re: arduino board help plz
Post by: paulstreats on December 11, 2007, 10:34:02 AM
that picture is definately for a digital range finder, so they must need a pull up resistor.
The one you have either doesnt need a pull up resistor because its an analog one. Or if it is a digital range finder then you need to move the signal wire to a digital i/o port one the arduino
Title: Re: arduino board help plz
Post by: robonoob on December 11, 2007, 02:05:44 PM
umm okei that confused me a little...
First: admin do u mean that i use 6V batterypack for two servos and only a signal wire goes from servo to arduino?
Second: what is a pull up resistor and what is a digital range finder and what is a analog one :Di mean whats the difference and whichone should i use if I'm making a wall avoiding bot?
and i made the Admin version picture too(at least i think that Admin meant that :D)
Third:can anybody please explain me what does these things mean like digital input and output, analog in and so on so on...
Fourth: http://www.sparkfun.com/commerce/product_info.php?products_id=242 this is the IR range finder I'm planing to use... it says there:"has an analog output that varies from 3.1V at 10cm to 0.4V at 80cm"(what ever it means) so... do i need to use the resistor or not?
Fifth: admin u said that there is no power bus... maybe this would help if I'd buy myself these 2 things?(although i don't know how to use these...:S) http://www.sparkfun.com/commerce/product_info.php?products_id=7914 and http://www.sparkfun.com/commerce/product_info.php?products_id=7916 ah and could anybody please explain me how to use these things and...
Title: Re: arduino board help plz
Post by: Fredrik Andersson on December 11, 2007, 04:12:59 PM
Almost there... ^^

You need to connect the boards ground with the servos ground (note - only ground not +V) else the signal wires to the servos doesn't make an enclosed circuit.

Also, remove the resistor on the IR rangefinder. That sensor is an complete package as it is. You just need to connect it to +5V, Ground and an analog input on the arduino.
Title: Re: arduino board help plz
Post by: Rebelgium on December 11, 2007, 04:27:32 PM
umm okei that confused me a little...
First: admin do u mean that i use 6V batterypack for two servos and only a signal wire goes from servo to arduino?
Second: what is a pull up resistor and what is a digital range finder and what is a analog one :Di mean whats the difference and whichone should i use if I'm making a wall avoiding bot?
and i made the Admin version picture too(at least i think that Admin meant that :D)
Third:can anybody please explain me what does these things mean like digital input and output, analog in and so on so on...
Fourth: http://www.sparkfun.com/commerce/product_info.php?products_id=242 this is the IR range finder I'm planing to use... it says there:"has an analog output that varies from 3.1V at 10cm to 0.4V at 80cm"(what ever it means) so... do i need to use the resistor or not?
Fifth: admin u said that there is no power bus... maybe this would help if I'd buy myself these 2 things?(although i don't know how to use these...:S) http://www.sparkfun.com/commerce/product_info.php?products_id=7914 and http://www.sparkfun.com/commerce/product_info.php?products_id=7916 ah and could anybody please explain me how to use these things and...

Pull up resistor, digital/analog rangefinder, digital/analog signals:
Search the forum and google.

power bus:
You can't buy a power bus, a power bus is a row of pins on your arduino PCB that's connected to +5V and another one to ground.
So you can connect external hardware easily.

Title: Re: arduino board help plz
Post by: robonoob on December 12, 2007, 08:19:14 AM
Almost there... ^^

You need to connect the boards ground with the servos ground (note - only ground not +V) else the signal wires to the servos doesn't make an enclosed circuit.

Also, remove the resistor on the IR rangefinder. That sensor is an complete package as it is. You just need to connect it to +5V, Ground and an analog input on the arduino.
hmm i don't get what u mean by that :D could you please download the picture and modify it for me please?
Title: Re: arduino board help plz
Post by: Admin on December 12, 2007, 08:22:35 AM
If you look at my $50 Robot, the pins where you connect the servos and sensors is a power bus.

You need to make something like that to plug everything in.
Title: Re: arduino board help plz
Post by: robonoob on December 12, 2007, 08:24:10 AM
If you look at my $50 Robot, the pins where you connect the servos and sensors is a power bus.

You need to make something like that to plug everything in.
i know what a power bus is but is still dont get the connecting thing... where do i have to connect the servos and the IR range finder
Title: Re: arduino board help plz
Post by: Ro-Bot-X on December 12, 2007, 12:25:12 PM
You should definitely read the tutorials on this site. Here, if you can't find them, this is the link:
http://www.societyofrobots.com/toparticles.shtml (http://www.societyofrobots.com/toparticles.shtml)
Title: Re: arduino board help plz
Post by: Mega on December 12, 2007, 12:52:56 PM
Today I received my Arduino (http://megabotblog.blogspot.com/) board. I plan to use this as the controller for my HummBot (http://megabotblog.blogspot.com/2007/12/humbot-start-your-engine.html).
The Arduino will control two Sharp GP2D15 IR sensors, a DC motor and one servo.
I will follow the approach as described here:
http://itp.nyu.edu/physcomp/Labs/Servo (http://itp.nyu.edu/physcomp/Labs/Servo)
and here:
http://itp.nyu.edu/physcomp/Labs/DCMotorControl (http://itp.nyu.edu/physcomp/Labs/DCMotorControl)

Would this be a good approach?

Mega
Title: Re: arduino board help plz
Post by: Ro-Bot-X on December 12, 2007, 03:37:34 PM
Mega, verry good examples. You just need to combine them. Use the DC motor for propulsion (forward-backward) and the servo for steering. You may want to add another servo for scanning the Sharp sensors, because the car like steering is hard to maneuver out of corners, so you want to find bad spots before you get into them. And is also good for pathfinding.

Keep the input switch (maybe add some more), add a 2x8 or 2x16 LCD so you can input start and finish coordinates and see them on the screen, then have the car drive between obstacles like a real DARPA car. Take a look at Admin's wavefront algorithm to do it. You are on the right track.

Ohh, I almost forgot, you need encoders for pathfinding.
Title: Re: arduino board help plz
Post by: Mega on December 13, 2007, 10:34:14 AM
Quote
You may want to add another servo for scanning the Sharp sensors, because the car like steering is hard to maneuver out of corners, so you want to find bad spots before you get into them. And is also good for pathfinding.
Yes, I plan to do this. I would like to have a servo controled sharp inside the body of the HummBot (http://megabotblog.blogspot.com/2007/12/humbot-start-your-engine.html). I'm slighly worried that the window frames of the body will interfere with the IR signals, so I'll have to position the servo/sensor carefully.

Next to that I will also need (sharp) sensors in the bumper of the HummBot to detect low objects.

Quote
Take a look at Admin's wavefront algorithm to do it. You are on the right track.
Excellent! I will definitely experiment with this algorithm.

Quote
Ohh, I almost forgot, you need encoders for pathfinding.
Yes, I have been thinking about this. But I have not figured out yet what would be the best way to add an encoder to by HummBot chassis:
(http://img29.picoodle.com/img/img29/5/12/13/t_HumBot2m_bf62cbf.jpg) (http://www.picoodle.com/view.php?img=/5/12/13/f_HumBot2m_bf62cbf.jpg&srv=img29)

There is no space near the wheels. One option might be to attach the encoder wheel to the drive shaft that attached the front wheels to the DC motor...

Title: Re: arduino board help plz
Post by: robonoob on December 13, 2007, 11:03:50 AM
mega i looked the links you gave...but unfortunately i didn't find anything for myself :( but thanks anyway...
so...I'm still waiting for somebody to help me with my schematics...
could anybody please download the picture and change it the way it needs to be? remember: this is my first robot and i don't know much about electronics :D
i also wanted to ask you why do i have to have nother battery pack? there is a plug where i can put an extra power on the arduino board... isn't that enough?
Title: Re: arduino board help plz
Post by: Mega on December 13, 2007, 11:10:38 AM
Quote
mega i looked the links you gave...but unfortunately i didn't find anything for myself Sad but thanks anyway...
so...I'm still waiting for somebody to help me with my schematics...
The servo connection looks ok, it is the same as in the link I sent: http://itp.nyu.edu/physcomp/Labs/Servo
Also, the IR sensor connection looks ok, except for the resistor, which is not needed as far as I can see.
Title: Re: arduino board help plz
Post by: robonoob on December 13, 2007, 11:13:11 AM
OK mega...
the link you sent... why is 1 of the Servo's connections opened? why isn't that connected to anywhere?
Title: Re: arduino board help plz
Post by: Mega 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.
Title: Re: arduino board help plz
Post by: robonoob 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?
Title: Re: arduino board help plz
Post by: Mega 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 (http://www.arduino.cc/en/Hacking/PinMapping168)
Title: Re: arduino board help plz
Post by: robonoob 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
Title: Re: arduino board help plz
Post by: Ro-Bot-X 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).
Title: Re: arduino board help plz
Post by: Mega 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.
Title: Re: arduino board help plz
Post by: paulstreats 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?
Title: Re: arduino board help plz
Post by: Ro-Bot-X 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.
Title: Re: arduino board help plz
Post by: Mega 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?
Title: Re: arduino board help plz
Post by: Ro-Bot-X 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.
Title: Re: arduino board help plz
Post by: Ro-Bot-X 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.
Title: Re: arduino board help plz
Post by: Admin 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
Title: Re: arduino board help plz
Post by: robonoob 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?
Title: Re: arduino board help plz
Post by: Ro-Bot-X on December 13, 2007, 03:25:00 PM
Yes, it will work.
Title: Re: arduino board help plz
Post by: robonoob 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?
Title: Re: arduino board help plz
Post by: airman00 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?
Title: Re: arduino board help plz
Post by: Admin on December 14, 2007, 02:12:26 PM
robonoob, your red wires (power) are connected to your 5V regulator, not your mcu ;)

no worries
Title: Re: arduino board help plz
Post by: robonoob 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?
Title: Re: arduino board help plz
Post by: airman00 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
Title: Re: arduino board help plz
Post by: robonoob 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?
Title: Re: arduino board help plz
Post by: Mega 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:
(http://bp2.blogger.com/__061egJIUA4/R2PhbkvXs9I/AAAAAAAAACg/ezjoQcqpMdA/s400/IR_Sensor_Circuit.JPG)

For more information see: http://megabotblog.blogspot.com/2007/12/my-first-hummbot-circuit.html (http://megabotblog.blogspot.com/2007/12/my-first-hummbot-circuit.html)
Title: Re: arduino board help plz
Post by: robonoob 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:
(http://bp2.blogger.com/__061egJIUA4/R2PhbkvXs9I/AAAAAAAAACg/ezjoQcqpMdA/s400/IR_Sensor_Circuit.JPG)

For more information see: http://megabotblog.blogspot.com/2007/12/my-first-hummbot-circuit.html (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?
Title: Re: arduino board help plz
Post by: Mega on December 15, 2007, 08:57:41 AM
I will use this circuit in my HummBot (http://megabotblog.blogspot.com/2007/12/humbot-start-your-engine.html).
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.
Title: Re: arduino board help plz
Post by: robonoob on December 15, 2007, 09:23:36 AM
I will use this circuit in my HummBot (http://megabotblog.blogspot.com/2007/12/humbot-start-your-engine.html).
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?
Title: Re: arduino board help plz
Post by: Admin 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.
Title: Re: arduino board help plz
Post by: robonoob 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?
Title: Re: arduino board help plz
Post by: paulstreats 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.
Title: Re: arduino board help plz
Post by: Admin 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.
Title: Re: arduino board help plz
Post by: robonoob 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...
Title: Re: arduino board help plz
Post by: Fredrik Andersson 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.
Title: Re: arduino board help plz
Post by: robonoob on December 16, 2007, 03:12:31 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.
u mean i could make all these files into one file that arduino programme understands?
How?
Title: Re: arduino board help plz
Post by: Admin on December 16, 2007, 10:37:15 AM
Quote
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.
You don't need to use that environment. AVR Studio will work, too.
Title: Re: arduino board help plz
Post by: Steel_monkey on December 16, 2007, 01:44:16 PM
All this looks a little funny- someone is going to code his own bot and asking, what is MCU. The best idea (if you want to creat something, not just copy) is to start from some basics: blinking LED, button control, PWM control, H-bridge control and others. Start writing little programs on assembler, designe your own development board (this Arduino is overpriced by comparison with DIY. At least You will understand function of all components). But the first is tech materials: look for books (if You want to know authors PM me) and datasheets: http://www.datasheetcatalog.com/datasheets_pdf/A/T/M/E/ATMEGA168.shtml. I believe this will help.
Title: Re: arduino board help plz
Post by: robonoob on December 16, 2007, 02:59:09 PM
All this looks a little funny- someone is going to code his own bot and asking, what is MCU. The best idea (if you want to creat something, not just copy) is to start from some basics: blinking LED, button control, PWM control, H-bridge control and others. Start writing little programs on assembler, designe your own development board (this Arduino is overpriced by comparison with DIY. At least You will understand function of all components). But the first is tech materials: look for books (if You want to know authors PM me) and datasheets: http://www.datasheetcatalog.com/datasheets_pdf/A/T/M/E/ATMEGA168.shtml. I believe this will help.
thanks :) but I've allready made a decision and I'm going to buy the arduino board and I'm going to make the robot i described before in this topic :) i got a code from a friend of mine (who i met in this wonderfull forum)
he has done quite the same robot that I'm going to do and so I'm hoping that i could use this code for my robot too :) of course if there are any modifycations needed then I'll try to make them but i hope not :)
PS: I've been reading this http://www.ladyada.net/learn/arduino/lesson5.html  GREAT page about arduino that does teach the basics of the  development board and gives examples about the simplest codes etc.
although i don't have my arduino board yet I've read this page and I'm on the 5. lesson ATM :) I've been trying to understand all this and I've done all the exercises that are written there :) so yea i think i will be able to make my robot when i get my arduino now :) and it all thanks to this The-Best-Robot-Forum-Ever :)
anyway if i run into problems i will ask you people :) or if i don't understand something :D cuz as I've said before and as my name says: I'm quite a Noob in electronics :P
Title: Re: arduino board help plz
Post by: robonoob on December 18, 2007, 10:05:02 AM
hi again :) i have been looking for the things to buy... and because this will be my first robot then i have to  strt buying stuff from the beginning meaning that i eaven have to buy the multimeter and stuff...
please give this thing a look: http://www.adafruit.com/index.php?main_page=product_info&cPath=17&products_id=68 this is a arduino starting pack... do u think this is worth the price?... i personaly think it is... :) but what do u think?
Title: Re: arduino board help plz
Post by: airman00 on December 18, 2007, 06:24:24 PM
looks pretty good, i would buy it

the price is  more than if you were to buy everything separate, but then again shipping is combined for all the stuff.

Title: Re: arduino board help plz
Post by: robonoob on December 19, 2007, 12:45:20 PM
looks pretty good, i would buy it

the price is  more than if you were to buy everything separate, but then again shipping is combined for all the stuff.


yea thats what i was thinking :) so...i'll buy this complect and then 3 servos a IR range finder , a multimeter, 7.2V battery... and a charger for it :) i think that would be everything i need :P
Title: Re: arduino board help plz
Post by: Mega on December 19, 2007, 01:16:44 PM
Quote
yea thats what i was thinking Smiley so...i'll buy this complect and then 3 servos a IR range finder , a multimeter, 7.2V battery... and a charger for it Smiley i think that would be everything i need Tongue
Sounds like a nice set of Christmas presents  ;)
After a while you probably need some more wires, LEDs, resistors, capacitators etc. but this looks like a good set to start with!
Title: Re: arduino board help plz
Post by: robonoob on December 19, 2007, 01:18:46 PM
Quote
yea thats what i was thinking Smiley so...i'll buy this complect and then 3 servos a IR range finder , a multimeter, 7.2V battery... and a charger for it Smiley i think that would be everything i need Tongue
Sounds like a nice set of Christmas presents  ;)
After a while you probably need some more wires, LEDs, resistors, capacitators etc. but this looks like a good set to start with!
exactly my idea :P i wish somebody would give this as a present for me for christmas :D(but nobody isn-t going to unfortunately :D)
Title: Re: arduino board help plz
Post by: maverick monk on January 02, 2008, 03:31:02 PM
did the hummbot start out life as a tamiya Humvee kit???
Title: Re: arduino board help plz
Post by: robonoob on January 02, 2008, 05:14:02 PM
did the hummbot start out life as a tamiya Humvee kit???
well I'm sorry but if I'm not wrong now then Mega was the one with the Humbot project :)
 BTW I'm going to get money for my arduino robot next week(finally :D:D) so I'm going to buy the parts and i can start with my robot :P
I'm waiting for this sooo much :D
i will try to take some photos with my mobile phone but i don't think they will be good... cuz it's quite crappy camera...and i don't have a better one...
anyway i will take these pictures then and upload them here so u could go with me with my first robot :P

PS: please anybody who has done or is doing any robots with arduino please post pictures or videos here for me...just to isnpire me :D and i hope many other people too...
Title: Re: arduino board help plz
Post by: Trumpkin on January 03, 2008, 09:55:25 AM
Once you get your servos and sensors wired can you please post a picture of that? ( I'm thinking of using the Arduino also)
Title: Re: arduino board help plz
Post by: robonoob on January 03, 2008, 10:07:38 AM
Once you get your servos and sensors wired can you please post a picture of that? ( I'm thinking of using the Arduino also)
yea i will make the picture...but with my mobile phohe camera cuz i dont have a real digital camera and i dont think the graphiks will be good...
but you could take a look at the schematics somewhere above if u want :D
Title: Re: arduino board help plz
Post by: robonoob on January 07, 2008, 07:51:12 AM
umm everybody... i was going over the whole post again and started thinking that why do i need to connect a non-digital servo like this: http://www.servocity.com/~servo/html/hs-311_standard.html to a digital pin of the arduino?? or do all the servos and motors go to digital pins?
Title: Re: arduino board help plz
Post by: Admin on January 07, 2008, 07:54:10 AM
http://www.societyofrobots.com/actuators_servos.shtml#digitalanalogservos
Title: Re: arduino board help plz
Post by: robonoob on January 07, 2008, 08:07:16 AM
yea well what i understand from there is that analog servos should have to be connected to analog pins and digital servos to digital pins... so my schematics is still wrong... i will buy this servo : http://www.servocity.com/~servo/html/hs-311_standard.html this is a analog servo so i will need to connect it to analog pin...
okei sorry i think it was my mistake not informationing you what servo i will be using :)

PS: no wait... if i connect the analog servo to analog pin then i wont be able to send PWM or would i?
omg I'm so confused :D
Title: Re: arduino board help plz
Post by: visualPerception on January 07, 2008, 08:24:01 AM
Sorry i just have to say, I think you mean informing.
Title: Re: arduino board help plz
Post by: Admin on January 07, 2008, 08:29:27 AM
robonoob, very second sentence:
Quote
Digital servos, at the user end, are controlled no differently than analog servos.

Use a digital port. ;)

(rereading what I wrote, I think that tutorial needs a rewrite . . .)
Title: Re: arduino board help plz
Post by: Trumpkin on January 07, 2008, 10:08:18 AM
is it possible to use a 6 volt battery to power the Arduino?
Title: Re: arduino board help plz
Post by: Fredrik Andersson on January 07, 2008, 11:20:01 AM
is it possible to use a 6 volt battery to power the Arduino?

Yes, but make sure it is charged enough. If it's too uncharged, the output voltage from the regulator will be lower than 5 volt.
Title: Re: arduino board help plz
Post by: robonoob on January 07, 2008, 11:26:52 AM
robonoob, very second sentence:
Quote
Digital servos, at the user end, are controlled no differently than analog servos.

Use a digital port. ;)

(rereading what I wrote, I think that tutorial needs a rewrite . . .)
oh sorry :D i missunderstood the sentence :) thanks :P
and yea my English isn't perfect LOL :D(not even close to it :D)
Title: Re: arduino board help plz
Post by: robonoob on January 08, 2008, 03:37:37 PM
yea...still wating my mom to get herself a creditcard :D but in meantime i've been doing some work on my CAD file :) check this out(this isnt finished obviously, only added servos, wheels, and a ball caster) :

anyway tell me what u think :) and plz tell me if the caster has to be on front or on the back? yea pulling is better than pushing and stuff so i think i will leave it back :) but if u have an argument why i should put it on front then let me know :)


Edit: OMG sorry for the double post :S
Title: Re: arduino board help plz
Post by: airman00 on January 09, 2008, 07:08:01 AM
where did u CAD it in?

Google Sketchup??
Title: Re: arduino board help plz
Post by: Trumpkin on January 09, 2008, 09:35:00 AM
I'm going to use the same ball caster for my robot. looks good robonoob and it's fine having the caster in back . 
Title: Re: arduino board help plz
Post by: robonoob on January 10, 2008, 02:19:12 PM
Yes it's google sketchup... :)
here take a look at my new pictures...i think its done but I'm not sure though so if u see a missing part then tell me :D

edit: i tried to put the mass as front as i could cuz i believe this would increase efficiency cuz the servos don't have so much to pull then :)
Title: Re: arduino board help plz
Post by: airman00 on January 10, 2008, 02:24:26 PM
Can you please upload your CAD to the Google Warehouse library and in one of the tags do societyofrobots .    I want that CAD of those casters!

Thanks
Title: Re: arduino board help plz
Post by: robonoob on January 10, 2008, 02:55:40 PM
Can you please upload your CAD to the Google Warehouse library and in one of the tags do societyofrobots .    I want that CAD of those casters!

Thanks
well i dont know if thats what u wanted but : http://sketchup.google.com/3dwarehouse/details?mid=25480e0fe0d974fa705310bd14c7d998

edit: i was wandering here and came to this with my thoughts: i will be using 6 AA rechargeable batteries(1.2V each) thats 7.2V i have planed that his will be enough to power my arduino and 3 servos and an IR and now i suddenly realized that this cant be... its to few volts. am i right?
anyway i thought that i will buy a 9V battery to power the arduino and connect 6V directly to servos  and the IR could get power from the arduino 5V power pin. so the schematics would something like this:
Title: Re: arduino board help plz
Post by: Admin on January 10, 2008, 03:38:22 PM
Two thoughts on your CAD design.

First, your robot 'butt' is too big. When your robot turns, it's butt will run into stuff . . .

So that brings me to my second point on how to save more space . . . put your batteries under the robot using velcro. Also consider making a second level using spacers.

Otherwise, looks good.
Title: Re: arduino board help plz
Post by: airman00 on January 10, 2008, 04:14:54 PM
Can you please upload your CAD to the Google Warehouse library and in one of the tags do societyofrobots .    I want that CAD of those casters!

Thanks
well i dont know if thats what u wanted but : http://sketchup.google.com/3dwarehouse/details?mid=25480e0fe0d974fa705310bd14c7d998

edit: i was wandering here and came to this with my thoughts: i will be using 6 AA rechargeable batteries(1.2V each) thats 7.2V i have planed that his will be enough to power my arduino and 3 servos and an IR and now i suddenly realized that this cant be... its to few volts. am i right?
anyway i thought that i will buy a 9V battery to power the arduino and connect 6V directly to servos  and the IR could get power from the arduino 5V power pin. so the schematics would something like this:

Thanks for the CAD and I love how your schematic looks!   ;D
Title: Re: arduino board help plz
Post by: paulstreats on January 10, 2008, 07:05:55 PM
Quote
edit: i tried to put the mass as front as i could cuz i believe this would increase efficiency cuz the servos don't have so much to pull then


Your servo's will have to pull the weight regardless of where where they are. In fact you would probably be better off placing heavier components as near to the servo's as possible to increase the static grip of the wheels.

I like the look of the cad, it must have taken a while :)
Title: Re: arduino board help plz
Post by: robonoob on January 11, 2008, 07:50:07 AM
okei admin it was a little too long(the butt) so i made it shorter and put the batteries on the bottom of the robot but i will use double sided tape instead of velcro(cuz i don't know a place to buy it from) and i will also mount the scanning servo with DST but what about the 2 driving wheels? how should i mount these?? :S
i mean like if these things: http://www.servocity.com/html/90_degree_universal.html come with the servo i am going to order( http://www.robotshop.ca/home/products/robot-parts/motors/servo-motors/hitec-servo-en/hitec-hs311-servo.html ) then i think i will use them.
the IR will be  mounted with a double sided tape(DST) as well.
PS: please give my last schematics a look and tell me if this would work as i described or not :)
thank you :)
Title: Re: arduino board help plz
Post by: Admin on January 11, 2008, 08:19:28 AM
Quote
i will use double sided tape instead of velcro(cuz i don't know a place to buy it from)
You can get velcro at any hardware or craft store. I buy the $20 box of like ~20ft of velcro . . . lasts me about 5 years. But you can also buy small strips for like $2. I don't recommend double sided tape for batteries because its really hard/annoying to remove.


as for mounting wheels, dont double post!
http://www.societyofrobots.com/robotforum/index.php?topic=2729.msg19352#msg19352


And for your CAD, don't forget a method to mount your arduino onto the robot. You will of course also need room for your wiring, etc.
Title: Re: arduino board help plz
Post by: Ro-Bot-X on January 11, 2008, 09:59:09 AM
You may want to install the drive servos so that the wheel axle will be towards the back instead of towards the front. This way it will improve turning radius of the ball caster and still be well weight ballanced.
Title: Re: arduino board help plz
Post by: robonoob on January 11, 2008, 05:47:34 PM
You may want to install the drive servos so that the wheel axle will be towards the back instead of towards the front. This way it will improve turning radius of the ball caster and still be well weight ballanced.
umm i don't know if that's what u meant but this is what i did:
Title: Re: arduino board help plz
Post by: Ro-Bot-X on January 12, 2008, 11:56:50 AM
Yes, this is much better. But you should also do the same for the Sharp Sensor since they have like 4 inch minimum measured distance...

Oh, and add bump sensors, just in case the robot can't see something lower than the range sensor.
Title: Re: arduino board help plz
Post by: robonoob on January 12, 2008, 12:10:39 PM
Yes, this is much better. But you should also do the same for the Sharp Sensor since they have like 4 inch minimum measured distance...

Oh, and add bump sensors, just in case the robot can't see something lower than the range sensor.
the 4 inch doesn't matter because i will make the robot turn if the wall is like 30 cm's from the robot :)
but bump sensors? what are these?
Title: Re: arduino board help plz
Post by: airman00 on January 12, 2008, 07:19:02 PM
bump sensors are contact switches

switch closed = obstacle

the obstacle hits the push button switch
Title: Re: arduino board help plz
Post by: Admin on January 12, 2008, 10:25:22 PM
Quote
the 4 inch doesn't matter because i will make the robot turn if the wall is like 30 cm's from the robot
but what if your robot turns into a wall?

Ro-Bot-X is right :P
Title: Re: arduino board help plz
Post by: robonoob on January 13, 2008, 03:26:46 AM
Quote
the 4 inch doesn't matter because i will make the robot turn if the wall is like 30 cm's from the robot
but what if your robot turns into a wall?

Ro-Bot-X is right :P
oh... i never thought about that :D anyways i will flip the scanner servo around too and then try the robot and if it starts hiting every wall then i will try making theese bump sensors  or something :)

edit: i put the scanner servo to the back i think this would work eaven better because my servo only rotates 90 degrees :)

PS: the fourth picture is about the range of view of the robot if i set the wall detection distance 30 cm.( about 12 inch)  :)
Title: Re: arduino board help plz
Post by: Admin on January 13, 2008, 12:04:03 PM
hey robonoob I really like your 4th pic with the IR scan range.

can I use it in my sharp IR tutorial?
Title: Re: arduino board help plz
Post by: robonoob on January 13, 2008, 12:19:33 PM
hey robonoob I really like your 4th pic with the IR scan range.

can I use it in my sharp IR tutorial?
but ofcourse :) it would be my honor :)
Title: Re: arduino board help plz
Post by: Trumpkin on January 13, 2008, 05:56:40 PM
you can get bump sensors from computer mice
Title: Re: arduino board help plz
Post by: robonoob on January 14, 2008, 06:05:40 AM
you can get bump sensors from computer mice
yea i have a lot of them but i think i wont need one :) but that will be clear after i have built my robot :)
BTW i will get a creditcard tomorrow and then i can order the parts tomorrow too :P but i dont know how much time it takes me to get the arduino cuz its out of stock wher i am going to buy it :(
Title: Re: arduino board help plz
Post by: robonoob on January 14, 2008, 03:23:05 PM
umm i recoved the credit card a day earlyer(fortunately) and i am now ordering the parts :)
but i have some questions...
http://www.robotshop.ca/home/products/robot-parts/sensors/infrared-sensors/sharp-gp2d12-ir-range-sensor-10-cm-80.html this thing comes without the cable? am i right? so i need to buy the cable aswell?
then: i've decided to buy this servo http://www.robotshop.ca/home/products/robot-parts/motors/servo-motors/hitec-servo-en/hitec-hs422-servo-motor.html and i was wondering if there are any mounting things with it? like this? http://servocity.com/html/90_degree_universal.html
 umm yea...this may be a stupid question but i really need an answer for this one too :D can i mount my IR to the servo horn with this thing? http://www.robotshop.ca/home/products/robot-parts/mechanics/mounts-hubs/lynxmotion-multi-purpose-sensor-housing.html
http://www.robotshop.ca/home/products/robot-parts/mechanics/robot-wheel-track/tamiya-ball-caster.html are there mounting skrews added to the kit? you know like the skrews with what i can mount the caster to my robot chassis?
and then lastly i was thinking of ordering a sonar for my future projects cuz i dont want to order a second time this soon cuz the shiping here is just CRAZY and my question is: assuming that i will be using arduino then what sonar would you recommend from this page? http://www.robotshop.ca/home/products/robot-parts/sensors/ultrasonic-range-finders/index.html
i was thinking of this particular one here: http://www.robotshop.ca/home/products/robot-parts/sensors/ultrasonic-range-finders/devantech-ultrasonic-range-finder-srf05.html
PS: i want to get a cheap sonar :D and if u reccomend me a sonar them please tell me why you would pick this one :)

PSS:i would need quite a fast answer cuz i cant wait to order the parts :P(too bad i have to wait a month to recive the parts because some of the things i'm gonna order oare out of stock :( )

PSSS: can anybody please tell me why some sonars have 2 "speakers" (i dont know how they call theese things :D) but some only have 1?
Title: Re: arduino board help plz
Post by: airman00 on January 14, 2008, 04:54:14 PM
the IR rangefinder does not come with a cable

the 90 degree mount is good also, but remember to get the screws that come with it


yes you can mount the sensor on that mount

ok the casters come with mounting machine screws

I would get the Maxsonar EZ1 , its the easiest to use

the reason why they have 2 speakers ( aka transducers) is that one is transmitting and one recieves. When there is only one transducer than that one transducer switches off being transmitter and reciever

what material are you using for the chassis?

Title: Re: arduino board help plz
Post by: robonoob on January 15, 2008, 07:32:56 AM

the 90 degree mount is good also, but remember to get the screws that come with it


yes you can mount the sensor on that mount

ok the casters come with mounting machine screws

I would get the Maxsonar EZ1 , its the easiest to use

what material are you using for the chassis?


umm okei so what does that mean? "but remember to get the screws that come with it"
why do i have to get the screws that allready come with it anyway?
what are mounting machine screws? are these the screwa i need to mount the caster to my chassis?
how should i mount the Maxsonar EZ1?? any products from www.robotshop.ca please :) or if there arent any then please suggest me a sonar that i could mount on that: http://www.robotshop.ca/home/products/robot-parts/mechanics/mounts-hubs/lynxmotion-multi-purpose-sensor-housing.html

edit: i think i will buy this sonar: http://www.robotshop.ca/home/products/robot-parts/sensors/ultrasonic-range-finders/devantech-ultrasonic-range-finder-srf05.html because it can measure from 1 cm to 4m.
what do u think about that sonar?
also: hot to wire this sonar to my arduino i cant see any wires coming out of the device? :S
and i still didn't get the answer to my question: what comes with the servo?

edit2: I CANT FIND SPACERS ANYWHERE!!! could somebody tell me how are they really called? i dont belive they are called spacers cuz i just cant find any of the tings i need with the spacer as a keyword :S
it would be good if there are any sale on www.robotshop.ca :)
Title: Re: arduino board help plz
Post by: Admin on January 15, 2008, 08:24:54 AM
Quote
hot to wire this sonar to my arduino i cant see any wires coming out of the device?
you will have to add your own wires. something like this:
http://www.societyofrobots.com/electronics_wire_connector.shtml

just like connecting stuff to the $50 Robot board
Title: Re: arduino board help plz
Post by: airman00 on January 15, 2008, 08:32:41 AM
Ok the servos do not come with any mounting things for the servo itself, you'll need to buy the servo mount separately. in the servo box you get the servo and a bag of these (http://www.budgetrobotics.com/shop/images/156.gif)


by screws that come with it , i meant the screws that are compatible with the 90 degree servo mount . these screws http://servocity.com/html/_4_truss_head_phillip_screws.html (http://servocity.com/html/_4_truss_head_phillip_screws.html)

With the casters you get these (http://images.outdoorinteractive.net/mgen/6500435.jpg). The casters come in kit form, they are extremely easy to build and what I like about it is that you can build them up in different ways to give them different heights.


The SRF05 is fine also , just you have to solder on wires to the pins. Look at the technical specifications of it to see what the PCB holes are for.

Its basically a two wire interface to your MCU. I like the Parallax PING ultrasonic sensor since it is a one wire interface , so if you can get a PING, get it!


Title: Re: arduino board help plz
Post by: robonoob on January 15, 2008, 09:03:51 AM
okei so i found this picture: http://www.superdroidrobots.com/product_info/SRF05/srf05p2.jpg can i programme and use this sonar with the arduino? and what's with the echo output and trigger input? where do i need to connect these?
Title: Re: arduino board help plz
Post by: Admin on January 15, 2008, 09:05:58 AM
its all explained here ;)
http://www.societyofrobots.com/sensors_sonar.shtml
Title: Re: arduino board help plz
Post by: airman00 on January 15, 2008, 09:09:47 AM
okei so i found this picture: http://www.superdroidrobots.com/product_info/SRF05/srf05p2.jpg can i programme and use this sonar with the arduino? and what's with the echo output and trigger input? where do i need to connect these?

its all in admins tutorial.

trigger input is basically your trigger switch shooting out a sonar signal for i think 10uS ...... then you wait for the echo output which you then convert to inches or cm
Title: Re: arduino board help plz
Post by: robonoob on January 15, 2008, 10:31:45 AM
anybody please tell me where to buy these "spacers". i need to mount my arduino with them but i cant find any :S
Title: Re: arduino board help plz
Post by: airman00 on January 15, 2008, 10:34:39 AM
look at hardware stores , Home Depot may have one
Title: Re: arduino board help plz
Post by: Admin on January 15, 2008, 10:35:17 AM
Quote
anybody please tell me where to buy these "spacers". i need to mount my arduino with them but i cant find any :S
you didn't look ;)

type spacer into mcmaster, its the first link

a few are on the first page of a google search

digikey and mouser have them too
Title: Re: arduino board help plz
Post by: robonoob on January 15, 2008, 11:06:39 AM
yea but arent there any for sale in www.robotshop.ca?? i dont want to order from any other places because i will order all the other parts from there and the shiping to here (estonia) is very very expensive :S
Title: Re: arduino board help plz
Post by: airman00 on January 15, 2008, 11:10:27 AM
why not just put something soft under the arduino and then screw a screw through the arduino's hole and through the material into your board

you have any hardware stores in estonia?
Title: Re: arduino board help plz
Post by: robonoob on January 15, 2008, 11:17:22 AM
lol :D yea ofcourse we have but i dont live near to any of em... :S but i will look for something soft to mount the arduino :) thank you for that idea :) oh hey it just reminded me that i have some of theese rubber "Standoffs" from an old CD-ROM :P i think i could use them :P
and i still dont know how i will mount the batteries onto the bottom of my chassis...
Title: Re: arduino board help plz
Post by: Trumpkin on January 15, 2008, 12:56:08 PM
just get some velcro, I don't now what kind of stores that you have in estonia but if there is a wally-world (Wal-Mart) you could find some there.
Title: Re: arduino board help plz
Post by: robonoob on January 15, 2008, 02:12:47 PM
guess again lol :D i dont think that we have wal-mart :D but i'll see if i can find some velcro somewhere :)
okei next maybe this is a software question more than an electican one but i dont want to make another topic about it :) anyways here it is: what is the analog output range of the Sharp GP2D12 IR Range Sensor?
i dot know if i expressioned myself clearly but what i mean is that from where to where does the sensor give me the reading to my arduino board?? like the POT gives from 0 to about 1000 and so on. i would like to be as accurate as possible :)
thank you :)
oh btw i finally ordered all the parts(hopefully its all i need) but i may have to wait for 3 WHOLE MONTHS to recive these parts :S and maybe eaven more cuz some of the parts were out of stock...

PS:please tell me if i have to make another topic or can i ask the arduino programming questions here too?
Title: Re: arduino board help plz
Post by: Admin on January 16, 2008, 01:21:47 PM
spacers are easy to make . . .

you can also use those square little rubber pads that come with the servos as a spacer.

Quote
please tell me if i have to make another topic or can i ask the arduino programming questions here too?
well, keep related posts together, otherwise Ill leave it up to you to decide.
Title: Re: arduino board help plz
Post by: robonoob on January 18, 2008, 08:43:28 AM
okei i will post my software questions here too then...
look at this: http://www.arduino.cc/playground/ComponentLib/Servo and plz tell me if i could use this library if i am using 90 degree servos instead of 180 degree?
Title: Re: arduino board help plz
Post by: Admin on January 18, 2008, 09:28:33 AM
you will probably have to tweak the servo timing a bit, but otherwise yeap it should work right away
Title: Re: arduino board help plz
Post by: robonoob on January 18, 2008, 10:17:58 AM
okei good but how can i tweak the servo timing?(i mean i dont even know what this is :D)

edit: i tried to make my first pseudocode too :D just tell me if this would be good :)

turn scanner forward
take IR reading
if( IR detects object
turn scanner left
take IR reading
if( IR detects object
turn scanner right
if( IR detects object
move robot backwards
wait 1s
turn left
else turn robot right)
else turn robot left)
else move robot forward)
loop

(and remember i am using arduino which can be programmed with a code similar to C or C++)
Title: Re: arduino board help plz
Post by: Admin on January 18, 2008, 10:59:39 AM
this should help you understand servo programming better:
http://www.societyofrobots.com/robotforum/index.php?topic=2724.0

and you can't have three else statements in a row ;)
Quote
else turn robot right)
else turn robot left)
else move robot forward)

do something like:
if IR detects object
  turn scanner
else
  robot turns that direction
  go straight
Title: Re: arduino board help plz
Post by: robonoob on January 18, 2008, 11:20:33 AM
this should help you understand servo programming better:
http://www.societyofrobots.com/robotforum/index.php?topic=2724.0

and you can't have three else statements in a row ;)
Quote
else turn robot right)
else turn robot left)
else move robot forward)

do something like:
if IR detects object
  turn scanner
else
  robot turns that direction
  go straight
every one of those else statements go together with one if statement above :) thats why i used "(" and ")"

edit: wtf? quote admin:: By varying the number - say 22 or 27 instead of 25, you can slow down or speed up your servo. Servos make a different humming noise depending on the speed (because of the gears meshing at different frequencies). ::end of quote
you mean that i can change the speed of servo?(modified)

edit2: okei i made a simple code that i think should work but if i use this code then what would be the point of scanning? what i want to do is something like scan the sensor from left to right(i am using a 90 degree servo) and then if it sees an object then it would turn somewhere... but how can i do that? do i have to array the sensor values?


int scannerPin = 9; //this is the scanning servo
int servoleftPin = 10;
int servorightPin = 11;
int maxpulse = 1.9;
int minpulse = 1.1;
int neutralpulse = 1.5;
int IRsensorPin = 0;
int IRreading;
int movemode = 0;

void setup() {
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
  pinMode(0, INPUT);
  digitalWrite(servoleftPin, HIGH);
  delay(1.5);
  digitalWrite(servoleftPin, LOW);
  digitalWrite(servorightPin, HIGH);
  delay(1.5);
  digitalWrite(servorightPin, LOW);
  digitalWrite(scannerPin, HIGH);
  delay(1.5);
  digitalWrite(scannerPin, LOW);
  }
 void loop() {
   IRreading = analogRead(0);
   if(IRreading > 500) {
     movemode = 1;
     }
     else {
       movemode = 2;
       }
       
       if(movemode == 1) {
         digitalWrite(servoleftPin, HIGH);
         delay(1.9);
         digitalWrite(servoleftPin, LOW);
         digitalWrite(servorightPin, HIGH);
         delay(1.9);
         digitalWrite(servorightPin, LOW);
         }
         if(movemode == 2) {
         digitalWrite(servoleftPin, HIGH);
         delay(1.1);
         digitalWrite(servoleftPin, LOW);
         digitalWrite(servorightPin, HIGH);
         delay(1.9);
         digitalWrite(servorightPin, LOW);
         }
         }
Title: Re: arduino board help plz
Post by: robonoob on January 19, 2008, 09:19:19 AM
okei i have come to this idea... look at this picture: that 159 mm is the width of my robot and i am planing to scan the area of that width and take 5 readings...if any of those readings detects an object the robot will turnif not it will go straight
my question now is how can i array these sensor values with the arduino? i read the array article on arduino.cc but it was quite hard to understand...
and if any of you have any other solutions for me then i'dd really appreciate them :)

and remember that i am using a 90 degree servo... :)

of and i have thought about this thing too: i modify the scanning servo aswell and then i can turn the servo 90 degrees to right and 90 degrees to left(i only have to set the right ammount of time that the servo can turn or it will start spinning and mess up the wires :D)
Title: Re: arduino board help plz
Post by: Ro-Bot-X on January 19, 2008, 10:12:40 AM
Man why don't you use the Servo library for Arduino?

see a sample code:

Code: [Select]
#include <Servo.h>

Servo servo1;


void setup() {

  pinMode(9,OUTPUT);
  servo1.attach(9);
  //servo1.setMaximumPulse(2000);
  //servo1.setMinimumPulse(700);
  servo1.write(700);
  int v = 700;
  int IRreading = 0;
  int movemode = 0;
}

void loop() {

  IRreading = analogRead(0);

   if(IRreading > 500) {              //is this for no object? if it is, then scan left-to-right
          movemode = 1;
   }
   else {                                  //object found
          movemode = 2;
   }

    if(movemode == 1) {
         v += 100;
         if(v>2000){
              v = 2000;
         }
         servo1.write(v);
    }

    if(movemode == 2) {        //set it to do something else, I just set it to scan right-to-left
         v -= 100;
         if(v<700){
              v = 700;
         }
         servo1.write(v);
    }

    Servo::refresh();

}
Title: Re: arduino board help plz
Post by: robonoob on January 19, 2008, 11:13:35 AM
okei thank you for the code but i have a 90 degree servo and i dont know what do i have to do to use the servo library with this servo...
(and this code was quite difficult for me to understand :D)
plz help me! how can i turn the 180 degree servo library into a 90 degree servo library?
Title: Re: arduino board help plz
Post by: Ro-Bot-X on January 19, 2008, 05:03:01 PM
All you have to do is determine the minimul pulse (700 microseconds in the above example) and the maximum pulse and declare them. To move the servo to a position, all you have to do is servo.write(pulsewidth), where pulsewidth is in microseconds, from minimum to maximum declared. 1500 is the value for centering the servo.
To understand how it works, take a look at the samples on the Arduino Playground pages.

I don't know the values that will work for a 90 degree servo, you have to start from 1500 and go up until the servo stops rotating. Same going down from 1500.
Title: Re: arduino board help plz
Post by: robonoob on January 20, 2008, 10:45:32 AM
Code: [Select]
#include <Servo.h>

Servo servoleft;
Servo servoright;
Servo scanner;
int sensor = 0;
int IRread1 = 0;
int IRread2 = 0;
int IRread3 = 0;
int IRread4 = 0;
int IRread5 = 0;
int moveMode = 0;
int scan = 0;
int object = 0;
void setup() {
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
  pinMode(0, INPUT);
  servoleft.attach(9);
  servoleft.setMinimumPulse(1100);
  servoleft.setMaximumPulse(1900);
  servoleft.write(1500);
  servoright.attach(10);
  servoright.setMinimumPulse(1100);
  servoright.setMaximumPulse(1900);
  servoright.write(1500);
  scanner.attach(11);
  scanner.setMinimumPulse(1100);
  scanner.setMaximumPulse(1900);
  scanner.write(1500);
  Serial.begin(9600);
  Serial.println("Ready to Rock 'n' Roll baby");
}
void loop() {
  scan = 1;   //scan front
  if(object == 0){
    moveMode = 1;
    }
  else if(object == 1) {   //if object front then turn left
    Serial.println("Object in front");
    moveMode = 2;
    scan = 1;   //scan left
    if(object == 1) {   //if object left then turn right 2 times(that means turn around)
      Serial.println("Object on the left");
      moveMode = 3;
      moveMode = 3;
      scan = 1;   //scan right
      if(object == 1);
      {   //if object right then turn right once more(that means the robot is facing the opposite direction that at the start)
        Serial.print("Object on the right");
        moveMode = 3;
      }
    }
  }
  if (scan == 1) {
    scanner.write(1376);      //this whole group takes 5 readings
    IRread1 = analogRead(0);  //from front of the robot
    scanner.write(1438);       //and if any of tose readings
    IRread2 = analogRead(0);   //detects and object then
    scanner.write(1500);        //the programm tells the robot
    IRread3 = analogRead(0);    //that there is an object :)
    scanner.write(1562);     
    IRread4 = analogRead(0); 
    scanner.write(1624);     
    IRread5 = analogRead(0);   
    if (IRread1 > 500 || IRread2 > 500 || IRread3 > 500 || IRread4 > 500 || IRread5 > 500) {
      object = 1;
    }
    else (IRread1 <= 500 || IRread2 <= 500 || IRread3 <= 500 || IRread4 <= 500 || IRread5 <= 500);
    {
      object = 0;
    }
  }
  if(moveMode == 1) {
    servoleft.write(1100);   //move straight
    servoright.write(1900);
  }
  if(moveMode == 2) {
    servoleft.write(1900);   // turn left for 0.6 seconds
    servoright.write(1900);
    delay(600);
    servoleft.write(1500);   
    servoright.write(1500);
  }
  if(moveMode == 3) {
    servoleft.write(1100);   //turn right for 0.6 seconds
    servoright.write(1100);
    delay(600);
    servoleft.write(1500);
    servoright.write(1500);
  }
}
okei i made this code (thank you ro-bot-x :) i made what u recommended)
i used the servo library, plz tel me if this would work? or would it make any errors( like start spinning on place or something...)?
BTW: is there any way i can change the speed of the servos?(i think not but just to be sure...)
Quote
if(IRreading > 500) {              //is this for no object? if it is, then scan left-to-right
actually no :D if IRreading > 500 then object detected :D(i think but i'm not sure cuz i still havent recieved the sensor and the arduino to test it)

EDIT: oops im so sorry i posted a wrong code and named it mine :D buy i fixed this problem now :D
Title: Re: arduino board help plz
Post by: robonoob on January 21, 2008, 08:01:33 AM
hey ppl i've been working with some codes :9 and i came up with this one(kinda used the same left edge detection that admins robot uses :P)
Code: [Select]
#include <Servo.h>

Servo servoleft;
Servo servoright;
Servo scanner;
int IRsensor = 0;
int scannerpos = 0;
int IRread = 0;
int leftedge = 0;
int scan = 0;
int moveMode = 0;


void setup() {
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
  pinMode(0, INPUT);
  servoleft.attach(9);
  servoleft.setMinimumPulse(1100);
  servoleft.setMaximumPulse(1900);
  servoleft.write(1500);
  servoright.attach(10);
  servoright.setMinimumPulse(1100);
  servoright.setMaximumPulse(1900);
  servoright.write(1500);
  scanner.attach(11);
  scanner.setMinimumPulse(1100);
  scanner.setMaximumPulse(1900);
  scanner.write(1500);
  Serial.begin(9600);
  Serial.println("Ready To Rock 'n' Roll Baby");
}
void loop() {

  if(leftedge == 1) {
    scanner.write(1100);
    moveMode = 1;
  }
  else if(leftedge == 0) {
    scanner.write(1900);
    moveMode = 2;
  }
  if(scan == 1) {
    IRread = analogRead(0);
    moveMode = 3;
    if(IRread > 500) {
      leftedge = 1;
    }
    else if(IRread <= 500) {
      leftedge = 0;
    }
  }
  if(moveMode == 1) {
    servoleft.write(1100);
    servoright.write(1900);
  }
  else if(moveMode == 2) {
    servoleft.write(1900);
    servoright.write(1900);
  }
  else if(moveMode == 3) {
    servoleft.write(1100);
    servoright.write(1900);
  }
}
this finds the objects left edge and tries to head towards it(i dont know if this would work though :D)
and i want you to check this over and tell me if this would work as i want it to work or not?
also i dont know how to get the scanner.write value equal to the scannerpos value... i mean like something like this
Code: [Select]
scannerpos = scanner.write
if scanner.write(1900)
then scannerpos would be 1900 aswell
if scannerpos > 1500(neutral position of the servo)
turn robot right
if scannerpos < 1500
turn robot left

EDIT: i think i'm going to make a step-by-step tutorial if my mobile phone camera allows me to make enought detailed pictures..
Title: Re: arduino board help plz
Post by: Admin on January 25, 2008, 08:59:50 PM
Again, I am impressed with your image . . . I assume you won't mind me putting this on the sharpIR tutorial?
http://www.societyofrobots.com/robotforum/index.php?topic=2573.msg21176#msg21176

Oh and you should invest in a good digital cam. I regret every day that I have limited and low quality video of my earlier robots :(
Title: Re: arduino board help plz
Post by: robonoob on January 31, 2008, 12:50:36 PM
Again, I am impressed with your image . . . I assume you won't mind me putting this on the sharpIR tutorial?
http://www.societyofrobots.com/robotforum/index.php?topic=2573.msg21176#msg21176

Oh and you should invest in a good digital cam. I regret every day that I have limited and low quality video of my earlier robots :(
yea i saw that you have put this picture to the tutorial :) i'm so proud now :D:D
and  unfortunately i dont have money to buy the camera :( i would be very happy if i had one but yea... too bad huh.
anyway still anybody plz can you tell me what do u think abou the codes i wrote some posts ago :)
Title: Re: arduino board help plz
Post by: robonoob on February 02, 2008, 02:50:06 AM
Hi ppl :P i got my arduino starter pack yesterday :P and it is soooo AWESOME :D (my first robot-like thing :D)
i made the LED knightrider and blink etc... but i was wondering how to connect the photocell i got from the pack so it would give me proper input? do i need to use resistors? what resisors? where should i connect what?
Title: Re: arduino board help plz
Post by: airman00 on February 02, 2008, 08:15:02 PM
(http://www.tigoe.net/pcomp/img/analogin.gif)
Title: Re: arduino board help plz
Post by: Trumpkin on February 04, 2008, 01:05:55 PM
Have fun Robonoob!  ;D
Title: Re: arduino board help plz
Post by: robonoob on February 05, 2008, 06:50:20 AM
(http://www.tigoe.net/pcomp/img/analogin.gif)
okei thank you :) ill try this one out :)
if anybody has any interesting ideas what to do with my arduino board then let me know of them :)
(i dont have any servos or stuff yet :( )
Title: Re: arduino board help plz
Post by: robonoob on February 07, 2008, 10:17:09 AM
Hey ppl i got some IR emitters and receivers (i think that his is what they are) from an old mouse.
i thought you could help me figure out how to use them as an encoder detectors :) notice that half of them have been coloured red on top and half of them are coloured black. i mean that that means which one is emitter and which one is receiver. but i don't know which if which. so, these black frame-like things are the things that hold the sensors as shown on the pictures as well.
so tell me how would i have to wire these things up on my arduino mini breadboard
Title: Re: arduino board help plz
Post by: Trumpkin on February 08, 2008, 05:15:45 PM
the black ones are the detectors. it looks like 1 might be burnt.
Title: Re: arduino board help plz
Post by: robonoob on February 09, 2008, 06:39:18 AM
the black ones are the detectors. it looks like 1 might be burnt.
okei the black is detector but still how would i need to wire them up?
and i dont think it is burnt i think that the light played a trick on us :D


edit: i made an h-bridge with my arduino too :P so i can run motors at the moment :) i may make a simple robot using my 1 photocell and the h-bridge :)
any ideas? oh and the IR emitters and detectors (look above) i'd like to use as well :)
so pleaseee give me ideas and/or links to any this kind of projects :)
thank you in advance
Title: Re: arduino board help plz
Post by: robonoob on February 15, 2008, 06:35:34 AM
hi :)
still no reply :(
anyway i made an awesome robotlike thing :D its just a simple prototype(i think)
anyway i took an old CD-rom, make a simple car out of it that can drive only backward and forward.
i put a light sensing resistor on to the front of it and programmed the arduino, so that if the robot is too close to a wall(the sensor is in a shadow) then the robot goes backwards, and if the sensor see's no wall(it sees light), then the robot goes straight. :)
i hope you understood what i just said :D
anyway i am very pleased with my first "robotlike" thing :D

still wateing to get some guidance about theese IR sensors mentioned above.
Title: Re: arduino board help plz
Post by: robonoob on March 20, 2008, 04:31:16 PM
okey ppl i received my parts today(about time huh?) and now I'm trying to put it all together...as admin told me that i can post my software questions here too, I'm going to ask you some things:

how can i make the servo turn clockwise for 1 second and then counterclockwise for 1 second and then again clockwise 1 second and so on, so on??? remember I'm using arduino, so its C++(or C, i don't really know)
i believe it has something to do with millis() function, but because I've never used millis() before, i don't know how to use it.

then secondly. how would you recommend me to make the robot scan? like scan from front and then sides and then make a decision? or scan from front and if there is an object then scan from the sides for a way to go?
or o u ppl have any better ideas for me to use?i wanted to do something like this: scan from five different directions: far left, left, front, right, far right. then make a decision where to move and then scan again.
but i think that this makes the robot to stop while it is scanning, but i want it to move and scan at the same time(of course if it is even possible)

i really hope you can help me with this guys.
oh and keep in mind that this is still my first robot, so be patient with me :P

thank you.
Title: Re: arduino board help plz
Post by: airman00 on March 20, 2008, 05:01:26 PM
okey ppl i received my parts today(about time huh?) and now I'm trying to put it all together...as admin told me that i can post my software questions here too, I'm going to ask you some things:

how can i make the servo turn clockwise for 1 second and then counterclockwise for 1 second and then again clockwise 1 second and so on, so on??? remember I'm using arduino, so its C++(or C, i don't really know)
i believe it has something to do with millis() function, but because I've never used millis() before, i don't know how to use it.

then secondly. how would you recommend me to make the robot scan? like scan from front and then sides and then make a decision? or scan from front and if there is an object then scan from the sides for a way to go?
or o u ppl have any better ideas for me to use?i wanted to do something like this: scan from five different directions: far left, left, front, right, far right. then make a decision where to move and then scan again.
but i think that this makes the robot to stop while it is scanning, but i want it to move and scan at the same time(of course if it is even possible)

i really hope you can help me with this guys.
oh and keep in mind that this is still my first robot, so be patient with me :P

thank you.

hey robonoob

I appreciate that you condensed all your questions

but I would like  a new thread for the software questions
Title: Re: arduino board help plz
Post by: robonoob on March 21, 2008, 12:47:14 AM
considered, done
Title: Re: arduino board help plz
Post by: Brandon121233 on March 24, 2008, 09:30:33 PM
Hey sorry I didn't find this earlier but have you guys checked out my tutorial on Walbot? I made my robot with the Arduino board, the MaxEZ1 Ultrasonic sensor and 2 Sharp dist. sensors. I answer a lot of your questions that you have been asking in my tutorial thats on this website under the Member Tutorials page http://www.societyofrobots.com/member_tutorials/node/45 (http://www.societyofrobots.com/member_tutorials/node/45), if you have any questions more about your project, I know a bunch about the Arduino board and I'm sure I could help you...
Title: Re: arduino board help plz
Post by: newbie on September 02, 2008, 06:49:56 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.

how to redefine it in ordinary language?hard?
admin always emphasis that the two envionment is same.
i  know we can burn arduino using avr studio but how about my motor library which is afmotor.h from ladyada?
my avr studio always have this error:
Quote
gcc plug-in: Error: Object file not found on expected location C:\Users\user\Desktop\irobot\iRobot.elf
Make sure your makefile specifies the output .elf file as iRobot.elf
i am so pity no one help me ...... :-\

i got errors and error when using the below code in arduino without redefine ( i am stupid)!!!!
http://www.societyofrobots.com/robotforum/index.php?topic=5065.0 (http://www.societyofrobots.com/robotforum/index.php?topic=5065.0)
http://
i really hope that someone may help me to redefine the below code into aduino capable......
at least give some guide......
don't let me walk alone in dark(robotics),
pls help

actually i am finding some arduino software capable source code for a micromouse(either good or bad nevermind)
Title: Re: arduino board help plz
Post by: Admin on September 02, 2008, 09:52:17 PM
Quote
my avr studio always have this error:
Quote
gcc plug-in: Error: Object file not found on expected location C:\Users\user\Desktop\irobot\iRobot.elf
Make sure your makefile specifies the output .elf file as iRobot.elf
Just search that gcc error (http://www.societyofrobots.com/robotforum/index.php?action=search2;params=YWR2YW5jZWR8J3wwfCJ8YnJkfCd8MiwzLDQsNSw2fCJ8c2hvd19jb21wbGV0ZXwnfHwifHN1YmplY3Rfb25seXwnfHwifHNvcnR8J3xyZWxldmFuY2V8Inxzb3J0X2RpcnwnfGRlc2N8InxzZWFyY2h8J3xPYmplY3QgZmlsZSBub3QgZm91bmQgb24gZXhwZWN0ZWQgbG9jYXRpb24=) and you will find answers ;D


Also, you can just use my $50 Robot code on the Arduino and it will work.