Table of Contents

;-- mode: Org; fill-column: 120;--

https://dip8.ru vitalij@gmx.com ckn3xp25q8TWUfOlhoOHL Заказ №144988 от 31.01.2022, 2 товара на сумму 2 846.28 руб. https://tmelectronics.ru

AC power (active power) or Instantaneous power or real power or just power

Voltage

Printed circuit board(PCB) -

1. SD card

https://www.kingston.com/unitedstates/en/solutions/personal-storage/memory-card-speed-classes

higher - lower

Speed Class 10 10 10 10 6 4 2
UHC CLass 3 1 3 1      
Video Speed Class V90 v60 V30 V10 V6    

2. battery

Lithium ion or LiON

Memory effect

  • plugged onto the charger long after it has been fully charged
  • undercharging
  • charging before the battery is fully drained

Shallow cycling

  • without allowing it to reach full charge status

Cycle life - Laptop batteries have a finite lifespan

Keep Your Laptop Cool

  • Lithium-ion batteries perform best when their temperature is between 15 °C and 35 °C
  • When their temperature gets too low, their capacity is reduced
  • When their temperature gets too high, a thermal failure may occur.

Charge Between 30% and 80%

  • ithium-ion batteries shouldn’t be charged above 80% and discharged below 30% of their maximum capacity to increase their lifespan.
  • manually limit battery charging using TLP:
    • su -c 'echo 80 > /sys/class/power_supply/BAT0/charge_stop_threshold'

bad!!!!

  • Take your laptop with your every day to school or work and use it until there’s no juice left.
  • Take the fully discharged laptop home and use it for the rest of the day while it’s connected to a charger.
  • Leave the laptop charging over night so that it’s charged to 100% next morning.

battery has deteriorated so far (capacity). - compare the energy-full and energy-full-design

3. terms

Alternating current (AC) - переменный ток Direct current (DC) - постоянный ток

  • insulating [ˈɪnsjʊleɪtɪŋ] - изоляционный
  • insulator [ˈɪnsjʊleɪtə] or dielectric [daɪɪˈlektrɪk] - изолятор или диэлектрик (используется для подчёркивания способности материала к накоплению энергии посредством поляризации - polarisability.)
  • conductive [kənˈdʌktɪv] - проводящий
  • conductor [kənˈdʌktə] - проводник
  • soldering - пайка, спаивание
  • integrated circuit [ˈɪntɪgreɪtɪd ˈsɜːkɪt] or chip or microchip - интегральная схема, микросхема
  • Surface-mount technology (SMT) -
  • Capacitor [kəˈpæsɪtə] - Конденсатор
  • breadboard[ˈbredbɔːd] - Макетная плата
  • terminal [ˈtɜːmɪnl] - клемма, соединение
  • supply voltage
  • current [ˈkʌrənt] - ток flow from the negative to the positive polarity of the voltage
  • load [ləʊd] - нагрузка типа лампочки bulb
  • to secure to a PCB - прикреплять, запаивать
  • soldering - пайка solderless - беспаячный
  • pin is to refer to electrical contacts of, specifically, the male gender
  • Pinout - cross-reference between the contacts, or pins and their functions. no gender or female

4. circuit

  • open/short circuits - electric circuit in which current does not flow or does flow

5. Printed circuit board or PBC

  • sandwich structure of conductive and insulating layers

for

  • to affix electronic components
  • to provide reliable electrical connections (and also reliable open circuits) between the component's terminals

6. Integrated circuit or chip or ICs

  • smaller, faster, and less expensive than those constructed of discrete electronic components
  • metal–oxide–silicon (MOS)
  • die - small block of semiconducting material on which a given functional circuit is fabricated - wafer is cut (diced) into many pieces, each containing one copy of the circuit. Each of these pieces is called a die.
  • most dies are packaged in various forms.

6.1. Pinout - cross-reference between the contacts, or pins and their functions

  • Цоколёвка («распино́вка»), или разво́дка вы́водов
  • basing diagram
  • на схеме сторона помечается кружочком или выемкой
  • обычно берется сторона где надписи и поворачивается по часовой на 45

нумерация

  • 1 4
  • 2 5
  • 3 6

