Tuesday, October 02, 2007

I'm back!

I've completed the CNC conversion of my mill and have it sitting on my work bench. This means:
  1. I can work on CNC in A/C comfort versus the garage
  2. I have to be very mindful of "dust" on whatever I mill so I have only played with engraving wood
  3. I need to make an enclosure so I can keep it in the house
I am working with a new group of students from the university. They are motivated, bt they are also 17 and 18hours this semester ... we'll see how it goes but I am positive that they will have a mobile platform by December.

As for me, I need/want to improve my robot speed/positioning. My encoders are 1000PPR, If I can double, triple, or sextuple that I can increase my accuracy. I'm looking at replacing my motors and encoders with some new ones. The encoder will be mounted on the motor and I calculate 6000PPR with them. As a bonus they have a higher output RPM. The con is that they are 7.2V motors and my Lipo is 14V. I can control the peak voltage via PWM so it's not that big a concern. The other con is cost. We are talking $94.

I need to post a video of what my robot looks like now. It's been a while, but I wrote a program the takes input variables for side length and number of verticies. It then commands the robot to draw that shape based on the calculated angles and distances. It works ok, but one motor always lags the other. My peak speed is 20 ticks for the PID time period I chose (20ms IIRC). This means I can command the robot to go 0 to 20 ticks. This is too small of a range. With the new motors, the range would be 0 to 120.

Onward,
Jay

Friday, September 21, 2007

Friday, March 16, 2007

Update March 16 2007:

Just wanted to post a graph of my measured velocities ... or put another way, how well my PD loop is controlling my motors. The motors have been commanded to go 14. 14 = 14 ticks per 20 ms. I have 1000ppr encoders on 3" wheels so that's .1357"/20ms at that speed. Expanding that the bot is traveling 6.7 inches per second or 407.12 inches per minute or 33.9 feet per minute or just for grins .382 miles per hour :D

Anyway, notice the error is only +-1 tick. I may play with adding in an integral component. The graph shows the output of the bot being commanded to drive in a 10" square. The first step drives both motors forward, then stop (it even reverse the motors to effect a quicker stop) then left reverse, right forward to turn to the left 90 degrees, the forward ...

One other neat side affect is that the motors resist any change from the commanded speed. Put another way, if the robot is told to stop (left and right = 0) then if you try to push it, it will resist (actively turn on the motors in the reverse direction. Cool, but is a big battery drain as the current will shoot to 1.2 amps.

Finally, at this PD rate (50Hz) the fastest encoder speed is 18ticks/20 ms which equals 8.7 in/s or 43.6 ft/min or .49 mph :)


Onward,

Jay

Tuesday, March 13, 2007

Update March 13, 2007:

The BlueSMiRF is paying huge dividends in my ability to code and test. My PID function is working great and I have set it for 50Hz. I have expanded my interactive menu to allow me to command distances and angles to the bot. Last night I finally added a separate switch for the motors, and mounted the motor controller circuit. I’ve been using a 3S Lithium Polymer battery for my power source, and am thinking of getting a 4S to see how fast I can go.

My next task will be to add the SoundGin circuit and play with announcing the current command or some phrase. Then I want to add odometry calculations and command waypoints. Then add in the sonar and some prox sensors. I’m still having fun with the blue tooth though.

On the CNC front, I lucked out (or maybe not, time will tell) in winning a CNC kit for my mill off Ebay. I’ve ordered the last missing components from McMaster Carr (great prices and fair shipping) and plan to install it this weekend. In the mean time, I need to disassemble the ball nuts to make sure they are not missing any and to clean them. It’s be a waste of time to install it all only to have to take it apart due to an issue regarding the ball nuts … at least that’s the way I see it.

Onward,
Jay

Monday, February 26, 2007

Update 2/26/2007:

It's been a long time since I last posted. I have only one excuse CNC :) It's consumed me and my attention for 3 months now. What do I have to show for it? A mini mill, a wish list, a parts list, and an AWAOL machinist that was going to help me get there.

On the robotic front I got inspired to help the local college team again and thus worked on some A2D stuff for line sensors. I also spent 5 hours with them troubleshooting their LCD, braiding wires, and answering questions. The results: they were able to follow a line fairly well before the night was over. But, the system was a bit unstable if the angle to the line was too great the robot would run right over it. Thus we started discussing how to slave the wheel speeds together to truly go straight.

