How to drive a Servo with EMG signals – RaspBerry Pi, Arduino, Internet Of Think (IOT)

How to drive a Servo with EMG signals

This app written in POWER-KI, can be executed on a PI 2/3 to acquire and elaborate EMG signals in order to control a Servo.

ACQUISITION AND ELABORATION

In your computer (Windows) you can install POWER-KI (any distribution ). Doing so you will be able to connect to the native Cloud interface provided by the PowerBerry Manager(PBM) running on your board.

Before connecting with PowerBerry you have to connect electrodes to the e-Heath platform and put them on your forearm (or whatever muscle you want to use).

From PowerBerry you can start the “pwb-dvc-hlt-01” app. Select it and click the LAUNCH button that appears to the right. When the application status change to ONLINE, you can connect with the CONNECT button, that appears when the app is ready.

As shown below, when the app is connected, on your monitor will appear a graphical interface that will represent the electromyographic signal’s trend.

By pressing the start button the program starts sampling the electromyographic signal and plots it on the central graphic (representing a 10 seconds time interval). On top of the page you can see two labels that show the signal value (one the numeric value, the other is a proportional histogram) and on the left side you can see two other buttons, one called SAVE which allows to save your samples in a csv file and one called LOAD for loading an old file earlier saved. To end the sampling you have to press the STOP button.

SERVO CONTROL

This application is also programmed to control a Servo by connecting it directly with the e-Health sensor platform (three pins: red-5V, brown-GND, orange-pin2); in fact the app has a program which moves the TowerPro SG 90 with the electromyographic signal generated by the muscle.

We set two thresholds to control the Servo: a minimum value to activate it and a maximum one to represent the maximum rotation degree (50 & 200). You can simply change these values by re-writing the code shown above.

Share This: