17
Final Design Project Engn/Phys 207—Fall 2017 J. Erickson Welcome to the Final Circuits design project, meant to be an practical and integrative experience of everything you have learned in Circuits this term! This project is meant to be a fun, challenging, and rewarding experience. The project report is due no later than Wednesday, Dec 13, 2017, end of business. This is a firm deadline. For this design project you are asked to design, build, and test a circuit to solve the problem, and write a report describing and illustrating the operation of your system. You are given 3 options, all related to biomedical circuits listed below. Select only ONE. Please read each problem statement carefully before deciding which one to select. The grading criteria and report requirements are the same regardless of which you select. Please see the section titled Report Guidelines and Grading Rubric below. 1. Option A: Opto-electronic heart rate detector photoplethysmograph (PPG) 2. Option B: EMG for prosthetics 3. Option C: Electrodermal Response Sensor (aka “Lie Detector”) Rules of Engagement Because this assignment will be used to assess both lab practical and theoretical skills, all students must satisfactorily complete this assignment in order to receive a passing grade for the course. You may collaborate with up to one classmate, and are encouraged to do so (in part, to avoid the lab equipment bottleneck). If you choose to work with a classmate, you must include an explicit statement in your final report explicitly stating who did what. Both members must be fully engaged in all aspects of the project. Each student must individually write his/her own design project report You may consult with your class notes and other material generated by you and you alone. You may also consult datasheets for electronics parts such as op-amps, instrumention amps and optical sensors. You may consult any course materials provided directly from the instructor posted to the course website, such as powerpoints, problem set solutions, hand-outs in class, and the op- amp datasheets provided. You may access URLs explicitly mentioned and linked in the problem statements, except where expicitly stated not to visit them. You may consult your textbook. Explicitly forbidden is directly searching any printed or electronic sources for Consultation with any other internet or outside sources not listed above is explicitly forbidden. 1

Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

Embed Size (px)

Citation preview

Page 1: Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

Final Design ProjectEngn/Phys 207—Fall 2017

J. Erickson

Welcome to the Final Circuits design project, meant to be an practical and integrative experienceof everything you have learned in Circuits this term! This project is meant to be a fun, challenging,and rewarding experience. The project report is due no later than Wednesday, Dec 13, 2017,end of business. This is a firm deadline.

For this design project you are asked to design, build, and test a circuit to solve the problem, andwrite a report describing and illustrating the operation of your system. You are given 3 options, allrelated to biomedical circuits listed below. Select only ONE. Please read each problem statementcarefully before deciding which one to select. The grading criteria and report requirements are thesame regardless of which you select. Please see the section titled Report Guidelines and GradingRubric below.

1. Option A: Opto-electronic heart rate detector photoplethysmograph (PPG)

2. Option B: EMG for prosthetics

3. Option C: Electrodermal Response Sensor (aka “Lie Detector”)

Rules of Engagement

• Because this assignment will be used to assess both lab practical and theoretical skills, allstudents must satisfactorily complete this assignment in order to receive a passing grade forthe course.

• You may collaborate with up to one classmate, and are encouraged to do so (in part, to avoidthe lab equipment bottleneck). If you choose to work with a classmate, you must includean explicit statement in your final report explicitly stating who did what. Both membersmust be fully engaged in all aspects of the project.

• Each student must individually write his/her own design project report

• You may consult with your class notes and other material generated by you and you alone.

• You may also consult datasheets for electronics parts such as op-amps, instrumention ampsand optical sensors.

• You may consult any course materials provided directly from the instructor posted to thecourse website, such as powerpoints, problem set solutions, hand-outs in class, and the op-amp datasheets provided.

• You may access URLs explicitly mentioned and linked in the problem statements, exceptwhere expicitly stated not to visit them.

• You may consult your textbook.

• Explicitly forbidden is directly searching any printed or electronic sources for

• Consultation with any other internet or outside sources not listed above is explicitly forbidden.

1

Page 2: Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

• If you feel you need to access any other material, please contact the instructor first.

