Archive for November 2010

Robot update

I finally have my final pcb design ready for prototyping. I haven’t had too much free time to work on this project as I’ve been busy with work and school. The solution to the power problem I had discussed previously turned out to be caused by my lack of including decoupling capacitors at the outputs of the motor driver, which was causing a temporary loss of voltage to the micro controller. The circuit seems to run great off of 4xAA batteries without any problems. In my redesign, I’ve had to make a couple of sacrifices as I couldn’t find a good way to break out 2 of the io ports on the uC, but I figure I probably won’t need those anyway, and I’ve made up for it by including breakout ports for all of the pins on the xbee module that I will eventually be installing. So for my final design, I have the ATMega328 micro driving 2 motors through a SN754410 dual H-bridge motor controller, serial communication over RS-232 with a max232 chip handling all of the voltage levels, and an Xbee wireless module to provide wireless serial communication and about a million other features. I was able to break out 14 I/O pins, so I should be able to rapidly prototype added functionality at a later date such as sensors and other outputs. When it’s all said and done, I will have spent about $102US on this project including shipping costs, making this my most complex, expensive and fulfilling project to date.

quick robot update

just ran my first series of tests on the control unit and motors. Learned a lot!!! the 2 motors together running at full speed with no load draw a current of over 780 mA.
this means that at no load, I’m using 3.9W of power. (this also lead to my discovery of NEVER touch the LM7805 voltage regulator, and that I need to invest in a heat sink)
I also learned that a 9V battery does not provide nearly enough current, even for bread boarding purposes, and running the motor controller IC off of one powersupply did not give the desired results, it seems the motor controller wasn’t getting the power it needed to drive the motors and the uC. I breadboarded it up with the 2 voltage sources (one for the uC, one for the motors) as the datasheet for the SN754410 suggested (datasheets don’t lie!) and things worked out magnificently. I’ve still got to do some speed tests on each motor so I can nail down the rate and timing to get accurate turns, but I’ve made definite progress. I’m still working to figure out my battery issue before I can finally finalize a design. right now it’s looking like this project is going to work best with the two power supply system I described above, but I’m going to do some research and see if I can come up with something a little better…

I should have video of some more of my tests coming tommorow.

Setting up Breadboard and Initial tests for robot.

Here’s my current progress on the robot project. First of all, I managed to get the chassis, gear box, and tank tread assembly put together correctly on my first try. This took a little bit of guess work as the directions for assembly are primarily in Japanese. I soldered on some really long leads to each motor for testing purposes(so they can reach the bread board).

I’ve breadboarded the important parts of the main control board. I’ve got the ATMega328P at the middle clocked to 16MHz, with a motor control subcircuit using the SN754410 motor controller as an H-Bridge voltage controlled current source for the motors. and a MAX232 subcircuit for serial communication with the computer
(very handy for debugging and issuing test commands to the uC)

here’s a link to the Schematic
This schematic is a working rough draft, I’m still refining it, but it gives a general idea of what I’m working with at least.


This weekend I will have some code written up so i can perform a series of tests on the circuitry, mostly what I’m concerned with is the current draw from each of the motors. This is important because I still haven’t picked a battery configuration for the final unit, but I’m thinking 4AA batteries would be the best balance of voltage, current, and size/weight. I also plan on getting more data on motor speed in the forward and reverse directions so that I can make some calculations for the software in regards to turning the unit.

All in all, I’ve made good progress over the last day or so.

Screw LED Matrices (for now), It's time to talk ROBOTS

So as I’m sure you’ve probably noticed by my previous entries on my blog, I am easily distracted by new fun things, and I’m heavily limited by my hobby budget (about $50/mo and it’s the first thing to get cut when my family needs money).  It’s been said before that time is money. For me, money is time!  I have plenty of time to invest in playing with all of the toys I buy, but since money is tight I sometimes have to make careful consideration in what toys I invest my money in.

So I was thinking. led matrixes are cool and all, but do I really want to invest my money in a new circuit that is only KIND OF COOL?  Heck no.  Thus I have back-burnered my blinky lights in lieu of something way more awesome.  A robot.

My plan with this robot is to focus on simplicity and flexibility in design.  Stage one is going to be building the wheels, transmission, and chassis since these are the base of the robot and probably the most significant parts.  For this I’ve chosen the following components from

I went with Tamiya parts due to their flexible configuration and simple design.  I decided to go with the tank treads for several reasons including
  • increased surface area contact means more torque transfered to linear power.
  • duh, tank treads are super cool.

Here’s an example of what the chassis, wheels, and motor assembly should look like when completely assembled.

treads chassis and motor example

treads chassis and motor example

For the time being, I’m anxiously clicking the FedEx tracking link. but I should have more to post on this by this weekend when I get the parts.

For phase 2, I’m designing an all purpose control board for the robot. I’m going to put quite a bit of work and research into designing the control board before I get a prototype made because I really only want to do this once.  At the center of the control board will be the ATmega328P microcontroller (my favorite for innumerable reasons) clocked externally at 16MHz via a crystal oscillator and programmable via a 10 pin ICSP.  The board will also contain the power subsystem, which will provide busses at 5V and 3.3V (common power supply for most IC’s), An RS-232 UART subcircuit for debugging and communication with the PC, a breakout for an XBee wireless module(future planned addition), a buzzer, and breakout ports for all of the remaining usable pins.  You might notice that the control board contains no permanent I/O as far as sensors and displays are concerned.  I am trying to keep the main board as simple as possible, but with the ability to add on or remove additional devices as I see fit by designing them externally and interfacing them with the broken out pins on the micro.  This way I can easily add or change any peripherals and continuously learn new things using my robot as a base platform.