RGB Swarm Robot Project Documentation

From Mech
Revision as of 13:48, 19 March 2009 by Oh Kwon (talk | contribs)
Jump to navigationJump to search

Overview

This project consists of two main parts; the improvement of e-puck hardware and the theoretical research on estimating the environment using data collected by the sensor. The e-pucks are improved to have a new version of XBee interface extension board which contains a color sensor to collect data, and have a new LED pattern board at the top of it. By designing this new LED pattern board, each black dot pattern of e-pucks, which has been used by the machine vision system, was replaced by the LED, and the machine vision system is improved in a way to recognize each robot by its LED lights, not by the black dots.

Hardware

XBee Interface Extension Board

i.Previous Version

E-puck XBee board v1.gif

The previous version of XBee interface Extension Board. Its configuration is shown in the figure on the left. This version of XBee Board does not contain a color sensor in it. Details about this version of XBee Interface Extension Board can be found here:


ii.Current Version

Epuck xbee board v2.gif

The upgraded version of XBee Interface Extension Board. It is designed by Michael Hwang. This version has a color sensor circuit built in. The details of the color sensor circuit can be found in the color sensor section below. The RTS flow control line on the XBee is connected to the sel3 line of the e-puck. Although the CTS line is not connected to the sel2 pin in this board design, it can be easily connected with a jumper.


This new version of XBee Interface Extension Board design was actually built and implemented on the e-puck # 3. In order to see if there is any working problem in this board design, it is first tested with the other e-puck which uses the previous XBee Boards.


The e-puck # 3 upgraded with the new XBee board did not show any problem in communicating with other e-pucks. According to the goal defined, all e-pucks, including e-puck # 3, locate themselves to the desired location.


iii. Color Sensor Circuit

Resistance of the potentiometer, ratio of amplification, circuit diagram. For this color sensor circuit, a high-impedance op-amp, LMC6484, is used to amplify signals from three photodiodes (for red, green, and blue) of the color sensor. This amplified ouputs are sent to the ADC channels which had been used as the X,Y, and Z axis accelerometers. A 10k potentiometer controls the ratio of amplification.


As you may noticed from the circuit diagram on the left, when each photodiode received a light, the certain amount of current start to flow through the photodiodes and generates a voltage across R1 = 680K. Each photodiode is designed to detect the certain range of wavelength of the light, and the amount of current flowing through the photodiodes is determined according to the amount of the corresponding light to each photodiode.


The op-amp, LMC6484, takes the voltage generated across R1 as an input signal to amplify, and amplifies it as much as the ratio we define using the 10K potentiometer. The corresponding equation is following.


|Vo| = |Vi*(R2/Rpot)|


Rpot = resistance of the potentiometer (shown in the diagram)

R2 = 100K (shown in the diagram)

Vi = voltage across R1 = 680K, which the op-amp takes as an input

Vo = output signal amplified from the op-amp


The amplified signal generated by each photodiodes are shown in the table below.


As shown in the circuit diagram on the left, the siganl from the red photodiode goes into the pin #5, and the amplified signal is sent out through the pin # 7. Similarly, the signal from the green photodiode goes into the pin #3 and it is sent out from pin # 1 while the signal from the blue photodiode goes into the pin #12, and it is sent out from pin #7.

Output Pins

  • Pin #7 - Amplified Red photodiode signal
  • Pin #1 - Amplified Green photodiode signal
  • Pin #14 - Amplified Blue photodiode signal


iv. Parts used

Parts used in both the previous version and the new version of XBee Interface Extension Board

  • 2x 10 pos. 2 mm pitch socket (Digikey S5751-10-ND)
  • LE-33 low dropout voltage regulator (Digikey 497-4258-1-ND)
  • 2.2uF tantalum capacitor (Digikey 399-3536-ND)
  • 2x Samtec BTE-020-02-L-D-A (Order directly from Samtec)
  • 0.1"header pins for RTS and CTS pins (you can also use wire for a permanent connection)
  • 2x 0.1" jumpers for connecting RTS and CTS pins if you used header pins(Digikey S9000-ND)

Additional parts for new version of XBee Interface Extension Board

  • 3x 100K resistors
  • 3x 680K resistors
  • 3x 10K potentiometer
  • 3x 5pF capacitor
  • 1x RGB color sensor (Order directly from HAMAMATSU, part#:s9032-02)
  • 1x High impedence op-amp LMC6484


v. Future modification

As mentioned in the overview, the black dot patterns of e-pucks are replaced with new LED patterns by implementing LED pattern board at the top of each e-puck. Thus, in order for the color sensor to collect data properly, it is necessary to move the color sensor from the XBee Interface Extension Board to the LED pattern board so that nothing will block the color sensor. All other components for the color sensor circuit remains in the XBee Interface Extension Board and only the color sensor will be place in the LED pattern board. We can use a jumper to connect the color sensor placed at the LED pattern board to the color sensor circuit place in the XBee Interface Extension Board. The datails of this LED pattern Board will be presented at the section below.


LED Pattern Board

This new LED pattern board is introduced for the Swarm Robot Project. Currently, the unique black dot pattern of each e-puck was used for the machine vision system to recognize each e-puck. However, this black dot pattern requires a white background in order for the machine vision system to recognize e-pucks. The new LED pattern board uses LEDs with the proper brightness, instead of the black dot pattern. By doing so, the machine vision system can now recoginize e-pucks on any background. The reason why this LED pattern is recognized on any background will be presented briefly in the Code section below. In addition, in order to apply this LED pattern to the machine vision system, we made a modification in code. This modification will also be presented in the Code Section below.

i. LED Pattern Board Design

This LED Pattern Board is created using Traxmaker. Although we replaced the black dots with LEDs, we kept the pattern of dots. The horizontal distance and the vertical distance between the two adjacent LEDs are both 0.8 inch. In order to reduce power consumption of the e-puck battery, we implement a seperate pair of AAA batteries to supply power to the LEDs.

ii. Parts used

iii. Test With Vision System