Lior Elazary KK6BWA

...because this life is yours. Some of it was given to you, the rest you make yourself.

  • Increase font size
  • Default font size
  • Decrease font size

Sparky

E-mail Print PDF
Article Index
Sparky
AutoCAD Drawings
Building the frame
Making the wheels
Motors
Encoders
Electronics
Final Assembely
Software
All Pages

Sparky was crated for the June, 2 2001 robotics competition (See Pictures) in San Diego (SDRS events).  The event was to go around 4 obstacles and return to the exact starting position. There was an advance round in which the robot has to circle the obstacles and also come back to the same starting point. I only participated in the first event. The robot did OK, it got second place (Well out of 2 robots that enter the competition. Mine and Alex Brown). To determine the distance to the starting point I was doing dead reckoning and sonar reading in which I tried to mach the sensor values obtain when the robot first started. But the timing for the dead reckoning was off and the robot kept on missing the target. Well, there is always next year. Now I use the robot as an EBOT for the  Robotics Society of Southern California.


Here is a detail explanation of how I build the robot and the algorithms.

 

Sparky learning to follow a wall using a neural network

For more info see Introduction to neural network.

 

 

 


 

 


 

The frame was cut out of aluminum using my cnc milling machine. After I finished designing it in AutoCAD I converted the drawing to a NCG program and fed it to the milling machine. You could also cut the aluminum with a hack saw. The aluminum I used was perched from www.onlinemetals.com.  (.090" ALUM SHEET 6061-T6). You could use thinner aluminums as long as they stay stiff.  To fasten the frame together I used rivets because there are cheap and they don't come apart over time do to vibrations. For the caster I riveted a tail dragger assembly in the back.


 

The wheels where perched from Tower Hobbies (Dave Brown Lite Wheels 3").  I then prayed apart the two nylon hub inserts, and riveted a large round horn on on of the nylon hub inserts. Then I drilled a hole large enough for the servo screw head to go into.

Then the wheel was then snapped back together. I made two of these wheels.

The caster was made from a small tail wheel and a .072" push rod. Bend the push rod as on the picture. The brass eyelets are there so the assembly wont bind.



 

For the motors I used stander servos that where also perched from Tower Hobbies (Futaba S3003 Standard Servo).

The servos was then hacked to allow for continues rotation. Here is how.

 

Open up the servo using the four screws on the bottom.

Open the top of the case and remove the black gear.

Cut the plastic tab in the black gear off.

Open to bottom of the case and remove the electronics with the motor. You can use the potentiometer were the black wheel was to push the electronics out.

Cut the top of the potentiometer, and position it to the center. You can do this by rotating it to one side and then the other to determine to max left and right positions and then turning it to the center. Another method will be to plug the servo in to a receiver and set the stick to neutral position. Then  move the pot to the center and adjust until the motor stops spinning.

Place some super glue around the potentiometer so it wont move.

Assemble the servo together and prepare one more servo the same way.



 

The encoders where made using two QRB1114 from digikey and a white full sheet label (perched from office depot). The way I build the sensor was exactly how Alex Brown build his for his robot Snuffy. Here is a link for that Line sensor.

The encoder disk was created fist in Adobe Photoshop. And then printed out on to the white sheet label. Then the encoder disk was cut and glued on to the wheel.

Here is the template in various formats. When you print it make shore that the resolutions is set correctly.

Photoshop: encoders.psd Resolution: 150 pixels/inch

GIF format: encoders.GIF Resolution: 72 pixels/inch

BMP format: encoders.BMP Resolution: 150 pixels/inch

Mount the sensors using some L shape scrap pieces on to the side of the robot. Make shore that the sensors are about 1/4" away. I had mine too close and the reading was erratic.


I use the Basic stamp 2 from www.parallaxinc.com. I plan on using different processors like a pic or a Motorola processors. It will all depend on the application. For now follow the schematics to assemble the brain.

 

I solder some pin posts directly to the stamp board where I plug in the servos or any other modules. Here is my stamp board.

The battery I use is the Kyosho 6 Cell 1100mAh HyperFly Battery from www.towerhobbies.com. I had this helicopter laying around so I used it's battery. I used a big battery for the time. I can run this robot for a bout 3 hours no stop. But you can use any battery you like as long as you meet the specs for the stamp and the servos. (5V-9v).



 

Mount the servos by tapping a 4-40 holes in the servos places and placing the servo with the rotating shaft in front. Install the tail wheel using some wheel collars. Place some Velcro on the top of the servos and on the back of the robot. Place Velcro on the battery and on the stamp board. Install the connectors in their positions and the battery.


 

Start Program

simple.bs2

This simple program will get the two motors running at predetermine speed. This program is also used to determine the right and left wheel stop values. You should place the robot on a box where the wheels can spin freely. Run the program and set the speed to 0. Keep modifying the values for Right_Stop and Left_Stop until both of the wheels are stopped. Remember these values because all the programs I use, use these values.


Reading Encoders

These simple programs are test programs for the encoders. And some more advance navigation.

reading_encoders.bs2

The first program will drive the wheels at some speed and will show the encoded speed on the debug window.
The wheels I am using came out to be 3⅛" or 3.125". And the encoders have 32 tics for the each wheel. So the distance traveled in or revolutions (32 tics per rev) is found based on the circumference of a circle.

C=2πR or C=πD.

C=π(3.125).

And to calculate the number of inches per tic.

IPT = C/tics = π(3.125)/32 = 0.3068 inches/tics

simple_nav.bs2

The next program will make the robot go ~11 ft, rotate 180 deg, and come back, while maintaining both wheels velocity the same. This will hopefully make it go straight because as the robot turns, one wheel has to go faster then the other.

Here are videos of the alg in action.

 
 

A few problem with this algorithm in this particular robot.

1) As the wheels change speed the robot will try to correct the speed not the heading. So the the robot will end up going straight slightly off track.

2) As the robot makes the 180 deg turn to the right, it leaves the caster wheel pointed to the right. This will push the robot to the right until the equations kicks in. But because of the first problem the robot will be going to the right off the original course. I corrected this by not completing the turn and making only 160 deg and the robot return pretty close to home.

The next method I will try to implement a pid base on position and not velocity.

 

 

June 2, 2001 Contest

jun2_nav4.0.bs2

The event was to go around 4 obstacles and return to the exact starting position. There was an advance round in which the robot has to circle the obstacles and also come back to the same starting point. I only participated in the first event. The robot did OK, it got second place (Well out of 2 robots that enter the competition. Mine and Alex Brown). To determine the distance to the starting point I was doing dead reckoning and sonar reading in which I tried to mach the sensor values obtain when the robot first started. But the timing for the dead reckoning was off and the robot kept on missing the target.

 

 

This is the program I used. It requires two ultrasonic sensors positioned at 90degs so one reads the values in from the front and the other reads the left side value. I decided to make the robot rotate to the left to provide some change, since I thought every body will make theirs rotate to the right (I don't know why it's that). The code is not pretty by all means.

 


 

 

 

 

 

 





 






Last Updated on Wednesday, 08 May 2013 14:08