Sunday, May 6, 2012

Sumo Bot Fully Assembled (with issues)

After a lot of frustrating hours, I have my first Sumo Bot somewhat up and running... unfortunately, he is currently running in circles  I have not found my error yet, but I must have an short somewhere....

Here is the functionality which I do have. (The following four digits control the drive direction, for example, to drive forward, the command is 1010.  To 'turn on a dime' the command is 1001 for counter clockwise or 0110 for the clockwise direction.)
1000 = Right side drives forward (which is what should happen)
0100 = Nothing happens, but both pins on the right side are high (should drive right side in reverse)
0010 = Both sides drive forward (should only drive left side forward)
0001 = Both sides drive in reverse (should only drive left side in reverse)

Although he isn't working, he sure looks pretty.

Completed Sumo Bot Isometric View

Side View

Front View

Saturday, May 5, 2012

Updates


Its been a little while since my last post. Let's go over what I've been doing

The Sumo Bot (Name TBD)
I have slowly been populating the PCB and testing everything as I go along. I have had a series of issues which have been simple mistakes but time consuming to realize.

First, I was having issues with the driver chip not pulling down the low side of the H-bridge, even when I was telling it too. That was easily corrected when I realized the current sense pin MUST be connected to ground.  I am planning to hook the current sense to an ADC pin, but I was holding off just in case the driver sent a lot of current through that pin into the PIC.  So far, I have not let any of that magic smoke out... yet.

Next, the edge sensors were not changing voltage when the line was supposed to be sensed. That again was easily fixed when I realized that the program I was using had the pins set as outputs.
"Why does that matter?" You ask...
Well, when the PIC pin is set as an output (rather than input) there are pull down resistors (resistors which are connected to ground) that are enabled.  These resistors ensure the pin in not 'floating' (when you change states on to off, the pin remains high).  In my case, when I powered the board, they were pulling the output side of the IR sensor down, such that it appeared nothing was happening when the input changed.  I realized that while falling asleep one night.

Here is what the sumo bot is looking like these days.

Current Status of Sumo Bot

Learning C# (C Sharp)
One of my more favorite bloggers is Shane Colton (scolton.blogspot.com).  In general, he does a lot of seemingly advanced things with motor drivers, quad-copters, and robots in general.  He also does a lot of data logging and plotting with a program he created in Visual Basic (or so I have gathered).  I am hoping I can do the same with C# (pronounced C Sharp).  Through the robot club I am part of, a member has given me the code to log incoming serial data... now I am attempting to use the "Chart" tool to also plot the incoming data.  Once I have something worthy of posting... I will include the downloadable program.  The below image is the current layout.

C# Form Layout

Bench-Top Milling Machine

I realized the other day that I have not shared my new bench-top milling machine from MicroMart.  It is the "MicroLux High Precision Heavy Duty R8 Miniature Milling Machine", pictured below

MicroLux High Precision Heavy Duty R8 Miniature Milling Machine
Since December, when my wife surprised me with it, I have only used it a handful of times, but so far, I am impressed.  After adjusting the ways so they are a little tighter than the factory setting, I am happy with the results.  It's definitely no Bridgeport... but I'll be able to make all the same parts... only taking off less material with each pass.

That's actually a point I would like talk more about.  Typically, internet reviews of smaller metal working tools (e.g. mill and lathe) complain about how 'bad' they are when compared with full sized machines.  To those reviewers I say, Blah!  The main difference between a big machine and the bench-tops is the amount of material you can take off with each pass.  Larger machines are very stiff and can handle removing a lot of material while leaving a nice surface finish.  Small machines are significantly less stiff and require less material removal to get the same surface finish.  In reality, a hobbyist, like me, can do everything with a small machine that someone with a large machine could do (in general)... but only slower.  I'm not making parts to earn money, I don't need to make parts quickly.

But I digress....

Saturday, March 31, 2012

Mini Sumo Bot Board Has Arrived!

I ordered the board on 3/18 and it arrived in the mail today (3/31), 13 days later.  That's pretty impressive lead times by BatchPCB!

