Interfacing Of Earth Sensor With OBC

:
Earth sensors is used to sense the position of earth and by this reference position of the satellite
is maintain. Potentiometers is used instead of earth sensor and this potentiometers is interacts
as sensors with OBC. In Satellite three sensors are used to maintain the position of satellite. Here
we used three 10k potentiometers. Potentiometers (Earth sensor, Sun sensor & Magnetometer)
sends analog data to AT mega 16 from port A (PA0 PA1 PA2).
For input:
On PA0 earth sensor is connected, on PA1 sun sensor is connected & on PA2 magnetometer is
connected.
A7 A6 A5 A4 A3 A2 A1 A0
0 0 0 0 0 0 0 0

This controller converts the analog data from a potentiometer to 10 bit digital data. The analog
data is quantizing as follows and the angle for a step is calculated as:
5/

=0.00488 volts
The minimum angle which changes as the change in voltage is 1.8°. Scaling is done so 1024 step
size will reduce to 100. When the change in voltage is 0.00488x10 so angle will be change to 1.8°.

PA0 ATXMega A3
PA1
PA2
12Volts
Ground Common
PA0 ATXMega A3
PA1
PA2
12Volts
Ground Common

Analog input voltage range Output digital signal (10 bit) Degrees
0V---0.047V 00000000 180°
0.048V---- 0.095Mv 00000001 178.2°
0.096mV---- 0.143mV 00000010 176.4°
0.144mV---- 0.191mV 00000011 174.6°
.
.
.
.
.
.
.
.

4.88V---- 5V 11111111 0°

If the input from potentiometer is 5V so the satellite is directly facing the earth and if the input
from potentiometer is 0V so the satellite is opposite to the earth and if the voltage between 0V—
5V so the satellite is some angle deviated from the earth.
Potentiometers (Earth sensor, Sun sensor & Magnetometer) will be connected to a port A of the
AT mega 162 from pin A0, A1 & A2.
For instance the output will be check out from LEDs. 10 LEDs will be connected temporarily to
the port B and port D to check the values of the register ADC. In future input from potentiometer
is directly control motors to stable the position of satellite.
For Output:
Temporarily at port B and port D 10 LEDs will be connected to check the value of ADC.
B7 B6 B5 B4 B3 B2 B1 B0
1 1 1 1 1 1 1 1

D7 D6 D5 D4 D3 D2 D1 D0
1 1 0 0 0 0 0 0


Components to Be Used:
Components Specification
Microcontroller At mega 16
Potentiometer 10K
LEDs COM-00533
VCC 5volt



Connection of potentiometer With ATmega 162:







ATmega 16
VCC
GND
Block Diagram:


















MICROCONTROLLER
MOTORS
EARTH SENSOR
POWER SUPPLY