6.2. packages

  • Integrated circuits are put into protective packages https://en.wikipedia.org/wiki/List_of_integrated_circuit_packaging_types
    • Through-hole packages - uses holes drilled through the PCB for mounting the components.
      • dual in-line package (DIP or DIL) - rectangular housing and two parallel rows of electrical connecting pins
      • Transistor, diode, small-pin-count IC packages
    • Surface mount -Chip on board is a packaging technique that directly connects a die to a PCB, without an interposer or lead frame. surface-mount technology (SMT)
    • Chip carrier - rectangular package with contacts on all four edges.
      • plastic leaded chip carrier (PLCC)
    • Pin grid arrays
    • Flat packages
      • Small outline packages
        • small-outline integrated circuit (SOIC)

Tube package - A tube is a rigid extruded plastic package designed to fit the profile of the part and protect the leads. Tubes ship with the exact number of parts ordered and a rubber plug or plastic peg in each end to prevent the parts from sliding out. Tubes are packaged according to the ESD (ElectroStatic Discharge) and MSL (Moisture Sensitivity Level) protection requirements determined by the manufacturer.

6.3. Dual in-line package

  • DIPn, where n is the total number of pins
  • plastic or ceramic packages
  • secured to a PCB by inserting the pins through holes in the board and soldering them in place
  • can be mounted either by through-hole soldering or in sockets or point-to-point wiring ("dead bug style")

zero insertion force (ZIF) mechanism - type of socket

6.4. In-system programming (ISP)

  • or also called in-circuit serial programming (ICSP)
  • no standard
  • Typically, chips supporting ISP have internal circuitry to generate any necessary programming voltage from the system's normal supply voltage, and communicate with the programmer via a serial protocol.

6.5. Microcontroller MCU for microcontroller unit

  • small computer on a single integrated circuit (IC) chip
  • contains one or more CPUs (processor cores) along with memory and programmable input/output peripherals
  • designed for embedded applications
  • microcontroller is similar to, but less sophisticated than, a system on a chip (SoC). An SoC may include a microcontroller as one of its components

7. FLASH

Non-Volatile and volatile types of flash memory

  • NOR flash
  • NAND flash
  • The connections of the individual memory cells are different Флеш-память различается методом соединения ячеек в масси
  • They differ at the circuit level depending on whether the state of the bit line or word lines is pulled high or low. In NAND flash, the relationship between the bit line and the word lines resembles a NAND gate; in NOR flash, it resembles a NOR gate.
  • The interface provided for reading and writing the memory is different; NOR allows random access, while NAND allows only page access.
  • Main application NAND - File storage NOR - Code execution

8. Coulomb's law

Закон Кулона

  • Сила взаимодействия двух точечных зарядов в вакууме направлена вдоль прямой, соединяющей эти заряды, пропорциональна их величинам и обратно пропорциональна квадрату расстояния между ними. Она является силой притяжения, если знаки зарядов разные, и силой отталкивания, если эти знаки одинаковы.

9. Capacitor

From Coulomb's law a charge on one conductor will exert a force on the charge carriers within the other conductor, attracting opposite polarity charge and repelling like polarity charges, thus an opposite polarity charge will be induced on the surface of the other conductor. The conductors thus hold equal and opposite charges on their facing surfaces,[22] and the dielectric develops an electric field.

applications

  • Capacitors are commonly used in electronic devices to maintain power supply while batteries are being changed. (This prevents loss of information in volatile memory.)
  • Reservoir capacitors are used in power supplies where they smooth the output of a full or half wave rectifier. They can also be used in charge pump circuits as the energy storage element in the generation of higher voltages than the input voltage.
  • Power factor correction
  • Suppression and coupling
  • Signal coupling - pass AC but block DC signals

10. TODO induction motor or asynchronous motor - AC electric motor

Variable-frequency drive - systems to control AC motor speed and torque by varying motor input frequency and voltage.

11. Ponoma 5250 Test Clip - For connecting to the bios chip.

  • для соединения с surface mounted SOIC & SOJ chips body width from .150 to 350 wide
  • 8 pins .260 width

11.1. Статическое электричество

