Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
Biomedical Engineering Summer School  EL#1 - 1 
© Electronics and Computer Science, University of Southampton Page 1 of 10 
Biomedical Electronics Summer School 
BIO-EL Lab #1: Optical Heartrate Sensor 
In this lab you will construct the electronic 
circuit to measure heartrate optically. The 
board has a red, light emitting diode (LED) 
that will flash to indicate your heartrate. 
This exercise introduces techniques for 
constructing an electronic circuit, and 
techniques for testing the hardware with 
laboratory test equipment.  
 
Biomedical Engineering Summer School  EL#1 - 2 
© Electronics and Computer Science, University of Southampton Page 2 of 10 
Schedule 
  
Lab time : 1.5 hours 
Items provided 
  
Tools : Soldering Iron and Iron stand + safety glasses 
Solder 
Desoldering tool 
Side cutters 
Wire strippper 
Needle noise pliers 
Components : 1x Heartrate printed circuit board 
Integrated circuit (IC): 1x MCP602 
Resistors: 3x 680kΩ, 1x 68K, 1x 47kΩ, 2x 6.8kΩ, 2x 1kΩ 
Capacitors: 1x 1µF (blue), 3x 100nF (yellow) 
Switch 1x micro DPDT 
1x 5mm Red LED 
1x IR sensor (Black case) 
Equipment : Multimeter and cables 
Power Supply  
Oscilloscope + probe 
 
  
   
• You will work in pairs for this laboratory exercise, but you will each solder your own 
PCB.  
• Before starting, we recommend that you have a quick read through all sections of these 
notes so that you have an idea of what you are going to be doing in the lab. 
• Be careful – the tip of the soldering iron is very hot! 
 
 
Revision History   
July 30, 2023 
July 23, 2023 
July 11, 2022 
July 18, 2019 
July 16, 2018 
Dr Russel Torah – updated R9 to be 1k 
Dr Russel Torah – update tools and other fixes 
Dr Daniel Spencer – minor amendments 
Dr Daniel Spencer (dcs) – new PCB design 
Dr Daniel Spencer (dcs) 
Version 2.3 
Version 2.2 
Version 2.1 
Version 2.0 
Version 1.0 
Biomedical Engineering Summer School  EL#1 - 3 
© Electronics and Computer Science, University of Southampton Page 3 of 10 
1 Your Lab Exercise: Heartrate sensor 
You start with a bare printed circuit board, insert the components and then solder the components 
in place. You will learn and apply the techniques of soldering to assemble the components onto a 
double-sided printed circuit board (PCB). After the circuit is built, it is essential to test it to see 
that it operates correctly. A circuit can fail for a number of reasons, including poor soldering (dry 
joints or solder bridges), components in the wrong place, components the wrong way round, faulty 
components or a poorly fabricated PCB. To test the circuit you will use a bench PSU, a digital 
multimeter and an oscilloscope and a logic analyser. This will give you the opportunity to learn 
how to use these instruments.  
 
1.1 How to solder 
Start by watching this short video on how to solder and some tips: 
https://www.youtube.com/watch?v=Qps9woUGkvI  
Next, ask a mentor to show you and help set up the solder station. You will be provided with a 
small piece of strip board and some resistors to get the hang of soldering before you solder on the 
PCB.  Have a few goes until you’re happy you have the hang of it. 
 
2 Circuit Components 
2.1 Printed circuit board  
Electronic circuits can be constructed using a number of technologies: breadboard, tri-pad, 
stripboard, wire-wrap, PCB, or dead-bug. For simple prototyping of new designs a breadboard 
can be a convenient method, but it is limited to low-speed circuits. Some modern components are 
only available in fine pitched surface mount devices which don’t fit on a breadboard.  
A PCB is a multi-layer board, with each layer containing a number of copper tracks connecting 
the components as defined in the schematic. Simple boards are often two-layer with tracks on the 
top and bottom. 
 
 Have a look at the heartrate PCB – can you see the track which connects the battery to the switch? 
 
Boards designed for more demanding applications (such as in a mobile phone) are very similar, 
but with many more layers (4, 6 or 8 being common) sandwiched inside the board and connections 
made with vias.  
The board has been designed to use the plated through holes (PTH) for the components to join the 
two layers together at appropriate points on the board. 
  
