필사 모드: FingerScore Hardware 2 — Electronics Fundamentals (From Voltage, Current, and Resistance to Digital Signals)
EnglishIntroduction — When a Software Developer Meets Electronics
In the first article of the FingerScore series, we sketched the big picture of the product: a BLE ring that records racket-sports scores through finger gestures. We chose a microcontroller (MCU) and looked at how to combine the battery, an IMU sensor, and a BLE radio at the component level. But the moment you actually hold those parts and try to plug them into a breadboard, many software developers hit the same wall. "Why do I need this resistor? Can I not just wire an LED straight to a pin? What happens if I mix 3.3V and 5V?"
This article exists to help you climb that wall. It is written for people who have written code but are new to electronics, and it distills only the electronics fundamentals you actually need to build a small embedded device like FingerScore. We will not solve differential equations the way a university circuit-theory textbook does. Instead we focus on intuitively understanding "why this part is needed" and "where this number comes from."
There is one good analogy for software developers. An electrical circuit is like plumbing with water flowing through it. Voltage is water pressure, current is the amount of water, and resistance is a narrowing of the pipe. If you plant that one analogy firmly in your head, you have understood half of this article already. Let us begin.
Voltage, Current, and Resistance — Three Basic Quantities
The starting point of electronics is three quantities. Once you firmly grasp the relationship among these three, the rest is application.
- Voltage (unit V, volts): the difference in electric potential between two points. In water terms, it is the pressure, the force pushing the water along. There is a voltage between the plus and minus terminals of a battery.
- Current (unit A, amperes): the amount of charge flowing per unit of time. In water terms, it is the amount of water passing through the pipe. In embedded devices we usually work in milliamperes (mA) or microamperes (uA).
- Resistance (unit ohms): how strongly something opposes the flow of current. In water terms, it is a narrowing of the pipe. With higher resistance, less current flows at the same voltage.
The water analogy, organized into a table, looks like this.
| Concept | Unit | Water analogy | In FingerScore |
| --- | --- | --- | --- |
| Voltage | V, volts | Pressure | Battery 3.7V, logic 3.3V |
| Current | A, amperes | Amount of water | LED about 5mA, tens of uA in sleep |
| Resistance | ohms | Pipe narrowing | LED current-limiting, pull-up resistors |
There is one important intuition here. Voltage is something that is "applied," while current is something that "flows." A battery is a voltage source, so it tries to supply a constant voltage, and the current is determined by how well the circuit conducts. That answers the question, "Can I not just plug an LED directly into a pin?" If you do not block the flow with a resistor, excessive current flows and the part burns out.
Ohm Law — The F = ma of Electronics
The equation that ties the three quantities together is Ohm law. It is the most-used formula in electronics, and in practice it alone gets you through about 80 percent of circuit calculations.
Ohm Law
V = I * R
V : voltage (volts)
I : current (amperes)
R : resistance (ohms)
Rearranged
I = V / R (the larger the resistance, the smaller the current)
R = V / I (find the resistance needed for a desired current)
The meaning is clear. At the same resistance, raising the voltage increases the current proportionally; at the same voltage, raising the resistance decreases the current inversely. In water terms it is the obvious statement: "raise the pressure and more water flows; narrow the pipe and less water flows."
It helps to also know power (the energy consumed). You need it when calculating battery life.
Power Formula
P = V * I
P : power (watts)
Combined with Ohm law
P = I * I * R
P = V * V / R
For example, if one LED has 2V across it and 5mA flowing through it, the power it consumes is calculated like this.
P = V * I
P = 2 * 0.005
P = 0.01 watts = 10 milliwatts
That looks like a small number, but in a FingerScore ring running on a coin battery, even small draws like this add up and determine battery life. That is why in embedded work we are always counting a current budget.
LEDs and Current-Limiting Resistors — Your First Calculation
When learning electronics, almost everyone does "lighting an LED" as their first exercise. But you must not connect an LED straight to power. An LED, once a fixed forward voltage (Vf) is across it, refuses to take more voltage and instead tries to draw current without limit. Connected without a limiting device, it instantly burns out from overcurrent. So we place a current-limiting resistor in series to block the flow.
The calculation is a rearrangement of Ohm law.
Current-Limiting Resistor Calculation
R = (Vsupply - Vled) / I
Vsupply : supply voltage (e.g., 3.3V)
Vled : LED forward voltage (red about 2.0V, blue about 3.0V)
I : current you want to flow (e.g., 5mA = 0.005A)
Suppose we connect FingerScore status-indicator red LED to the 3.3V logic supply and want 5mA flowing.
R = (3.3 - 2.0) / 0.005
R = 1.3 / 0.005
R = 260 ohms
The result is 260 ohms, but real parts are only sold in fixed standard values (the E series). The nearest standard value to 260 ohms is 270 ohms, so we use 270 ohms. Taking the resistance slightly higher just reduces the current a touch, and the LED still lights fine. In embedded work, being "a little conservative" (slightly less current) is the safe choice.
Drawn in ASCII, the circuit on the breadboard looks like this.
LED Lighting Circuit
3.3V ----[ R1 270 ohm ]----|>|---- GND
LED1
(long leg = +)
R1 : current-limiting resistor
LED1 : indicator LED, long leg (anode) toward the supply
Let me point out two common mistakes here. First, LEDs have polarity. The longer leg is plus (the anode) and the shorter leg is minus (the cathode). Plug it in backwards and it will not light. Second, if you forget the resistor, the LED burns out or the MCU pin is damaged. The answer to "why insert a resistor?" is precisely this current limiting.
Button Input and Pull-Up / Pull-Down Resistors
FingerScore senses finger gestures with a sensor, but during development we often test input with a simple button. Connecting a button straight to an MCU pin causes another problem, because while the button is not pressed the pin is left "floating."
A floating pin picks up surrounding electrical noise and wanders arbitrarily between 0 and 1. Then input appears as though it arrived even when you pressed nothing. To prevent this we need a resistor that weakly ties the pin to a stable reference voltage. These are pull-up and pull-down resistors.
- Pull-up resistor: weakly ties the pin toward the supply (3.3V). Normally it reads as 1 (HIGH), and when the button is pressed the pin connects to GND and reads as 0 (LOW).
- Pull-down resistor: weakly ties the pin toward GND. Normally it reads as 0 (LOW), and when the button is pressed it reads as 1 (HIGH).
| Type | Normal state | Button pressed | Resistor placement |
| --- | --- | --- | --- |
| Pull-up | HIGH (1) | LOW (0) | Between pin and supply |
| Pull-down | LOW (0) | HIGH (1) | Between pin and GND |
The most common pull-up button circuit, drawn in ASCII, looks like this.
Pull-Up Button Circuit
3.3V ----[ R1 10k ohm ]----+---- GPIO2 (MCU input)
|
SW1 (button)
|
GND
R1 : pull-up resistor, usually 10k ohm
SW1 : button. Pressing it connects GPIO2 to GND, reading LOW
There is a reason 10k ohm is the usual value. Too small, and pressing the button leaks a large current from supply to GND, wasting power. Too large, and its ability to suppress noise weakens. 10k ohm is a long-proven balance point.
There is good news. Most MCUs have built-in pull-up and pull-down resistors inside the chip, so you can enable them in code and the circuit works without an external resistor. In a small device like FingerScore where you want to reduce the part count, we lean heavily on these internal pull-ups. That said, internal pull-ups are not precise in value and are usually large (tens of k ohm), so in noisy environments an external resistor is more stable.
Capacitors — Decoupling and Debouncing
The part you meet most often after the resistor is the capacitor. A capacitor stores charge briefly and releases it; in water terms it is a small water tank. When voltage suddenly fluctuates, the tank fills or drains to cushion the shock.
There are two representative uses for capacitors in embedded work.
First, the decoupling (or bypass) capacitor. Chips like an MCU or a sensor draw a sharp burst of current the instant they operate. At that moment the supply voltage dips briefly, but if you place a small capacitor (usually 0.1uF) right next to the chip, that capacitor supplies the momentary current and steadies the voltage. Placing a decoupling capacitor next to the power pin of essentially every chip is the standard practice. Forget it, and the chip occasionally resets or misbehaves for no apparent reason.
Decoupling Capacitor Placement
3.3V ----+-------------- VCC (chip power pin)
|
C1 0.1uF
|
GND -----+-------------- GND
C1 : decoupling capacitor, as close as possible to the chip power pin
Second, debouncing. A mechanical button bounces its contacts several tiny times the instant it is pressed. As a result, one press is read by the MCU as several presses. Attaching a small capacitor to the button pin smooths out this bounce into one clean signal. In practice, however, software debouncing (ignoring repeated input within a set window in code) is used more than hardware debouncing. FingerScore gesture recognition is, in the end, also a matter of cleaning up signals in software.
| Use | Capacitor value | Placement | Effect |
| --- | --- | --- | --- |
| Decoupling | 0.1uF | Next to chip power pin | Voltage stabilization |
| Bulk decoupling | 10uF or more | At the supply entry | Absorbs large current swings |
| Debouncing | 0.1uF | Between button pin and GND | Smooths contact bounce |
Voltage Divider — Splitting Voltage with Two Resistors
Sometimes you need to drop a voltage by half, or to a specific ratio. For example, if you want to measure a battery voltage (3.7V) with the MCU ADC but the ADC input limit is 3.3V, you must lower the voltage a bit before feeding it in. The simplest circuit for this is the voltage divider. You place two resistors in series and tap the voltage from between them.
Voltage Divider
Vin ----[ R1 ]----+----[ R2 ]---- GND
|
Vout (between R1 and R2)
Vout = Vin * R2 / (R1 + R2)
If R1 and R2 are equal, Vout is exactly half of Vin. By adjusting the ratio you can make the voltage you want. For example, to halve 3.7V to about 1.85V, use two resistors of the same value.
Vout = 3.7 * 10k / (10k + 10k)
Vout = 3.7 * 0.5
Vout = 1.85V
A caution: a voltage divider always leaks current through R1 and R2 to GND, so it consumes power. In a battery device we take the resistor values high (tens of k ohm or more) to reduce this loss. Also, drawing a large current from the divider output collapses the ratio, so use a divider only for "reading a signal" (such as ADC measurement) and never for "supplying power."
Digital and Analog — Two Different Worlds
Let me pause to organize the big picture. There are broadly two kinds of electronic signal.
- Digital signal: it takes only two values, 0 and 1. More precisely, LOW (near 0V) and HIGH (near the supply voltage). On/off information such as whether a button is pressed or whether to turn an LED on or off is digital. It is robust against noise and precise.
- Analog signal: it can take any continuous value from 0V up to the supply voltage. Information that represents a "degree," such as temperature, brightness, microphone sound, or remaining battery charge, is analog.
The MCU is a part of the digital world. Internally it handles only 0 and 1. So to read analog information (such as a fine change in battery voltage), it needs a converter that turns analog into digital, which is the ADC described later.
| Aspect | Digital | Analog |
| --- | --- | --- |
| Values | Two: 0 or 1 | Any continuous value |
| Examples | Button, LED on/off | Temperature, brightness, battery voltage |
| Noise tolerance | Strong | Weak |
| MCU handling | Handled directly | Converted via ADC first |
GPIO — The Connection Between the MCU and the Outside World
GPIO stands for General Purpose Input/Output, the general-purpose I/O pins. Among the legs on the MCU, these are the pins we can freely control in code. From a software view, a GPIO is like a particular bit in memory. Write a 1 to that bit and the pin goes HIGH; write a 0 and it goes LOW. Conversely, read that bit and you learn whether the pin is currently HIGH or LOW.
A GPIO is configured in one of two directions (modes).
- Output mode: the MCU drives a voltage onto the pin. Use it to turn on an LED or send a signal to another chip. Write HIGH in code and the pin outputs 3.3V; write LOW and it outputs 0V.
- Input mode: the MCU reads the voltage on the pin. Use it to read a button state or a digital output from a sensor.
In pseudocode it looks like this.
// Turn on an LED with GPIO output
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, HIGH); // LED on
digitalWrite(LED_PIN, LOW); // LED off
// Read a button with GPIO input (using internal pull-up)
pinMode(BUTTON_PIN, INPUT_PULLUP);
int state = digitalRead(BUTTON_PIN);
// With pull-up, normally HIGH, LOW when pressed
if (state == LOW) {
// the button is pressed
}
There is a limit you must always remember with GPIO. The current a pin can drive has an upper bound (usually tens of mA per pin). Connect a load beyond this limit directly (such as a motor or several strong LEDs) and the pin is damaged. Large loads must be controlled through a transistor or a dedicated driver chip. Something as small as a FingerScore indicator LED is fine to drive directly from GPIO as long as you include a proper current-limiting resistor.
Logic Levels — The World of 3.3V and 5V
In digital signaling, the reference voltage that separates HIGH from LOW is called the logic level. But this reference differs from chip to chip. Older chips like the Arduino Uno use 5V logic, while modern low-power MCUs, BLE chips, and most sensors use 3.3V logic. FingerScore uses 3.3V logic by default, for battery efficiency and BLE chip compatibility.
Rough thresholds in 3.3V logic look like this.
3.3V Logic Levels (approximate)
Read as HIGH : about 2.0V or above
Read as LOW : about 0.8V or below
Ambiguous : 0.8V to 2.0V (indeterminate, to be avoided)
An important caution follows here. Connecting a 5V signal directly to the pin of a 3.3V chip can damage the 3.3V chip, because a 3.3V chip is not designed to tolerate a voltage higher than its own supply. Conversely, sending a signal from 3.3V to a 5V chip is usually fine (3.3V exceeds the 5V chip HIGH threshold). When mixing chips of different logic levels, use a converter part called a level shifter.
Fortunately, FingerScore unifies the MCU, the IMU sensor, and the BLE on the 3.3V family, so no level shifter is needed. Unifying the operating voltage when choosing parts is a key trick for keeping a circuit simple.
I2C, SPI, UART — How Chips Talk to Each Other
The core function of FingerScore is reading hand motion with an IMU (accelerometer plus gyroscope) sensor. But how do the MCU and the IMU sensor exchange data? You cannot convey complex sensor values by sending only 0 and 1 over a single pin. So we use digital communication protocols that bundle several pins and communicate by an agreed set of rules. The three used most in embedded work are I2C, SPI, and UART.
- I2C: connects several chips with just two wires (SDA for data, SCL for clock). Each chip has a unique address, and when the MCU calls an address, only that chip responds. With few wires the wiring is simple, and it is used most for connecting sensors. Speed is moderate and distance is short. The FingerScore IMU is most comfortably connected over I2C.
- SPI: uses four or more wires (MOSI, MISO, SCK, CS) but is much faster than I2C. Used for sensors, displays, or memory that need high-speed data. With many wires the wiring is complex.
- UART: communicates one-to-one between two devices over two wires (TX for transmit, RX for receive). It has no address concept and is simple. Used heavily for GPS modules, serial output for debugging, and communication between modules.
Comparing the three protocols looks like this.
| Protocol | Wire count | Multiple devices | Speed | Main use |
| --- | --- | --- | --- | --- |
| I2C | 2 (SDA, SCL) | Yes (address based) | Moderate | Connecting sensors |
| SPI | 4 or more | Yes (per CS pin) | Fast | High-speed sensors, displays |
| UART | 2 (TX, RX) | One-to-one only | Moderate | GPS, debug, module comms |
The wiring to connect an IMU over I2C, drawn in ASCII, looks like this.
I2C Connection (MCU and IMU sensor)
3.3V ----+----[ R1 4.7k ]----+
| |
| +-------------+----- SDA ---- MCU GPIO (SDA)
| |
+-----|----[ R2 4.7k ]----+
| |
IMU +----- SCL ---- MCU GPIO (SCL)
|
GND ---- GND
R1, R2 : I2C pull-up resistors (usually 4.7k ohm)
IMU : accel/gyro sensor, has an I2C address
Remember that in I2C a pull-up resistor (usually 4.7k ohm) is needed on each of the two lines, SDA and SCL. I2C only pulls a pin LOW, so to keep it normally HIGH there must be a pull-up. Many sensor boards already have these pull-ups mounted, so check the datasheet.
ADC — Turning Analog into Numbers
We separated digital and analog earlier. The MCU is a part of the digital world, so it cannot directly understand an analog voltage. To read an analog value you need an ADC (Analog to Digital Converter). The ADC slices the input voltage into fixed steps and turns it into a number.
The key concept of an ADC is resolution. For example, a 10-bit ADC divides the range from 0V to the reference voltage into 1024 steps (2 to the 10th power). A 12-bit ADC divides it more finely into 4096 steps.
ADC Conversion (10-bit, reference voltage 3.3V example)
digital_value = (Vin / Vref) * (2^bits - 1)
Vin : input voltage to measure
Vref : reference voltage (e.g., 3.3V)
bits : resolution (e.g., 10)
e.g.) Vin = 1.65V, Vref = 3.3V, 10-bit
digital_value = (1.65 / 3.3) * 1023
digital_value = 0.5 * 1023
digital_value = about 511
So when the input voltage is exactly half of the reference voltage, a 10-bit ADC returns the number about 511. A representative use of the ADC in FingerScore is measuring remaining battery charge. After lowering the battery voltage with a voltage divider so it falls within the ADC input range, we convert the number read by the ADC back to a voltage and compute what percentage of battery remains.
Signal Measurement — Multimeter and Oscilloscope
As you build circuits, the moment inevitably comes when you must check, "Is this actually working right now?" Just as you use a debugger and logs in software, in hardware you use measurement instruments. The two most important for a beginner are the multimeter and the oscilloscope.
The multimeter is the basic tool of electronics. The three measurements you make most often are these.
- Voltage measurement: place the probes across two points and read the voltage. Confirm "does the 3.3V pin really put out 3.3V," or "how much battery voltage is left."
- Continuity check: it beeps to tell you whether two points are electrically connected. Essential for checking whether a solder joint is good, whether there is a break, or whether there is a short.
- Resistance measurement: read a resistance value. Check whether you inserted a part backwards or whether the value is correct.
The oscilloscope is an instrument that shows the change in voltage over time as a graph. A multimeter tells you only "the voltage at this instant," but an oscilloscope shows "how the voltage fluctuates over time" as a waveform. It is essential for dynamic problems such as whether I2C communication is happening correctly, how bad the button bounce is, or whether the shape of a signal is normal. A beginner does not need to buy an expensive oscilloscope right away; getting comfortable with the multimeter first is plenty.
| Instrument | What it shows | Typical use | Beginner priority |
| --- | --- | --- | --- |
| Multimeter | Instant voltage, continuity, resistance | Wiring check, voltage check | Essential (first) |
| Oscilloscope | Waveform over time | Comms signals, bounce analysis | Later |
Reading Circuit Symbols — The Language of Schematics
To buy parts and build a circuit by following along, you need to be able to read a schematic. A schematic is a drawing that represents parts with agreed symbols. Drawing symbols in text is hard, but the meanings of the symbols you see often, organized into a table, look like this.
| Part | Symbol description | Label convention |
| --- | --- | --- |
| Resistor | Zigzag or rectangle | R1, R2 |
| Capacitor | Two parallel lines | C1, C2 |
| LED | Triangle with two arrows | LED1 |
| Diode | Triangle and a bar | D1 |
| Battery | Alternating long and short lines | BAT |
| Chip/MCU | Rectangle with pin numbers | U1, MCU |
| Ground (GND) | Horizontal lines shrinking downward | GND |
The most confusing part of a schematic is GND (ground) and power. On a schematic, think of every GND symbol as actually being the same single point. Rather than wiring lines one by one, scattering GND symbols here and there means they are all connected. Power (such as 3.3V) is likewise treated as connected among matching labels. Knowing this convention makes even a complex-looking drawing far easier to read.
First Circuit Exercise — Lighting an LED with a Button
Let me tie everything we have learned into one circuit: a simple "press the button and the LED lights" circuit. It is also the smallest possible form of the FingerScore input-and-response flow. The parts are an MCU, a button (SW1), an LED (LED1), and a current-limiting resistor (R1); for the pull-up we use the MCU internal feature.
Button-Lights-LED Circuit
3.3V ---------------------+
|
[ R2 270 ohm ]
|
LED1 (long leg = +)
|
GPIO4 ---- MCU (output)
GPIO2 ---- MCU (input, internal pull-up)
|
SW1 (button)
|
GND
R2 : LED current-limiting resistor
LED1 : indicator LED
SW1 : input button
GPIO2: button input pin (internal pull-up)
GPIO4: LED control pin (output)
The operating code, in pseudocode, looks like this.
// Control an LED from button input
void setup() {
pinMode(BUTTON_PIN, INPUT_PULLUP); // internal pull-up: normally HIGH
pinMode(LED_PIN, OUTPUT);
}
void loop() {
int pressed = (digitalRead(BUTTON_PIN) == LOW); // LOW when pressed
if (pressed) {
digitalWrite(LED_PIN, HIGH); // LED on
} else {
digitalWrite(LED_PIN, LOW); // LED off
}
}
This one small circuit contains almost all of the core of this article. GPIO input (button), internal pull-up (prevents floating), GPIO output (LED), current-limiting resistor (prevents overcurrent). Once you build this pattern by hand once, the rest is just application.
Common Mistakes Beginners Make
Finally, let me collect the mistakes a beginner almost inevitably makes at least once. Knowing them in advance can greatly cut your debugging time.
- Forgetting the current-limiting resistor. Wiring an LED or chip pin straight to power and burning it out with overcurrent. On outputs, always suspect a missing resistor.
- Not tying GND in common. If several parts do not share the same GND, the signal reference is misaligned and behavior goes wrong. The GND of every part must gather to one point.
- Mixing logic levels. Feeding a 5V signal into a 3.3V pin and ruining the chip. Unify the operating voltage of parts, or use a level shifter.
- Forgetting the decoupling capacitor. The chip occasionally resets for no reason. Make it a habit to place 0.1uF next to the chip power pin.
- Inserting an LED or diode with reversed polarity. It will not light. The long leg is plus.
- Ignoring a pin current limit. Driving a large load like a motor directly from GPIO and burning the pin. Route large loads through a transistor.
- Misreading breadboard wiring. Getting confused about how a breadboard rows and columns connect, breaking the circuit. Check with the multimeter continuity function.
Checking just this list can prevent half the failures of your first circuit.
Closing — Preview of the Next Article
In this article we learned the basic language of electronics needed to build the FingerScore ring. We went around once through voltage, current, and resistance, Ohm law, LED current calculation, pull-up and pull-down resistors, capacitors, voltage division, digital and analog, GPIO and logic levels, I2C/SPI/UART, ADC, and measurement tools like the multimeter and oscilloscope. We wrapped up with how to read a schematic and a button-LED exercise, and I hope the once-abstract parts have become a little more tangible.
In the next article we step up one level and cover the MCU firmware that actually runs on top of this circuit. We read accelerometer and angular-velocity data from the IMU sensor over I2C, clean up that signal, and implement a basic algorithm that recognizes a "scoring gesture." It is the stage where we first breathe the life of software into the hardware. We will follow together how the GPIO, I2C, and digital-signal concepts learned here come alive directly as code.
References
- SparkFun Electronics learning resources: https://learn.sparkfun.com
- Adafruit Learning System: https://learn.adafruit.com
- All About Circuits textbook: https://www.allaboutcircuits.com
- Texas Instruments technical documents: https://www.ti.com
- Nordic Semiconductor (BLE chip maker): https://www.nordicsemi.com
- Ohm law (Wikipedia): https://en.wikipedia.org/wiki/Ohm%27s_law
- I2C bus explanation (Wikipedia): https://en.wikipedia.org/wiki/I%C2%B2C
현재 단락 (1/246)
In the first article of the FingerScore series, we sketched the big picture of the product: a BLE ri...