Atahan GüneyEEE

Lab notebookLaboratuvar defteri

NotesNotlar

The concepts I had to understand properly to build the projects on this site, written the way I would explain them to a classmate. Each note says where I used it.

Bu sitedeki projeleri yapabilmek için düzgünce anlamam gereken kavramlar; bir sınıf arkadaşıma anlatır gibi yazdım. Her notta onu nerede kullandığım da yazıyor.

EM

Skin depthDeri kalınlığı (skin depth)

δ = 1 / √(π f μ σ)

In a good conductor an AC field decays exponentially with depth; δ is where it drops to 1/e. In copper at 50 Hz it is about 9 mm, at 1 GHz about 2 µm, which is why high-frequency current only uses the surface of a wire.

İyi bir iletkende AC alan derinlikle üstel olarak sönümlenir; δ, alanın 1/e'ye düştüğü derinliktir. Bakırda 50 Hz'te yaklaşık 9 mm, 1 GHz'te ise yaklaşık 2 µm'dir. Yüksek frekanslı akımın telin sadece yüzeyini kullanmasının sebebi bu.

used inkullanıldığı yer: ElectroField

EM

Propagation constantYayılma sabiti

γ = α + jβ = √(jωμ(σ + jωε))

α tells how fast a wave loses amplitude (Np/m), β how fast its phase turns (rad/m). Picking the root with α ≥ 0 is what makes the wave decay instead of grow, a detail that is easy to get wrong in code.

α dalganın genliğini ne kadar hızlı kaybettiğini (Np/m), β ise fazının ne kadar hızlı döndüğünü (rad/m) söyler. Dalganın büyümek yerine sönümlenmesini sağlayan, α ≥ 0 olan kökü seçmektir; kodda kolayca yanlış yapılabilen bir detay.

used inkullanıldığı yer: ElectroField

EM

Reflection coefficient & VSWRYansıma katsayısı ve VSWR

Γ = (ZL − Z0) / (ZL + Z0) · S = (1 + |Γ|) / (1 − |Γ|)

If the load does not match the line, part of the wave comes back and forms a standing wave. Γ = 0 means a perfect match, |Γ| = 1 means everything is reflected (short, open or pure reactance).

Yük hatla uyumlu değilse dalganın bir kısmı geri döner ve duran dalga oluşturur. Γ = 0 mükemmel uyum, |Γ| = 1 ise her şeyin yansıması demektir (kısa devre, açık devre ya da saf reaktans).

used inkullanıldığı yer: ElectroField, and the 404 pageve 404 sayfası

EM

Input impedance of a lineHattın giriş empedansı

Zin = Z0 (ZL + jZ0 tan βl) / (Z0 + jZL tan βl)

A piece of line transforms the load impedance. A quarter-wave line (βl = π/2) turns ZL into Z0²/ZL, so a short becomes an open. This is a good test case because the answer is known.

Bir hat parçası yük empedansını dönüştürür. Çeyrek dalga boyu bir hat (βl = π/2), ZL'yi Z0²/ZL'ye çevirir; yani kısa devre açık devre olur. Cevabı bilindiği için iyi bir test durumu.

used inkullanıldığı yer: ElectroField

EM

Poynting vectorPoynting vektörü

S = E × H · ⟨S⟩ = ½ Re{E × H*}

The direction and density of power flow (W/m²). For a plane wave it points along the propagation direction, which is the arrow in the figure on the home page.

Güç akışının yönü ve yoğunluğu (W/m²). Düzlem dalga için yayılma yönünü gösterir; ana sayfadaki şekilde gördüğünüz ok bu.

used inkullanıldığı yer: ElectroField

EM

Waveguide cut-offDalga kılavuzunda kesim frekansı

fc,mn = (up/2) √((m/a)² + (n/b)²)

A rectangular guide only carries a mode above its cut-off frequency. Below it the field is evanescent and dies out within a short distance. TE₁₀ has the lowest cut-off, fc = up/2a.

Dikdörtgen bir dalga kılavuzu bir modu sadece kesim frekansının üstünde taşır. Altında alan sönümlenen (evanescent) bir alandır ve kısa bir mesafede kaybolur. En düşük kesim frekansı TE₁₀ modundadır: fc = up/2a.

used inkullanıldığı yer: ElectroField

DSP

Exponential moving averageÜstel hareketli ortalama (EMA)

y[n] = α x[n] + (1 − α) y[n−1]

A first-order IIR low-pass with one multiply-add per sample. Smaller α means smoother output and more lag. Its time constant is τ = Ts(1 − α)/α.

Örnek başına bir çarpma-toplama yapan birinci dereceden bir IIR alçak geçiren filtre. Küçük α daha yumuşak çıktı ve daha fazla gecikme demek. Zaman sabiti τ = Ts(1 − α)/α.

used inkullanıldığı yer: SerialScope

DSP

