Project completed and demoed in the ECE153B capstone lab.
Despite significant hardware limitations, we were able to consistently read directionality when far away from
sono-reflective surfaces. Using these readings, we were able to turn toward and track the source of the
sound. Furthermore, when a consisent volume sine wave was input to the system, we had nearly 100% accuracy
tracking the reference signal. In total, we learned a great amount about the properties of sound, embedded
hardware peripherals, ideas for future projects, and had a wonderful time.
Pre-test checks
2019-03-20
We arrived in lab two hours earlier than our scheduled meeting time to hook up the board and get final
confirmation that it was prepared for presentation. In some last-minute testing we also reduced the number
of consecutive signals to begin moving backward, helping improve the forward/backward control via voice
input.
As a last-minute change, replaced the stacked 6-volt batteries with single 12-volts, greatly increasing motor
response (due to better current throughput.)
Processing Data
Early 2019-03-20
We continued the data processing from earlier, developing increasingly complicated post-processing techniques
to manage multipath audio noise. Eventually, with a combination of Kyle's previous step-detecting algorithm,
signal-counting, and debouncing, we got reasonable recognition and response. To this we attatched a
simplistic control algorithm and setup the board for some independent testing. We found that, surprisingly,
pure sine waves still responded well despite the many layers of processing designed around words.
Best of all, we got both sine-wave following and voice following working and on video. Halleluiah.
Progress Paved with Stubmles
2019-03-19
In beginning development tonight, we encountered significant problems with our initial design intents because
of our intended listening process. We assumed that the voice signal would be sampled sufficiently quickly
that its objective power would be the same. From that, we assumed we could find directional power. However,
two-syllable and less words are extremely short (~100ms) and our sampling rate is limited to 3300 samples
per second. We need to make sure that we do not do a read to determine direction between to microphone reads
not done during the same word. For this purpose, Kyle proposed several exceptional data processing
algorithms to better control the input data. We wrote code to collect data from the LPC4088 and began to
perform our proposed data processing in Excel and MATLAB, estimating performance for several test sets of
simple tones and voice samples.
We also discovered that even with explicitly programmed gain, the actual signal gain from each mic varied
wildly between our four units. To correct this, we also generated normalization scalars from our test data
to apply to each microphone.
People Pursuing Part Connection
2019-03-18
This meeting, most of the group met from 6:30pm onward through 2am, completing assembly of the board on
the 3D-printed board mount and beginning to test the algorithms for operating the board. We discovered our
initially intended computation battery could not supply sufficient current to power the LPC4088 developer
kit and our mics together. We also discovered nonlinear behaviour in the power output of our H-bridge at 6
volts, so to ensure consistent behaviour we decided to double our motor power supply voltage.
Performant Averaging
2019-03-16
Today we completed I2C read code for two microphones and began writing code to average their output data.
While values returned were proportional to the volume we fed into the microphone, we noticed significant
echo pickup from the environment that threw off attempts to determine signal directionality in the
two-microphone case. We hope this will not become a significant problem in the four-microphone case, but to
help mitigate it we are developing a backboard for the microphone mounts to ensure they pickup fully only
sounds incident on their facing direction. We are also nearing completion of the 3D-printed board mount, the
plastic and print time for which were helpfully provided by Toyon Industries. Thanks Toyon!
Performing I2C
2019-03-12
This lab session explored wiring the ADC and mics, powering the ADC and mics, and getting our first I2C
communication with the ADC. We saw good microphone output on oscilloscopes and got valid bytes back from the
ADC. Our next steps are completion of the mounting board and ADC I2C handling code.
Performant Motors
2019-03-09
We had another weekend meeting, this time to finish code for running our motors forward and in reverse.
During this testing, we made a couple mistakes. We...
Forgot to have a common ground for the circuit
Forgot to change pin numbers in the code to match our GPIO map
Forgot to change PWM width from our previous testing to make sure we ran the right program
Forgot to check the code for reverse motor operation
Testing pins with an oscilloscope, we located the first two and corrected them. The motors turned at a speed
proportional to the PWM duty cycle, so we assume our code works well enough.
Parts Experimentation
2019-03-06
This week was parts interface week. We hooked up our motors through the L298N Dual H-bridge for
Arduino package (part number ASMMR in the ECE shop) and provided 5V supply from the lab bench power
supply, then controlled the H-bridge with a PWM signal. It worked! Unfortunately, only one of our first
selected GPIO pins worked. After further testing, we discovered that the vast majority of the GPIO pins on
our LPC4088 developer's kit were not responding, even after we ensured the IO-Configuration Register
(IOCONN) had been configured to set each of those pins in GPIO output mode. Thankfully, with trial-and-error
testing, we found six pins that were viable for timer-based GPIO PWM.
During the trial-and-error testing, we also began to import I2C behavior from our lab2 code, for interfacing
with the Adafruit ADS1015 12-bit multiplexing ADC.
Finally, we also disabled automatic gain on our Adafruit
MAX9814 microphones and measured their performance on an oscilloscope. We got some good near-sine
waves with whistling and humming and some good noise from holding consonants; that appeared to be working
well.
Programming weekend
2019-03-02
Our programming group met Saturday this week to go over PWM specs and to test our motors. The motors were
more powerful than we expected, a pleasant surprise. They also drew a low enough current that we could begin
considering driving them directly from the LPC4088 pins. Debate as to the safety of such a setup for our
development board is ongoing.
This weekend's major challenge came in the form of a tiny FIXME message. Astoundingly, the LPC4088 developer
board drivers provided for ECE 153B students does not have drivers for the PWM modules. This immediately
stymied our progress toward writing a simple interface for our particular use case. We sepnt some three
hours pouring over datasheets and, eventually, located the PWM memory region layout and output pins. While
based off the standard Timer blocks, the PWM blocks had some subtle differences (like removal of the
External Capture Register) that made directly adapting the Timer drivers difficult. Currently, our group is
carefully weighing the interrupt cost of handling PWM through a basic timer block and interrupts, versus the
development cost of writing our own drivers to use the PWM blocks.
Programming begun
2019-02-26
This week, waiting for the parts to arrive, we began to program utility classes and the general program
structure for the ROVR LPC4088. We also completed deployment of our project website to GitHub Pages. The
project code and website are published here on GitHub for
your viewing pleasure.
We have scheduled an extra lab session for this Saturday, once the parts have arrived, to make more progress
before the coming week.
Parts ordered
2019-02-19
This week, we designed system block diagrams and ordered the additional parts we'll need for the lab. Finding
an ADC with which we could interface was a significant challenge, as many ADCs within our budget wouldn't
support signal multiplexing or had an insufficient sampling rate for picking up even deep male voices.
Using the Audacity sound editing software, we tested the
recoverable signals according to the nyquist rate of the ADCs we considered, eventually settling on the Adafruit ADS1015, a 12-bit 4-channel multiplexing ADC
with programmable gain. We also chose Adafruit for our microphones, taking advantage of the Adafruit
MAX9814 for its easy pin access, mountable pcb form-factor, and the ability to disable its automatic
gain control.
We also considered motors with reasonable gearing ratios for our project, eventually settling on the Yosoo
Mini DC 6V Speed Reduction Motor for providing 300RPM as its max speed via a built-on gearbox. A low
base RPM was important, as constructing a new motor gearbox was outside the scope of this project. We also
decided on a brushed DC motor rather than a stepped motor to simplify the otherwise complex PWM operations
necessary to provide power to the motor.
Finally, we identified some H-bridges from our existing parts that could be used to give high-current power
to the motors while still controlling the motors LPC4088 built-in PWM module.
Project proposed!
2018-02-14
Welcome to the ROVR project homepage! The ROVR project is a toy student project to explore the limits of
software digital signal processing on the LPC4088 developer's kit.