• There is no time limit. You may spend as much time in the lab working on the project as youwish. I estimate that the time required to complete this project and the write-up to be about15-20 hrs. Please optionally note the amount of time you spent working on this project. Thisinformation will be used for feedback purposes only and will in no way effect your grade.

• There are many possible “good” solutions—i.e., there is more than one correct solution. Assuch, both creative and elegant designs are encouraged!

• The instructor will be happy to clarify any issues or questions regarding the design projectproblem statement.

• The instructor will be available to help work through questions related to new concepts—i.e,using virtual grounds for single-supply circuitry and/or developing and debuging Arduinocode, but you should ask questions after making a valiant attempt first.

• The instructor will be purposefully less helpful than usual with regard to circuitry with whichyou should be very comfortable by now (filters, amplifiers, LEDs, etc.) If you become trulystuck to the point you are not able to proceed, you may trade in a few points from your finalgrade to get help and/or advice from the instructor.

If you are ever in doubt whether something is in bounds, please consult the instructorbefore plunging ahead! Your signature below indicates you have read these rules of engagementand will abide by them.

Name:

Signature:

Time Spent Working on Project (optional):

2

Page 3: Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

Report Guidelines and Grading Rubric

Think of the write-up as being a conversational piece and/or user’s manual to communicate yourdesign, experiment, and findings to a classmate (or anyone who familiar with various types ofcircuitry). As such, you should include:

• Overall design rationale for your circuit, broken down into functional blocks

• Intuitive explanation for how it works

• All relevant circuit diagrams with clearly labeled component values

• Calculations and justification supporting component and parameter values selected

• Photograph of of the actual circuit you built, carefully annotated so someone can connectwhat you drew for on paper to what you actually built

• Quantitative analysis: Show all relevant equations, transfer functions, calculations, computedgenerated plots of expected G(f) vs log f etc, deriving where necessary.

• Results obtained. For this section, it is sufficient to show representative input vs. outputscreenshots as you step through each functional block of your design. You’ve already doneenough data acquisition to plot G(f) and/or φ(f) plots in past labs and do not need to doso here.

• Analysis and discussion of how well your circuit performs, especially with regard to the designspecifications outlined in the problem statement

• Suggestions of how to improve your design or additional features that could be added.

• The write-up could be very nicely augmented by a video demo-ing the final product. Bestvideo wins a prize!

This being an open-ended project, your grade will be assigned based on the following rubric:

1. Circuit design is conceptually sound

2. Circuit was properly constructed and tested

3. Results are clearly illustrated in beautiful graphics and in text

4. Quantitative comparison of design in theory vs. the actual performance measured in lab.

5. Analysis of experiment is accurate and complete

6. Discussion includes relevant commentary on how well the objectives were met

7. Suggestions for modifications might be made to improve the design in the future

3

Page 4: Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

Final Design Project—Option A: My Finger Has A Heartbeat

Please take 15 min to carefully read through the entire problem statement below before embarkingon your final project 1

Introduction to Photoplethysmography (PPG)

It wasn’t so long ago that form and function of major organs of the body remained a mystery. Forexample, Aristotle described the heart in the 4th century as consisting of 3 chambers (it has 4)and also thought it was the “seat of intelligence and sensation” (whooops, sorry, that would be thebrain). It wasn’t until the early 1600’s that the circulation system and the heart’s specific role wascarefully described by William Harvey in the 17 chapter epic entitled De Motu Cordis (translatedinto English: On the Motion of the Heart and Blood). It’s a little known fact that in 2003, Buddythe Elf rediscovered much of this science, quipping “My finger has a heartbeat.” You can read moreabout the fascinating history of the heart here: https://web.stanford.edu/class/history13/

earlysciencelab/body/heartpages/heart.html.

Figure 1: Buddy the Elf finds out his finger has a heartbeat. You can relive this amazing momentin history here: https://www.youtube.com/watch?v=65fI6MJjlsE.

