P16214: Bicycle Power Meter
/public/

Build & Test Prep

Table of Contents

The purpose of this page is to document our MSD team's progress through MSD II as we begin to build and test our design as we move closer and closer to the ImagineRIT festival. This page tracks the tests that our team performed and any design changes that may have resulted from issues we faced while testing certain parts of our design.

Team Vision for Build & Test Prep Phase

During this phase of MSD II our team plans to begin testing the battery lifetime as well as it's capacity. Also the team plans to continue testing and debugging our strain gauge amplifier circuit. This circuit will be tested by create the amplifier circuit using a breadboard as well as etching our own PCB. The circuit will be powered using a power supply with a sinusoidal signal to simulate varying strain values on the crankset. With the sinusoidal input the team will then measure the voltage at the output compared to the input to confirm the expected gain value.

Test Plan Summary

As our team transitioned from MSD I into MSD II we had created a list of test items that we wanted to run tests on to verify that particular parts of our system were operating as expected and as we designed them to run. This test plan document was started in MSD I and has since had some items added to it in MSD II. The up to date test plan, with updated completion dates and more tests desired to be completed, can be seen below:

Updated Test Plan

Updated Test Plan

The original and up to date document for the subsystem test plan can be found in the MSD II Documents folder. Some of the tests shown in the subsystem test plan were completed and started during this phase of MSD II. The tests that were run during this phase are all shown in more detail as follows.

Strain Gauge Amplifier Circuit

Continuing from MSD I our team had tested the wheat-stone bridge amplifier circuit for the strain gauges. The amplifier circuit had been tested on a breadboard to ensure that it was working correctly. After our team had verified that the amplifier circuit was working correctly and as expected on the breadboard we decided to etch our own printed circuit board (PCB) for the amplifier circuit. To create this PCB we first had design the layout for the board using Fritzing which is a PCB layout software program. After creating the layout design we then had to create the mirror image of the traces the way we wanted to see them on the PCB. This was done by creating a pdf from the Fritzing file to allow us to print out the layout of the traces.

After having the mirror image of our circuit board layout we then had to iron the image onto a copper plated protoboard. The images below show the mirror image of our PCB layout (on the left) and Connor ironing the image to the copper plated board (on the right):

public/Photo Gallery/Amp PCB_Traces.JPG public/Photo Gallery/Amp PCB_Ironing.jpeg

After the image of the board layout was ironed to the copper plating this left behind the ink which stuck to the copper. The pictures below show the resulting ink traces that remained on the copper after ironing the image:

public/Photo Gallery/Amp PCB_Printed on Copper_1.jpeg public/Photo Gallery/Amp PCB_Printed on Copper_2.jpeg

Once the ink was on the copper plated board the board was then placed into a Ferric Chloride solution that would cause a chemical reaction with the copper. This chemical reaction would remove the copper from the board but the copper that is underneath the ink would remain untouched. The following pictures show the board as it was placed in the solution with the copper being removed from the board but the ink traces still remaining:

public/Photo Gallery/Amp PCB_Solution to Remove Copper_1.jpeg public/Photo Gallery/Amp PCB_Solution to Remove Copper_2.jpeg

It can be seen in the pictures above that most of the copper has been removed from the board other than a little bit of copper still along the edges of the board. It can also be seen that the traces remain in tact with the board and the Ferric Chloride solution has not removed the ink or the copper beneath the ink. After the board was removed from the Ferric Chloride solution and dried off, making sure to wipe off all of the solution, the resulting board looked as follows:

public/Photo Gallery/Amp PCB_Copper Removed_1.jpeg public/Photo Gallery/Amp PCB_Copper Removed_2.jpeg

Now that only the ink remained on the board we had to rub off the ink to leave behind only the copper traces. This was done by using rubbing alcohol and nail polish remover to get the ink off. The resulting board with only the copper traces remaining can be seen below:

public/Photo Gallery/Amp PCB_Finished_1.jpeg public/Photo Gallery/Amp PCB_Finished_3.jpeg

With only the copper traces remaining on the board our team had to drill small holes into the board to allow for the pins of the amplifier chip as well as the resistor leads to be able to fit through which would allow them to be soldered to the PCB. This was done with some help from our friends in the machine shop. They were able to use the drill press to accurately place the holes where we needed them without disrupting the copper traces which will allow for an electrical signal to still pass through them. The following picture shows the drill press being used to drill holes into our PCB:

public/Photo Gallery/Amp PCB_Drilling Holes_1.jpeg public/Photo Gallery/Amp PCB_Drilling Holes_2.jpeg

After the holes were drilled out of the PCB our team was now ready to solder the components to the board. The following pictures show Connor soldering the components to the board as well as the finished board having all of the components soldered into it:

public/Photo Gallery/Amp PCB_Soldering_1.JPG public/Photo Gallery/Amp PCB_With Components_1.JPG

This process shows how our MSD team was able to save this project money by making the PCB for the strain gauge amplifier circuit ourselves rather than sending out to have a PCB made for us. After creating this PCB it was time to test it to verify that we were getting the correct values as expected just like we saw when testing the circuit using the breadboard. However, upon testing the amplifier circuit on the created PCB our team was seeing issues and we were not obtaining the correct results.