Перед тем как приступать к работе с чувствительной электроникой (микросхемы, микроконтроллеры, КМОП-компоненты и т.д.) нужно убрать такой паразитный и не несущий пользы заряд. Для этого достаточно коснуться руками какого-то массивного металлического предмета.

антистатические браслеты - на запястье одной из рук а отвод накопившегося в теле паразитного заряда выполняется через подключенный к ней проводник, соединенный с помощью зажима "крокодильчика" с заземлением.

Важно заметить что соединение "человек-заземление" - не прямое! В разрыве соединения "пластина-заземление" должен присутствовать резистор с сопротивлением в несколько мегаОм. Он необходим для уменьшения силы тока уходящего заряда, а также для безопасности при работе с электронными устройствами, питающимися от потребительской сети переменного напряжения.

11.2. описание

Измерительный клипс SOICO8 Производитель POMONA Модель 5250

  • Совместим с 8-контактными корпусами SMD (150 мил и 200 мил)
  • Идеально подходит для программирования в системе, например, с помощью программатора REVELPROG-IS.
  • совместим с системами в оболочках SO-8 (150 и 200 мил),
  • совместим со всеми программаторами (позолоченные разъемы, растр 2,54 мм), например, с REVELPROG-IS,
  • возможность зажима зажима на распаянной памяти (хотя и не рекомендуется - можно легко повредить контакты памяти и / или пластину зажима).

12. bios chip Macronix MX25L6406EM2I-12G

13. bios chip Winbond 25Q64CVSIG

https://github.com/nenadstoisavljevic/t420-coreboot-guide https://www.instructables.com/Lenovo-T420-Coreboot-WRaspberry-Pi/ https://tomvanveen.eu/flashing-bios-chip-raspberry-pi/ https://nm-projects.de/2017/08/flashing-coreboot-on-the-t430-with-a-raspberry-pi/

coreboot config t440 , cannot boot https://blog.0xcb.dev/lenovo-t440p-coreboot/ t420 config https://www.reddit.com/r/coreboot/comments/fzuzch/t420_coreboot_installation_guide_0_guaranteed/

  • SOP8
  • 3V 64M-BIT / 8M-byte
  • W25Q64CV
  • SERIAL FLASH MEMORY WITH DUAL AND QUAD SPI
  • Standard SPI: CLK, /CS, DI, DO, /WP, /Hold

– Dual SPI: CLK, /CS, IO0, IO1, /WP, /Hold – Quad SPI: CLK, /CS, IO0, IO1, IO2, IO3

1 cs - 24 2 MISO - 21 3 - 4 GND - 25 or 39 5 MOSI - 19 6 CLK - 23 7 - 8 VCC - 17

  • test: flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=2000
  • flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=1500 -c "W25Q64.V" -r factory1.rom
  • flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=2000 -c "W25Q64.V" -r factory2.rom
  • flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=2500 -c "W25Q64.V" -r factory3.rom

14. bios chip Winbond flash chip "W25Q32.V"

  • 4096 kB

15. flashrom

sys-apps/flashrom

read flash at PC:

What can I do about /dev/mem errors?

  • disable CONFIG_IO_STRICT_DEVMEM
  • CONFIG_IO_STRICT_DEVMEM

FLASH:

  • Lower spispeeds will provide you with better reads. However,
  • you can increase `spispeed=128` to a higher value such as
  • 512 for faster reads. An spispeed of 128 takes roughly
  • 10 min per read.

https://www.flashrom.org/RaspberryPi

raspberry bi - enable SPI

16. датчики магнитного поля

  • Геркон
  • Датчик Холла
  • Униполярный – когда сила магнитного поля достигает определенной величины датчик срабатывает. Такие датчики откликаются только на один полюс. Если к датчику поднести магнит другим полюсом, то датчик на него не реагирует. Когда сила магнитного поля снижается датчик возвращается в исходное положение.
  • Биполярный – в этом случае имеет значение полярность магнитного поля. Один полюс включает датчик, другой полюс выключает.
  • Омниполярный датчик Холла – реагирует на любой магнитный полюс. Т.е. любой полюс может включать и выключать датчик. Это может быть, как южный, так и северный полюс.