2.2 Components 
Components are generally divided into two categories: those that have wires or legs that are 
pushed through the board and soldered underneath (called through-hole) and those that lie on the 
surface of the board and are soldered on the same side (called surface mount). The board you are 
going to solder is through hole which is the easiest to solder as the components are usually larger.  
Which type of package to use in a design depends upon a number of factors including component 
availability (modern devices are often only available as SMDs), assembly method (automatic 
Biomedical Engineering Summer School  EL#1 - 4 
© Electronics and Computer Science, University of Southampton Page 4 of 10 
pick-and-place machines may prefer SMDs) and circuit size (SMDs can achieve a much higher 
density by their small size and assembly on both sides of the board). 
The design contains a number of commonly used electronic components: 
• Resistor: A device for limiting the flow of current. For through-hole resistors the value is 
usually indicated by a set of colour codes. The device is not polarised which means that it 
may be installed either way round.  
• Capacitor: A device for storing charge; often used for filtering and improving the local 
quality of power sources. The value and maximum voltage rating is normally written on 
the component. They can be polarised (typically values ≥ 1µF) or un-polarised. 
• Switch: A device for selecting between a number of possible circuit configurations. A 
common terminology is mPnT, where m describes the number of linked switches in the 
package and n describes the number of positions each switch can take, e.g. SPDT denotes 
a Single Pole Double Throw switch. 
• LED (Light Emitting Diode): A polarised device which illuminates when current flows 
through it in the correct direction. 
• IC (Integrated Circuit): A multi-leaded package containing internal circuitry – often 
containing thousands or millions of components. Devices range from relatively simple 
voltage regulators with three pins to high performance microprocessors with many 
hundreds of pins. 
3 Soldering the components 
1. Place the iron in good contact with both the pad and component lead. 
2. Wait a couple of seconds for both pad and component to reach temperature. 
3. Add a little solder to the joint, taking care not to add the solder to the iron tip, but aim it to 
meet the junction of the pad and the lead. 
4. Add enough solder that the joint forms a volcano shape (figure 2A). 
5. Remove the solder. 
6. Remove the iron. 
7. Ensure that the component lead is not moved while the solder cools (five seconds is 
enough) or the joint will fracture creating a dry joint. 
8. Inspect the joint and ensure that it is shiny. If not reheat and add a little more solder to 
introduce some new flux. 
9. Use the side-cutters to remove the excess lead, cupping your hand over the board as you 
do so to avoid the lead becoming a projectile. 
 
 
3.1 Removing a solder bridge  
Modern PCBs contain a solder mask which helps to minimise the chances of an accidental bridge 
between two adjacent pads. However, when soldering fine pitch devices it may occur. Use a length 
of solder wick to absorb the excess solder, by touching the wick and iron over the offending area. 
  
Biomedical Engineering Summer School  EL#1 - 5 
© Electronics and Computer Science, University of Southampton Page 5 of 10 
4 Assembly 
4.1 Preparation 
Start by laying out the components from the kit on a piece of paper and identify their values. Write 
down the component identifiers next to each component and ensure that none are missing. You 
can use your multimeter set to its resistance range to confirm the resistor values: 
Plug the two cables from the draw underneath the bench into the multimeter as per the figure 
below. Press the “Ω” button to measure resistance. 
 
 
4.2 IC Socket 
Insert the 8-pin socket (NOT the IC) ensuring 
that the pin 1 indicator corresponds to the PCB 
indication. 
 
Turn over the PCB so that it rests on the 
socket. Solder two diagonally opposite pins. 
Now turn the board over and confirm that the 
socket is flush with the board. If not, turn over 
and gently reheat the offending pin whilst 
applying a little downward pressure to the 
PCB. 
 
You can now solder the remaining 4 pins 
knowing that the socket is correctly inserted. 
If you have never soldered before, ask one of 
the demonstrators to take a look at your first 
few solder joints for feedback on your 
technique, before you proceed too far. 
 
 
  
Biomedical Engineering Summer School  EL#1 - 6 
© Electronics and Computer Science, University of Southampton Page 6 of 10 
4.3 Resistors 
 
Resistors are two-leaded components have no 
polarity and can be inserted either way round. 
If you wish to be precise you can insert the 
resistors so that their colour codes read from 
left to right (or top to bottom).  
Ask a demonstrator to help you setup the 
multimeter so that you can check the value of 
each resistor. 
Insert one of the 680kΩ resistors into R1.  
 
Turn over the board, and secure the component 
in place before soldering when required by 
bending the legs slightly. Alternatively you 
can hold these down with bluetac.  
Next, solder the connections to hold the 
component in place.  
 
Now, turn over the board and check the 
resistor is sitting flat on the board. If not, you 
can heat one side with the soldering iron and 
press through the component. You can ask 
demonstrator to help you with this.  
 
Remove the two pieces of surplus wire from 
the soldered components using the cutters. 
Hold, or place your hand over, the lead you are 
cutting to avoid it flying off as a projectile. 
 
Next, repeat for the remaining two 680kΩ 
resistors which go into R2 and R4 
 