Upon making all of the connections and powering up the board, the output voltage level was incorrect as to what was expected. With no force applied to the strain gauges, the voltage at the output of the amplifier circuit was approximately 2.3V; the expected no-strain value is between 0V and 500mV, and 2.3V saturates to the rails of the microcontroller so that it won't detect any change in strain. After further investigation, the reason for a very high output voltage was that the wheat-stone bridge was not functioning properly; once the board was powered on, the difference between the two reference resistors was not zero, thus the voltage divider was dividing the 1V signal unevenly. The difference between the two strain gauges was near zero, so the two input signals to the amplifier, V+ and V-, were at a difference of approximately 1.15mV at the zero-strain state. Once amplified, this difference was 2.3V.

It is unclear why the circuit was behaving incorrectly on the PCB when it was performing well on the breadboard. The layout and connections were checked several times, and all voltages on the PCB were at the correct levels, with the exception of the voltage between the two reference resistors of the wheat-stone bridge. In order to rule out the fact that it could have been a bad board, another PCB was created using the same process as shown above. This board was then tested and found to have the same results. Due to the failure of this test, the next step will be to create the circuit board using a through-hole proto-typing PCB.

Accelerometer

After verifying that the accelerometer does in fact give the correct values as expected in each axis direction, code could then be developed to calculate the angular velocity that will be seen by the accelerometer. This test was conducted by placing the accelerometer on a breadboard and using the microcontroller to power it as well as to read the output values coming from the accelerometer. The following pictures show the test setup that was used to test the accelerometer:

public/Photo Gallery/Accelerometer Test Setup_1.jpeg public/Photo Gallery/Accelerometer Test Setup_3.jpeg

Due to the positioning of the accelerometer into the spindle of the crankset we will only see the values of the y-axis and z-axis change. These are the only two axis that will see a change in the acceleration due to gravity whereas the x-axis is placed in the spindle so that it will not see any changes due to gravity while the spindle is spinning.

Upon running this test there was an issue that arose. It was noticed that the accelerometer kept shutting off and not producing the correct values. Initially the accelerometer was being powered by a digital I/O pin from the microcontroller. The reasoning for powering the accelerometer with a digital I/O was so that we could program the microcontroller to turn off the accelerometer while it wasn’t being used to limit the power consumption of the system. Since the digital output pin can only be 0V when low and 5V when turned high we had to pulse width modulate (PWM) the output signal to get it to a value of 3.3V so as not to damage our accelerometer. It was noticed that with the PWM signal coming from the accelerometer, the switching frequency was very quick but the accelerometer was able to detect this very quick switching frequency and it was turning on and off at the same rate as the PWM digital output signal.

Next it was decided to run the enable pin of the accelerometer off of a steady 3.3V pin coming from the microcontroller. It was decided that the accelerometer used such little power that it would not hinder our power consumption that much by leaving it on all the time. When this change was made testing continued however, the accelerometer would still shut off after an allotted amount of time. It was decided to investigate this case further to discover the reasoning behind the accelerometer shutting off. We decided to monitor the 3.3V signal to see if there were times when it would go below the shutoff voltage of the accelerometer. This was not the case because the signal never wavered when the accelerometer shut down. Next we decided to try a voltage divider to run from the digital I/O pin.

After running the accelerometer from the voltage divider of the I/O pin it was noticed that we were having the same issues as seen when running the accelerometer from the 3.3V pin. This anomaly could not be explained however, we were able to put a precaution in the code for when the accelerometer does start to shut down. When this happens we will turn the enable pin off and then on again. By doing this the accelerometer will turn back on so quickly that it will show no effects in the accuracy of our accelerometer measuring the angular velocity of the spindle.

Risk and Problem Tracking

At the beginning of MSD II our team decided to take another look at our risk management to see how we were keeping up with our risks and how we were mitigating them. After conducting the tests shown above our team was able to make some changes to our risk assessment based on the results of the tests as well as based on some of the issues that our team ran into during these tests. Our MSD team updated risk assessment is shown below:

Updated Risk Management

Updated Risk Management

It can be seen in the photo above that for risk item number 4, the app not functioning as designed, the likelihood has been decreased from a 3 down to a 2. This was decreased due to the team performing some very preliminary testing with the app and we were able to get the app to display values sent by bluetooth from the microcontroller. This gave our team more confidence that we would be able to develop an app that can display the values sent from the microcontroller. It can also be seen in the photo that the likelihood of risk item number 6, not completing the working device by ImagineRIT, has been increased from a 1 to a 2. The reasoning for this change was because our team ran into the issues shown in the tests above with the strain gauge amplifier circuit and the accelerometer.

Our team also decided to use the problem tracking tool to help us track and come up with various solutions to the issues that we face during our testing of the subsystems. The image below shows the issues that our team identified and how we plan to deal with these issues:

Problem Tracking

Problem Tracking

The original and live documents for the risk assessment and the problem tracking can be found using the following links for the Risk Assessment and for the Problem Tracking respectively.

Design Review Materials

The design review materials that our team prepared was our subsystem test plan document. This document shows all of the tests that our team plans to complete during this project including all of the results from each test as it gets completed. The following link connects to the Test Plan Document.

Plans for next phase

Our MSD team came up with a list of plans that we want to complete next phase to keep us on track for completing our project on time by ImagineRIT. The list of plans that our team came up with are as follows:


Home | Planning & Execution | Imagine RIT

Problem Definition | Systems Design | Subsystem Design | Preliminary Detailed Design | Detailed Design

Build & Test Prep | Subsystem Build & Test | Integrated System Build & Test | Integrated System Build & Test with Customer Demo | Customer Handoff & Final Project Documentation