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).

I built a robot where I needed to read 4 RC servo pulses, generate 4 RC servo pulses, and control two bi-direction DC motors with PWM.  It turned out that doing that with an Atmega328P and Arduino macros was pretty cumbersome, and in the end I couldn’t pull it off.  I’m pretty sure it can be done with interrupts and I intend to do that with a Microchip PIC controller.  But the design concept would have sucked up all the resources in the Arduino.  Avoiding that reality is how I ended up working this design.

In my last post on this topic I covered the selection of a microcontroller.  I’ve decided to use the Microchip PIC1F1829 in the 20-pin QFN package for this design.  I covered my reasons in a previous post.  The next step was to complete part modeling and schematic capture for the design.  I was concerned about whether or not I could get all of the parts for this design onto a PCB.  We have a standardized footprint we’ve defined for some of our open source modules.

In circuit design there are always a number of tradeoffs including cost, size, and functionality.  Although this is an R&D effort, those tradeoffs come into play.  It took 3 iterations of the PCB before I got the symmetry and fit I was looking for.  I met my targets for cost and size.  It’ll take more work to see if I hit functionality too.  The top copper layer is below.

You can see the two H-bridge ICs on the right hand side of the PCB.  Motor and power connections occur on that edge of the board.   The PIC16F1829 is the small IC center-left.  On the left hand side of the board there are some connector holes that will allow 3-pin servo wiring to be soldered into the board.  The board edges are castellated to allow for surface mounting.  There are also holes for headers to be soldered in 50mils in from the board edge on each pad.  That will allow the module to be placed into a solderless breadboard.


The next step in my design process is to write an operating system for the PIC16F1829.  Normally I’d put some of that code creation ahead of the PCB completion.  In this case I had to make sure the parts would fit into our board, so I went ahead and completed the PCB layout before embarking on software.

I’ll likely just implement a serial communication protocol and a serial bootloader.   Then I’ll order the PCB and finish the firmware concurrently with the hardware testing.

We should be able to re-use the serial interface and bootloader for other designs based on the PIC16F1829.   Once those modules of the operating system are defined I can pass them on to the other guys working on Solutions Cubed stuff.  The last step in this design is to put all the circuitry back into an Arduino Uno PCB footprint, which gets me back to where I was in September; building an Arduino compatible robot controller.  Unfortunately, I have a number of other projects lined up between this effort and that one.  I t may take a while.


  1. […] week I took it up again for a much smaller project.  I began writing code for the Servo and Motor Controller project that uses a PIC16F1829.  I was able to start this design from scratch, and use […]

  2. […] PIC16F1829 and thought I’d share the serial communication routine.  I’ve completed the schematic capture and PCB layout for the servo motor controller design.  But it’s a good idea to get some code written before moving forward with the PCB prototype […]

  3. […] soon are a dual DC motor and quad servo controller board, a button / user-interface controller, and a generic microcontroller board for experiments.  These […]

Speak Your Mind