На два вывода датчика подается питание, которое может быть, как однополярным, так и двуполярным. Третий вывод сигнальный.

17. Raspberry PI

Raspberry Pi 3 Model B Rev 1.2

4× Cortex-A53 1.2 GHz

ARMv8-A Quad Core 1.2GHz Broadcom BCM2837 64bit CPU 1G@LPDDR2

arm7a - 32 mode

BCM2835 Revision : a02082

17.1. install

  1. download OS https://www.raspberrypi.com/software/operating-systems/
  2. check sum
  3. insert usb, lsblk -p
  4. write to SD Card:
    • sudo dd if=2021-10-30-raspios-bullseye-armhf.img of=/dev/sdX bs=4M conv=fsync
    • unzip -p 2021-10-30-raspios-bullseye-armhf.zip | sudo dd of=/dev/sdX bs=4M conv=fsync status=progress
    • Please note that block size set to 4M will work most of the time. If not, try 1M, although this will take considerably longer.
  5. sync

17.1.1. headless setup

17.2. Raspberry Pi OS

  • is a free operating system based on Debian, optimised for the Raspberry Pi hardwar
  • default login and password:
    • pi:raspberry

17.2.1. raspberry commands

  • rpi-update - update your Raspberry Pi OS kernel and VideoCore firmware to the latest pre-release versions.
  • pinout - GPIO refference
  • sudo raspi-config - configuration tool - This may result in automated edits to /boot/config.txt and various standard Linux configuration files.
  • raspinfo - full info

17.2.2. Useful Utilities

  • tvservice - HDMI video and audio.
    • -p, –preferred Power on the HDMI output with preferred settings.
    • -o, –off Powers off the display output.
    • -e, –explicit="Group Mode Drive" Power on the HDMI with the specified settings Group can be one of CEA, DMT, CEA_3D_SBS, CEA_3D_TB, CEA_3D_FP, CEA_3D_FS. Mode is one of the modes returned from the -m, –modes option. Drive can be one of HDMI, DVI.
    • -t, –ntsc Use 59.94Hz (NTSC frequency) rather than 60Hz for HDMI mode.
    • -c, –sdtvon="Mode Aspect [P]" Power on the SDTV (composite output) with the specified mode, PAL or NTSC, and the specified aspect, 4:3, 14:9, 16:9. The optional P parameter can be used to specify progressive mode.
    • -m, –modes=Group where Group is CEA or DMT. Shows a list of display modes available in the specified group.
    • -M, –monitor Monitors for any HDMI events, for example unplugging or attaching.
    • -s, –status Shows the current settings for the display mode, including mode, resolution, and frequency.
    • -a, –audio Shows the current settings for the audio mode, including channels, sample rate and sample size.
    • -d, –dumpid=filename Save the current EDID to the specified filename. You can then use edidparser <filename> to display the data in a human readable form.
    • -n, –name Extracts the display name from the EDID data and shows it.
    • -l, –list Lists all attached displays and their display ID.
    • -v, –device=display Specifies the ID of the device to use; see the output of –list for available IDs.
  • vcgencmd - used to output information from the VideoCore GPU
  • Thonny - Python 3 development environment in REPL (Read-Evaluate-Print-Loop),

17.2.3. apt

  • update:
    • sudo apt update
    • sudo apt full-upgrade
  • Searching for Software:
    • apt-cache search locomotive
  • Installing a Package
    • sudo apt install tree
  • uninstall
    • sudo apt remove tree or sudo apt purge tree

17.3. USECASES

reconnect HDMI

  • uncomment these two lines to /boot/config.txt
    • hdmi_force_hotplug=1

17.3.1. enable ssh

  1. sudo raspi-config
  2. Interfacing Options -> P2 SSH -> YES
  3. sudo systemctl enable ssh
  4. ssh pi@[raspberrypi_ip_address]

17.3.2. increase swap

  • sudo dphys-swapfile swapoff
  • sudo nano /etc/dphys-swapfile
    • CONF_SWAPSIZE=100
  • sudo dphys-swapfile setup - delete the original swap file and recreate it to fit the newly defined size.
  • sudo dphys-swapfile swapon
  • reboot