Sampling & aliasingÖrnekleme ve örtüşme (aliasing)

fs > 2 fmax

If a signal has content above fs/2, it shows up as a false lower frequency after sampling, and no filter in software can remove it afterwards. The fix has to come before the ADC.

Bir sinyalin fs/2'nin üstünde bileşeni varsa, örneklemeden sonra sahte ve daha düşük bir frekans olarak görünür ve sonradan hiçbir yazılım filtresi bunu temizleyemez. Çözüm ADC'den önce gelmeli.

used inkullanıldığı yer: SerialScope

DSP

RC low-passRC alçak geçiren filtre

fc = 1 / (2π R C)

The analogue cousin of the EMA. At fc the output is −3 dB, and above it the gain falls by 20 dB per decade. Easy to check in LTspice before building it.

EMA'nın analog akrabası. fc'de çıkış −3 dB'dir, üstünde kazanç dekad başına 20 dB düşer. Kurmadan önce LTspice'ta kontrol etmesi kolay.

used inkullanıldığı yer: labs, LTspicelaboratuvarlar, LTspice

ADC

ADC resolutionADC çözünürlüğü

LSB = Vref / 2N

A 12-bit ADC with a 3.3 V reference has steps of about 0.8 mV. Any error in Vref scales every reading, which matters a lot for small signals such as an on-chip temperature sensor.

3.3 V referanslı 12 bitlik bir ADC'nin adımları yaklaşık 0.8 mV'tur. Vref'teki her hata bütün okumaları ölçekler; bu da çip içi sıcaklık sensörü gibi küçük sinyallerde çok önemlidir.

used inkullanıldığı yer: Pico 2W, sensor readingsPico 2W, sensör okumaları

CV

Eye Aspect RatioGöz En-Boy Oranı (EAR)

EAR = (‖p2−p6‖ + ‖p3−p5‖) / 2‖p1−p4‖

Eye height over eye width from six landmarks. Because it is a ratio, it does not care how far the face is from the camera. It drops towards zero when the eye closes.

Altı noktadan elde edilen göz yüksekliğinin göz genişliğine oranı. Oran olduğu için yüzün kameraya uzaklığını umursamıyor. Göz kapanınca sıfıra doğru düşüyor.

used inkullanıldığı yer: CV-01

CV

Debouncing a detectorBir algılayıcıyı kararlı hale getirmek

alert ⇔ x < thr for N consecutive frames

A single frame can be wrong. Requiring the condition to hold for several frames in a row filters out blinks and detection glitches, the same idea as debouncing a push button.

Tek bir kare yanlış olabilir. Koşulun art arda birkaç kare boyunca sağlanmasını istemek göz kırpmaları ve algılama hatalarını eliyor; bir butonun debounce edilmesiyle aynı fikir.

used inkullanıldığı yer: CV-01, CV-02

CV

Pixel to actuator mappingPikselden eyleyiciye eşleme

θ = x / W · 180°

A linear map from image coordinates to a physical range. Clamping the result and smoothing it keeps a jittery detection from shaking the motor.

Görüntü koordinatlarından fiziksel bir aralığa doğrusal eşleme. Sonucu sınırlamak ve yumuşatmak, titreyen bir algılamanın motoru sallamasını engelliyor.

used inkullanıldığı yer: CV-02

BUS

UART framingUART çerçeveleme

8N1 → 10 bits/byte · 115200 baud ≈ 11.5 kB/s

Each byte is sent with a start and a stop bit, so the real throughput is baud/10. UART has no idea of messages, only bytes; a newline or another delimiter is what turns a byte stream into lines you can parse.

Her byte bir başlangıç ve bir bitiş biti ile gönderilir, yani gerçek veri hızı baud/10'dur. UART mesaj kavramını bilmez, sadece byte bilir; byte akışını ayrıştırılabilir satırlara çeviren şey satır sonu ya da başka bir ayraçtır.

used inkullanıldığı yer: SerialScope, CV-02

BUS

I²C

SDA + SCL · open-drain · 7-bit address

Two shared lines, pulled up by resistors, with every device listening for its own address. Missing pull-ups or a wrong address are the two usual reasons a display stays black. Scanning the bus first saves time.

Dirençlerle yukarı çekilmiş iki ortak hat; her cihaz kendi adresini dinliyor. Eksik pull-up'lar ya da yanlış adres, bir ekranın siyah kalmasının en yaygın iki sebebi. Önce hattı taramak zaman kazandırıyor.

used inkullanıldığı yer: IOT-01

RF

BLE GATT

service → characteristic → value

BLE devices do not stream like a serial port. They expose small values (characteristics) grouped into services, and the other side reads, writes or subscribes to them. The default payload is small, about 20 bytes.

BLE cihazları seri port gibi sürekli veri akıtmaz. Servislerde gruplanmış küçük değerler (karakteristikler) sunarlar; karşı taraf bunları okur, yazar ya da bunlara abone olur. Varsayılan veri yükü küçüktür, yaklaşık 20 byte.

used inkullanıldığı yer: IOT-01

PWM

Servo control signalServo kontrol sinyali

50 Hz · 1–2 ms pulse ↔ 0–180°

A hobby servo reads the width of a pulse, not a voltage level. The period stays at 20 ms and only the high time changes. Under load it draws much more current than a logic pin can give.

Hobi servosu bir gerilim seviyesini değil, darbenin genişliğini okur. Periyot 20 ms'de sabit kalır, sadece yüksek kalma süresi değişir. Yük altında bir lojik pinin verebileceğinden çok daha fazla akım çeker.

used inkullanıldığı yer: CV-02

PWR

Relays & load isolationRöleler ve yük izolasyonu

GPIO → transistor → coil · flyback diode

A GPIO pin cannot drive a relay coil directly. A transistor switches the coil, and a diode across the coil absorbs the voltage spike when it turns off. Relay modules usually include both.

Bir GPIO pini röle bobinini doğrudan süremez. Bobini bir transistör anahtarlar, bobine paralel bir diyot da kapanma anındaki gerilim sıçramasını sönümler. Röle modüllerinde genelde ikisi de bulunur.

used inkullanıldığı yer: IOT-02

BENCH

Breadboard → perfboardBreadboard → perfboard

jumpers → soldered joints · plan the layout first

Breadboards are fast to change but their contacts loosen and long jumpers pick up noise. Moving a working circuit to perfboard makes it permanent; drawing the layout on paper first saves a lot of desoldering.

Breadboard'lar hızlı değiştirilebilir ama kontakları gevşer ve uzun jumper kablolar gürültü toplar. Çalışan bir devreyi perfboard'a taşımak onu kalıcı yapar; yerleşimi önce kağıda çizmek çok fazla lehim sökmekten kurtarır.

used inkullanıldığı yer: hardware buildsdonanım projeleri

THERMAL

Self-heating & thermal time constantKendi kendine ısınma ve ısıl zaman sabiti

ΔT = P · Rθ · (1 − e−t/τ)

A chip under load settles above room temperature by roughly power × thermal resistance, and it gets there with a time constant, like an RC circuit charging. Logging CPU and room temperature together makes both visible.

Yük altındaki bir çip, oda sıcaklığının yaklaşık güç × ısıl direnç kadar üstüne oturur ve oraya, şarj olan bir RC devresi gibi, bir zaman sabitiyle ulaşır. CPU ve oda sıcaklığını birlikte kaydetmek ikisini de görünür kılar.

used inkullanıldığı yer: IOT-02

NET

Outbound-only IoT controlSadece dışa açılan IoT kontrolü

device → HTTPS poll → bot API · check chat ID

If the device asks a server for commands instead of waiting for incoming connections, no router ports need to be opened. It still needs a whitelist so that only the owner can send commands.

Cihaz gelen bağlantıları beklemek yerine bir sunucuya komut sorarsa modemde port açmaya gerek kalmaz. Yine de sadece sahibinin komut gönderebilmesi için bir izin listesi gerekir.

used inkullanıldığı yer: IOT-02

SW

Producer–consumer threadsÜretici-tüketici thread'ler

reader thread → deque(maxlen) → GUI timer

Blocking I/O goes in its own thread, the GUI keeps its own, and a bounded buffer sits between them. The GUI never waits, and memory stays flat during long sessions.

Bloklayan G/Ç işlemleri kendi thread'inde, arayüz de kendi thread'inde çalışır; aralarında sınırlı bir tampon durur. Arayüz hiç beklemez ve uzun oturumlarda bellek sabit kalır.

used inkullanıldığı yer: SerialScope

SW

Python in WebAssemblyWebAssembly'de Python

Pyodide = CPython → WASM (+ NumPy, SciPy)

Lets the same Python package run on a server and in the browser. The price is a large first download; after that the page works without a backend.

Aynı Python paketinin hem sunucuda hem tarayıcıda çalışmasını sağlar. Bedeli büyük bir ilk indirme; sonrasında sayfa bir backend olmadan çalışır.

used inkullanıldığı yer: ElectroField

TEST

Independent verificationBağımsız doğrulama

method A ≈ method B (within tolerance)

Testing a numerical result against the same formula proves nothing. A second method that shares no code (a matrix cascade, a power balance, a residual in the original equation) catches real mistakes. Limiting cases such as σ → 0 are cheap and very effective tests.

Sayısal bir sonucu aynı formülle test etmek hiçbir şey kanıtlamaz. Kod paylaşmayan ikinci bir yöntem (matris kaskadı, güç dengesi, orijinal denklemdeki artık) gerçek hataları yakalar. σ → 0 gibi limit durumları ucuz ve çok etkili testlerdir.

used inkullanıldığı yer: ElectroField