Front and Back Side of Sumo Bot PCB
For the longest time, I have been wanting to do a time lapse video of me doing something... anything.... Finally, this time I remembered and set up my free app on my iPhone to capture it (app is Time-Lapse by TippTech LLC).  Check this out.


I still have a bit of soldering and testing to do before I am done, but, when I hooked up my PICkit2, the PIC16F877A was recognized!

During my testing as I solder things on, I realize my status LED is not actually connected to a pin on the microcontroller...... ERRRRR.
AND
I also noticed that there was two unconnected traces in the board layout.  If you look closely at the PCB image on my last post, the bottom center area shows two traces (thin yellow lines)... which are telling me to connect them both ground.  Unfortunately, my ground plane has been cut up into different pieces due to various traces, it disconnected itself (yes, I am blaming it on Eagle)..

Both of the above errors can be easily (but reluctantly) corrected by adding additional wire.  I plan on making V2 eventually anyway.

Sunday, March 18, 2012

PWB on Order!

Today, I added the finishing touches to the schematic and finished laying out the board (auto-trace did most of that work).  I added a bit more circuitry to protect the PIC from back EFM.  I also added a decoupling capacitor to avoid any issues with the motors sucking up enough of the power to shut the PIC off.  That being said, this thing is much more complicated than any of the boards I have made in the past... I'm a little worried I will have spent all that money ($17 for the board and $10 for the handling) and then all of the solder time to find out I did something wrong.  We will see.

Below are the finished schematic and board.

Completed Mini Sumo Schematic

Finished Mini Sumo PWB
The board has the following features
  • Four motor direction indicator LEDs
  • Schottky EMF-protection diodes
  • Diode protection from incorrect battery 
  • TX/RX connections
  • Seven IR sensors (3 line sensors and 4 distance sensors)
  • Total motor peak current of 5Amp (I think that is without a heat sink)
Lets hope it works.

Friday, March 16, 2012

Sumo Bot Schematic and Printed Circuit Board (PCB)

Today I decided to spend a few hours working on the Sumo Bot schematic and Printed Circuit Board (PCB).  As you can see from the images below, I have made a lot of progress.  (I am using Eagle by CadSoft).  I just have to let auto-trace to its thing and I will be all done.  Then off to BatchPCB

In general, there is nothing fancy going on.  I am using a L298 4A Motor Driver and either a PIC16F877A or PIC16F886.  I believe they are interchangeable.  The PIC16F886 has the advantage of four pins which can output Pulse Width Modulation (PWM).  Later on, I may want to get fancy and control the motors more precisely (rather than the current two speeds, off or on).

I  included a few jumpers to turn off LEDs when I don't need them as well as hooking the 'current sense' pins on the motor driver to the PIC.  I'm not sure how they work at the moment, but I might want to play with that in the future.

There are also a number pins which are currently unused.  Those will be connected to a pad on the board which is easily accessible... for future projects and/or expanding this board's capabilities.

Sumo Bot Schematic

Sumo Bot PWB

Although this is about complete, here are a few things version 2 might include
  • Low voltage alarm using an OpAmp (like this one) to protect the Li-Po battery
  • On-board IR sensors and emitters to replace the expensive narrow field-of-view Sharp sensors

Sunday, March 4, 2012

Working Mini Sumo Robot!

After a lot of wire stripping, soldering, confusion, de-soldering, re-soldering, and four letter words, I got the bot working!

I retrofitted my tachometer board and soldered it down to a perforated board.  I then wired everything to it.

Yes.... I know.... It looks horrible.  But it is only a prototype.

Mess O' Wires

Under the hood



After getting the circuit wired and code working properly, I am beginning to lose faith in these off-the-shelf IR sensors.  Unfortunately, the just do not seem to have the field-of-view I am going to need.  (they are "Distance" sensors after all)


On the other hand, the sensor are mounted on the same flat surface.  I should try to angle them a little and see if that helps.

