BLOG4 Tao

 1. Distance Sensor Verification

In this stage, we first verified the performance of the distance sensor (GP2Y0A02YK0F) using an oscilloscope.



Objective

To confirm whether the sensor output matches the characteristic curve provided in the datasheet.


Method

The sensor was powered using the lab power supply.

The output pin (analog voltage) was connected to the oscilloscope.

A reflective object was placed at different distances (within 20–150 cm range).

The corresponding output voltage was recorded.


Observation

The output voltage decreases as the distance increases.

The curve is nonlinear, especially steep at shorter distances.

The measured values closely follow the datasheet curve trend.



for example,we measure 2 different result individually.

When the distance from the white paper is 20cm, the voltage is around 2.5V, which perfectly matches the chart.




When the distance from the white paper is 70cm, the voltage is around 0.9V, which perfectly matches the chart.



Conclusion

The sensor is functioning correctly, and its output behavior is consistent with the datasheet.

This validates that it can be reliably used for distance detection in our system.


2. PWM & Motor Controller

This PWM control system uses an RTOS-based task structure and a finite state machine to generate PWM signals for motor control, where input events trigger state transitions that determine the duty cycle of the output signals.

First, let's look at the PWM behavior we measured with an oscilloscope before, corresponding to the two PWM pins on the board.

0.5 ms


1ms


1.5ms


2ms



After this, we proceeded to integrate the motor controller (Sabertooth 2x12) with our control board.




 PWM Signal Mapping and Signal Verification

Identified PWM output pins on the microcontroller board.

Used oscilloscope to probe the controller input pins.

input from board need 5V:



Connected them to the controller input pins:


S1 → PWM channel 1



S2 → PWM channel 2


GND is also correct:



 Conclusion:

PWM signal generation and transmission were correct.


3.Identify and analyze problems

Despite a correct PWM input, the motor controller is not working.


Observed symptoms:

Motor unresponsive

Controller indicator lights:

STATE2 LED lit

ERROR LED lit


This indicates an internal fault in the controller.

Consulting the datasheet and testing the power supply voltage revealed that the problem is likely due to low voltage.


We referred to the controller datasheet and performed power measurements.

Measured Result:

Supply voltage at controller input: ≈ 2.3 V



Datasheet Requirement

Minimum input voltage: 6 V



Analysis:

The supplied voltage was far below the required operating range.


This explains:

Error LED activation

Controller not responding to PWM signals

Even though PWM signals were correct,

Power supply failure prevented system operation


5. Conclusion and Follow-up Steps

The motor controller failure was caused by insufficient power supply voltage, not a signal problem.

Follow-up Measures: Since we found that the power supply voltage was not the issue, we need to check if there is a wiring problem or something causing voltage drop. Then, ensure the input voltage is stable at ≥ 6V, and retest the system after voltage correction.





Comments

Popular posts from this blog

Blog 1 - Igor Kapusniak

Blog 5 - Bin Bot Project - Davin Barron