Team P16214: Bicycle Power Meter

Team P16214: Bicycle Power Meter

Team P16214: Bicycle Power Meter

Team members: Luke Brophy, Adam Dibble, Ian Gielar, Sean Langan, Connor Reardon

Test Plan

Section 1: Battery

The battery selected for our power meter is rated at a capacity of 950mAh. This rating will be tested by using a simple circuit to draw the more than the maximum amount of current our microcontroller can draw (500mA) at any one time. An ammeter and a voltage meter will be used to measure the current and voltage of the battery and these values will be logged every 5 minutes until the test is complete. The data points will then be plotted to show the lifetime characteristics of the battery.

Section 2: Mobile App

Section 3: Strain Gauges

The strain gauge used for this test is an omega 90 degree rosette. The strain gauge will be mounted to the crank arm to measure bending strain. The crankset will be clamped, and force will be applied to the pedal via hanging calibrated weights. The objective of this test is to be able to predict the force that is being applied to the pedal from the strain gauge signal. Since the crank arm length is constant, the force can be found by dividing the torque by the moment arm. The amplifying circuit will be used to create a more readable signal from the strain gauge. The amplified signal will be imported to labview using a NI Daq device for data analysis. The test procedure is outlined below:

  1. Solder leads to strain gauge
  2. Mount strain gauge to top of crank arm
  3. Clamp crankset
  4. Connect strain gauge to amp
  5. Connect amp to NI Daq device
  6. Apply calibrated weights to pedal
  7. Import data, and create force vs. strain signal curve

Results:

Section 4: Microcontroller

The microcontroller to be used for this project is the DFRobot Bluno Nano Arduino BLE Microcontroller. A Bluno Nano will be mounted on the crank arm of the RIT Cycling Bike Blender for the final product and a development board version, the DFRobot Bluno Arduino BLE Microcontroller, will be used for testing.

Section 4.1: BLE

The first tests to be run for the microcontroller subsystem will involve the BLE communications. Items to be tested include the functionality of the BLE communication, the BLE range between the Bluno (development board) and the mobile phone, the BLE range between the Bluno Nano and the mobile phone, and the BLE range between the Bluno Nano and the Bluno.

Figure 4.1: BLE Range Test Depiction.

Section 4.1.1: BLE Functionality Test:

The functionality of the BLE communications will be tested for each of the cases listed above by following the procedure below:

  1. Connect the microcontroller to the phone using Evothings Workbench and its provided simple sketch.
  2. Verify that a connection is made.

The test results will be measured using a binary scale. If the microcontroller is able to connect to the phone (or other microcontroller), the result of the test is pass; if the microcontroller is unable to connect to the phone (or other microcontroller), the result of the test is fail. It is expected that each item will pass this test.

Results:

The results for this test are below:

Section 4.1.2: BLE Range Test:

The range of BLE communications will be tested for each of the three cases/items listed above. This will be done by the following procedure:

  1. Connect the microcontroller to the phone using Evothings Workbench and the provided Arduino sketch
  2. Once the BLE is connected, begin to increase the distance between the devices
  3. Continue to increase the distance until the connection is lost
  4. Find the maximum distance by decreasing the distance between the devices until the connection is re-established
  5. Measure the distance between devices
  6. Repeat steps 2 - 5 three times and take the smallest recorded distance as the maximum BLE range

It is expected that the BLE range will be greater than or equal to 20 meters.

Results:

Section 5: Crankset Layout

This test focuses on the Component layout as a mock up. Cardboard cutouts of each components were made and placed on the crankset. The test is used to confirm that each component will fit on the crankset

Figure 5.1: Image shows the proposed locations for the microcontroller, amp circuit and accelerometer.

image 1 jpg

Figure 5.2: Image shows the proposed location for the battery and drive side amp circuit.

Results:

Spatial test
Expected Result / Measured Result
strain gauges / Pass / Pass
Amp Circuit / Pass / Pass
Battery / Pass / Pass
Micro Controller / Pass / Pass

Table 5.1: The results of the spatial test are tabulated above

Results:

