Project

# Title Team Members TA Documents Sponsor
40 Variable Speed Running Music Device
Alan Wan
Nithin Boopalan
Weston Heard
Jianchong Chen design_document1.pdf
proposal1.pdf
# Variable Speed Running Music Device

Team Members:

Alan Wan (alanwan2),
Weston Heard (wheard2),
Nithin Boopalan (nithinb2)
# Problem

Most people bring their phone on a run to listen to music. It is big and bulky, and unless you have a perfect playlist, there isn’t going to be music that syncs with your running. If you do happen to have music that is the same as your pace, there is nothing to enforce that you are running at that speed.

# Solution

We intend to fix this by replacing your phone on runs with a device that can react to how fast or slow you are going compared to your intended pace, and a mode where the music will automatically adjust to the speed you are going, in case you don't want to have to worry about keeping on pace.

The device clips to your waistband and stores your music on an SD card so it doesn't move around in pockets. A motion sensor in the device picks up each step, and the device can calculate the steps per minute. It can then play a song that lines up with one’s steps, speeding it up or slowing it down slightly to keep it locked on. If the pace changes too much, it then switches to a different track instead. Everything will run on the device, so no phone or internet is needed.

## Subsystem 1, Motion Sensing

This subsystem determines the runner’s running cadence.

Running cadence usually falls between 140 and 190 steps per minute, which puts foot strikes at 2.3 to 3.2 Hz. An IMU is clipped at the hip in the device and samples acceleration at 200 Hz. The firmware in the STM32 then filters the signal to that range, removing the constant gravitational pull, and projects that reading as the direction of gravity.

Cadence is then found by autocorrelation, where the firmware compares four seconds of a signal against shifted copies of itself. Then the computed shift that best matches is used as the time it takes one stride to repeat, ie stm. This is more reliable than individual foot strikes as it uses the whole window together, so one missed step or short peak barely moves the result. The search first covers the Hz for the running range, then widens to cover walking if nothing is found. This prevents a reading of 180 spm from being labeled as walking. However, since this shift is a whole number of samples, the raw result can only land on certain values, around 2.7 spm apart at 180 spm. The STM32 then interpolates between neighboring values to get the accuracy to be within 0.3 spm.

Components:
6-axis IMU, SPI interface: TDK InvenSense ICM-42688-P
Microcontroller Unit: STM32F4 family


## Subsystem 2, Music Storage and Playback

This subsystem stores the songs and adjusts the speed to match the runner.

Songs are stored on a microSD card as uncompressed WAV files, preventing the processor from decoding MP3. Audio is read off the card using DMA, a block within the microcontroller that can move data without the processor copying, so that reading doesn’t interrupt playback. Each song’s tempo is worked out ahead of time on a computer before being saved in an index file on the SD card. The device then only has to do a lookup while running instead of processing audio for the BPM.

Tempo Matching: Tempo can be changed with WSOLA (waveform similarity overlap-add) by up to 10%. It cuts the audio into overlapping chunks and places them back closer or farther apart to change the speed. This allows for a speed change while preserving pitch. However, the further out the pace is, the worse it will start to sound, and the device will then be forced to change songs.

Target Tempo: plays songs at a targeted pace, and when the runner falls behind the set pace, a low-pass filter is placed to muffle the audio to signal falling behind and clears out as they return to pace. This provides the runner feedback without having to stop running

Components:
microSD card socket: Hirose DM3AT-SF-PEJM5
microSD card: 32 GB SanDisk High Endurance or Samsung PRO Endurance

## Subsystem 3, Audio Output

This subsystem turns the digital audio into a signal that can drive headphones. The main analog circuit design in the project.

Audio samples will travel from the microcontroller over I2S, a three-wire bus for audio, to a DAC, which converts each sample into voltage. This voltage is held until the next sample arrives, so the output appears as a staircase. They then pass through a reconstruction filter to remove the distortion before it reaches a headphone amplifier, which supplies the current that 16 to 32 ohm headphones need. This amplifier gain is capped so the output never exceeds 150 mV RMS into 32 ohm headphones.

Components:
Stereo audio DAC: Texas Instruments PCM5102A
Low-noise audio op-amp for reconstruction filter: Texas Instruments OPA1662
Headphone amplifier, no capacitor output: Texas Instruments TPA6132A2
3.5mm TRS headphone jack: CUI SJ-3524-SMT-TR

## Subsystem 4, Power

This subsystem powers the device from a single lithium cell and handles charging.

The lithium cell will fall from 4.2 V to 3.0 B as it drains, and in the process will cross a 3.3 V logic rail; a buck-boost converter can then be used so the rail remains stable as the discharge finishes. The DAC and headphone amp are fed through dropout regulators that keep the noise from the converter out of the audio. An MCP73831 charges the cell over USB-C, and a MAX17048 fuel gauge will report the charge to the microcontroller.

Components:
Single-cell lithium-polymer battery, 1000 mAh
Low-dropout regulator
Buck-boost regulator: Texas Instruments TPS63020
Battery Charger: MCP73831
Battery fuel gauge: Maxim MAX17048

# Criterion For Success

Cadence is measured within 1 spm of the true value for the range 140-190 spm. The true value can be obtained with a fixed motor setup and verified through video.

Once the device is locked onto a speed, play music to within 1 BPM of the runner’s steps per minute. Verify by checking the audio output and comparing the speed to video of the runner.

After the pace changes by 15 spm or more, change music to match th
e new pace within 10 seconds. Test both speeding up and slowing down by 15 spm or more.

Recognizes stops and starts within 10 seconds of them happening.

The device lasts at least 2 hours of continuous usage.

The device remains lightweight, under 300g, and stays clipped to the waistband over a 15-minute run.

Cloud-controlled quadcopter

Anuraag Vankayala, Amrutha Vasili

Cloud-controlled quadcopter

Featured Project

Idea:

To build a GPS-assisted, cloud-controlled quadcopter, for consumer-friendly aerial photography.

Design/Build:

We will be building a quad from the frame up. The four motors will each have electronic speed controllers,to balance and handle control inputs received from an 8-bit microcontroller(AP),required for its flight. The firmware will be tweaked slightly to allow flight modes that our project specifically requires. A companion computer such as the Erle Brain will be connected to the AP and to the cloud(EC2). We will build a codebase for the flight controller to navigate the quad. This would involve sending messages as per the MAVLink spec for sUAS between the companion computer and the AP to poll sensor data , voltage information , etc. The companion computer will also talk to the cloud via a UDP port to receive requests and process them via our code. Users make requests for media capture via a phone app that talks to the cloud via an internet connection.

Why is it worth doing:

There is currently no consumer-friendly solution that provides or lets anyone capture aerial photographs of them/their family/a nearby event via a simple tap on a phone. In fact, present day off-the-shelf alternatives offer relatively expensive solutions that require owning and carrying bulky equipment such as the quads/remotes. Our idea allows for safe and responsible use of drones as our proposed solution is autonomous, has several safety features, is context aware(terrain information , no fly zones , NOTAMs , etc.) and integrates with the federal airspace seamlessly.

End Product:

Quads that are ready for the connected world and are capable to fly autonomously, from the user standpoint, and can perform maneuvers safely with a very simplistic UI for the common user. Specifically, quads which are deployed on user's demand, without the hassle of ownership.

Similar products and comparison:

Current solutions include RTF (ready to fly) quads such as the DJI Phantom and the Kickstarter project, Lily,that are heavily user-dependent or user-centric.The Phantom requires you to carry a bulky remote with multiple antennas. Moreover,the flight radius could be reduced by interference from nearby conditions.Lily requires the user to carry a tracking device on them. You can not have Lily shoot a subject that is not you. Lily can have a maximum altitude of 15 m above you and that is below the tree line,prone to crashes.

Our solution differs in several ways.Our solution intends to be location and/or event-centric. We propose that the users need not own quads and user can capture a moment with a phone.As long as any of the users are in the service area and the weather conditions are permissible, safety and knowledge of controlling the quad are all abstracted. The only question left to the user is what should be in the picture at a given time.

Project Videos