SwarmRobot-Uno and Software Architecture

From XinCheJian
Jump to navigation Jump to search


Exploring .....

Later stages will investigate use of this approach in the AtTiny SwarmRobot.


  • made a robot prototype based on Arduino UNO board.
  • made a sensor receiver and transmitter shield
  • designed the architecture of software.
  • Coding the class of Sensor.
  • demonstrated succesful object detection using simple Infrared system

Architecture of Software

  • Four kinds of objects: Sensor, Motor, Messager, Action.
  • Two threads: 'main process' and 'timer interrupt process'

Attachments in detail:

Class diagram
Class diagram
Interaction diagram
Interaction diagram
Data of Class
Data of Class

Message format for communicating

  • baud rate: 2k bit/s( it depends on: 1.the min signal pulse width, here I take 500us. Constraint: must be less than the half of 38k.)
  • start bit: 3 bits of 0 (using the low output of IR-receiver as the 0 bit)


    typedef struct{
    uint8_t ReceiverID; // send from LSB
    uint8_t SenderID;
    uint8_t MessageID;
    uint8_t Para;
    uint8_t VerifyFirst; // Verify bytes, the value should be equal to the value of ReceiverID
    uint8_t VerifyLast; // Verify bytes, the value should be equal to the value of the l Para
  • verification: using repeating data as above.
  • Stop bit: null.
  • Message transfer rate: 2K bits/51 bits=39, 39 messages per second.
  • collision detecting: thinking:)

partial circuit diagram


1. about emitting infrared of prototype robot : when change signal from 0 to 1 on the 38k PWM, there is a very strong infrared at the start of changing that can enable all four IR-receivers. I'll go to Xinchejian and to solve the problem tonight.

IR object detection experimental success
Problem has been solved! That front left LED really is ON, showing it that the SwarmRobot detected that box!

All Xinchejian SwarmRobot AFRON wiki pages