Go Down

### Topic: Robofest help (Read 2883 times)previous topic - next topic

#### Robofest-Team

##### Dec 06, 2012, 03:13 pm
Hello,

I'm entering into the robofest competition and I need some help. Basically I have to find the area of a black triangle taped onto a white table as quickly & accurately as possible. I'm going to use A=1/2B*a so I need my robot to find the base and the hight of the triangle.

I know I could use the motor rotations, but I was hoping for a quicker way to get the measurements I need. Could the Arduino use a camera or other sensors so my robot does not have to follow the edge of the triangle?  Also money is not really an object, but I don't know to much programing for Arduino.

Any help would be appreciated!

#### johnwasser

#1
##### Dec 06, 2012, 04:35 pm
Arduinos aren't vert good with cameras.  Not enough RAM to buffer the image.

If you put a bunch of optical sensors in a line you could sweep across the triangle in one movement.  For each step where black is detected, add up the number of sensors between the left-most black sensed and the right-most black sensed.  Continue until no black is sensed.  The sum is proportional to the area of the triangle.  The units of measurement are (spacing between sensors) wide and (step size) high.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

#### Robofest-Team

#2
##### Dec 06, 2012, 04:59 pm
Thanks for the Idea!

Also, are optical sensors the same as light sensors. If so, is there analog expanders so that I could have more then the 15 sensors my mega allows?

Thanks again!

#### johnwasser

#3
##### Dec 06, 2012, 06:33 pm
Yes a light sensor and a light will allow you to detect the difference between white and black surfaces.  If you tune them to detect Black and White you can use a digital input, of which the Mega has many.

What degree of accuracy do you need in the area measurement?
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

#### Robofest-Team

#4
##### Dec 06, 2012, 07:45 pm
It needs to as accuracy as reasonable possible as they don't tell you how close it needs to be as they don't want teams to guess.

Do you have any recommendations on which light sensors are better?  Also, how do I tune light sensors?

Thanks for all your help!

#### johnwasser

#5
##### Dec 06, 2012, 08:48 pm

Also, how do I tune light sensors?

From the ATmega processor datasheet you can read the maximum voltage that will always read as LOW and the lowest voltage that will always read as HIGH.  You want one color to read below the maximum LOW and the other color to read above the minimum HIGH.

"Line Follower" bots need to solve this same problem.  Perhaps so research on those will turn up a proven digital design.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

#### cr0sh

#6
##### Dec 07, 2012, 06:12 am

Arduinos aren't vert good with cameras.  Not enough RAM to buffer the image.

Why does everyone keep forgetting about the Nootropic Design Video Experimenter kit?

http://nootropicdesign.com/ve/

It's built on the back of a modified form of the TVOut library; that said, you likely won't have much code (or more likely, SRAM) room left over for the rest of your custom code (and you can't use a Mega with it) - but maybe you could devise a way to use one Arduino dedicated to the VE, and communicate with it via another Arduino (with your code on it).

Other options would be to build something like the AVRCam:

http://www.jrobot.net/Projects/AVRcam.html

...which is kinda like the CMUCam system, just lower cost (plus you have to build it yourself - no kits or other ways of buying it, AFAIK)...
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

#### oric_dan

#7
##### Dec 07, 2012, 06:53 pm
Here is something that could be mounted on a panning servo, and easily handled by
limited Arduino RAM.

http://www.parallax.com/Store/Sensors/ColorLight/tabid/175/CategoryID/50/List/0/SortField/0/Level/a/ProductID/566/Default.aspx

Go Up