NEX ROBOTICS FIREBIRD V ATMEGA 2560 Hardware Manual page 42

Robotic research platform
Table of Contents

Advertisement

Figure 3.33 shows the typical output character of the GP2D120, GP2D12 and GP2Y0A02YK
sensors. In these graphs X axis represents distance from the obstacle and Y axis represents the
output voltage. The sensor's output characteristic is slightly logarithmic in nature hence to get
the distance in millimeters we have to use following formulas.
Distance in mm for GP2D120 = 10.00*((1.00/ ((0.001240875*(float) ADC value) + 0.005)) –
0.42)
Distance in mm for GP2Y0A02YK =
(int)(10.00 * (2799.6 * (1.00 / (float)((double)(ADC_Value)^(double)(1.1546)))));
UC
Pin name
PIN
No.
15
OC4A/PH3
PK5/ADC13/PCINT2
84
1
PK4/ADC12/PCINT2
85
0
PK3/ADC11/PCINT1
86
9
PK2/ADC10/PCINT1
87
8
88
PK1/ADC9/PCINT17
Table 3.10: Connections of the Sharp IR range sensors and its power control MOSFETs
* Sharp IR range sensor enabling and disabling is covered in section 3.10A
© NEX Robotics Pvt. Ltd. and ERTS Lab, CSE, IIT Bombay, INDIA
Sharp IR ranges sensor 1 to 5 disable.
Turns off these sensors, when output is logic 1*
ADC input for Sharp IR range sensor 5
ADC input for Sharp IR range sensor 4
ADC input for Sharp IR range sensor 3
ADC input for Sharp IR range sensor 2
ADC input for Sharp IR range sensor 1
with the ATMEGA2560 microcontroller
Fire Bird V ATMEGA2560 Hardware Manual
USED FOR
UC pin correct
I/O setting
Output
Input (Floating)
Input (Floating)
Input (Floating)
Input (Floating)
Input (Floating)
42

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FIREBIRD V ATMEGA 2560 and is the answer not in the manual?

Table of Contents