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