All the components fit on the crankset. The proposed layout will be used to make the cad drawings for the full assembly.

Section 6: Accelerometer

The reason for having the accelerometer is to allow for the cadence (revolutions per minute) to be measured. The accelerometer will be placed in the center of the spindle of the crank set for the Power Meter. The reasoning for having the accelerometer in the spindle is to protect it from any damage that may occur when riders are getting on and off of the bicycle or from riders whose feet slip off of the pedals and accidentally kick the accelerometer. Another reason for placing the accelerometer in the spindle is to allow for the accelerometer to be at the center of the axis of rotation so that the only acceleration that it will feel is that which is due to gravity. This will allow for the readings from the accelerometer to be most accurate. To ensure that the accelerometer is giving accurate results it must first be tested to show that it is producing the expected results.

The following are the steps to test the accelerometer accuracy:

  1. Place the accelerometer, and microcontroller onto a breadboard
  2. Connect the output from each axis of the accelerometer to an input pin on the microcontroller
  3. After powering the devices, choose one axis (x, y, or z) to isolate.
  4. Rotate the breadboard with the devices on it to known angles (0 deg, 90 deg, and -90 deg) and record the output voltage of the isolated axis.
  5. Also record the number of bits used for each angle (using Arduino code for the Bluno
  6. Make sure that each angle matches up with a particular orientation of the axis with respect to gravity (-1g, 0g, 1g)
  7. Repeat Step 4. for the other 2 axes

After performing this testing this will then allow the microcontroller to be coded to connect a particular angle with each different voltage that is produced. This test will be verified using the calculations that were done previously to determine the level of degree sensitivity of the accelerometer.

Results:

After conducting the accelerometer testing it was seen that the x-axis and the y-axis produced values for the voltage that were close to the expected values as taken from the data sheet for the accelerometer. However, the z-axis did not produce the expected results taken from the data sheet. The recorded voltages for each axis are shown in the table below:

Due to the values of the z-axis not being the correct values, calculations were performed to verify that these incorrect values would be good enough to perform the task at hand. After the calculations it was determined that the z-axis could still detect the angle up to a 0.5 degree accuracy which is more than sufficient for the bicycle power meter application.

Section 7: Strain Gauge Amplifier Circuit

Due to the very small range of change in signal value for the strain gauges, extra circuitry will be needed in order to amplify the strain gauge outputs before being measured by the microcontroller. A wheat-stone bridge will be used in order to create a circuit which compares the varying strain gauge signal with a non-varying signal. The difference in voltage between these two signals will be extremely small, in the range of 0V - .0005V, so the signals will be passed to an instrumentation amplifier in order to achieve a range of approximately 0V - 1.1V. This will allow the microcontroller to measure varying strain with acceptable accuracy. The amplifier will need to yield a gain of approximately 2000V/V, or 33dB.

The instrumentation amplifier to be used is the Texas Instruments INA2126. In order to test the amplifier, the circuit below will be constructed using a breadboard, the INA2126, and several resistors:

Figure 7.1: Amplifier Circuit Schematic.

R5 will be chosen to be approximately 40.1Ω, which will set the instrumentation amplifier to 2000V/V gain. R1 and R2 will represent the strain gauges, and will be chosen to be 349.65Ω and 350.35Ω in order to represent a maximum strain. R3 and R4 will be fixed to the nominal value of the strain gauges, 350Ω. A sinusoidal voltage will be supplied to the wheat-stone bridge, then the input and output of the amplifier will be measured in order to verify the gain. The node between R1 and R2 (green probe) is the input measured and the output at the top op-amp (purple probe) is the output. It is expected that a gain of 2000V/V will be measured.

Results:

The circuit in Figure 7.1 was simulated using OrCAD PSPICE with the following results:

Figure 7.2: Simulation Results for Amplifier Circuit.

The output peak voltage in the simulation was 0.9974V and the input peak voltage was 499.815uV, corresponding to a gain of 1995.54V/V. This is very close to the expected value of 2000V/V. Next, the circuit was constructed in the lab and tested:

Section 8: Overall System Accuracy