Some centuries on, the function of the heart is very well understood. Indeed one major biomedicaltechnology is to detect the pulse rate of the heart. This is important for monitoring patients insickness and health. For instance, in a hospital, one might wish monitor an newborn’s heart rate(2B) to make sure it is going to stay alive through the night (Fig. 2), and trigger a medicalemergency rescue, in the worst case. In health, this might be attaching a Polar-brand heart ratemonitor for cardio fitness training. The major goal of this project is to develop circuitryto non-invasively monitor the pulse rate.Before venturing on, another quick word about the working principle behind this technology. Typ-ically, one measures the pulse rate at the finger tip by shining a bright light onto the finger andmeasuring the amount of reflected light (Figure 2A). Upon each beat of the heart, a volumeof oxygenated blood is pushed into the finger tip. The amount of reflected light vs. time variesaccording to volume of blood in the finger tip. During systole, the blood volume increases andreflected intensity decreases; and vice-versa during diastole. Voila—there’s the physiological basisfor the time changing signal you can detect. In summary, the intensity of reflected light from a

1Recommended listening (questionable?) is Heartbeat by Enrique Iglesias: https://www.youtube.com/watch?v=

NVk4vENObiI

1

Page 5: Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

Figure 2: (A) Reflection of light by blood volume in finger varies over time. (B) Baby in neonatalcare unit with pulse measurement system on foot—not the hand because, well, babies like to sucktheir fingers and thumb. Image credit in (A): A. Ganesan ahd A Ganesh Heart rate monitor usinga programmable SoC

finger tip can be modeled as:R(t) = Ro + r(t)

where Ro represents the constant “dc” reflected intensity and r(t) is the “ac” component thatrepresents the change in reflectance due to pulsatile blood flow. The dc and ac components ofblood flow—hence reflected light intensity—are depicted in Figure 3.

Figure 3: Cartoon version of various structures in finger tip leading to constant (dc) and time-varying (ac) components of reflected light. Image credit: T. Tamura et al http://www.mdpi.com/2079-9292/3/2/282

2

Page 6: Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

Optical Sensor

So, let’s use a sensor that senses changing amounts of reflected light, the TCRT 1000 reflectiveoptical sensor: https://www.vishay.com/docs/83752/tcrt1000.pdf. This sensor integrates aLED and phototransistor in a convenient packaging to properly capture reflected light (see mode ofoperation Fig 2 in the TCRT 1000 datasheet). The higher the intensity of reflected light incidenton the base of the phototransistor, the larger the current flow through the transistor. One caneasily generate a corresponding voltage by having the transistor current flow through a resistor Rc,as shown in Figure 4.

Figure 4: Optical sensor circuit for detecting changing blood flow. Two options are shown, withRc connected to the collector (left) or the emitter (right). The output port indicates the outputvoltage from the sensing part of the circuit, which needs to be filtered and amplified.

Also, take a look at Fig 3 in the datasheet which describes operation of the LED. The LED beginsto turn on at about 1.0 V and maxes intensity at about 1.3 V. A good middle-range choice for theforward current would be in the range of IF ≈ 50 mA.Now for the sensing phototransistor side, take a look at Fig 4 in the datasheet. This graph specifieshow much current flows through the transistor IC (“Collector current”) vs. the voltage acrossthe transistor VCE given the intensity of the LED (IF ). Notice this graph applies to a holding areflective card 1 mm above the sensing element. We don’t know a priori how much light will bereflected from a finger tip, but one might reasonably guess less than a reflective card. Moreover,we don’t know a priori how much the intensity of reflected light changes with each pulsation ofblood flow. So it may take some iterating to find an appropriate value for the resistor Rc.

3

Page 7: Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

Design Considerations

To reiterate, Your task is to design, build, characterize, and perform proof of conceptexperiments for a PPG circuit that is capable of cleanly measuring the pulsatile bloodflow in the finger tip—hence determine the heart rate—based on the reflected inten-sity sensing principle. Additionally, your system must incorporate a Arduino analogmeasurement and visualization of the PPG signal. You must be able to measure and displayyour signal using an open-source microcontroller, e.g., the Arduino. The signal you ultimately ac-quire should look something like that in Figure 5, which results from proper sensing, amplification,and filtering.For compatibility with the Arduino, you’ll use a single-sided power supply. This means using the+5V and GND ports on the Arduino in the final design (you can use a standard power supplyduring development and testing). This power supply scheme differs from the dual supply you areaccustomed to using of +15 V, -15 V and ground. For the op-amp, use a LM324. The reasonfor doing so is that the LM324 can have an output that approaches -Vcc = 0 V. The TL082 can’tdo that: if powered by +5 and 0 V, the lowest the output can get is about 1.4 V, limiting thedynamic range.

Figure 5: Sample signal of pulse rate vs time. In this case the peaks are clear, so identifying peaksand computing the pulse rate would be easy.

Design Criteria Summary

1. PPG output signal must be obvious to the naked eye (general guideline of about 1V peak-to-peak ac signal)

2. PPG signal should contain frequencies of interest only, filtering out high and low frequencynoise sources.

3. The output signal must be measured and visualized with the Arduino, thus the signal rangebe in the range of 0 - 5 V for Arduino compatibility.

4. Must use a single-sided power supply (5 V and ground) provided by the Arduino and theLM324 op-amp.

5. Must incorporate a LED that blinks each time a pulse is sensed—an immediate visual indi-cator that it is sensing each heart beat.

4

Page 8: Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

Final Design Project—Option B: Helping Hand

The prosthetics field has been undergoing a small revolution the past several years, thanks toadvances in miniaturized electronics, high performance batteries, and machine learning techniques(for example, see Figure 1). As discussed in class, one common control paradigm is to use tomeasure the electromyogram (EMG)—electrical activity associated with muscular contractions—to drive motors and actuators in the prosthetic hand.

Figure 1: Touch Bionics iLimb Ultra. Dexterity is sufficient to squish a foam ball. The motion/gripof the prosthetic hand is driven by the EMG measured on the existing part of the amputee’s forearm.Image credit: http://www.touchbionics.com/products/active-prostheses/i-limb-ultra

The prerequisite for such a prosthetic device is to non-invasively measure the electrical activityassociated with muscle contractions. Electrodes placed on the skin can measure the electricalsignal associated with muscular activity, if the signal is properly filtered and amplified. This is theElectromyogram (EMG). The EMG is processed and interpreted by a computer or microprocessor toconvert a pattern of muscular activity measured with electrodes on the skin’s surface into commandsthat move motors in a desired manner. For instance, flexing the biceps twice in quick successionmight be interpreted as: “Move robotic arm forward-right to grab green squishy ball.” A goodprosthetic hand can help perform functions like grasping a water bottle, picking up a pencil, andbuttoning clothes, thus restoring a high-quality of life to an amputee. So wouldn’t it be coolto.... build the circuit hardware that measures electrical signals generated by muscular activity —the Electromyogram (EMG) and program a microcontroller to do something when a contractionis detected, such as illuminate an LED or turn a motor. The next two sections provide a quickcrash-course on the EMG signal and actuation.

1

Page 9: Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

1 EMG Measurement

EMG signal origin and relation to prosthetic devices

When your forearm muscle (or any other muscle) flexes—whether it be to grip a pen, throw aball, shake a hand, strum a guitar, climb on rocks, curl your hair, or even to wire a circuit on thebreadboard—electrical signals are generated because there is an “excitation front” that causes anet movement of Na+, Ca++, and other ions in the muscles—i.e. there’s current flow in a resistivemedium, ergo a voltage is generated! This process is illustrated in Fig. 2. In summary, the EMGis a measurement of the difference in potential between two points along the skin directly abovethe muscle..

Figure 2: An excitation front propagates down a muscle unit (beneath the skin). A net movement ofions (indicated by green and purple arrows) represents the net flow of ions—i.e., current flow. Withcurrent flowing in a resistive medium (we’re all a big bag of salt water, right?) means a voltage isgenerated. This signal can be sensed by measuring the difference in potential of electrodes placedon the skin.

A sample EMG measured non-invasively from the “belly” of a forearm muscle using skin-surfaceelectrodes is depicted in Figure 3. As the muscle contracts various individual fibers contract atfrequencies ranging from about 10-500 Hz. The amplitude is about 100 - 400 µV peak-to-peak.Thus, you can see where filtering and amplification come into this design problem.