Biomedical Engineering Summer School  EL#1 - 7 
© Electronics and Computer Science, University of Southampton Page 7 of 10 
Solder the 68kΩ resistor into the slot for R3 
 
Solder the remaining resistors: 
R5 =47kΩ 
R6 =6.8kΩ 
R7 = 6.8kΩ 
R8 = 1kΩ 
R9 = 1kΩ 
 
4.4 Capacitors 
Some types of capacitors are polarised, which means they must be inserted in the correct 
orientation (they have one positive, and one negative terminal). The capacitors in this design are 
non-polarised which means it does not matter which way round they are inserted. 
C1, C2 and C3 are 100nF capacitors. These are 
all yellow. If you have very good eyesight, you 
may be able to read the marking as “104” 
which means 10 followed by 4 zeros, i.e. 
100,000 pF which is 100nF (1nF=1000pF). 
 
C4 is a 1µF capacitor. This is blue. If you have 
very good eyesight, you may be able to read 
the marking as “105” which means 10 
followed by 5 zeros, i.e. 1,000,000 pF which is 
1µF. 
 
 
4.5 LED and Photosensor 
The red LED has two pins and must be inserted in the correct orientation in the holes marked 
LED1. The photosensor (black rectangular package with four pins) contains an infrared LED and 
Phototransistor and must be inserted the correct orientation in Q1. If you are unsure, check with a 
demonstrator. 
The red LED should be inserted with the flat 
edge matching the flat of the white silkscreen 
on the board. 
 
Biomedical Engineering Summer School  EL#1 - 8 
© Electronics and Computer Science, University of Southampton Page 8 of 10 
 The LED/phototransitor package should be 
inserted such that the two circles face 
upwards.   
You might need to use the needle nose pliers 
to help gently bend the legs to fit in the PCB 
holes, be careful not to break them. 
 
 
4.6 Switch 
Insert the switch into the socket marked power 
and solder. The switch can go in either 
orientation.   
 
Insert the switch into the board and solder 
 
5 Testing 
Before plugging in a power supply, we need to check the circuit. 
Take the Check the resistance between 
point A and point B.  
It should be approximately 0.7MΩ 
 
Now check the resistance between 
points A and C. 
It should be approximately 6.8KΩ 
 
Biomedical Engineering Summer School  EL#1 - 9 
© Electronics and Computer Science, University of Southampton Page 9 of 10 
Continue checking the resistance 
between point A and the IC socket 
(labelled anti-clockwise from B to H. 
A→D ≈68KΩ 
A→E should be less than 1Ω 
A→F ≈1.4MΩ 
A→G ≈18KΩ 
A→H ≈0.7MΩ 
A→I should be greater than 2MΩ  
 
Insert the black integrated circuit (IC) into the socket, checking with a demonstrator that the 
orientation is correct. The semi-circle or dot at the top of the IC should be orientated with the 
semi-circle on the socket. 
5.1 Power  
Next, you are going to power on the board using a benchtop power supply. Cut, strip and solder a 
length of red wire (~50cm) to the back of the board, labelled “VCC” and a black wire to ground 
(GND) as shown in the figure below.  You should strip about 1cm of the plastic wire insulation 
from both ends, ask for help from the demonstrators if you’re unsure how to strip the wire. 
 
 
Do not plug in the board to the power supply until step 4 below. 
1. Turn on the power supply using the switch in the bottom left corner.  
2. Ensure the button in the bottom right corner is depressed 
3. Rotate the dials until they read 3.00 (Volts) and 0.020 (Amps)  
4. Plug in the red and black wires to + and – respectively (figure below) 
5. Check that the dials still read 3.00V and 0.020 (Amps) 
6. Finally, press the button circled in yellow on the power supply. 
 
Biomedical Engineering Summer School  EL#1 - 10 
© Electronics and Computer Science, University of Southampton Page 10 of 10 
 
 
 
5.2 Heartrate measurements 
• Hold your finger over the photo sensor. You need to hold very still and wait for 10 seconds 
for the reading to stabilise. The red LED should flash in time with your heartrate. 
• Now try using different fingers.  
 
 
6 Further work 
If you have time, ask a demonstrator how to connect the circuit up to an oscilloscope to see the 
signal.  
 
Note: Measuring heartrate optically is very challenging. The circuit is fairly simple, and 
demonstrates some of the challenges in measuring and processing bio-signals. The circuit has a 
very high gain to measure the faint signals and the circuit is prone to oscillation. You will need 
to keep very still, as movement changes the amount of light absorbed. For best results, put the 
board flat on the bench and press lightly on the sensor.  
 
 
6.1 Battery power 
If you have time towards the end of the lab, you can remove the power wires and solder the coin-
battery holder. Ask a demonstrator to help you with this.