Showing posts with label MAKE Coasterbot. Show all posts
Showing posts with label MAKE Coasterbot. Show all posts

Thursday, May 20, 2010

It does actually work!

It actually works! The mouse encoders read correctly, they can keep up with the wheel rotation (only about 50rpm max),  and everything fits on the motor plate of the MkII chassis.

Black Dog Robotics dyno test cell

Right now I'm running a modified version of the PS2 example from the Arduino website, with enough of the motor control code from the original Coasterbot program to get the wheels turning. So far, so good. Next step is to put it all together - the original Coasterbot motor control software with I2C, PS2 mouse encoder reader, and the Arduino PID Library.

The amount of knowledge out there and everyone's willingness to share it just amazes me. You really have to love the Arduino community!

Brian
The Black Dog

Tuesday, May 18, 2010

Coasterbot update

I found the top 4 entries in the MAKE Robot Build contest
#1 Jartron


#2 UFO


#3 HUL-10


#4 Tortellini


Nice work everyone!

Brian
The Black Dog

Friday, May 14, 2010

It might actually work

A hacked up old mechanical mouse, two Lego pieces, a bit of hot glue, a piece of double sided tape and there you have it - a functional Coasterbot wheel encoder.

Finished encoder (left), parts required (center)

Or at least it looks like it might be functional - the Lego pieces will make it easy to build into the Coasterbot drivertrain, and the Arduino gets counts from the encoder. There are still a few things to test, including  but not limited to:

  • Are the encoder counts valid? The sensor and the encoder wheel have to be lined up pretty accurately in the plane of the encoder wheel (although there can be some play along the shaft axis). Also, the encoder wheel shaft and the Lego axle have to line up accurately, otherwise there will be too much runout in the encoder wheel to ever get the sensor in the right position. If this isn't right, I'll get counts for part of the revolution of the encoder wheel but not all of it - worthless.
  • How many counts are there per revolution? Looks like around 130, but I have to actually count the slots to get this number precisely.
  • Can the encoder keep up? I have no idea how fast the chip in the mouse runs, so I might end up with an encoder that works great, but only for low rotation rates. It would be possible to gear down the shaft driving the encoder to slow the rotation to a readable rate, or use an encoder with fewer slots, but then positioning accuracy suffers. 130 counts/rotation is 2.7 degrees per count. Gearing the read shaft down increases the degrees/count on the rotation I want to measure. Maybe OK for speed control, but not great for measuring distance to determine a position. And putting another Lego gear in the system adds more lash, reducing the accuracy even more. It might end up being a lot of work to get an answer that is less accurate than making an estimate from a pwm value/battery level/motor speed lookup table.
  • Is this robust enough to handle being in the Coasterbot? The sensor isn't worth much if it works great for 2 minutes then falls apart. If it looks promising but not strong enough, I'll have to figure out a better way to mount the encoder wheel and sensor. Maybe drilling a hole in the encoder wheel and mounting it on the axle, then building a housing for the sensor and LED so the final product would look something like an RCX rotation sensor.


If all the above works, then I can start work on the motor control Arduino code to implement PID, using one of the Arduino PID libraries (or writing it myself to learn what's involved).

Side note - the MAKE Coasterbot Build winners are announced today! It will be interesting to see who wins. The BDR Coasterbot should be a contender - it's strong on function, expandability, and documentation; but weak in creative use of the coasters, overall aesthetics, and maybe the design is too simplistic. It's more of a engineering exercise than an art project - I just wanted something that met the goals of the contest, and go me moving on building an expandable Arduino controlled robot. Anyway, we'll see what the results are soon.

Brian
The Black Dog

Saturday, April 17, 2010

Sensors connected, let the testing begin!

Got the sensors attached, connected, and tested while watching some of the FIRST Championship matches from Atlanta this morning.


front facing Sharp GP2Y0D810Z0F digital IR and Maxbotix EZ-1 sonar distance sensors 

This robot will find and drive toward obstacles, stopping short of hitting them. The Maxbotix sonar will find distant obstacles and keep the robot on path towards the selected one. The Sharp IR sensors will trigger around 10cm to stop the robot short of contact. After it finds the obstacle, it will spin around and target another. At least that's the theory...

I also found how to embed scrollable text in the blog (use Scribd) which will be handy for the next phase of the project - writing the code for the master and slave Arduinos.

Here's the Arduino code for testing the sensors:
CoasterBot Sensors Test

Sample output:
Test Output



Brian

The Black Dog