Wednesday, January 29, 2014

High Level Software Design

High Level Design
There are two main parts to the design. A control server and the onboard robot controller.

The objective is to use the Raspberry Pi as a communication controller. The control server implementation hosts a asynchronous queue that the Raspberry Pi listens to. Allowing the control server to send command messages to the Raspberry Pi. The Pi then translates the commands into leg movement sequences.

The Raspberry Pi uses gathers information from sensors and for sending to the control server. The control server can use that information to change the instructions sent to the robot to control it's movement.

Raspberry Pi Constraints

The Raspberry Pi cannot reliably generate PWM servo control pulses. Particularly in Python the language I chose to write the Pi code. (I chose Python because it's well supported and I would like to learn more.) Given the robot requires 18 servos that increases the problem.

There is a wide range of sensors to choose from that could provide great environmental feedback to the server. However many require analog inputs. The Raspberry Pi does not include a hardware Analog to Digital converter.

Overcoming Constraints

In order to control 18 servo channels I chose to use Adafruit's 16 Channel PWM controller I2C interface. This allows using 2 boards for up to 32 channels.
It's a breakout board with onboard microcontroller for handling the PWM. It has an

Having used I2C for PWM servo control it made sense to look for a I2C Analog to Digital (ADC) controller.

I eventually decided on a AVR ATMega328. Totally overkill for the purpose but readily available and lots of documentation online.

No comments:

Post a Comment