Preliminary Detailed Design
Team Vision for Preliminary Detailed Design PhaseIn this phase, we planned to do some research on fatigue analysis and on optimal sensor placement. We also planned to select electronic components for data acquisition and to begin working on supplying power for those components. Software design was also planned, with the goal of having a layout of the basic classes and data structures we will need to gather and send all data. Finally, we planned on designing the base plate and waterproof box enclosure and running some thermal simulations. The enclosure was not to include an exact layout for all the components yet.
We achieved all these goals in our design, though there are changes that may come into play here when other pieces of the design are done. The power supply may change after we figure out power distribution, some sensor positions may change to better suit fatigue analysis, etc.
Feasibility: Prototyping, Analysis, Simulation
MyoWare Sensor AnalysisIn order to fully understand what the MyoWare ENG Sensor was doing, we decided to reverse engineer it and create an LTSpice model for simulation. The device can be broken down into 3 three amplification stages. The first being an instrumentation amplifier that amplifies the voltage difference between the two electrodes. The second stage is a full-wave rectifier that takes the portion of the sine wave that is below 1/2 VCC and flips it above that level. The final stage is an integrating amplifier whose output is proportional to the magnitude of stage 3 output within the last few hundred milliseconds.
From this model we have identified 3 problems with the device that we would like to address. The frequency content of the signal is lost when we integrate it. Filtering out known noise frequencies is almost non-existent. Sending the signal as a voltage is more susceptible to interference after it is transmitted along the cable to the ADC.
To address this, we have decided that the best course of action shall be to modify the MyoWare sensor to suit out needs. Making new sensors was rejected because of the additional amount of work and that some components are not readily available. The proposed changes will require changing component values, cutting a few traces on the board, and adding a few jumper wires.
The details of these changes will be outlines in an ECO document to be posted at a later date. The simulation results of the proposed changes are shown below.
Raspberry Pi Thermal Analysis
The Raspberry Pi we are using for our computations thermally throttles processing speeds at 85 degrees celcius. Since we are placing it in an enclosed box in order to meet our goal of being waterproof, a thermal analysis was done in Autodesk Fusion 360 in order to be sure that our cooling measures were effective enough to allow the Raspberry Pi to operate at peak clock speeds.
As shown above, the Pi would have to significantly throttle if used without a heatsink, and would likely also experience throttling with just the bought heatsink. However, with the preliminary design of our custom heatsink, there are no concerns with keeping the CPU cool.
Designs, Drawings, Schematics, Flow Charts, Simulations
Electronic Component SelectionsSBC: Raspberry Pi 3 B+
- ARM Cortex A-53 1.4 GHz, quad-core, 64-bit
- 1 GB LPDDR2 SDRAM
- 40 pin GPIO header
- Broadcom Videocore-IV
MyoWare EMG sensor
- Will be modified as shown in MyoWare Sensor Analysis.
MyoWare EMG ADC: MAX1202AEAP+
- Maxim MAX1202AEAP+
- 8 Channels
- 12-bit resolution
- 133 ksps
- Custom breakout board will be made.
Pulse Oximeter: TI AFE4490
- ProtoCentral breakout board
- 22-bit ADC resolution
- DB9 connector for ear probe
- Up to 20 ksps
- Digital filter built-in
Thermistor: Littelfuse PR103J2
- 10 kohm Base resistance at 25 °C
- Accuracy: ±0.05 °C at 0-50 °C
- Range: -55 °C to 80 °C
Thermistor ADC: ADS1115
- 860 sps/channel
- 4 Channels
- 16-bit Resolution
CAN Interface: MCP2515 Controller, TJA1050 Transceiver
- 1 Mb/s bandwidth
Power supply: USB power pack
- Anker 10,000mAh
- USB Output
- Active Voltage Filtering
Quick-disconnect connector: ODU Break-Away
- Disconnects as the driver exits
- Should not hinder egress time
- 19 pins
Custom ADC Board for EMG Sensors
We have selected the MAX1202 ADC as a suitable option for recording the EMG sensor signals. It is an 8 channel 12-bit ADC that we communicate with over a SPI interface. Because we have decided to transmit the EMG signal as a current, we will need to convert that current back to a voltage at the ADC. A custom PCB was required to accomplish this. Below are the schematics and board layout for the custom design. Great care was taken to keep the analog and digital signals apart from each other to reduce interference. Current to voltage conversion is accomplished through a sense resistor.
Below is the first draft of the UML diagram detailing the software design. Some details may change as far as filtering and fatigue calculation.
At the lowest level, signals are captured via Readers for each sensor. The pulse oximeter signal will be sampled at a rate high enough to capture the peaks for the heart rate and to get a good reading for the blood oxygen level (rate to be determined). The EMG sensors will be sampled at a rate of at least 4 ksps each to capture the frequencies of interest. The temperature sensor will be sampled at 860 sps (the maximum rate of the ADC). Sensor values will be read via the SPI and I2C interfaces using the pigpio library.
The PulseOxReader will maintain blood oxygen level samples and the times at which the peaks occurred. Those times can be used to calculate the heart rate. The EMGReaders will maintain an array of samples, as will the TempReaders.
The DataCompiler will make requests to get data from the Readers. The PulseOxReader, upon request, will calculate a mean heart rate based on the heartRatePeaks. The number of most recent peaks to maintain is TBD. Overall oxygen level is calculated by an average of the recent samples as well. Upon request of a fatigue value, the EMGReader will have to read the muscle activity. Since we are reading at a relatively slow rate, we can FFT the most recent samples to get the median frequency. The GPU_FFT library will be used for this. The overall muscle activity will be the max activity read within the window. The TempReaders (ambient and body) will also get requests for temperature readings. It will return the average of the most recent temperature samples.
Each time a metric is gathered by the DataCompiler, it is then sent to the CAN module via a SPI interface using the Copperhill Tech CAN library.
Preliminary Enclosure Design
Our preliminary design features an aluminum baseplate that acts as the CPU heatsink. The waterproofing will be provided with a 3d printed lid, and there will be mounting features inside of the lid for the smaller daughter boards, and there will be a bulkhead connector to allow wires to pass through the lid.
Potential EMG Electrode Placements
The preliminary electrode placements target surface muscles involved in steering and pushing a car pedal. Testing will be completed during the next phase to determine which muscles are useful to log and which produce the cleanest, most repeatable signal. The system has the capability to log EMG signals from eight MyoWare sensors, so the best eight muscles will be selected.
Bill of Materials (BOM)
PurposeConfirm that all expenses and contingencies are afforded by the project financial allocation
The full document and actual spending can be viewed here: BOM & Budget
PurposeDemonstrate objectively the degree to which the Engineering Requirements are satisfied
The full document can be viewed here: Test Plans
Automated Software TestsUnit tests will be written using Microsoft’s C++ unit testing framework in Visual Studio. This is a list of the kinds of tests we plan to add in order to avoid regressions as the software is developed.
Data Conversion Tests: These tests are for converting raw signal data (using dummy data as an input) and ensuring that the output of the conversion is correct. This will include temperature, muscle activity, blood oxygen level, and heart rate.
Fatigue Algorithm Tests: Tests will be written providing the fatigue calculator with dummy data and ensuring that the output is correct based on incoming muscle activity, force, heart rate, blood oxygen level, and temperature.
Filter Tests: Input dummy data into the digital filters and make sure the output is correct.
Sensor Placement TestsTests will be written and performed using PowerLab 26T, LabChart 7, and PASCO Capstone to determine optimal sensor placement and conditions.
Skin Preparation: Determine what combination of skin preparation conditions produces the cleanest, easiest to reproduce signal for signal processing. The full test plan can be seen here: Skin Preparation Test Plan
EMG Arm Electrode Placement: Determine the ideal electrode placement on the 5 surface muscles to produce cleanest, and most repeatable signal for processing. The full test plan can be seen here: EMG Arm Electrode Placement Test Plan
EMG Leg Electrode Placement: Determine the ideal electrode placement on the surface muscles involved in pushing a pedal to produce cleanest, and most repeatable signal for processing. The full test plan can be seen here: EMG Leg Electrode Test Plan
Final Arm Muscle Selection: Determine if all 5 muscles are used in the act of steering and are useful to log.
Thermistor Placement: Determine what the best place for the thermistor is for repeatable and accurate temperature measurements and driver comfort.
Fatigue Algorithm Tests
Fatigue Algorithm Calibration: Determine if calibration procedure is useful and able to produce repeatable results for use in the fatigue algorithm.
Fatigue Algorithm Test: Determine if the fatigue algorithm produces useable and accurate results when used with dynamic forces, instead of static forces.
System Level Design and FlowchartsNo changes have been made to the Systems Design as of this phase.
No new risks have been identified as of this phase.Risks
Design Review Materials
There are no pre-reading materials for this phase. This section will be updated with action items and notes after the review.
Plans for next phase
Next phase, we plan to continue to do more research on fatigue analysis and figuring out how to measure muscle forces for the algorithm. We also plan to work on power distribution design and continuing work on making a working prototype of the modified MyoWare sensor, as well as working on an interconnect diagram and layout for all the devices. For software, we plan to make a more detailed design of what each thread will be doing in the system, and get some more details on calibration of the hardware. Finally, the waterproof enclosure will have to be modified to optimally position all electronic devices.