Society of Robots - Robot Forum

General Misc => Robot Videos => Topic started by: hazzer123 on June 13, 2007, 01:33:39 AM

Title: My first robot
Post by: hazzer123 on June 13, 2007, 01:33:39 AM
Ok before my exams i made a simple photovore. It wasn't that impressive... I decided to make it avoid all the objects in its way instead. But I had to start revising.

Now ive finished my exams, i decided to clean up the code and put it in a more permanent chassis. Sure, its not the most sophisticated thing in the world. But it didnt cost much, and i learnt a load making it.

It uses two homemade IR detector/emitter pairs to detect objects. It has two hitec servos for drive. Powered by a Ni-Cd battery from my brothers R/C car. The microcontroller is a PIC16F876A using a bootloader. The chassis is salvaged froma floppy drive.

I would post the code, but its not well commented. I will clean it up and post it.

It works by creating distance thresholds when powered on. It samples the sensors, and then will turn accordingly if there is a big change in one of the sensors.

Here is a video -

[youtube=425,350]xnJuK3IqwKE[/youtube]

The attached pictures are-

1) With the old cardboard chassis.
2) During rebuild with the floppy drive case.
3) Finished rebuild.
Title: Re: My first robot
Post by: Hal9000 on June 13, 2007, 04:07:44 AM
Hey that's pretty neat man, well done! It's nice to see stuff after tralking to you about it lol :)

Umm, yeah, all I can say is that tidying up the chassis and getting some proper wheels might be a good idea. Some sort of modularity for adding new sensors etc.

I often think that a good way to do this is get some lego technic and use all the axles through hole blocks to attach stuff to. Very nice indeed.
Title: Re: My first robot
Post by: Ai-bot on June 14, 2007, 09:19:52 AM
Hi

that is pretty good for your first robot.
Look forward to see more of your robots in the future.
Title: Re: My first robot
Post by: hazzer123 on June 14, 2007, 09:31:05 AM
Hi

Thanks for your comments :)

I plan on making it into a micromouse. But the thing i need first is a more powerful controller.

I have a few PIC18F4520s with hardware multiply, but my programmer velleman k8048, doesnt support them. They are supposedly supported if i use Winpic, but i have had no success.

I dont have the money for a new programmer. Hmmmm i was thinking if i could send a couple of chips somewhere to get flashed with a bootloader... Is there anywhere i can do this?

Thanks

Title: Re: My first robot
Post by: Camtron on June 16, 2007, 12:11:08 PM
Looks really clean to be your first.  I would say you have alot of potential.
Title: Re: My first robot
Post by: sotu on June 24, 2007, 07:19:18 AM
Nice robot.. ;D Looks really cool!
You can buy a inexpensive microcontroller for 20$ at Pololu.com
How much did your cost? Couse i dont think you get a Computer program in the packcage at Pololu, thats the problem, HOW TO MAKE THE CODES AND TRANSFER THEM!!
Title: Re: My first robot
Post by: hazzer123 on June 24, 2007, 11:06:53 AM
Hi,

my microcontroller was free :). Go to the microchip samples website and register on it. You are allowed 2 orders of up to 12 chips each a month. They also do serial eeproms etc. Its a great source of chips :)

As for a computer program, i just used GVim, a text editor, and wrote the program in assembly. I used a velleman K8048 to flash the PICs.

Thanks
Title: Re: My first robot
Post by: NOOBinDistress on August 30, 2007, 07:18:12 AM
meybe someday ill finish a halfway decent robt ;D
Title: Re: My first robot
Post by: airman00 on August 30, 2007, 08:14:14 AM
Did you have to modulate the two IR sensors. I mean did you modulate the two IR sensors to two different frequencies.
 Also, if you would have one more IR in front it would be a lot more reliable setup.

Can you please tell us about the IR sensors. Schematics please...

Nice job man!

,Eric
Title: Re: My first robot
Post by: hazzer123 on September 03, 2007, 09:34:18 AM
Nah i didn't modulate the IR sensors, they are both on all the time. I figured i didn't need to - if there is no object in front, then no light will be detected, not matter how many IR LEDs there was.

Yeah a front IR sensor would have been good, but it was just a quick little experiment. Now i have a much better PIC programming setup (i have an ICD2 and some PIC18F4525s) i might consider making the robot significantly more complex.

The schematic is really simple. The sensors are just phototransistors in a voltage divider, and the output voltage is fed into an ADC. Pic makes decisions based on these reading sends forward or reverse signals to either of the servos accordingly. I dont think it is worth making a schematic.

Thanks for the compliments guys :)

Harry
Title: Re: My first robot
Post by: airman00 on September 04, 2007, 08:16:27 PM
What do you mean by ADC?

The A to D pin on the microcontroller. OR a seperate chip. If so, which chip was it?

looking forward to the code.
Title: Re: My first robot
Post by: hazzer123 on September 05, 2007, 09:50:29 AM
I meant the ADC on the PIC.

I don't have the code any more sorry :(.

It was in assembly and not commented anyway, so it wouldnt have been too useful.

Ill be making a V2 robot soon. I will first make it behave in the same way as V1 and post the code which will be C (compatible with MPLAB C18).

Harry
Title: Re: My first robot
Post by: airman00 on September 06, 2007, 06:35:10 PM
No I only want the code to see how you did ADC in assembly. Hazzer can you send the code to my email ([email protected])
Or can you just post here how you did the ADC in assembly language.

movlw Thank You
movwf Hazzer123

lol
Title: Re: My first robot
Post by: goatfish on March 09, 2008, 03:25:31 AM
that things a tank