Pages: [1]   Go Down
Author Topic: Robofest help  (Read 1447 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 179
Posts: 8074
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 179
Posts: 8074
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 179
Posts: 8074
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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)...
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 149
Posts: 2790
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: