Skip to content
Snippets Groups Projects
Commit af782df5 authored by evan.wendell@duke.edu's avatar evan.wendell@duke.edu
Browse files

Final Commit

parent fc26865a
Branches main
No related tags found
No related merge requests found
Pipeline #459900 passed
%% Cell type:markdown id:35e2a4df tags:
%% Cell type:markdown id:a8d75837 tags:
# BLE Lab Jupyter Notebook
Evan Wendell
%% Cell type:markdown id:ddde6e41 tags:
%% Cell type:markdown id:5fc0bf66 tags:
## Battery Level
To calculate the accuracy of the battery level measurement, the expected value was compared to the measured value using the percent error calculation. The percent error of the expected battery level to the measured battery level is 2.06%
![Battery_Level](Battery_Level.png "Battery Level")
(This image is with a battery level input of 2V)
The battery level was very accurate based on this calculation.
%% Cell type:markdown id:ff6e2c8b tags:
%% Cell type:markdown id:4642112a tags:
## 100Hz Linearity
1. Measurements of a 100Hz sin input with Vpp of 5-50mV were made for LED 1
![Picture1](Picture1.png "Linearity 1")
With an R-squared value of 0.9758, it can be concluded that the brightness of LED1 varies linearly with the Vpp input of the 100Hz sin wave.
%% Cell type:markdown id:f08a1f42 tags:
%% Cell type:markdown id:746b0c0e tags:
## 500Hz Linearity
2. Measurements of a 500Hz sin input with Vpp of 10-150mV were made for LED 2
![Picture2](Picture2.png "linearity 2")
With an R-squared value of 0.9967, it can be concluded that the brightness of LED2 varies extremely linearly with the Vpp input of the 500Hz sin wave.
%% Cell type:markdown id:34ea1b18 tags:
%% Cell type:markdown id:4be4d3f1 tags:
## Bluetooth Functionality
Bluetooth was implemented and the functionality was tested using 3x1 data array with the pressure, and brightness measurements.
<img width = "420" height = "600"
src = "BLE_Connection.jpeg"
controls>
</img>
This image shows bluetooth connection to Evan's Device.
This image shows that bluetooth connection to Evan's Device was established.
%% Cell type:markdown id:8f02b4b1 tags:
%% Cell type:markdown id:be5530aa tags:
## VBUS Functionality
VBUS functionality was determined using the second USB port.
Below is an image of loggin statements entering and exiting the VBUS error state (1) as well as a video showing the functionality of the error LED (2).
1. ![VBUS_Alarm](VBUS_Alarm.png "VBUS Alarm")
2.
<video width = "420" height = "600"
src = "VBUS Alarm.MOV"
controls>
</video>
%% Cell type:markdown id:46202f28 tags:
%% Cell type:markdown id:6e0af3ea tags:
## Questions
1. According to nyquist theorem, the sampling rate must be 2x the maximum frequency of the sinusoid. Therefore, because the maximum sampling frequency for the nRF52833 board of a 12 bit ADC is 200 ksamples per second, the maximum frequency of the sinsoid must be 100kHz. When the bits are reduced to 8, the maximum sampling rate increases because there are less approximations per sample. Therefore, the maximum frequency would be higher than 100kHz. Based on my calculations, a bit depth of 8 bits would correspond to a sampling rate of 300 ksamples per second. Therefore, at a bit depth of 8 bits, the theoretical maximum frequency of the input sinusoid would be 150kHz.
2. Experimentally, it was determined that the maximum input frequency that didn't experience aliasing was 100kHz. This is consistent with the theoretical maximum frequency at 12 bits but lower than the theoretical maximum frequency at 8 bits.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment