For the prototype, the navigation system utilized a combination of tape sensing and IR Photo-Transistor sensing. The design relied on using an array of five TCRT5000 Infrared Reflective Sensors which consists of an IR LED and photo transistor. The LED emits infrared light which is reflected with varying intensities depending on the reflectance of the object the light is incident upon. A white object reflects most of the incident light while a dark object absorbs most of the incident light. The phototransistor converts the reflected light back into current and therefore provides a means to distinguish between the white space and black lines. We implemented line following using a PD controller to provide smoother motor commands compared to using a number of IF statements.
Gordon the Robot relied on ultrasonic distance sensing to determin when it was near the pot and also to determine when the pot was on the burner.
The distance from the Pot handle or game board boundaries were read using two ultrasonic ranging modules (HC-SR04). Both sensors were powered from the 5V power rails while the trig (Trigger Pulse Input) and echo (Echo Pulse Output) pins were connected to the Arduino Mega. To measure the distance from any object, the Microcontroller sends a short pulse from an Arduino digital pin to the Trigger Pulse Input which triggers the emission of ultrasound waves. The ultrasound waves are reflected by the object and the time taken for the waves to return is converted to a distance. We used a timer to pulse and read a single ultrasonic sensor at a time so there would not be conflicting signals.
Gordon the Robot relied on a Photo-transistor circuit to determine its initial orientation within the start zone with respect to the POT.
The photo-transistor was placed in a transresistive amplifier configuration to provide a more linear relationship beteween the output voltage and output current. Signal conditioning and amplification was done next using a high pass filter and differential amplifier to remove noise and the conditioned signal was finally passed through an inverting schmitt trigger to provide a boolean digital output detecting the presence of the POT when the photo-transistor was facing it.
Problems faced in POT sensing
Environmental noise from IR rays of the sun, and IR beacon of opposing kitchen island caused sudden spikes in the output of the Schmidt trigger giving false readings.
Resolutions:
Software implementation that uses interrupts to filter the incoming signal and reject step inputs with a duty cycle below a certain on time in microseconds (BEST).
Cover the photo-transistor in a heat shrink tube to only allow IR signals from the front.
Decrease Amplification value of the differential op amp.
Increase cutoff frequency of the high pass filter.
To control the drive motors, we used the L298N motor driver which is rated for up to 35 V and 2 A per bridge, which is sufficient for our drive system. Motor speed is controlled by the Arduino via PWM signals to the two L298N Enable pins, while direction is controlled by setting the state of the four L298N Input pins. Notably, since this motor driver package allows access to the four individual input pins, we were able to use fast braking that effectively shorts the motor by setting the corresponding input pins for a motor to the same state while the enable was high. This offered distinct advantages in our driving and navigation.
Problems faced in drive system control
Allowing for fine motor control at lower PWM duty cycles: One issue the team faced with line sensing was the inability to control the DC motors at lower PWM duty cycles leading to undesirable behavior while testing the line following system.
Resolution: Increasing the default frequency of the PWM pins we were using to control our motors helped solve this issue.
The servo motor is powered by the 5V power supply and controlled via Arduino digital pin using the Servo library functions. The circuitry is trivial and can be found in the main circuit diagram below.
The team designed two main power rails to supply power to the circuit elements as all circuit components were powered by either a 5V power supply or 12V power supply. The two 7.2 V batteries were connected in series to supply 14.4V. These batteries were connected in series with a 3A fuse to prevent excessive current from damaging circuit elements. The 14.4V power line was regulated using a buck converter 12 V for the 12 volts main power rail and the 12V was regulated to 5V for the 5 volts main power rail. An emergency shutoff switch was also connected between the 12V regulator and 12V power rail to turn allow a manual turn off.