Jenny Wen's Project Site for ECE 3400, Intelligent Physical Systems
This lab was split in two parts. In the first part, the robot activated after a specific frequency was detected and turned in place detecting obstacles. In the second part, I turned the robot into a light-following, obstacle-detecting robot.
First, I removed the filters from the last lab because the measured frequency response was far from ideal. I also added the ultrasonic sensor after shifting some existing parts around. Finally, I changed the pins I was using for PWM to the motors to D3 (PF5) and D6 (PF4) on the Nano to avoid issues with the timers since I was using the TCA timer to collect audio samples for the Fourier analysis. An image of the result is shown below.
I then wrote code for and characterized the ultrasonic sensor, and plotted the measured distance and error versus actual distance in the graph below.
The demonstration for this part of the lab required that the robot starts moving after a 550 Hz tone is detected. I first used MATLAB to plot the spectrum of notes contained in the sound file that was provided to us. The audio file and the frequency spectrum of the audio file are provided below.
After the 550 Hz tone is detected, the robot turns in place and begins detecting obstacles that are placed in the configuration below. The onboard LED lights up when it detects an obstacle.
A video demonstrating the everything for this part of the lab is viewable below.
For this part of the lab, the robot navigates in the obstacle course pictured below, lured by a flashlight.
In words, along with LED statuses at each step:
A video demonstrating the everything for this part of the lab is viewable below.
This concludes lab 4, the final lab of the semester.
Overall, I think this class and the labs were a good culmination of everything I learned in previous classes, such as analog circuitry and signal analysis. I also learned a lot because I had to be creative with the code, since I wasn't allowed to use certain libraries or functions like delay() or attachInterrupt(). It was a little frustrating sometimes when things didn't work the way they were supposed to, like in lab 3 with the filters, but I think it was an inevitable but valuable part of the engineering design process and experience.