Next steps...
  • Attempt to improve current IR sensors
  • Play with different IR sensors
  • Begin working on custom PCB (in-work, see below)

Sumo Robot Schematic

Saturday, February 25, 2012

Added Electronics to the Balancing Bot

Last weekend, before getting the sumo bot kit, I spent some time working on the balancing bot.  I added a vertical length of Aluminum and mounted the electronics on it.  The plate is 3/8 thick and about 5 inches long... it not only acts as a place to mount the electronics, but its main purpose is to raise the center of gravity (CG) higher.  Confused??  Which is easier to balance in your hand, a pencil or a broom stick?  (the correct answer is the broom stick).  The greater the distance between your hand and the CG, the easier it will be to control.  

Before ripping the motor controller off to be used on the Sumo Bot, I was able to get all the parts working... I still have a bit of work before I will be able to get that thing balancing.  During initial wiring, I managed to smoke the H-Bridge and fry the PIC Microchip on my PICKit2 Evaluation board.  Too bad really, I used that thing all the time (no, really.)  These motors have a 6 Amp stall current, so I need to buy something a little beefier.

After that fiasco, I spent some time using my USB to Serial breakout board from Sparkfun (DEV-09716).  After a bit of playing around, I managed to send the accelerometer data from one axis to my PC using Hyperterminal, which I think is a standard program installed on every machine... if not, I'm sure you can find it, or an equivalent for free.  The accelerometer is from Pololu (MMA7361L).

Front Isometric View

Side View

Rear Isometric View

Added Electronics to the Sumo Chassis

Last night was a busy night.  From about 7pm to 2am I managed to do the following.
  • Design IR sensor bracket and standoffs
  • Fabricate the bracket and standoffs
  • Modify the ballast plate to mate with razor blade 'scoop'
  • Assembly everything to the chassis
  • Wire the line sensors on the bread board
  • Wire sensors to my makeshift sumo board (reusing my tachometer board)
  • Wire motor driver board to sumo board
  • Begin rough version of program
  • Fix all of my mistakes in wiring
  • and finally, actually get it moving in a somewhat logical fashion
The Cobra chassis does come with standoffs and additional hardware for mounting, but they were just a little too high for my taste.  Using small diameter tube, I made my own standoffs which were about 1/4" shorter than the stock ones.  My ultimate goal here is to limit the height in an attempt to reduce the IR signature (i.e. make it harder for other bots to see me).  As you can see from the following images, it's quite low profile.

IR Sensors - Isometric View

Low Profile Front View

Side View
Although the Cobra kit came with the circuit diagram showing how to wire the line sensors, I wanted to make sure everything worked for me as it should. The included instructions are from Lets Make Robots. The image below shows the breadboard set-up  The bottom left pin of the line sensor block is the output pin.

Line Sensor Circuit
The following images show the 'completed' sumo bot.  I say 'completed' because this is only a rough first cut of the Bot.  I plan on playing with the code to get this working well enough to figure out what improvements need to occur.  For example, I can already tell (I think) that the IR sensors have too narrow of a field of view.  This causes the bot to loose sight of it's opponent too easily.  I'll try to include some video showing this on the next post.

Isometric View 1 - 'Completed' Version 1 of my Sumo Bot

Isometric View 2

Side View

Front VIew

Top View

Things left to do.
  • Attached line sensors
  • Create line sensor circuit
  • Wire output of line sensor to board
  • Start design and layout of custom Mini Sumo Bot PWB
  • Work on scoop mechanism

Wednesday, February 22, 2012

Review of Fingertech Robotics "Cobra" Mini Sumo Bot

As I mentioned in a previous post, I ordered the Fingertech Robotics Mini Sumo Bot kit.  At $120, I was hoping I would not be disappointed in the quality of the parts and assembly.  In summary, I was not.

  • 4 Motors at $20 each          = $80
  • 4 Wheels at $10 each          = $40
  • 3 Sensors at $1.75 each      = $5.25
  • 1 Chassis at ~$10 each       =  $10
  • 4 Posts at ~$0.25 each       = $1
  • 8 Fasteners at ~$0.25 each = $2
  • 1 Scoop at ~$5 each          =  $5
  • Glue                                   = Priceless
  • Grand Total                       = $143.25