Enter PID (proportional integral derivative) loops and controls. Mobile Robotics implements a PI loop, while others using a PD (http://www.geology.smu.edu/~dpa-www/robots/doc/speedctl.txt). This weekend I typed out the code in the Mobile Robotics book modifying what I thought needed to be and letting her rip. Let me just say that I am using anti-phase PWM where 0 to 128 is reverse and 128 to 255 is forward with the duty cycle getting bigger the further you get from 128. Well, the robot did in fact slave the two motors together, but in opposite directions! When I added code to stop it after 4000 ticks (4 revolutions) the robot then when in a straight line. Great ... now why is it doing that?!

Long story short, I knocked together an Excel spreadsheet to simulate the result of the PI loop today. I had a multiplication error when trying to convert -100% <> 100% duty to and actual PWM value. DOH! On the otherhand, I changed over tot he PD loop David uses and now understand a lot better what is really going on. Can't wait to try it out later tonight.

Onward
Jay



A screenshot of my excel spreadsheet

Tuesday, January 16, 2007

Video!

I made a quick 20second video of my ball launcher in action. Don't be too critical as it's on;y a quick and dirty to test my progress but several friends requested it so here is is http://www.youtube.com/watch?v=r30vDsLaZn8

Oh, and here is a shot of the new wiring I did over the weekend:
Note the labels, the braided cables, and the empty spot on the right side for the mouting of the launcher.

Onward,
Jay

Monday, January 15, 2007

Monday, January 15, 2007 Update:

I got inspired to do some wiring on my project this weekend. I made 4 connectors for the encoders and motors. I also started working on the ball launcher. I took my 2” 90 degree PVC elbow and started hacking at it. I am using a DIY brushless motor I built for flying RC airplanes to drive the launch wheel www.gobrushless.com. The wheel is foam landing tire which I tapped for 3mm (to fir the motor shaft thread) and secured with a nyloc nut. I am using a homemade mount I turned from nylon previously to mount it to an “arm” of blue PVC. The arm will screw to a block of Delrin I have JB Welded to the modified elbow. This will allow me to adjust the motor/wheel assembly up and down, and the threaded motor shaft will allow me to adjust the wheel position with respect to the center of the tube.

The launch motor will be driven by a BL ESC (electronic speed control) that I have which is in turn controlled by the MAVRIC via a standard servo signal. The balls will be fed to the launcher via a turnstile gate controlled by another servo.

I’ll post pictures if my ISP is back up tonight. Hopefully I’ll get off my duff and actually write some code to make this thing move.

Onward,
Jay

Saturday, January 06, 2007

Where have I been, what have I been up to?

Great questions. I have been researching and procuring a benchtop mill. It should make it easier and more fun to build parts of this robot, but it’ll become it’s own project as well. I plan to convert it to CNC (CNCZone). That said, I have not put much time into doing anything on this project except read some books on subsumption during this time.

I’m hoping I’ll get inspired to work on it this weekend, but right now, CNC and machining have piqued my full interest.


How the mill comes packed and crated. First order of business was to clean the protective packing grease off.


The mill installed in it's new home. Not sure I'll be needing the drill press or not. Need to find it a new home.

Onward,
Jay

Saturday, December 16, 2006

Progress update December 16, 2006:

As you can see from these two images I have made great strides in building the mobile base.

Today I:
  • Mounted the two lower decks where the casters mount
  • Mounted the casters
  • Machined some standoffs from acrylic rod (see the second image)
  • Attached the motor mount assemblies with angle brackets (very stiff and perpendicular)
  • Made a mount for the sonar (using 3mm PVC)
  • Redid the sonar cabling (using 22ga stranded versus the solid, and following my wiring standard layout)
  • Mounted the sonar

From the front:

Note: the front lower deck will also be the mount point for the line following sensors. You can see two of the angle brackets I'm using to shore up the motor mounts. At this time the bot weighs just over 2 pounds ... largely due tot he motors and encoders.

From the rear:

Note: I used the acrylic rod because I have 20 feet of it that a friend gave to me. I am considering lighting it with LEDs … but that's for a later time. This deck with also hold the Lipo pack.

To do:
It might help if I actually kept up with my todo lists but I use them as a brainstorm tool and right now my mind is racing with ideas.
  1. Resolder the motor controller circuit
  2. Rewire the encoders with longer leads using my wiring standard (which is to say the same as a servo lead) | GND | 5V | SIG1 | SIG2 …
  3. Get this bot mobile with some simple code to count encoder pulses and drive a square
  4. Add in PID to start using waypoints and let the "algorithm" decide how to get from A to B

Onwards,
Jay

Monday, December 11, 2006

December 11, 2006 progress,

I was on a roll this weekend and have some photos of my progress to share.

This first photos shows how I printed templates for my motor mounts. I first cut the mounts to their final width and height, glued them together with wood glue (tried spay adhesive first but it was too messy), glued the template on, marked the holes with a center punch, and drilled the mounting and clearance holes on my drill press. The photo below is my first design. Taking a page from my RC airplane days of constructing planes from foam, I added tabs and slots.

Note: I originally drilled the holes the same for both side, but due to the motor shaft being offset it was not symmetric like the encoders. Also, the mounting hole closest to the output shaft is too shallow for the screws I had. What is, was symmetric are the two mounting holes at 180 degrees which is what I am using.



The second image shows the motor and encoder mounted along with the gears and wheel. The motors are heavy and the assembly feels like it weighs half a pound or more (will measure it and update this post).



To add the mounts again I when with a tab-slot design. I printed a template for the base to locate the slots and used a razor knife to cut them out. I also had to make slots for the small portion of wheel that protrudes through the base.



Next steps are to:

  • Strengthen and square the mounts using l-brackets and a cross bar of some sort. I have some acrylic rod I am going to try. Failing that, I’ll add a skin of 3mm PVC along the bottom to tie them together.
  • I have decided to redo my motor controller board using the ribbon cable wires versus wire wrap. The insulation is better, and I had an issue with intermittent shorts when I tested it before.
  • Create the cables for the encoders to the interface board
  • Make some mounts for the caster wheels (it’s really back heavy right now so 1 may be enough)
  • Write some code to drive in a square

Onward,
Jay