Thursday, November 17, 2011

Design of M-Block

http://hk.myblog.yahoo.com/robot-builder/article?mid=56

網誌日期:2008-05-07 21:43

1. Why design  M-Blocks?

Having experience in programming with atmega8  ( 8K Bytes flash program memory, two 8-bit timer, one 16 bit timer , 6-8 ADC, 1 UART, 1 I2C, 1 SPI ). I figured out it is quite limit if you need to build a robot with many sensors and accumulators. That  comes to my mind and think  it is  possible to build stack blocks of atemega8 and connect them together. Each block perform it's own function. The challenge is to design the protocol to communicate among the blocks.

The following figure outlines the design. The I2C Master device called Controller Module (CM). CM  perform its task by receiving commands from Radio Control, Bluetooth serial port or PC serial port. Then, it sends I2C commands to the slave devices and receive response from these devices. When the salve devices receive the commands, they will perform its own tasks. It is possible to write a autonomous logic. For example, Motor Module will turn on and turn off the H-bridge, Servo Module will move the servos, Sensor  Module will acquire data and response to CM.  That is it!. It seems all the above functions can be carried out in a single board computer. But if you need to extend the number of sensors (say 20 more) or number of accumulators (say control 4 motors more). Single board computer cannot achieve the goal.

(M)     (S1)    (S2)     (S3)     (S4)   ...... (Sn)
CM    SM1   SM2    MM1   MM2  .....            M-Blocks
  |          |           |           |           |
------------------------------------------------  I2C Bus

Lets see how I2C works.
http://www.esacademy.com/faq/i2c/general/i2cproto.htm
http://www.robot-electronics.co.uk/htm/using_the_i2c_bus.htm

www.robot-electronics.co.uk sells Compass sensors, Servo Controller, Ultrasonic Sensor, Thermal Sensors , Text to Speech Synthesizer. All have interface to I2C.

If it is possible to develop efficiency I2C protocols for communication among the salve modules and the mater module, it is possible  to extend the system by adding new modules.


2. What is the Pro and Cons of M-Block?
Pros:
1. Multitasking, each module perform  its own task, for example, controller in Motor Module only service to control the H-bridge.

Cons:
1. All modules are connected through I2C bus. If the bus hanged, the system will not work.
2. All the control is carried out through Controller Module as a proxy by sending commands to  the Slave Modules. This turn out to be quite inefficiency in control.


3. M-Blocks structure

a. Controller Module - I2C Master module to control slave devices

b. Motor Module - I2C slave device to control two SN754410 H-Bridge Motor Driver 1A

c. Servo Module - I2C slave device having 12 channels for controlling stanard  analog servo .e.g. Futaba S3003.

d. Sensor Module - I2C slave device with  ADC conversion for connecting Ultrasonic Range Finder - Maxbotix LV-EZ0 and Infrared Proximity Sensor - Sharp GP2Y0A21YK

e. Radio Module - 6 channels Radio receiver and transmitter detached from damaged electric helicopter. It connect to Controller Module and ICP to decode PPM signals.

f.  Bluetooth Module - As a bluetooth serial port  Bluetooth Modem - BlueSMiRF Silver connected to Controller Module's UART serial port. The bluetooth serial port will let you control the robot from PC terminal or custom build programe. It is possible to control the robot from bluetooth smartphone such as Nokia N73 or Nokia N82.

No comments:

Post a Comment