The first thing I though when I opened the box was "it's assembled"!?  Being mechanically inclined, I usually like to put stuff together myself (or in most cases, rip things apart).  But it was nice to see it all together right out of the box... I guess.

The first thing I noticed when I pulled this out of the box was the weight, it seemed very heavy.  Mini sumo bots are allowed to weigh a maximum of 500 grams, per Robogames.net and the RobotRoom.com.  Although I do not have a scale handy to check the weight, Fingertech claims it weighs in at 333 grams.  (3-3-3, come on... what is the likely hood of that number?)

My only area of disappointment was the method of securing the motors down to the chassis.  In this case, they are glued on.  Typically, I am not a fan of glue.  It can be easy to shear a motor off the chassis during handling or worse during a competition.  Lets hope they picked a good glue (Elmers = Bad).  I will probably change this in the near future, stay tuned.

Also, I did notice that one of the motor axes was just a little off from being parallel with the others... again, this is a big drawback when using glue.  Its hard to fix the position once its stuck together... but I'm sure it is not enough to cause any issues.  In fact, it will probably not even be noticeable to most people.  But I know it is there, and I'll probably just HAVE to fix it sooner or later.  If it ain't broke...... make it straight.

Fingertech's images of this kit were lacking, so I figured I would show it off for them.

Isometric View

Side View

Front View

Bottom View

Rear View

Rear Isometric View

Included Hardware and Sensors

Wheel Removal In-Progress

Wheel Removed

Snazzy Isometric View

Sunday, February 19, 2012

Project 6 - Balancing Bot

For a while now, I have been gathering all the parts needed for a two wheeled balancing robot.  Finally, I had the motivation (not to mention a few nights) to design and fabricate the chassis.

Balancing Bot CAD Isometric View


Isometric View #1

Isometric View #2

Underside View

Side View
I'm using gear motors and wheels purchased from Pololu.  The unique thing about this design is the o-ring belt drive system.  At work, I am constantly using o-rings in their traditional means... sealing.  However, when I inspected the o-ring bible, published by Parker, they discuss using them as belts.  Odd?  Next time your taking apart that old printer, keep your eyes open... this method is used often when gears are not needed or optimal.

I have a few more parts to make, then the 'fun' begins.... How hard can it be?

Mini Sumo Bot

After getting cyclops up an running, I started to think about alternative chassis.  Sure the Tamiya track version is fine for a test-bed, but I needed something that was a little more robust and competition worthy.  I ended up buying Fingertech's Cobra chassis from Fingertech Robotics.

Fingertech Robotics 'Cobra'  Chassis

It has not yet arrived from Canada, but I'll be sure to transfer all of Cyclops's guts over to this beast.

Sunday, January 1, 2012

Mini Sumo Robot Testing

I have made some serious progress (in comparison to what I usually do).  My Mini Sumo Robot has all the components secured to the platform (secured = tape) and a working program.

Instead of using home-built IR sensors (shown in the image in my last post), I opted to use the Sharp IR distance sensor to make things easier to start.  Since I only had one laying around, I have named him "Cyclops".  Obviously, the more sensors the better, but this is a good place to start.

Mini Sumo Robot - Cyclops
Mini Sumo Robot - Cyclops (Front)
Mini Sumo Robot - Cyclops (Back-Side)
Mini Sumo Robot - Cyclops (Back-Side)
Although he has not changed much in appearance since my last post, I have wired everything and created a simple program.  The program does the following.


  1. Rotate
  2. Sense target
  3. Drive forward
Here is the IR Sensor working


And here is the first test (actually about the fourth after a bit of tweaking).


From here, I will refine the program to make him a bit smarter and 'tune' the IR sensor so it's not seeing the ground when the sensitivity is turned up (turned up in the code).    

My long-term goal is to design and build a 'professional' version.  I can use Cyclops to refine my design and keep me motivated.