Menu

Software

This page displays the task diagram and state diagrams for the Somasoid MEP software. It also provides a download link to PNG files for each diagram.

Table of Contents

Task Diagram



sEMG Processing

Overview: Filters incoming sEMG signals and detects hand grip strength.

Detailed Description: This task takes incoming data from the ADC, placing it in a vector, and performs a Fast Hartley Transform, FHT, to take the data into the frequency domain. This is accomplished with a slightly modified version of the ArduinoFHT library, created by "guest" of openmusiclabs.com. A filtering step (either no filter, bandpass, or 2nd Order Butterworth filter) is then run and the data is transformed back into the time domain and processed to determine grip strength. The task then waits for more data and this process repeats.



Motor Adjustment

Overview: Adjusts motors to match hand grip strength.

Detailed Description: This task polls the current grip level and determines whether the hand needs to open or close its grip to achieve that result. If an error is detected with the motors or related hardware, the grip opens and the motors stop to prevent possible injuries.



Error Handling

Overview: Takes appropriate action to alert the user of errors (such as overgripping, overheating, low battery, no electrodes) and situationally acts to resolve these issues.

Detailed Description: The error handling task polls the shared error flag to determine if there is a system error. When the flag is set, the task enters the appropriate state and either works to resolve the issue or enables a watchdog timer to reset the microcontroller.



Data Handling

Overview: Serves as the terminal interface with a computer, displaying data when prompted.

Detailed Description: The data handling task serves as a user interface, allowing the user read-write access to several configuration variables for the system. This functionality is provided through a virtual RS-232 port, implemented with the Lightweight USB Framework for AVRs, LUFA, libraries developed by Dean Camera.



Source Code

Download

The complete source code for this project is available at the Somasoid MEP Code page.

Source Code Documentation

An online version of the source code documentation is available here.

Changes to Included Libraries

Changes to the various libraries used in the code are documented and explained here.


Related

Wiki: Somasoid MEP Homepage