« Introduction to Biomedical Engineering»: Сourse
« Introduction to Biomedical Engineering»: Сourse
« Introduction to Biomedical Engineering»: Сourse
« Introduction to Biomedical
Engineering»
2
Introduction to Electronics
This section is designed to introduce basic concepts of electronics to a person who
never dealt with such concepts before. The section is split onto 3 sub-sections. We will
start with introducing the basic components, we will describe its functions and behavior,
and then we will continue with more applied concepts such as amplifiers and filters.
First, let’s talk about the electronics from a prospective of a lay person. On the
screen, you can see a Figure of 2 people. Can you spot an electronics engineer?
Right, the person on your right you all recognize, it is famous Steve Jobs, the
founder and spiritual leader of Apple Inc. The person on your left however is less known,
this is Steve Wozniak, the Principle Electrical Engineer of Apple, and the actual creator
of all early Apple products.
However, you can see what I mean; it takes a specific kind of person to be an
electronics engineer. You have to read and understand very complicated impenetrable
diagrams, you gotta spend almost all of your time in a workshop with no natural light,
surrounded by the massive amount of quite complicated equipment, and you gotta speak
a specific language which is only spoken by geeks like you.
3
Figure 2 - Impenetrable diagrams
Which brings us to the next question: is electronics even relevant? And the answer
is: absolutely. And not only for biomedical engineering. If you look at any modern product,
be it consumer or specialized, it will always, and I mean always contain electronics.
Starting from cars, which is an example of very conservative industry, and finishing things
like MRI scanner, where electronics contain more than 50% of its shear weight.
No, really, the entire thing can be replaced with one diagram and a model. We call
these models a Transfer Functions, and we will talk about them in detail during the second
section of the course. However, the simple idea is that any system can be represented
as a function in Laplace domain, which has inputs and outputs. By knowing this function,
you can predict the system behavior and analyze its performance, and because someone
else had already done the work of proving it, you can be sure that the actual system
behaves exactly as intended when integrated into the product.
Right, when we talk about electronics, there two main areas it can be divided into.
And it is a direct consequence of the types of information that the electronic bit is dealing
with. They are analog, and digital. Analog electronics deals with continuous signals,
meaning at any time point there is a value of a function we consider, and it can be any
value. Digital electronics operate with discrete signals, meaning there is limited range of
discrete values, and they are defined over discrete time intervals (also called sampling
periods). The basic comparison between the two is real world VS things computer like.
5
Analog(ue) and Digital Signals
Digital electronics, a thing that computers like, operates with pulses, the most
common of which is on/off pulse. That means that you only have 2 values, and the signal
can only be on, or off and it can obviously code binary information. In real life you would
deal with certain voltages, like 0 for off, and 1 (|or 5) for on. With the correct circuitry, this
kind of signal is very robust to external noise: you can see on the Figure, that even if you
distort the original signal a lot, with the selection of appropriate threshold, you can achieve
near-perfect recognition of where is on, and where is of. The most common thing to do a
job is a Schmidt trigger, which does exactly that, exists on every Arduino digital pin, and
ensures the robust detection of pulses.
On and off pulses can be used to transmit something more advanced than the
digital information. You can vary the time of ‘on’ VS ‘off’ pulse over the specific amount of
time, and get so-called Duty Cycle, which is equal to Pulse Width (the time the signal is
on) over total amount of measured time, times 100%. So if you have several consecutive
pulses, you can transmit some information by encoding it in the pulse width. The beauty
6
is: if the system you transmit this information to cannot react fast enough to each pulse
(like a motor or LED). Then your actual power, or voltage, that the system "extracts" from
these pulses will be equal to the duty cycle time the amplitude of the pulse: The motor
due to inertia will not react fast, so its speed will be "modulated" by the duty cycle of the
pulses that you send, each consecutive pulse will push the motor, and amount of
additional speed it receives each time will be proportional to the amplitude of the pulse
time the pulse duration, thus, if you can do it fast enough, you can control that precisely.
As was mentioned before, Duty Cycle is quite powerful tool to transmit analog
information over digital world, and many micro-controllers, including Arduino, will have
this functionality implemented by default. The standard name for technique and circuitry
is Pulse Width Modulation.
OK, the digital electronics is brilliant, but how do we convert our real-world signals
into the digital world. The specific tool to perform this function is called (surprise-surprise)
Analogue-to-digital converter or ADC. It takes the input signal, most commonly voltage,
and produces the binary output (sequences of pulses). The most common of them would
have one input and several outputs, each output would binary-code its specific register,
7
and inside there will be some sort of threshold detector (it can also be a Schmidt trigger).
The input signal goes to each detector, which turns 1 if the threshold was met, if the
thresholds are logarithmically scaled with base 2, each gives you a binary digit. If your
signal is small, then none of the detectors worked and the output is 000, if you start
increasing it, until the lowest threshold is met, then you get 001, and so on. Obviously,
there is circuitry that controls compensation voltage for every threshold activation, but it
is quite easy and operates as a subtraction feedback for each register.
There are different types of ADCs which operate at different accuracy level
(resolution), the sophisticated go up to 24 registers (or bits), which mean they can code
a lots of numbers (precisely 2^24). They also operate at different frequencies (sampling
rates), and normally sampling rate trades off resolution and vice versa.
Coming back to digital VS analogue electronics, here is a simple diagram of pure
digital circuitry (also known as digital clock), it normally consist of blocks, connected to
each other with wires transmitting binary signals (on-off signals). Here, for example, is
the pulse generator, connected to Clock Divider (slows down the clock to 1/sec), then
counter (counts pulses up to 8), then binary LED display controller, which in turn drives
the LED display. Digital electronics is very easy to design, everything is standard, but it
is generally expensive and requires more energy for the same job.
8
Figure 10 - Analogue vs. Digital electronics - LED display
9
Diodes
The next essential component on the list is a diode. It is a semiconductor device,
which means that it can only transmit current in one direction. This direction is called
forward, from so-called Anode (positive voltage) to cathode (negative voltage). If we apply
inverse voltage (positive to cathode and negative to anode), current will not flow, and
diode is 'reverse biased'.
So when you see a diode in the circuit, you can simplify by assuming no resistor
in one direction (straight wire), and infinite resistor in another direction (gap). The most
common and simple use for diode is current protection. If you remember 70s-80s toys,
and importance of misconnecting the polarity of the battery, either you understand the
simplicity and brilliance of protecting the expensive stuff from complete burn out by
inserting a simple diode forward way on positive pin, or reverse in parallel (please take
time to analyze what is happening on the screen and what is the difference).
Figure 13 - Forward biased (positive voltage) and Reverse biased (negative voltage)
10
In reality, however, diodes are not ideal, they need certain small voltage (forward
voltage) to start working, and they do not hold infinite reverse voltage (the maximum is
called breakdown voltage). Also, they can only transmit limited amount of current before
they start to heat a lot. Some diodes exploit these properties, and then they are
specifically marked on the diagrams with funny symbols. For you, however, it is enough
to say: this is a diode, I know what it is doing, move on, or google the specifics if you need
to.
The particular interesting type of the diode world are light emitting diodes, or LEDs.
As name suggest, they emit light when forward biased, they are the love and joy of every
engineer, and keystone of modern consumer electronics. The luminosity of LED is
proportional to the current flow. Maximal current, at which diode starts to be a flaming
sword, is limited at much lower values than traditional diode, so it is a good idea to add
some resistor in series which is called 'limiting resistor', to avoid overheating issues and
power fluctuation troubles. However, in more precise application where luminosity is a
factor to control, it might be necessary to control the current directly supplied to LED.
11
The other type of commonly used diodes is a photo-diode. Based on the
photoelectric effect, this guy acts as an inverse of LED, and generates the current which
is proportional to the amount of light reaching the active photoelectric element. Depending
on the composition and structure, they can generate lots of current, but then they react
slowly, or can produce low current but act fast which is great solution for sensors. They
are commonly used as a receiver for remote controls of the consumer TVs.
Figure 16 - Photodiode
The current generated by the diode is proportional to the incident light, so the circuit
can be greatly abstracted and simplified. There are many types of them, some of which
are sensitive to a specific light wavelength, and some are directionally sensitive. Again,
think of them as inverse of LEDs.
12
Transistor
Moving on, we are now at the doorstep of the most critical component for any
electronics, a Transistor. A semiconductor device, has 3 pins, and acts as either insulator
or conductor between two of them (normally called Collector and Emmitor, C and E on
the diagram), depending on the control signal, applied to the 3rd (called Base, or B on
the diagram). To put it simply it can be described as a control valve for current passing
through it, or a variable adjustable resistor. Depending on the operation mode or
semiconductor physics, they can be p-n-p, where more base current mean more output
current, or n-p-n, where more base current means less output current. Their main
applications are: 'switching' for digital electronics, and 'amplification' for analogue.
Figure 17 - Transistors
They are great for switching, where you control the flow of high current (normally
high power to some heavy duty appliance) using low current (normally battery driven, or
supplied by a micro-controller). Real transistors will not have infinite switching speed, and
will have a have maximum current you can supply to the base (and so used with the
limiting resistor), and minimum resistance at fully 'on' mode. If you see a base pin of the
transistor on a diagram connected to a microcontroller digital pin, it is probably used as a
switch.
13
So if you see a base of a transistor connected to the input signal on the diagram, it is
probably used in amplification mode.
There are many types of transistor and transistor-like components, some of them
are voltage controlled, and if you want to know more, google and Wikipedia contain more
than enough information about them, so the general rule: do not know something - google
it, works best.
14
Circuits
Well, finally, now we know basic components, let’s consider some circuits. Since
we will look at both analogue and digital electronics, let’s review 555 timer. Inside it is
actually quite complicated, but as always with digital, we can consider the IC block only,
which is displayed on your right. As we know already, bypass capacitors can be ignored.
The rest resembles a connection of Rs and C, which we will talk about later, but the
principle is that capacitor takes time to charge and discharge, and this time depends
solely on the combination of capacitance and resistances around.
We can use this to construct a circuit, which will charge, and discharge the
capacitor upon reaching the certain voltage threshold, it can be easily implemented using
digital logic, and this is exactly what 555 timer does. Therefore, the circuit is delivering
pulses with the fixed period, which are solely dependent on three analog components and
can be easily controlled.
15
16
Some graphic material used in the course was taken from publicly available online
resources that do not contain references to the authors and any restrictions on material
reproduction.
17
This course was developed with the support of the "Open
Polytech" educational project
18