IEEE UCSD Micromouse Team 6

Sensor Characterizations

One of the major issues in designing a Micromouse is finding inexpensive and reliable sensors.

Qualities of Good Sensors for a Micromouse

  • Large dynamic range
  • Low noise
  • Inexpensive
  • Small physical size
  • Consistent response in many light conditions
  • Tolerant of measurement angles up to 45º

Test Setup

Overview

The test setup uses an Arduino Duemilanove with an atmega328P running at 5Vdc and 16MHz. Unless noted, the ADC uses the internal reference voltage for conversion. A button is implemented to allow orderly capture of samples. Pushing the button tells the Arduino to capture 1000 samples.

The Arduino Duemilanove is superseded by the Arduino Uno. The Uno comes in two configurations, one with the atmega328 in a DIP package and the other in an SMD package. For the purposes of this test setup, the DIP vs. SMD packaging of the atmega chip is not an issue. I prefer the DIP configuration for a number of reasons outside the scope of this discussion.

Why Arduino?

I picked the Arduino for testing for two reasons.

  1. I have several of the on hand
  2. I know how to quickly program the Arduino. Basically, I am not fighting my with my tools; I am getting work done.

Sharp GP2D120X

The Sharp GP2D120X is an IR sensor that calculates the distance from the sensor to the target using trigonometry.

The GP2D120X is a discontinued part and is starting be in short supply

Pros

  • Resistant to Light Conditions
  • Good Performance from 1”-4”

Cons

  • Noisy
  • Response curve is not 1:1 on for all values of distance
  • Large Mechanical footprint
  • Slow, datasheet says 5-8ms required between each unique reading
  • Requires about 15ms from startup to first usable value

Response

Figure 1: 0-6" response for the GP2D120X

Figure 1: 0-6” response for the GP2D120X

Figure 2: 0-8" response for the GP2D120X

Figure 2: 0-8” response for the GP2D120X

Both Figure 1 and 2 show that between 0”<d<1”, and 1”⇐d<8”the GP2D120X have the same range of ADC values namely, [0, 700]. For use in most Micromouse designs, the minimum usable range is 1” from the sensor. Although it is possible to create a software method to overcome the minimum range problem, the probability of an error is very high and the impact of an error is very high. The actual error ends up being an inversion of the software's perception of the distance from the sensor to the wall. Also, notice the noise floor is very high in both figures.

The noise can be minimized by using an averaging filter. On the 2009 tank design, we found that a double 10 point moving averaging filter was able to clean up the noise to an acceptable level.

Test Setup

The figures were generated with MATLAB. The data was gathered with Arduino (atmega328 series), on a 5V ADC reference. The GP2D120x was powered with 5Vdc with a 100uF bypass capacitor on the 5Vdc rail. The software polls the ADC 1000 times and reports the value via the serial port at 115200 baud. The code is built on the Arduino libraries.

Sharp GP2Y0D810Z0F

The Sharp GP2Y0D810Z0F is a digital distance sensor. It returns a HIGH or LOW value if the distance from the sensor to the wall is within a defined range. The sensor is an active low device, meaning that it will return a LOW value for TRUE and a HIGH value for FALSE.

Pros

  • Digital, very easy to integrate and read from a large number of sensors.
  • Almost no noise

Cons

  • Digital values show only if a wall is within the sensor's range or out of the sensor's range.
  • Slow, requires about 3ms between each unique reading
  • Requires about 6ms from startup to first usable value

Response

Figure 2: 0.6-5.2" response for the GP2Y0D810Z0F Figure 3: 1.0-7.0" response for the GP2Y0D810Z0F

Figures 3 and 4 both show that the sensor works very well in the 1-4” range. Figure 3 shows that the range is usable down to 0.6”. The sensor shows no resolution between 0.6” and 4.0”, outside of the LOW value. This limits the sensor's usefulness in the Micrmouse context because the sensor is really only useful for determining if there a wall in front of the Micromouse.

Test Setup

The test setup used a GP2Y0D810Z0F mounted a breakout board sold by Pololu. The breakout was stuck into a breadboard and a 100uF bypass cap was place on the 5Vdc power supply rail. An Arduino was used to poll the sensor 1000 times and relay the reading to a computer via the RS232 port at 115200 Baud. The plots were generated with MATLAB.

Sparkfun QRE1113 Line Sensor Breakout - Analog (ROB-09453)

The analog Sparkfun QRE1113 Line Sensor Breakout is an IR reflectance sensor. It is different from the Sharp sensors above in that it is directly measuring the quantity of light reflected by the wall with a photo-transistor.

The Sparkfun QRE1113 Line Sensor Breakouts (both the analog and digital versions) are sensitive to the reflectivity of the of the wall material. Some type of calibration mechanism (software or hardware) is needed to compensate for the reflectivity factor.

Pros

  • Cheap
  • Small
  • Medium Noise

Cons

  • Short range
  • Low dynamic range

Response

Figure 5: Sparkfun QRE1113 Line Sensor 1"-6" Response Figure 6: Sparkfun QRE1113 Line Sensor 0.4"-3.4" Response Figure 7: Sparkfun QRE1113 Line Sensor 1"-1.8" Response

Figure 6 shows that an unmodified sensor has a fairly small dynamic range, around 400 ticks on the atmega328's built-in ADC. This is about half of what the Sharp GP2D120X's dynamic range is. Looking at Figure 5, the noise figures are reasonable, with the magnitude of the noise being less than ±3 ticks. The noise figure breaks down, however, when the wall is at a 45º angle to the sensor.

Test Setup

The test setup used a QRE1113 mounted a breakout board with support circuitry sold by Sparkfun. The breakout was stuck into a breadboard and a 100uF bypass cap was place on the 5Vdc power supply rail. An Arduino was used to poll the sensor 1000 times and relay the reading to a computer via the RS232 port at 115200 Baud. The plots were generated with MATLAB.

Custom Sensor

Pros

Cons

Response

Figure 8: Figure 9:

Test Setup

System Diagram

Pin Assignments

LPC2148 Pin Assignments

Signal Name            Port            Pin Function        Notes
--------------------------------------------------------------
EncoderLeft1        P0.30            CAP0.0
EncoderLeft2        P0.29            CAP0.3
EncoderRight1        P0.28            CAP0.2
EncoderRight2        P0.4            CAP0.1

LeftDir1            P1.22            GPIO:output
LeftDir2            P1.23            GPIO:output
RightDir1
RightDir2            P1.21            GPIO:output
LeftPWM                P0.0            PWM1
RightPWM            P0.1            PWM3

LeftFront            P0.13            AD1.4
LeftRear            P0.12            AD1.3
RightFront            P0.21            AD1.6
RightRear            P0.22            AD1.7
Front                P0.6            AD1.0

Schematics

Datasheets

Links

 
projects/micromouse/team_6_2011.txt · Last modified: 2012/01/28 16:58 by jeffw
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki