Valley Robotics
September 07, 2010, 12:25:56 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Robotics Presentations:
1) October 16 - ALFA Conference at Monterrey, Mexico.
2) TBD - Los Fresnos Elementary
 
   Home   Chat Help Search Calendar Blog Login Register  
Pages: [1]
  Print  
Author Topic: My first bot  (Read 3472 times)
Guajardo
Newbie
*
Posts: 12


View Profile Email
« on: November 06, 2008, 11:15:48 PM »

I want to start a robot that has IR senors to see where it's going through to make sure it won't crash into a wall. This robot could later be upgraded to do other tasks... but right now I'm going to use this material to build it.

1 PICAXE-28X1 Starter Pack


1 L293D Motor Driver


1 PICAXE Servo Upgrade Pack


1 Sharp GP2D120 IR Sensor - 11.5" / Analogue


2 Gear Motors with wheels (ratio of 120:1 to 210:1)


The complete robot should look something like this. Any recommendations?
Logged
Heriberto
Administrator
Jr. Member
*****
Posts: 51


heribertor88
View Profile WWW Email
« Reply #1 on: November 07, 2008, 12:56:55 AM »

Jaime,

Get yourself some good ol' pittman motors.  go to www.sparkfun.com or www.digikey.com and not only buy the sharp sensor, but get yourself some other components like some extra servo wire(21GA) and a few servo connectors so you can wire up your robot the easy way instead or soldering and later desoldering (get connectors!)

For the processor, I will post a link later on of a guy who created his own board by using a $6 pic16f876a processor and able to hook up a few servos to this inexpensive board made from just minor components.  I have two of these so u may have one  Smiley

As I have promised I will help you build your first robot and I hope you get far in life for this is only the beginning.  When you build your second it will be so much easier and enjoyable.
Logged
Heriberto
Administrator
Jr. Member
*****
Posts: 51


heribertor88
View Profile WWW Email
« Reply #2 on: November 08, 2008, 05:12:59 PM »

The link for the guy using the pic16f84a processor is below
http://www.pinter75.co.uk/robots/

This is the same processor is used on robot #8 "hexapod".
http://valleybots.com/index.php?topic=17.0

It was programmed using assembly.  I know you do not know how to program in assembly.  Oscar Valdez, and I will help you in any way we can.  If you want to pursue programming your robot in assembly we will help you.

I now am using another processor called the atom 28pin from microchip.  I now use Basic on it and it is a breeze to program anything on it.

As soon as you buy all of your components, take pictures and document all of your work.  My biggest mistake was ignoring the documentation and now I'm faced with no pictures to show you guys my horrible first robot, but I learned from it more than any other.  Keep this post updated on your progress.
Logged
javi87
Global Moderator
Newbie
*****
Posts: 4


View Profile Email
« Reply #3 on: December 08, 2008, 09:56:30 AM »

The link for the guy using the pic16f84a processor is below
http://www.pinter75.co.uk/robots/



it seems like a good start I myself want to start a project based on pinter75's homebrew botboard but the link in his website leading to the circuit and the code is broken do you happen to have that info? Also your link is broken too, no biggie one can navigate.
Logged
Guajardo
Newbie
*
Posts: 12


View Profile Email
« Reply #4 on: April 21, 2009, 09:08:07 PM »

Alas! Jaime Guajardo stopped playing his xbox 360 to get something done for real. The result is a cheaplooking cardboard thingy from a protein bar box with a brain. As of now the proteinbox bot only advances forward to stop when an object is infront of it. My code is messed up because it's not supposed to stop, but move back. If anyone is willing to help with it i'd be great. Smiley
Anyways heres my baby:


And heres is her brain:


code(which needs to fixed.. and yes I got the part from the analog from the internet):
Code:
low p10
low p11
  m var word
  mike var word

loop
    ADIN p0, mike;
    if mike < 200 then (200 what? what type of dist :S)
    gosub s
    else
  gosub l
    endif
     goto loop

s
for m=0 to 200  (I don't know what these distances are... and why m is suddenly used)
pulsout p10, 4000
pulsout p11, 2000
pause 20
next
return


for m=0 to 25    (same thing over here)
pulsout p11, -4000
pulsout p10, -4000
pause 20
next
return
Logged
Heriberto
Administrator
Jr. Member
*****
Posts: 51


heribertor88
View Profile WWW Email
« Reply #5 on: April 26, 2009, 08:15:56 PM »

Jaime,
I'm proud of you!!!  You took the initiative and finished the robot.  Now comes the interesting part.  Tweaking the code to perfect the results.  Remember that you first have to calculate your servo pulses until you find what the full right, full left and neutral pulses are for each servo.  Each manufacturer has different values. Plus the frequency your processor works at also differs the output of your pulse.  Hereafter you can command your robot to drive any direction.

You can check the distance of the distance analog sensor in the computer by debugging within the program.  I can show you later how this is done when we meet.

My questions to you.
1. What is m?  I believe m is suppossed to be mike(which is the analog distance sensor)  You have not declared this variable as a sensor or a pinout.  Are you confusing it with the variable mike?
2. Why did you pulseout a NEGATIVE value of -4000 and -2000 on the l subroutine?
    I believe 4000 will not work because your servo probably takes only 2000 microseconds(give or take) as the max. (which is full right)

I will meet you during the week so we can look at the code or maybe after school finishes so we can be stress free from finals.  Take care.
Logged
Guajardo
Newbie
*
Posts: 12


View Profile Email
« Reply #6 on: November 09, 2009, 01:42:35 AM »

Here is an update of what this baby can do!

<a href="http://www.youtube.com/v/afqBD92Ms2k&amp;ap=%2526fmt%3D18&amp;rel=0&amp;fs=1" target="_blank">http://www.youtube.com/v/afqBD92Ms2k&amp;ap=%2526fmt%3D18&amp;rel=0&amp;fs=1</a>


More info at: http://sites.google.com/site/jaimemguajardo/home/robot-gallery/robot1
Logged
oelias
Newbie
*
Posts: 8


View Profile Email
« Reply #7 on: February 18, 2010, 03:36:44 PM »

Nice robot. you really wen all out on it.
I just had a couple of questions. How did you get the robot to follow the path made by the black tape?
did you also use IR sensors? and can you get it to follow a different color tape?

Thanks
Oscar
Logged
Heriberto
Administrator
Jr. Member
*****
Posts: 51


heribertor88
View Profile WWW Email
« Reply #8 on: August 29, 2010, 03:49:10 PM »

Oscar, the robot follows the black tape by use of IR sensors on both sides of the line.  It can definitely follow any type of color as long as the new colored tape offers a different IR value than the floor.  Also remember that to specifically read a certain color you need the same colored LED, but for simplicity, if you only want to detect difference in color then any color will do just fine. http://www.societyofrobots.com/sensors_color.shtml

It's normally triggered by offering a threshold value to initiate a turn right/left function that commands the bot to stay on course.

For example, a white floor with a black tape can offer good differentiation, but a white floor on a lightly colored green or blue will not offer the same values, but ideally will still work.

let's simply use 0-100 (darkest to brightest) these values can vary depending on your ADC(Analog to digital converter)
white floor: 80
black tape: 20-30
green tape: 50-60

a good trigger value can be 70, but to be more accurate I'd stay with the black tape because it offers reliability.  Sometimes the white floor can have stains or dirt and can trigger if too close to the "white floor value"

Note: the brightest would obviously be a light source of some kind shinning down on the sensor

Let me know if I confused you more or cleared any doubts Smiley  I'm no expert so it's best you look online for details, but this should suffice to get you in the right path.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!