The IR sensors are intended as redundancy to the sonar.
The IR sensors are intended as redundancy to the sonar.
For this task, two different kinds of IR sensors were chosen as IR sensors sufficiently long-ranged to cover for the sonar is inaccurate at shorter ranges.
For this task, two different kinds of IR sensors were chosen as redundancy for the sonars. The
Thus, a second, shorter-ranged sensor was chosen to cover the remaining distance.
long-ranged sensors are meant to cover for the sonar at short range while the short-ranged sensors
are meant to cover the remaining distance.
\subsubsection{Hardware details}
\subsubsection{Hardware details}
The long-range sensor chosen for the task is Sharp GP2Y0A710K0F. %Possible URL link?
Its distance measuring range is $\SI{100}{}$ to $\SI{550}{\centi\metre}$.
Its distance measuring range is $\SI{100}{}$ to $\SI{550}{\centi\metre}$.
Accuracy could not be ascertained from the data sheet.
Accuracy could not be ascertained from the data sheet.
Output of the sensor is a current, where the voltage varies between $\approx\SI{1.5}{}-\SI{3}{\volt}$, where lower values corresponds to longer distance.
Output of the sensor is a current, where the voltage varies between
The voltage curve is demonstrated in Figure \ref{fig:long_ir_voltage}.
$\approx\SI{1.5}{}-\SI{3}{\volt}$, where lower values corresponds to longer distance.
Measurements are carried out continuously every $\SI{16.5}{\milli\second}\pm\SI{3.7}{\milli\second}$, and output is updated after maximum $\SI{5.0}{\milli\second}$.\cite{sheet:ir_long}
% TODO: Add a picture?
% The voltage curve is demonstrated in Figure \ref{fig:long_ir_voltage}.
Measurements are carried out continuously every $\SI{16.5}{\milli\second}\pm\SI{3.7}{\milli\second}$,
and output is updated after maximum $\SI{5.0}{\milli\second}$.\cite{sheet:ir_long}
The short-ranged sensor chosen is Sharp GP2Y0A02YK.
The short-ranged sensor chosen is
It has a distance measuring range of $\SI{20}{}$ to $\SI{150}{\centi\metre}$ with an accuracy of $\pm\SI{10}{\centi\metre}$.
Output of the sensor is a current, where the voltage varies between $\approx\SI{0.5}{}-\SI{2.7}{\volt}$, where lower voltage corresponds to longer distance.
It has a distance measuring range of $\SI{20}{}$ to $\SI{150}{\centi\metre}$ with an accuracy of
The voltage curve is demonstrated in Figure \ref{fig:short_ir_voltage}.
$\pm\SI{10}{\centi\metre}$. Output of the sensor is a current, where the voltage varies between
Measurements are carried out continuously every $\SI{38.3}{\milli\second}\pm\SI{9.6}{\milli\second}$, and output is updated after maximum $\SI{5.0}{\milli\second}$.\cite{sheet:ir_short}
$\approx\SI{0.5}{}-\SI{2.7}{\volt}$, where lower voltage corresponds to longer distance.
% TODO: Add a picture?
% The voltage curve is demonstrated in Figure \ref{fig:short_ir_voltage}.
Measurements are carried out continuously every $\SI{38.3}{\milli\second}\pm\SI{9.6}{\milli\second}$,
and output is updated after maximum $\SI{5.0}{\milli\second}$.\cite{sheet:ir_short}
\subsubsection{ADC}
\subsubsection{ADC}
As the output of the sensors are analogue, the mircroprocessor will reqire usage of its internal ADC (Analog-to-Digital Converter).
As the output of the sensors are analogue, the mircroprocessor will require usage of its
The ADC is configured in the basic Single conversion mode, as the clock speed is vastly greater than the update frequency of the sensors.
internal ADC (Analog-to-Digital Converter). The ADC is configured in the basic Single conversion mode,
ADC conversion is specified to take at most 15 clock cycles, so the check will block until conversion is complete.
as the clock speed is vastly greater than the update frequency of the sensors. ADC conversion is
Voltage is mapped through a lookup table (one for each sensor type), approximated using data from the corresponding data sheets.
specified to take at most 15 clock cycles, so the check will block until conversion is complete.
Voltage is mapped through a lookup table (one for each sensor type), approximated using data from the