I need advice: Building autonomous toy Car

I need some advice on building myself a robot. I am not sure if this is the correct place to post, if not, please tell me where to ask.

So this is what I want my robot to do:

Program 1

Move about. Find light, open spaces.

Speed is controlled in two ways: On the one hand, its determined by the proximity sensors, the more space, the faster it can go. On the other hand, it "wants" to stay in the light. The brighter it is, the slower it goes. It always goes the fastest speed allowed by both factors.

If something moves. Run away.

When the movement/infrared sensor senses something, it should switch to program 2

Program 2

Run Away! Find dark, closed spaces.

Speed is again controlled the same way as before, the less space, the slower it goes, but: The more light, the faster it can go.

After a certain time of peace and quiet, it switches back to program 1.

So this is what I want to use to build it:

Remote control car
with 7.2V DC motor and a stepper motor.

Arduino

Motor Control shield
http://www.ladyada.net/make/mshield/
(for hooking up the stepper and the d/c motor)

I am not sure how to connect the sensors. I was thinking of using an extender shield (as depicted in the picture below) so I can use a sensor shield for hooking up plug & play phidgets. This is expanisve though and I am not shure if it is really worth the money.
If i do it, here are the components:

Extender Shield
http://www.liquidware.com/shop/show/DTX/DoubleTall+ExtenderShield

Sensor Shield
http://www.emartee.com/product/41798/Arduino-Sensor-Shield-V4.0

And for Power
http://www.liquidware.com/shop/show/BP/Lithium+Backpack

Sensors:

Proximity (x3)
http://www.eztronics.nl/webshop/catalog/product_info.php/cPath/33/products_id/155
or
http://www.eztronics.nl/webshop/catalog/product_info.php/cPath/1_21/products_id/156
or
http://www.eztronics.nl/webshop/catalog/product_info.php/cPath/1_21/products_id/91

I am not really happy with these, as I believe that there are cheaper ones available... is there a sensor you would recommend?

Light
http://www.eztronics.nl/webshop/catalog/product_info.php/cPath/33_39/products_id/186

Movement
http://www.eztronics.nl/webshop/catalog/product_info.php/cPath/33_43/products_id/275

The arduino has such a thing as an internal timer, right?

This is how I imagine it all to fit together:


I would appreciate comments, on what equipment you would use, whether there are any obvious mistakes I am making, maybe you have some ideas to help me...

I am currently studying neuroscience and recently have developed a fascination of robotics and AI. I am still sort of brainstorming here, but I want to have some sort of platform on which I can experiment with neural networks etc. I also see this as a first step which should be able to be expanded upon. (thats why I am sort of considering getting the Mega instead of the Arduino)

If anyone would be interested in brainstorming on this with me, id be very pleased. I'm also happy to share my other thoughts on where this could be going, but as i just accidentally deleted my huge (huuuugeee) post that I just wrote, i will leave it at that for now.

Cheers

and thanks in advance for any feedback

paul

void forward(motor_speed){
  analogWrite(motion_1, motor_speed);
  digitalWrite(motion_2, LOW);
}

void backward(motor_speed){
  digitalWrite(motion_1, LOW);
  analogWrite(motion_2, motor_speed);
}

void motion_stop(){
  digitalWrite(motion_1, LOW);
  digitalWrite(motion_2, LOW);
}

void left(){
  digitalWrite(steer_1, HIGH);
  digitalWrite(steer_2, LOW);
}

void center(){
  digitalWrite(steer_1, HIGH);
  digitalWrite(steer_2, HIGH);
  delay(10);
  digitalWrite(steer_1, LOW);
  digitalWrite(steer_2, LOW);
}

void right(){
  digitalWrite(steer_1, LOW);
  digitalWrite(steer_2, HIGH);
}

i use this in my code for movement so it's easier to move around

although my robot isn't autonomous.
its internet controlled so no brains there.
i may use it as a extra function.

my robot worked fine but i burned my self made h-bridge for steering :frowning:

I like the idea to be honest, but I think you are trying to put too many functions in one robot. do you realy expect it to work first time without trial and error. What i suggest is that you play around with each individual sensor and post some code like how to detect an obsticla and we can write the rest of it for you. Like to go to a lighter spot you would say

if (leftlightval > rightlightval){
left()
}
or something

Hmm - sounds like a cockroach simulator - now all you need to do is build 1000 of them, add some solar panels, then release them out on the street!

:wink:

LOL would love to see that :stuck_out_tongue: hahaha

... any progress yet?

well whatever

well, sadly, no real progress on that project yet.

I got myself most of the sensors to experiment round with them a bit, but I have not assembled anything yet. (Well, built myself a little light-seeking robot and built myself a radar with IR sensors...) I do still plan on creating an autonomous robot, but I think I will use a differencial drive (or something cool like the RHex -->Desert RHex testing - YouTube)

but right now the project is on hold. if you want to see what I am working on, check out http://fkeel.blogspot.com

I do hope to revive this though :slight_smile:

(oh, and SaSaa are you dutch? do you know Zaza? ... that is the name I have given this project in my head :slight_smile: ...)

Looks like someone has been watching Prototype this. :slight_smile:

no, actually not.... i stumbled over prototype this only today...

Ive just been fascinated by walking machines for quite a while, and while a love hexapods i believe something like RHex to be more efficient in terms of power consumption (and I believe also in terms of spending... 18 quality servos is just something I cant afford :-(...)

Why 18 ? I thought you only needed 6 for a hexapod ?

i meant something like this

18 = 6 legs with 3 degrees of freedom