My uncreative retarded clone of the famed YDM
The 1st Video is of the basic 1st working code slapped together in about 30 min.
The second video is a tweaked version with wall detection so it doesnt just skim across walls. Its not perfect but getting better.
This is my first attempt ever at a robot. Ive always been semi-interested in robotics but nothing ever sparked my interest till the Yellow Drum Machine. (Thanks Fritz) Right now it is built on a 1/4" poplar base and everything is hotglued with the exeption of the controll board and the front axle.
I chose the 16F887 for a couple reasons, I have acess to as many as I blow up, I dont know C and didnt have time to learn an OS like used in the aurdonio or picaxe. Plus ASM is easy for me to understand and I know exactly whats going on.
Im using the GM10's for the SRF05 and eventually the drumsticks. Ive limited the current to them to about 40-45mA so when they stall they arent sucking massive amounts of power, the same is doneon the drive wheels which are limited to about 120mA.
I made a general use pcb for the uC so it can be reused in many projects later on if I choose.
It also has a 5 discrete H-Bridges capable of over 2A available to each motor. I only have 3 populated but have 2 more if I so desire.
I placed transistor buffers capable of driving upto 500ma on an 8-bit wide port if I need any high current drives such as the GM10's for the drum sticks and peripheral devices so I can turn them off and on to conserve power.
Now for the code, I have it 1st make sure it has enough distance in front of it before moving. Then as it moves I have it find the range to objects infront of it about every 1/3 of a second. When an object is closer then the preset value (4-7 in depending on material) it stops. Then It will look left and right and determine the greater value and turn toward it. It will then look forward again to see if it has enough room to go, if not it will again look for the greater distance and turn.
It also has wall and peripheral object detection so it wont skim across the base of a wall or clip an object. I have the robot about every 1.5 seconds look left and right to see if there is any obstacles. If there are it will slightly turn itself (about 15 degrees or so) to avoid the wall/object. It will do that upto 4 times then will just assume it has turned away enough. Then it continues on till it finds something in range and performs the appropriate action.
It has some problems on shiny floors as you can see in the 2nd video. The SRF05 detects an echo because it actually bounces off the floor and not the object in front of it. I will tilt the head up a little to prevent this. It works great on a carpeted floor because it absorbs some of the signal so it doesnt echo.