Thursday, July 29, 2021

Altium impedance setting for differential ,and single ended high speed paths

Example application

HDMI pcb path impedance

  • Each HDMI channel is comprised of 4 TMDS pairs. Each HDMI channel set shall be routed primarily on the top or bottom layer as a group or alternately routed as a group on internal layers. Each TMDS signal shall have a single-ended impedance of 50 Ω ± 10%. Each TMDS pair shall have a differential impedance of 100 Ω ± 5%. 
  • Read more.


Schematic - Set differential pairs in schematic for required nets

  • Use differential pair tool
  • Set label 100Ohm
  • Place them on nets 


Impedance matching/ set impedance to PCB group of paths

  • use the blanket tool in schematic design group signals with the same impedance 30Ohm / 50Ohm
  • Use parameter set
  • Rename Parameter set to 50Ohm
  • Use the blanket tool 
  • Draw a square using a blanket tool around the pins that you need to be 50Ohms
  • Place 50Ohm Parameter set to blanket

PCB Editor 

  • Calculate PCB pathwidth according to required impedance (50Ohm/ 80Ohm/ 100Ohm)
  • Set new rules each nets in Design Rules
  • Set impedance 

Sunday, July 25, 2021

High Speed PCB Component Placement Guide

 

PCB size 

  • Outline of PCB based on Main Components
  • Make sure the selected PCB size can fit components
  • Place Mounting holes
  • Make sure connectors have enough space and there are support mechanical parts

Initial placement 

  • CPU/ Processor
  • User Interfaces
    • Connectors eg DDR4 Connector
    • Type C USB
    • Buttons/ LEDs

  • RAMS Should place near to CPU symmetrically in order to easy signal trace length matching
    • Also consider space required for length matching since  signal trace length matching consumes lot of space 
  • E-MMC
  • WiFI
  • Power 
    • PMIC
    • Buck converters/ Boost

After the above is done start placing the following around the CPU, CPU on the TOP side, following components are on the bottom side of the PCB



  • Bypass caps should be closer to the pad
  • PPU/PD Closer to pad
  • REF as close as possible
  • Series terminations 
  • DC Blocking caps closer
  • Zener diodes closer to pad 
  • Ferrite beads
Will have to perform several component placement iterations even after starting the trace layout.
  • Start placing other connectors HDMI, USB 3.0, Display connectors
  • Place caps /diodes releated to output connectors

Saturday, July 24, 2021

How to use Strain Gauges ?

Strain Guage Calculate Required Gain For Amplifier Circuit

Application

  • Use a Strain Gauge to measure the torque of a rotating shaft


(Image source)

  • Wheatstone bridge circuit is required for this torque measurement
  • Wheatstone bridge configuration
    • Half-bridge  -2 strains sensors and two fixed resistors
    • Full bridge - 4 strains sensors - max range and max accuracy



(Image source)
  • Wheatstone bridge supply voltage
    • Negative and Positive - full range (5V to -5V or +3.3V to -3.3V)
    • Positive and GND (5V to  GND or +3.3V to GND )

 


Let's take a commercial strain gauge from Vishay

Application - max measuring torque 95Nm of the cylindrical shaft

Perform a simulation Ansys to find max stain at 95Nm 

The software tool will need the following in order to perform simulation 

  • Dimensions of shaft
  • Material of shaft
  • Environment temperature etc mechanical details
Max strain at 95Nm was found to be 340 micro stains
  • Deformation 0/0408mm
  • Following calculations can be done based on the above findings in the Ansys software tool

Let's calculate the required gain for above strain range


  • The non-invritng amplifier can provide the gain of 2941, filtering will be required before gaining and after gaining
  • Differential op-amp also can be used to gain 2941, has advantages compared to the non-inverting amplifier - can get a full range of measurement  
  • A tuning circuit to set zero torque offset will be needed. otherwise, at zero torque the Wheatstone bridge will have some voltage difference which leads to less measuring range
                                                                     (Image source)

Tuesday, July 20, 2021

Wi-Fi Module Selection Guide