Additionally, prosthetic hands are usually programmed to recognize the the time-averaged inten-sity of the EMG signal. Time averaging can be done with rectifying and smoothing. For example,see the orange colored trace in Figure 3. This time-averaged signal is often referred to as theRMS signal because it can approximated by computing the time-avareged root-mean-square ofthe oscillating EMG signal (black trace in Figure 3).

Arduino: Indicator light and/or motor actuation

The second half of prosthetic design is to do program a microcontroller to do something in responseto having sensed/measured the muscle contraction. Two cool ideas are to sequentially illuminateLEDs based on the strength of muscle contraction. For instance, a weak signal would light up

2

Page 10: Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

Figure 3: Example EMG (black trace) measured from the forearm over 5 contractions of the forearmmuscle with increasing strength. The average signal intensity trace (orange) is shown overlaid. Itis a rectified and smoothed version of the EMG trace. Green and red triangles indicate on andoff times of each contraction. The inset at bottom left shows the fine temporal detail of the 3rdcontraction. The labels As and An indicate the signal and the noise levels from which the SNR iscomputed.

1 LED, whereas a strong contraction would light up 3 LEDs. Another idea is to rotate servomotors with grips to rotate a hand or grip an object. As a starting point for those interested inthis options, see the Arduino demo tutorial here: https://www.arduino.cc/en/Tutorial/Knob.In any case, you need to program an Arduino to do something in response to having measured amuscle contraction.

Single-sided power supply design considerations

Also, for compatibility with the Arduino, you’ll use a single-sided power supply. This means usingthe +5V and GND ports on the Arduino. This power supply scheme differs from the dual supplyyou are accustomed to using of +15 V, -15 V and ground. For the op-amp, use a LM324. Thereason for doing so is that the LM324 can have an output that approaches -Vcc = 0 V. The TL082can’t do that: if powered by +5 and 0 V, the lowest the output can get is about 1.4 V, limitingthe dynamic range.

3

Page 11: Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

Pay particular attention to the fact that you would like to properly amplify both positive andnegative swings of the EMG signal; thus you will likely want to consider using a virtual groundVcc/2 for your amplification stages. This effectively sets the reference point to the middle of thepower supply range instead of ground (which would be no fun because we would clip all of thenegative swings in the EMG signal). You may draw inspiration from BackYardBrains’ design asillustrated in Figure 4. Note that the Vcc/2 “virtual ground” should serve as the reference pointin your circuit for all other components (not the power supply ground).

Figure 4: Virtual ground circuitry. The virtual ground Vcc/2 serves as the reference point for othercomponents in your design. BYB uses the TLC2272344 op-amp. You can use the LM324.

2 Design Problem Statement

Your task is to design, build, characterize, and perform proof of concept experiments for a circuitthat is capable of cleanly measuring the EMG. Additionally, your system must incorporate a Ar-duino analog measurement which actuates LED lights or motors. Furthermore, your circuit mustalso output a rectified and smoothed version of the EMG, which represents the overall intensity ofthe contraction. The smoothing time scale should be about 0.1 s (refer to Figure 3).

Design criteria summary

1. EMG signal should contain frequencies of interest only (≈ 10 − 500 Hz), filtering out highand low frequency noise sources

2. EMG output signal must be obvious to the naked eye (general guideline of about 1V peak-to-peak ac signal). Recall that the voltage generated on the skin surface is expected to be inthe range of ≈ 100 − 1000 µV.

3. The system must also output the time-averaged RMS signal

4. The output EMG and RMS output signal range must be in the range of 0 - 5 V for compati-bility with measuring and visualizing with an Arduino UNO

5. Must use a single-sided power supply (5 V and ground) provided by the Arduino

4

Page 12: Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

6. Must incorporate 3 (or more) LEDs whose illumination is controlled by the Arduino; thenumber of LEDs that illuminate should be representative of the strength of contraction.Alternatively, the Arduino can control servo motors which rotate by an amount proportionalto the strenght of muscle contraction.

Safety Considerations: Proof of concept on Human Subject

For safety reasons, under no circumstances should you connect your EMG circuit toa human subject without first consulting the instructor!

Proof of concept on a Human: Once you have demonstrated to the instructor that your circuitsufficiently meets the design criterion above, we will do a real live human test for proof-of-concept.For safety reasons, we will power your circuit via two 9V batteries in series. For safety reasons,under no circumstances should you use a power supply plugged into the wall whiletesting your circuit on a human subject! The instructor will help you prepare for humansubject measurement with proper placement and use of EMG electrodes.

3 Amplifier Data Sheets and Pinouts

You may find the following to be helpful while constructing your circuit:

5

Page 13: Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

Figure 5: Top: Possibly useful information from the instrumentation amplifier INA 126 data sheet.The gain is set by the resistor RG as follows: Vo = (V +

IN − V −IN )(5 + 80kΩ

RG). The 0.1 µF capacitors

connected to the power supply may be included to help reduce any unwanted 60 Hz power supplynoise that might be “injected” into the amplifier. Bottom: Pin out. Power is supplied to thedevice on pins 4 (-Vcc) and 7 (+Vcc). Pin 5 “Ref” should be connected to ground. Pins 1 and 8are connected to the gain setting resistor. Pins 2 and 3 are the two signal inputs. The output isprovided on pin 6.

6

Page 14: Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

Final Design Project—Option C: Don’t Sweat It

Please take 15 min to carefully read through the entire problem statement below before embarkingon your final project 1.

Introduction to Electrodermal Activity (EDA)

This project asks you to design a circuit that is suitable for measuring electrodermal activity (EDA).The EDA measures time-varying electrical skin resistance (or equivalently, conductance) from thefingers that is associated with sweat gland activity (see Fig 1). Since sweat gland activity is subjectto “subconscious control” (more properly referred to as the autonomic nervous system activity),the skin resistance measurement is accepted as a standard way to monitor one’s emotional state23.

Figure 1: Electrode placement for EDA measurement. Typically the resistance between the twofinger electrodes (“bipolar placement”) is used to monitor a test subject’s skin resistance (conduc-tance).

The applications of EDA measurements are many. EDA has found use in medical diagnosis ofvarious illnesses, such as depression and sensory modulation disorder. The most familiar exampleis probably the “lie detector” (part of a polygraph4) whereby a suspect is subjected to a seriesof questions, while the EDA is measured. The main idea is that if the EDA will exhibit differentcharacteristics depending on the veracity of the suspect’s answers to a series of questions. In theold days, the voltage output from the EDA sensing causes the pen-graph to rotate accordingly tomark the chart. Modern systems simply use an oscilloscope display to track the skin’s resistance

1Recommended listening: The Boxer by Mumford and Sons http://www.youtube.com/watch?v=YAl-vZsswb42 http://www.bem.fi/book/27/27.htm. Note: Please do NOT follow this link while completing the project. It is

included only for completeness for appropriately citing sources.3 http://www.adinstruments.com/solutions/education/Electrodermal-Response-EDA/. Note: Please do

NOT follow this link while completing the project. It is included only for completeness for appropriately citingsources.

4A polygraph typically measures heart beat, breathing rate, and EDA.

1

Page 15: Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

over time. (For example, see the MythBusters segment found here: http://www.youtube.com/

watch?v=NFXJASVJBV4).A recent journal article5 suggests that EDA measurements could be used for gaming systems,whereby the EDA of the player(s) is integrated into the gaming system for a more interactiveexperience. In addition, EDA has found use in medical diagnosis of various illnesses, such asdepression and sensory modulation disorder. All of this is to say that EDA measurements turn outto be very useful in a variety of applications.One key piece of information: As was mentioned above, the electrodermal response is under sub-conscious control. Various studies have shown that the time scale of these resistance changes rangesfrom about 0.2–2 sec , for an equivalent a frequency range of 0.5–5 Hz. This is the frequency bandof interest. The change in skin resistance (conductance) depends on the person, the quality of elec-trode contact, the subject’s state of hydration at the time of the test, etc. However, skin resistancemeasured between two fingers generally remains in the range of 100 kΩ- 4 MΩ.A representative EDA measurement (Figure 2) shows conductance—the inverse of resistance—changing over time. The big jumps in conductance (e.g. after time serial 2) represent a noticeabledecrease in resistance. For example, a change in conductance value of ∆g = 1/∆R =0.5 micromhosis equivalent to a change in resistance of ∆R = 1/0.5× 10−6micromhos = 2 MΩ (That’s relativelyvery large!).

