Showing posts with label Data Acquisition. Show all posts
Showing posts with label Data Acquisition. Show all posts

February 07, 2014

Revisiting the Sternocleidomastoids: Accessory Muscles of Respiration


We know that sternocleidomastoids (strap muscles of the neck), scalene muscles and alae nasi are considered accessory muscles of breathing, although some controversy exists. If you saw an asthmatic individual in his desperate attempts at breathing or an agitated person or a person exercising vigorously, you could watch these muscles in action. However, that wasn't exactly what I had in mind while I was doing this experiment. I was really thrilled to chance upon it. Kind of a serendipitous discovery in its own right. You too can figure this out easily. The placement of the surface leads were as shown on the right. Red dots were for the reference and recording electrodes whereas the blue dot represents the ground (as usual). 

The neck muscles of each side were tested one at a time. For example, This wav file (open it Audacity or BYB neuron recorder) was obtained from EMG recording from the right sternocleidomastoid; the leads were placed on the right side and the ground lead on the manubrium. The head was at mid-line (neutral position) to start with. Next, it was turned to the right, then midline again, then to the left (without any external resistance applied), then against resistance applied by the left hand. The muscle of the right side moves the head to the left. Finally, the head was again restored in its neutral position. An improvised notation could be N to R to N to L to L+ to N (Legend: N=neutral, R = right, L=left, L+ = left against resistance). 

Similarly, the left side was tested in a likewise manner (N to L to N to R to R+ to N). And this is the waveform obtained. The surprise awaited me, I was in for an ambush!

While the leads were still on the strap muscles of the left side of my neck, I observed the EMG waveform in real-time. I noticed that as I was taking a deep breath, the EMG activity increased significantly. I didn't have to turn to my head to the right anymore! I then maintained this position by holding my breath. The activity continued. Here's the recorded .wav file. The associated camera recording will speak for it (see below: Youtube). Yes, it proved that it was indeed an accessory muscle called in to address forceful inhalation. I then did a forceful exhalation, but no increase in EMG activity was observed, buttressing my observation. 



As you may have noticed that I have used the terms inhalation and exhalation, in lieu of, inspiration and expiration. Well, inspiration, it definitely is! Expiration? No way!
Further analysis still awaits.
Spikerbox recordings may also possibly illustrate simultaneous EMG activities in protagonist and antagonist muscles. More of these later.

To be continued............
Creative Commons License
This work by Amiya Sarkar is licensed under a Creative Commons Attribution 4.0 International License.

Last modified: never 
Reference: hyper-links, unless specifically mentioned

Surface EMG from Thumb: Strongly 'Opposed' ?

Lead placement for the experiment, as shown on the right.
As I have already mentioned, the ground electrode sits atop
the manubrium sterni, on the upper chest (breastbone).

The camera recording is shown below. You can see the Piezoelectric crystal's spark and also hear its sound on snapping. However, I haven't yet had time to analyze if the spark did contribute some 'useful' static on the trace (open & watch this .wav file in BYB software).






Method: Pressing on a piezo crytal (from a cigarette lighter) by 'opposing' the thumb against the base of the little finger (as shown by the figure). Electrode placement shown in red & green markings [the ground electrode sits atop manubrium sterni]. Muscle (mainly) contracting is "opponens pollicis", a small, triangular muscle in the hand, which functions to oppose the thumb. [Strictly speaking, opposition of the thumb refers to the tip of the thumb touching the tips of other fingers. But that way, generating enough force without creating an unnecessary torque that topples the piezo is quite a challenge! After all, I had no assistant, and had to hold the camera too with the other hand]

Concept: A fixed and constant amount of force is necessary each time before the spring yields and the piezo fires. This end point is supposed to be caught in the trace 1) as a sharp spike after the surface EMG pattern or, 2) can be 'used' as a 'static'.

EMG amplitude and rate of spikes will need to be analyzed in short, discrete time intervals by simple counting.

Creative Commons License
This work by Amiya Sarkar is licensed under a Creative Commons Attribution 4.0 International License.
Last modified: never
Reference: hyper-links, unless specifically mentioned

February 06, 2014

Interpreting Rate Coding Data: Counting Spikes in a Tracing & Consequent Plotting of Firing Rate Versus Time

We acquire data by using the following device configuration (the green laptop cable will go to the laptop mic input, running on battery power) as shown below. Please see this link to learn about the anatomy of a coaxial cable, so that you can make a ground connection off a coaxial cable.

You can also take the ground off the reference point used for the Faraday cage clip, if you'd like. Incoming analog signals from the spikerbox will go into the internal ADC (Analog to Digital Converter) of the Conexant HD audio port of the laptop, whence the signal will be digitally processed. After a signal has been stored either in Audacity or in the BYB neuron recorder, we can open the'.aup' or the '.wav' file respectively later.

Here, I am attaching a typical wav file captured by striking the quadriceps tendon with a percussion hammer (knee jerk). This is a deep (tendon) reflex. I'll post more on this later. You need to open it using either of the two softwares listed. I am posting a screenshot on the right.
You can see three large spikes in the tracing. These spikes are actually not single/solitary, as they might innocuously suggest, but they are a conglomeration of many individual ones.

The below tutorial explains how to interpret these raw data.



By the way, there's no simple way to count spikes! First, we need to define spikes. We can fix an arbitrary threshold, beyond which we will label them as one. Here are some very rudimentary thoughts on counting:
  • Coupling/buffering the output from the laptop audio-out port via ICs like ULN 2004 Darlington transistor arrays to drive filament lamps [these filament lamps are a modest way to an integrator as the heat takes time to dissipate off]. The more the spike rates, greater will be the brightness. Then pick-up this optical signal by an LDR (Light Dependent Resistor) and then noting the resistance change [precalibration is necessary]. We can use capacitors too (using their exponential charging/discharging equations) or a linear optocoupler like MOC5010.
  • Software: writing some code snippets to Matlab/Python programs 
  • Using a Foster-Seeley phase discriminator: However, a new algorithm should be developed.
  • Converting the electrical signals to mechanical tracings on a rotating Kymograph [speed adjusted] may make it easier to read and count
  • Allowing only signals above a certain 'predefined' threshold voltage to pass through. We may use diodes for this cut-off estimation. Next, employ a CD 4520, a dual 4 BIT binary up counter that advances from LOW to High transition on clock input '0' (CK0) when CK1 is high, after the signal has been "gate"d . We can use an appropriate crystal to this counting purpose. Many optically based circuits are available on the net.
  • We can think of using a frequency to voltage converter IC like LM 2907
  • But presently, i'll be counting them manually. My time limitations and fading electronic experiences precludes any pursuits of above kind.
After we have successfully counted the 'rates' of 'action potential's, we can plot their number/spikes vs time plot in a linear or logarithmic scale. 


Here's where I positioned the ground electrode, on the manubrium sterni, on the upper chest (breastbone). The overlying hairs had been shaved and cleaned with spirit to reduce the input impedance. In all the spikerbox experiments the placement of the ground remained the same unless otherwise stated. 

To be continued....

Creative Commons License
This work by Amiya Sarkar is licensed under a Creative Commons Attribution 4.0 International License.

Basic Concepts and some 'Assumptions' in SpikerBox Biopotential Experiments

Exploring signals of very low amplitude, as is usual in most bioelectrical signaling, is not an easy job. In many instances the power line hum often drowns these weak electromagnetic dialects. In fact, our body acts as an antenna in receiving these wayward disturbances. We can curb these interference by the following means:

  • Opting for battery operated power for the sensing device (the bio-instrumentation amplifier) as well as the data acquisition inputs, for example, a laptop that runs on battery. The brightness of the laptop display maybe set to maximum, as some laptops may emit significant stray noise when brightness is not saturated.
  • Switching off any fluorescent lights
  • By proper Earthing of the equipment
  • Using differential op-amp configuration for adequate noise suppression by eliminating common mode signals
  • Using a preamplifier; and coupler gels that reduce electrical impedance (resistance) between the electrode (lead) and the body surface
  • Choosing an operational amplifier having a high CMRR (common mode rejection ratio)
  • By using a unity gain amplifier (voltage follower) configuration that has a very high input impedance
  • Employing a noise cancelling mechanism like the 'right leg driver'
  • Using a Farady Cage for effective 'shielding' from electromagnetic interference (static)
  • Employing a hardware filter (band stop or Notch filter) or a software program to eliminate/reject a particular frequency band (e.g. 50 Hertz or 60 Hz cycle frequencies)
There's many more options to tackle the undesirable gatecrasher, the 'hum'. Yet it is so difficult to achieve. Easier said than done!

To probe a physiological or pathophysiological response, a stimulus requires that it be precise/ accurate in timing, amplitude, reproducible, relatively less damaging and that it leaves a 'desirable' stimulus artifact so that we can calculate the delay in response in the tracing. Of the various types of stimuli available we generally prefer electrical stimulation over others; such as, mechanical, thermal and chemical, for the above reasons. 

