LSM303DLHC Electronic Compass Module and the Arduino


Our BM004 breakout module is based on the ST Microelectronics LSM303DLHC.   The LSM303DLHC basically has two ICs embedded in its tiny plastic packaging.  They are a 3-axis accelerometer, and a 3-axis magnetometer.  Both devices are connected to an I2C interface and you access the functions of each by addressing different internal register addresses.

[Read more…]

Dual DC Motor Controller with Quad Servo Controls


I’ve been working on this design on and off for the last couple of months.  The idea came about when I was trying to build a robot that needed to read servo pulses, write servo pulses, and control two motors.  I tried using an Arduino, but it really wasn’t up to it.

[Read more…]

Robot Wheel Design


Robot wheel controller and mechanical progression.

I’ve spent a lot of my spare lab time messing around with a robot wheel mechanical concept, and an electronic design that controls a pair of DC motors and 4 RC servos.  Here’s an update.

[Read more…]

Creating a Ponoko 2D Laser Cut Project with SketchUp


Creating a Ponoko 2D laser cut project in ShetchUp is easy, but takes a couple of steps.  SketchUp is great for creating 3D objects, but Ponoko (a fabrication service) doesn’t accept its files for 2D laser cuts.

[Read more…]

SketchUp Robot Chassis


I’m working on a robot chassis in SketchUp this week (even though we’re closed).  Over the last several of months I’ve been working on consulting designs and product development, and got behind on one of the research projects I wanted to spend time on.  This week I’ve had a chance to catch up a little.

[Read more…]

Servo and Motor Controller


An RC servo motor controller is what I’m currently working on.  Here’s a copy of the schematic in PDF format.  In a previous blog post I recounted my effort to build a robot controller and incorporate it into an Arduino clone design (see that post here).

[Read more…]

Robot with 4 wheel drive

A robot with independent wheel drive is something we’ve been working on in our spare time.  Here is the latest iteration of the prototype.

Over the last couple of months we’ve been testing different mechanical systems to control robot wheel position.  In addition to position each wheel is to have independent control over the motor speed and direction.  This prototype gets us part of the way to what we were shooting for.

Motor control:  Currently this robot is using skid steering where the left hand motors are driven by a shared control signal (a single H-bridge), and the right hand motors are driven by a separate signal.  This is similar to how a tank or bulldozer is driven.  We used a Parallax BASIC Stamp 2 to read radio control signals (1-2ms pulses) and convert them to motor drive commands.  The BASIC Stamp converts the pulses to serial commands that are then sent to the Motor Mind C, a dual motor controller.  This allows the robot to turn left and right as well as move forward and reverse.  The RC channels are “mixed” in the BASIC Stamp 2  which makes control of the robot more intuitive for the operator using an RC transmitter.   The next step is to control each motor with its own H-bridge.

Wheel Position:  We built a simple lever arm using some brass rectangular tubes.  These were bolted onto servo horns on one end and the other end was bolted to the motors.  Circular brass tubes were used to create pivot points, and where the brass connections needed to be solid we just brazed it using a heat gun and solder.  The mechanism allows close to 90 degrees of movement.  In our code we limited the range to about 45 degrees.  Each wheel position can be independently controlled, and we used an Arduino Uno to read inputs from our BASIC Stamp 2 and convert those to 4 servo drive signals.


RC Signals:  Originally we wanted to use our Firstbot Arduino clone to run this design.  We ran into two problems.  The first was not having a lot of time for coding and testing.  The second was that the Arduino is not very good at doing multiple timing things at the same time.  We wanted to read 4 RC channels (measure pulses 1-2ms in duration with a period around 20ms).  We also wanted to generate 4 RC signals for servo control (output 1-2ms pulses with a 20ms period).  And we need to generate 4 PWM signals to control the motors. There were a variety of problems we ran into when attempting this.  Servo control was at times erratic, and even caused one to burn out.  PWM control was lost on one of our channels due resource sharing in the Arduino.   I’m pretty sure we could get close making this work if we broke away from using Arduino macros and implemented some interrupt based code.  But being short on time  we decided to through in a BASIC Stamp 2 and Motor Mind C.  This offloaded the pulse reading and motor control functions.  And Arduino Uno was then used to control the wheel position by generating servo signals.