Figure 2: Example of an EDA trace: Skin conductance vs. time is displayed. Time scale bar: 50sec. Vertical scale bar: 0.39 micromhos, where “mhos” are units of conductance (=1/R), henceorigin of the name (ohms→mhos). This particular example is from a study examining childrenwith sensory processing disabilities. Figure credit: American Journal of Occupational TherapyMay 2010 64(3) 443–452.

5J. Comp. Networks and Comm. (2011) doi:10.1155/2011/610645. Note: Please do NOT refer to this journalarticle while completing the project. It is included only for completeness for appropriately citing sources.

2

Page 16: Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

Design Considerations

Your aim is to design a system that can properly measure the EDA, and record andvisualize it using and Arduino microcontroller. Essentially, your task is to design a circuitthat converts a changing resistance Rskin(t) into a changing output voltage Vout(t). To make thecircuit output as linear as possible with changes in skin conductance use a Wheatstone Bridgefor the resistance sensing part of the circuit. Since we don’t know the baseline value of the skinresistance ahead of time, you’ll need to incorporate a means of initially balancing the bridge. Ofcourse, you need to design and build appropriate filters and amplifiers as well.For compatibility with the Arduino, you’ll use a single-sided power supply. This means using the+5V and GND ports on the Arduino in the final design (you can use a standard power supplyduring development and testing). This power supply scheme differs from the dual supply you areaccustomed to using of +15 V, -15 V and ground. For the op-amp, use a LM324. The reasonfor doing so is that the LM324 can have an output that approaches -Vcc = 0 V. The TL082 can’tdo that: if powered by +5 and 0 V, the lowest the output can get is about 1.4 V, limiting thedynamic range.Pay particular attention to the fact that you would like to properly amplify both positive andnegative swings of the EDA signal; thus you will likely want to consider using a virtual groundVcc/2 for your amplification stages. This effectively sets the reference point to the middle of thepower supply range instead of ground (which would be no fun because we would clip all of thenegative swings in the EDA signal). You may draw inspiration from BackYardBrains’ design asillustrated in Figure 3. Note that the Vcc/2 “virtual ground” should serve as the reference pointin your circuit for all other components (not the power supply ground).

Figure 3: Virtual ground circuitry. The virtual ground Vcc/2 serves as the reference point for othercomponents in your design. BYB uses the TLC2272344 op-amp. You can use the LM324.

Design Criteria Summary

1. Detect changes in skin resistance in a frequency range of 0.5–5 Hz.

2. The magnitude of the output voltage should be “usable” by an Arduino. As a general guide-line, a noticeable change in Vout should be at least ≈ 250 mV. This corresponds to 250 mV/5V5% of the Arduino’s dynamic range.

3. Indicator light: your device should include an indicator light that illuminates whenever asubstantial decrease in skin resistance is detected. Otherwise it should be off. Use your

3

Page 17: Rules of Engagement - home.wlu.eduhome.wlu.edu/~ericksonj/engn207_f2017/designproj/FinalProject_all...Calculations and justi cation supporting component and ... My Finger Has A Heartbeat

Arduino to measure the EDA signal then compute whether and when to illuminate the LED.

Proof of Concept Experiment: The Real Deal

Once you have presented convincing evidence to the instructor that your device works as promised,you will indeed use it to test a real human test subject. When ready, please consult the instructorfor help and approval performing measurements on live test-subjects. We will use Ag/AgCl elec-trodes or conductive fabric electrodes fastened around the fingers to insert the real life test subjectresistance into your system.

4