Professional Documents
Culture Documents
Ramdan - 18010040 - Chapter 2 - Exercises - 2021
Ramdan - 18010040 - Chapter 2 - Exercises - 2021
NIM: 18010040
Chapter 2: Exercises/Tasks.
8. What are the using of gyroscope, accelerometer, and compass sensor in autonomous
robots?
Answer:
Gyroscope:
Several manufacturers of gyroscopes available for model airplanes and helicopters.
These modules are meant to be connected between the receiver and a servo actuator, so
they have a PWM input and a PWM output.
In normal operation, the PWM input signal from the receiver is modified according to
the measured rotation about the gyroscope’s axis, and a PWM signal is produced at the
sensor’s output, in order to compensate for the angular rotation.
Accelerometer:
The accelerometer measuring a single or two axes at once, sensor output is either analog
or a PWM signal that needs to be measured and translated back into a binary value by
the CPU’s timing processing unit.
The acceleration sensors were quite sensitive to positional noise (for example servo jitter
in walking robots), so that we used additional low-pass filters for the analog sensor
output or digital filtering for the digital sensor output.
Compass Sensor:
A compass is a very useful sensor in many mobile robot applications, especially self-
localization.
An autonomous robot has to rely (menyandarkan) on its on-board sensors in order to
keep track of its current position and orientation.
The standard method for achieving this in a driving robot is to use shaft encoders on
each wheel, then apply a method called “dead reckoning”.
10. What are drawbacks of gyroscope and describe data processing techniques have been
applied for overcomes.
Answer:
A particular problem observed with the piezo gyroscope is drift: even when the sensor
is not being moved and its input PWM signal is left unchanged, the sensor output drifts
over time.
This may be due to temperature changes in the sensor and requires compensation.
An additional general problem with these types of gyroscopes is that they can only sense
the change in orientation (rotation about a single axis), but not the absolute position.
12. What are the best solutions in creating interrupt at the CPU for image byte of the camera
and shows it technique's approach?
Answer:
Very interrupt creates considerable overhead, since system registers have to be saved
and restored on the stack.
Starting and returning from an interrupt takes about 10 times the execution time of a
normal command, depending on the microcontroller used.
Therefore, creating one interrupt per image byte is not the best possible solution.
It would be better to buffer a number of bytes and then use an interrupt much less
frequently to do a bulk data transfer of image data.
This approach using a FIFO buffer for intermediate storing of image data.
The advantage of a FIFO buffer is that it supports unsynchronized read and write
in parallel.
So while the camera is writing data to the FIFO buffer, the CPU can read data out,
with the remaining buffer contents staying undisturbed.
The camera output is linked to the FIFO input, with the camera’s pixel clock
triggering the FIFO write line.
From the CPU side, the FIFO data output is connected to the system’s data bus,
with the chip select triggering the FIFO read line.