Yet, we sometimes need to take recourse to other forms; as I was kinda forced to use mechanical stimulation to elicit a 'knee jerk' or that I had to abandon an interesting project (Hoffmann's reflex) as the TENS (Transcutaneous Electrical Nerve Stimulation) unit would invariably inject more than enough electromagnetic static into the waveform to render it useless. Marking the exact instant of an applied mechanical stimulus is bothering. I tried to circumvent this by making an "induction circuit", the makeshift switch of which
would be placed on the patellar tendon and 'close' on tapping by a hammer, thus sending an intended static. Also tried to sandwich a piece of piezoelectric material between the percussion hammer and the quadriceps tendon. But none worked so far. I had to remain contented by recording with a camera simultaneously, so that it picked up the sound of patellar impact!

The experiments I have done so far were mostly on obtaining 'surface Electromyography (EMG)' and nerve conduction velocity studies (NCV or NCS). The signals were fed into the SpikerBox input through coaxial cables into its RCA jack inputs, where it was amplified by an integrated circuit (IC) INA 2126P, an Instrumentation Amplifier. There was also a provision for rendering the electrical impulses 'audible' following amplification of the signal by LM 386, which was set at its default gain of 20. [For a more complete detail, please visit "Backyard Brains Wiki"] Thus, we could hear the action potentials and also interface the output with a laptop or a smartphone by softwares such as Audacity, Backyard brains neuron recorder (my own personal favorite) etc for real-time viewing, as well as, for recording for later storage, retrieval and analysis. 

The EMG recordings was done when the muscles were at rest, and at exercise: isometric or isotonic. Since I do not have a 'force transducer', a 'dynamometer' or a Mosso's ergograph; I had to invent ways to measure force/'work done' by other ingenious (or ingenuous? only time will tell !) means. Here's some:
  • spring constant (Hooke's Law) of the device maybe obtained by calibrating with a known device and by measuring how far the cylinder moves into the outer barrel (there's a spring inside that snaps hard onto a piezo crystal when force is applied).
    Piezo based cigarette lighter producing high enough voltage causing a spark thus igniting the gas 
  • by coupling it to a linear potentiometer which have also been previously calibrated (see figure), and then displaying the resistance in a multimeter or through a linear dot/bar display using LM 3914 IC.
  • Work done = Force*Distance=m(mass)*g(acceleration due to Gravity)*displacement (see schematic diagram)
Although we would love a stereo output from a 2 channel SpikerBox, the one I have, I do not have a laptop that accepts stereo microphone input.  Stereo signals are more preferable to human interface devices than plain old mono input. A stereo signal 'may' still possibly be 'recorded' by a 
  • Desktop line-in (via Avance AC97 soundcard) input but that would entail 50 Hz hum to pass through as well. 
  • A stereo (tape/CD) recorder running on battery power is a better option. The data can later be played/digitized at a later time. 
  • A stereo FM transmitter or a 3 pin to USB adapter is yet another option. 

Meanwhile, here's some relevant issues regarding Two channel spikerbox:
  • The internal connection pattern of (4 ring TRRS vs 3 ring stereo) 'smartphone'-'laptop' cable foxed me  for some time to realize that the Left & Right channels were only capacitively coupled
  • That my low-cost Penta T-Pad tablet could NOT render waveforms in BYB app while my Samsung GT-S5360 gleefully obliged. However, the screen was way too small to allow any reasonable analysis & that data longer than >=2 seconds could not be saved in the mobile
  • There was significant 'clipping'/distortion of the waveform in my mobile phone [maybe I could have attached a resistor to the ground/common pin to attenuate the signal. But I opted for not modifying the device in any way.]
Hence, I used the other cable coming from Y splitter (audio splitter) for the measurement of output signal amplitude, since I was outsmarted by my smartphone!

My tryst with such experiments is not new. I have previously done amphibian nerve-muscle preparation experiments using Kymograph and Dubois-Reymond induction coils, in medical curriculum. This included studying the effects of external influences like temperature, load, repeated stimuli causing beneficial effect & fatigue etc. on the tissue. I also studied peristalsis & effects of external influences including drugs on Guinea-pig smooth muscle in Dale's tissue organ bath. Also being an electronics enthusiast, I tried to decode the language the heart speaks, in the honest pursuit of making biomedical instrumentation. It's tough! (fun intended)

Lastly, all that has been said above may be modified as we gain more insight and experience. Please feel free to use/modify this work, do your own research, give your feedback or point something wrong in this article. 

N.B.-Remember, electricity kills! Try to have a close friend, preferably a doc, by your side. Check that the 'Earth' outlet is really what it outta be!

Last modified: never
Reference: hyper-links, unless specifically mentioned

Creative Commons License
This work by Amiya Sarkar is licensed under a Creative Commons Attribution 4.0 International License.