Following should be considered when selecting a Wifi Module for Electronic Product 

  • Operating Frequency bands
    • 2.4Ghz - 802.11 b/g/n
    • 5Ghz - 802.11 a/h/ac
    • 5.9Ghz -802.11 p
  • Transmission range
    • TX power, power usage
    • Reducing frequency can increase the range same time data rate reduces 
    • Can increase using repeaters (will regenerate the signal if signals are dropped or interfered with environment noises) and range extenders
  • Bandwidth  
    • Raw datarate - raw bit rate
    • User data rate 
    • Idle data rate - max data rate 
  • Embedded  soc chip or external chip
  • Driver support
    • C++libs or API or windows drivers
  • Module 
  • Security Standards
    • Encryption
    • Authentication scheme
    • WEP
    • WPA
    • WPS
    • WMM
  • Interface
    • UART
    • SPI
    • SDIO
    • USB
    • I2C
  • Antenna 
    • Omni direction antenna 360-degree antenna /  smaller range (wifi routers)
    • Directional antenna/ higher range/ transmission selected range 20 degree straight forward 
    • UFL connector with external antenna 
    • PCB antenna
    • SMD antenna chip 
  • Certifications 
    • Country-wise citification  
    • Certifications should be passed according to country standards where the product is going to be sold
    • FCC - USA
    • IC - Canada
    • CE - Europe
  • Available documents
    • Datasheets
    • PCB layout diagrams
    • Hardware design test results
    • Pwer usages/modes related details
  • Suppliers 
    • Component distributors should have selected devices in their stocks
    • Select 2-3 suppliers as a backup if one supplier goes out of stock during production 
  • Usable Applications
    • Automobile
    • Mobile devices
    • Personal electronics
    • Medical grade
    • Health and fitness 
  • Do targeted customers required RoHS confermance?
  • IEEE standards 
    • IEEE 802.11 a/b/g/j/n/p/ac/ad
    • Operating frequency
    • Range
    • Data rate
  • OTP 
    • Over the air program download option
  • Cost 
  • Module size/chip package size
  • Other available options
    • BLE / BT dual mode
    • Dual-band eg - 5Ghz and 2.4Ghz
    • Two-Way
    • One-to-Many
    • Many-to-One
    • Hotspot
    • Soft acees point
  • Manufacturer support
    • Drivers
    • Tutorials
    • User guides
    • Version upgrades
    • Continuous production - the selected wifi device should not be discounted in production
    • Forums 

Saturday, July 3, 2021

What are stitching capacitors and when to use?


Stitching capacitors

Multilayer PCB boards use a stitching capacitor to increase coupling capacitance between ground and power plane 




If planes as above then coupling between power and GND is important

If both middle planes are GND then coupling between them is not important

In the 2nd stack up the gap between GND and power increased compared to the 1st stackeup. there for it reduces coupling between those layers. so that increases impedance between them 

                                                                 C = qA/d

                                             d = gap (0.04 inch 2nd picture )

When d increases C reduces, then impedance increases between layers 

Less impedance is important for the return path of signals

                                                                Z = 1/jwC

Impedance is inversely proportional to capciatance (impedance formula for capacitor)

So that when c reduces impedance increases -> not good for the return path 

Capacitive coupling- in this case, middle layers are in different voltage potential (PwR and GND) then they are coupled capacitive

In this case, can use stitching capacitors between PWR and GND to increase the coupling (capacitive coupling) good for return path, less impedance

stitching capacitor provides a path for the return current to flow back to its source. ... The capacitor would connect between the ground plane and power plane and must be located adjacent to where the signal trace changes reference planes

Decrease in the gap between signal and GND is better --> increases the coupling between signal and ground

As in the below picture Never Cross a Ground Plane Gap in High-Speed PCB Design - use a stitching capacitor to guide return current 

                        


What will affects Return-path?

The common affecting factors of return path are

  1. Slots in Plane layers
  2. Split planes
  3. giving power plane as the reference plane 
  4. Routing with different Reference planes
  5. plane voids
  6. Routing Signals on Plane edges






LeetCode C++ Cheat Sheet June

🎯 Core Patterns & Representative Questions 1. Arrays & Hashing Two Sum – hash map → O(n) Contains Duplicate , Product of A...