Society of Robots - Robot Forum
General Misc => Robot Videos => Topic started 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.
-
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.
-
Hi
that is pretty good for your first robot.
Look forward to see more of your robots in the future.
-
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
-
Looks really clean to be your first. I would say you have alot of potential.
-
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!!
-
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
-
meybe someday ill finish a halfway decent robt ;D
-
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
-
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
-
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.
-
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
-
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
-
that things a tank