17.3.3. as a wireless access point

  • Install hostapd and dnsmasq
  • nano /etc/dhcpcd.conf # Configure a static IP for the wlan0 interface
    • interface wlan0
    • static ip_address=192.168.0.10/24
    • denyinterfaces eth0
    • denyinterfaces wlan0
  • Configure the DHCP server (dnsmasq)
    • sudo nano /etc/dnsmasq.conf
      • interface=wlan0
      • dhcp-range=192.168.0.11,192.168.0.30,255.255.255.0,24h
  • Configure the access point host software (hostapd)
    • sudo nano /etc/hostapd/hostapd.conf
      • interface=wlan0
      • bridge=br0
      • hw_mode=g
      • channel=7
      • wmm_enabled=0
      • macaddr_acl=0
      • auth_algs=1
      • ignore_broadcast_ssid=0
      • wpa=2
      • wpa_key_mgmt=WPA-PSK
      • wpa_pairwise=TKIP
      • rsn_pairwise=CCMP
      • ssid=NETWORK
      • wpa_passphrase=PASSWORD
    • sudo nano /etc/default/hostapd
      • DAEMON_CONF="/etc/hostapd/hostapd.conf"
  • Set up traffic forwarding
    • sudo nano /etc/sysctl.conf
      • uncomment net.ipv4.ip_forward=1
  • Add a new iptables rule
    • sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    • sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"
    • /etc/rc.local
      • iptables-restore < /etc/iptables.ipv4.nat
  • Enable internet connection - to build a bridge that will pass all traffic between the wlan0 and eth0 interfaces.
    • sudo apt-get install bridge-utils
    • sudo brctl addbr br0
    • sudo brctl addif br0 eth0
    • sudo nano /etc/network/interfaces
      • auto br0
      • iface br0 inet manual
      • bridge_ports eth0 wlan0

17.4. GPIO and the 40-pin Header

  • pull-up and pull-down resistors ???
  • 3V3 ??
  • GPIO (general-purpose input/output)
  • Any of the GPIO pins can be designated (in software) as an input or output pin and used for a wide range of purposes.
  • Two 5V pins and two 3V3 pins are present on the board, as well as a number of ground pins (0V), which are unconfigurable. The remaining pins are all general purpose 3V3 pins, meaning outputs are set to 3V3 and inputs are 3V3-tolerant.
  • input and outputs can be set to high (3V3) or low (0V).
  • Pins GPIO2 and GPIO3 have fixed pull-up resistors, but for other pins this can be configured in software.
  • In order to use the GPIO ports your user must be a member of the gpio group. pi is already in
  • https://gpiozero.readthedocs.io/ - Python lib for GPIO

GPIO pins functions:

  • I or O
  • PWM (pulse-width modulation)
  • SPI
  • I2C
  • Serial

commands

  • pinout
  • raspi-gpio

17.4.2. safe

https://ph0en1x.net/86-raspberry-pi-znakomstvo-s-gpio-perekluchatel-i-svetodiod.html важно помнить что:

  • Внутренние буферы и ключи, которые подключены к пинам GPIO, НЕ защищены от перегрузки по напряжению и току;
  • Пины питания с выходным напряжением +3.3В можно нагружать током не более 50мА;
  • Пины с выходным напряжением 5В стараемся грузить током не более чем на 500мА (для Model A) и не более чем на 300мА (для Model B) - почему так, расскажу ниже.
  • Перед работой стоит убрать с себя статический заряд, а еще лучше использовать антистатический браслет;
  • Пайку электроники желательно выполнять с отключенным разъемом GPIO (чтобы не было прямого контакта "жало паяльника - пин");
  • Не перегружать пины питания +5В (макс. ток 300-500мА) и +3.3В (50мА), не закорачивать их напрямую с другими пинами;
  • Исключить протекание тока величиной более 8-15мА через пины GPIO;
  • Исключить попадание напряжения выше +3.3В на пины GPIO;
  • Подключать напрямую не более 3х светодиодов (по 2-15мА каждый) к Raspberry Pi;
  • Перед подачей питания на схему и малинку внимательно проверить правильность всех подключений.

18. Banana Pi

Created: 2024-03-03 Sun 09:49

Validate