Servos:  We used HiTek HS-645MG servos.  The had decent torque and metal gears (about 100 oz-in).  Unfortunately they run about $35 each retail.  These can operate to 180 degrees if provided with a pulse of 0.6-2.4ms.  The 4 servos required close to 2A.

Power:  An 8.4V 3000mAh RC battery was used to run the motors and a Castle Creations servo regulator was used to step voltage this down to 5.1V to keep the servos from catching fire.

Motors:  4 12V 200RPM gear head motors were used.  These are smallish, have a decent mix of torque and speed, and were in stock.

Next step:  We’ve got a couple of ideas to run with on this design.  First, a small board that handles the RC signals, servo outputs, and PWM signals would be cool to have.  Second, there are 4 brass pieces that were used for each wheel.  We want to see if they can be boiled down into a single strut.  We could have that laser cut to make the hardware a little more clean.  Finally, we never had a chance to try and control each wheel by itself.  Another issue is that with only 4 RC channels to control everything you end up with a user interface problem.  You really need control channels to control each motor and each servo separately.  Not sure how to handle that.  Perhaps move to a WiFi / PC interface?

Arduino Compatible Robot Controller


An Arduino compatible robot controller is something I’ve been working on in my spare time.  I wanted to try to combine the ease of use of the Arduino software and hardware with a dual DC motor controller.  I thought this could be a good platform for people building their first robot to experiment with.  The design has an Atmega328P microcontroller just like the Arduino Uno Revision 3.  I’ve also matched the form factor and pin out of the Arduino Uno R3.

The interface to the two Freescale MC33926 H-bridge motor driver chips requires about 10 i/o pins.  That’s a lot.  Some of these pins provide analog motor current feedback or H-bridge status and really aren’t required to run motors.  You should be able to get the number of control lines down to about 6 (2 enable lines and 4 PWM lines).  All of the connections between the Arduino pins and the Freescale ICs occur through 1K resistors.  The resistors can be removed if the user wants to free up some pins.

I received the printed circuit board last week and finally set aside some time to work on it.  Things look pretty good so far.  The parts fit and nothing caught on fire when I powered it up.  What else can you ask for in life?  However, I was limited to about 2 hours of lab time on Friday afternoon before I had to turn off the lights and head home.  On Monday I should get the Arduino bootloader programmed into the Firstbot prototype and see if the PCB connections are error free (never happens, but one can hope).  I’m looking forward to seeing if this design works right out of the chute.  If it does it should be an awesome toy to have around.

SketchUp Robot Designs


SketchUp is great for robot designs. It’s also  a free and easy to use tool.  SketchUp was Google’s drawing software, but was recently purchased by Trimble.  You can learn more about this software product at this web site.  Last weekend I downloaded the free version and watched about an hour’s worth of YouTube videos detailing the basic tools the software provides.   It didn’t take long to figure out the basics, but I’m still just scratching the surface of this useful tool.

[Read more…]

Robot Wheel Design

Robot wheel prototype

Robot wheel design has been on my mind lately.  We’ve been asked to take some robots down to a fundraiser for the Discovery Museum in Sacramento.  I want to build something new for their event and was thinking about a robot that looks like a regular household item until you activate it.  I’ll probably use a lunch box (my favorite chassis) or a brief case.  But the design I have in mind needs to deploy its robot wheel before moving.  Basically it needs to stand up and then move, and when deactivated it should sit down and just look like a regular object.

To do this I wanted a hinge mechanism that I could position electronically.  Think of it like an aircraft wheel that is stored in the wheel bay when not in use.  A hobby RC servo seemed like a good fit for the design.  On the way to work I picked up some brass at the local hardware store and at the end of work I took a couple of hours to cut/drill the brass and solder pieces together.   The prototype seems to work, and should be light weight.  I stuck a knobby RC truck tire on this, but will use something lighter in the final design.

It took me a couple of tries to get the mechanics correct.   I’ll do a mechanical design of this robot wheel on Google sketchup, since I need to fit four on the robot, and having some defined dimensions would help me do that.  But overall it was a successful effort considering I spen just a couple of hours trying to put this together myself.  I really like using brass since it is easy to work with and you can braze it with solder and a heat gun.  It’s a poor man’s weld.  I’m also quite proud of the hinge that is really just one brass tube that slides into another slightly larger brass tube.