Team Vision for Detailed Design PhaseOur goal is to finish any lingering designs and refine the remainder of the work already submitted. The GUI system has been improved as well as the KST plot capabilities. Housings have now been designed for the MyoMuscles to give them proper shielding. The IRB paperwork, as well as our primary testing plan and human consent forms have all been filled out and are ready for submission. Wiring diagrams have been created to reflect all of our electrical components and their interactions. As MSD I comes to a close, our team is making any preparations needed to hit the ground running for MSD II!
Prototyping, Engineering Analysis, SimulationHousings
Housings have been designed for the MyoMuscle EMG sensors that is easy to take off so the user can access the sensors, but also serve as a cover against high impact hits. The Myomuscles will be physically handled the most, so it also allows the user to hold them without touching the sensitive electrical components underneath.
The communication subsystem of our project uses bluetooth devices to transmit data wirelessly from the device on the arm to a computer. In order to ensure this is feasible with our system, we need to calculate the rate at which our device must be able to transfer data. We know that gyroscope data from our IMUs is 16 bits and acceleration data is 14 bits from the spec sheet for the IMU. We also know that the ADC on the Arduino produces a 10 bit representation of each EMG data point. We plan for a minimum sample rate of 40 Hz but it is possible we will go up to 100 Hz. For the purpose of this calculation the maximum 100 Hz rate is used. The maximum data rate calculated below is 22 kbits/s.
6*(16 bits/sample) + 6*(14 bits/sample) + 4*(10 bits/sample) = 220 bits/sample
(220 bits/sample)*(100 samples/s) = 22 kb/s
The HC-05 bluetooth device that we have selected has a maximum transfer rate of 3 Mb/s which is 136 times faster than our maximum transfer rate. When we transfer a single 220 bit sample at 3 Mb/s we can calculate the tranfer time of the sample as shown below. The transfer time of one sample is found to be 73.3 us.
(220 bits/sample)/(3 Mb/s) = 73.3 us/sample
Drawings, Schematics, Flow Charts, Simulations
Software DiagramsComputer Software Diagram
As soon as the C++ executable runs, a GUI will be opened. The user will be able to update their preferences within this GUI window, until they press a start recording button. Once the start recording button is pressed, the only GUI option that will be available to the user is the stop recording button. After the start command is received from the user, the executable will open the KST plot window with the most recent user preferences from the GUI. It will then send a start command to the bluetooth device. The executable will then enter a loop in which it will read from the bluetooth buffer until it has a full sample at which point it will write that sample to the file and then begin reading the next sample. There will also be a check within this loop for a stop command from the GUI which will result in the executable breaking from the read loop, sending a stop command to the bluetooth device, and opening another GUI window to allow the user to save the output file.
The Arduino software will be designed to run a loop that reads from a serial port repeatedly until it sees a start command that will be received on the bluetooth device. Once this command is received the Arduino will enter a loop that will read data from each sensor at a defined rate and then write that data back into the serial port through which it will be transferred to the bluetooth device. During each iteration of this loop, a check will be performed to see if a stop command has been received on the serial port. If the stop command is received, the Arduino will stop sending data and will return to waiting for another start command.
Arm Subsystem SchematicIn the detailed design section of this project, we completed a schematic diagram of the arm circuit. This diagram details the electrical connections that will be used to drive our DAQ system. The power supply system of our arm schematic displays the connection from a 3.7V source, which represents our battery, to a Pololu switching amplifier. In the actual switching amplifier, there is only one external ground connector due to an internal connection between input and output ground. This supplied power leads to the power monitor system in the KA2284 voltage signal monitor. This power monitor system will reference the grounded value and some signal value which will then be compared to some adjustable reference voltage range. The same signal being monitored through the KA2284 is fed into the voltage input of the Arduino Mega. The Arduino Mega will then supply power to each component in the data collection subsystem. The IMU data will be received as an I2C signal through clock and data lines. These two IMUs will be set at different addresses, one high at 3V and one low at ground, in order for the Arduino to be able to differentiate between them. The MyoMuscle EMG sensors will record muscle activation data with reference to a body ground. This muscle activation data will then be sent to the Arduino via 4 DAC pins. The communication component that will be connected to our arm system will then transfer that stored data by UART through a HC-05 bluetooth. This bluetooth will be powered through the Arduino at 5V.
Wiring DiagramWe also completed a wiring diagram that displays the physical connections that will be going into our device. This diagram was made with fritzing to allow for simple adjustments in the future as our design changes. While this diagram displays the same information as our schematic, it highlights which specific pins each signal will be tied to. The KA2284, Pololu Regulator, Notebook Battery, and MyoMuscle components were not attached to any fritzing library, so they were created by the team. We will be using Molex connectors to reduce the strain on our hardware which will be added for each of our data acquisition components. This diagram displays that without the use of a header, we will be able to make every necessary connection.
Block DiagramWe have added a testing section to our block diagram.
The previous team (P18043) did not have a very robust graphic user interface to control and manipulate the data acquisition system. For our GUI we will be using a windows executable program. This will allow for a simpler user interface that is easier to use and understand while providing the user with much more control of the device and system.
The main window of the GUI will be small and compact. This keeps the interface simple and provides room to view/manipulate graphs while still seeing the control window.
The Patient Sub-Window is opened from the File tab in the top bar of the main window. From here, you can specify the patient's ID, age, and whether or not they have tremors. These are preliminary information fields that may change later on.
We hope to be able to manipulate the data acquisition system directly from the GUI without editing the actual software. Therefore, from the edit tab, the user will be able to change the Baud Rate and the Com Port. Default values will be set, but if there are changes to the system (IE: the COM port changes), the user will not have to go into the actual software and change values.
Once a device is connected, the COM port the baud rate must be set to the same value that the device is set to. This is the default case (460800). This baud rate was chosen because it is the maximum supported rate for the HC-05. The user will then select the correct COM port, then the connection between the device and the computer can be verified (Connection Made). Therefore, it's important to check that the communication between the GUI and device is working properly before we try to collect any data.
Once the device is verified, the user can choose to begin collecting data. While data is being collected, the total recording time will be displayed in the main window.
During recording, the device will send a stream of data to the computer over Bluetooth. This data will be saved into various arrays corresponding to the data (X acceleration, Y rotation, etc). When the user chooses to stop recording, the final time will remain displayed in the main window.
During or after recording, the data can be plotted using the 2 buttons at the bottom of the main window. "Default Plots (All Signals)" will create a new window that displays all the different data plots that have been or are being collected.
Within the KST Plot window, plots are able to be moved, removed, and isolated on single graphs. For example, EMG data could be put on the same graph as IMU gyroscope data, or hand-accelerometer data could be isolated and shown on a single graph.
After the data is collected, the user can save the data into a .csv file or they can just begin recording again.