Small advanced robot

Hi,

Looking good!
Sorry about the broken plastic. What material did you use? Lexan? I bet Jim has several tip when it comes to drilling this material. I believe I’ve heard that you must unsharpen your drill at first.

Looking forward to see it in action!

they actually make plastic drilling bits that have some sort of reverse angle on them. I got a couple sizes from mcmaster, and they do seem to work, but other than to say they look a little different I’m at a loss as to the physics of why.

Can one melt thru the material using a soldering iron tip?

Thanks for the reply all…

If you are referring to the acrylic base, I’m sure you could but I just used the
same drill bit I used before at a much slower speed and was able to drill
the hole with no problems.

Get ready for awesome autonomous code at least the newest I have written.
For the top Arduino Ive got this
.

[code]#include <Servo.h>
Servo servo1; // left servo
Servo servo2; // right servo
Servo servo3; // neck servo
int signal = 6; // Incoming signal from the other microcontroler on IR status
int val = 0; // variable to store the read value
int ledPin = 13; // LED connected to digital pin 13
int counter = 0;

void setup()
{
Serial.begin(9600);
servo1.attach(17); //left servo
servo2.attach(16); //right servo
servo3.attach(15); //neck servo
pinMode(signal, INPUT); // sets the digital pin 7 as input
servo1.setMaximumPulse(2250);
servo1.setMinimumPulse(780);
servo2.setMaximumPulse(2250);
servo2.setMinimumPulse(780);
servo3.setMaximumPulse(2250);
servo3.setMinimumPulse(780);
}

void loop()
{
//Drive neck servo
if(counter > 280 && counter < 300)
center ();
if(counter > 580 && counter < 600)
panleft ();
if(counter > 880 && counter < 900)
panright ();

//Update counter
if(counter < 900)
{
counter ++;
}
else
{
counter = 0;
}

//Read Incoming signal from the other microcontroler on IR status
val = digitalRead(signal); // read the input pin
Serial.print (val);
if (val == 0)
{
Forward();
}
else
{
for (int i=0; i <= 100; i++)
{
Backward();
delay(10);
Servo::refresh();
}
for (int i=0; i <= 55; i++)
{
Left();
delay(10);
Servo::refresh();
}
}
Servo::refresh();
}

void Forward()
{
servo1.write (30);
servo2.write (150);
}

void Backward()
{
servo1.write (140);
servo2.write (40);
}

void Left()
{
servo1.write (150);
servo2.write (150);
}

void Right()
{
servo1.write (30);
servo2.write (30);
}

void panleft()
{
for (int i=0; i <= 3; i++)
{
servo3.write (0);
delay(10);
Servo::refresh();
}
}

void panright()
{
for (int i=0; i <= 3; i++)
{
servo3.write (180);
delay(10);
Servo::refresh();
}
}

void center()
{
for (int i=0; i <= 3; i++)
{
servo3.write (100);
delay(10);
Servo::refresh();
}
}

[/code]

For the bottom Arduino Ive got this
.

[code] int IR = 4; // select the input pin for the IR Sensor
int ledPin = 13; // select the pin for the LED
int signal = 6;
int val = 0; // variable to store the value coming from the sensor

void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT); // declare the ledPin as an OUTPUT
pinMode(signal, OUTPUT); // declare the Signal as an OUTPUT
pinMode(IR, INPUT);
digitalWrite(signal, LOW); // turn signal to a low
}

void loop() {
val = analogRead(IR); // read the value from the sensor
if (val > 320)
{
digitalWrite(signal, HIGH); // turn the ledPin on
}
if (val < 320)
{
digitalWrite(signal, LOW); // turn the ledPin on
}

Serial.print("Distance is: ");
Serial.print(analogRead(IR));
digitalWrite(ledPin, HIGH); // turn the ledPin on
delay(val); // stop the program for some time
digitalWrite(ledPin, LOW); // turn the ledPin off
delay(val); // stop the program for some time
}
[/code]

Yes
Yes I know I’m just using the bottom Arduino as a sensor slave :smiling_imp:
I will have it doing more later… (hehe reading more sensors lol)

docdoc

Here is a video clip of the robot using the above code to navigate around.

youtube.com/watch?v=4K_E1UVZ3TU

docdoc

Hey DocDoc,

Nice work so far. It’ll be interesting to watch its progress advance.

Keep up the good work!

Hi DocDoc,

I’ve missed the post with the video! Great work! I’ve noticed that the bot lifts the back part when you stop. Maybe if helps if the battery is moved a little bit more to the back. You could also tell it to stop before you put it into reverse. I bet you do that with your own car as well :stuck_out_tongue:

Just a idea though :wink:

Any progress on the line/edge sensors?

I love his glasses btw. I should I say glass. He’ve only got one :stuck_out_tongue:

Xan

(I am having some difficulty). Let me know?
R

Great pictures! You do good work. :smiley:

Hi,

Great Job Doc,

Could you please tell me how you configure your MLX90614. I just can’t figure out how to communication with it?

The MLX temp reader was put on the bench for the same reason of communication protocol. This is a very complex sensor that is not the easiest to read though at some point I may try picking it back up and giving it a try… For now Ive moved on to a new project that I will be posting very soon.

DoC