Phone

    00852-6915 1330

raspberry Related Articles

Stay Ahead with Expert Electronics Insights,
Industry Trends, and Innovative Tips

IC Chips

ESP32 vs Raspberry Pi: When to Use Each for Your IoT Project

Architectural Strategy Guide: This pragmatic guide covers ESP32 vs Raspberry Pi IoT for prosumers and scaling startup engineers designing production-grade hardware ecosystems.Relying solely on a Raspberry Pi for simple sensor tasks causes rapid battery drain and SD card corruption, while using only an ESP32 limits local machine vision capabilities. The 2026 standard for production-grade IoT is a hybrid architecture. Developers deploy the ESP32 as a deterministic, battery-sipping edge node and the Raspberry Pi 5 as a localized AI gateway. This framework eliminates cloud latency, reduces BOM costs at scale, and ensures graceful degradation during network failures.ESP32 vs Raspberry Pi IoT: The Microcontroller vs. OS DivideHybrid IoT architecture is essential because microcontrollers handle deterministic real-time tasks while single-board computers manage heavy data aggregation. For a broader context, see our Is Raspberry Pi a MCU Uses Analysis.The Car Window RuleBeginners frequently over-complicate simple actuations by deploying full Single-Board Computers (SBCs). Visual stress tests demonstrate a fundamental engineering principle: your car window motor does not need a Linux operating system to roll down. It requires a real-time signal from a microcontroller. Adding an OS introduces 20 to 60 seconds of boot time and creates unnecessary failure points for tasks that only require a continuous code-loop.Jitter vs. DeterminismRelying entirely on a Raspberry Pi for timing-critical tasks, such as motor control or bit-banging protocols, introduces operational risk. Linux task schedulers cause "jitter"—microsecond delays in execution as the OS manages background processes. Conversely, bare-metal execution on the ESP32 guarantees real-time, deterministic GPIO responses. When a sensor detects a threshold breach, the ESP32 triggers the relay instantly, without waiting for an OS scheduler.The Pricing MisconceptionA common consensus among enthusiasts is that the Raspberry Pi remains the default budget board. This is a pricing misconception. While the original Pi launched at $35, high-RAM Raspberry Pi 4 and 5 setups routinely exceed $100. As experts point out, if you just want to make "das blinking lights," raspberry pi vs arduino for diy projects is the correct financial and technical choice.Pro Tip: While many guides suggest using a Raspberry Pi Zero for basic smart home relays, professional workflows actually require ESP32 microcontrollers because sudden power loss corrupts Linux SD cards, whereas bare-metal microcontrollers simply reboot without data loss.The ESP32 at the Edge: Power, Protocols, and PitfallsThe ESP32 is optimal because its bare-metal execution guarantees predictable GPIO responses without operating system overhead.ESP32-C6 Ultra-Low Power Deep Sleep Analysis.Sub-Family Breakdown: C6, H2, and P4The ESP32 is no longer a single chip; it is a highly specialized family of microcontrollers.ESP32-C6: Integrates Wi-Fi 6, Bluetooth 5 LE, Thread, Zigbee, and the Matter protocol.ESP32-H2: Focuses on ultra-low-power Zigbee and Thread networking, omitting Wi-Fi entirely.ESP32-P4: According to the Espressif ESP32-P4 Series Datasheet, this variant features a dual-core RISC-V processor running at 400 MHz and intentionally omits built-in Wi-Fi and Bluetooth to focus entirely on high-performance I/O, edge computing, and human-machine interfaces (HMI).The Deep Sleep AdvantagePower consumption dictates hardware selection at the edge. According to Espressif ESP-IDF Power Management Documentation, ESP32 microcontrollers achieve deep sleep currents ranging from ~2.5 μA to 10 μA, depending on active RTC peripherals. In stark contrast, a Raspberry Pi 5 idles at roughly 3 to 4 Watts.With a deep sleep current of 2.5 μA, an ESP32 can run a remote soil moisture sensor for two years on a single 18650 lithium-ion cell. This means an agricultural engineer can monitor a 50-acre farm without scheduling monthly battery replacements.The Tuya ConnectionIn visual teardowns of retail consumer tech, experts point out that generic smart home devices—such as the Tuya smart bulb module observed at the 10:55 mark of recent hardware analyses—are fundamentally running ESP32 chips or close clones. This validates the ESP32 as the industry standard for commercial edge nodes.Raspberry Pi VS Arduino VS ESP32WARNING: The ESP32 ADC FlawUsers on community forums often report erratic analog sensor readings when using the ESP32. Real-world testing confirms that the ESP32’s built-in Analog-to-Digital Converter (ADC) is slow, low-resolution, and noisy. For high-precision light sensors or response-time testing, developers must integrate a dedicated ADC like the SAMD51, which processes 1 million samples per second.When to Actually Use a Raspberry Pi 5: The AI GatewayThe Raspberry Pi 5 is a localized AI gateway because its PCIe architecture supports high-bandwidth neural processing units. For a historical perspective on the platform, check the Complete Tech Guide of Raspberry Pi in 2021.Raspberry Pi 5 with AI HAT+ and PCIe Expansion.Local AI and Machine VisionThe Raspberry Pi 5 excels at tasks that overwhelm microcontrollers. According to official Raspberry Pi AI Kit documentation, the standard kit utilizes the Hailo-8L NPU to deliver 13 TOPS. However, to achieve 26 TOPS for real-time, non-cloud object detection, developers must use the upgraded Hailo-8 AI HAT+ variant. This allows a local security system to identify faces in real-time without sending video feeds to a cloud server.The PCIe GPU FlexThe Pi 5's PCIe interface transforms it from a hobby board into a localized server. In visual stress tests, engineers successfully mounted a Raspberry Pi Compute Module 5 on a "Sentinel Core" board and connected a full-sized AMD Radeon graphics card via the PCIe slot. As hardware analysts note, Raspberry Pis are "full computers that happen to have an accessible way to control other devices over the GPIO pins."Data Aggregation & Home AssistantConsequently, the Pi 5 serves as the central nervous system of a hybrid architecture. It runs Home Assistant, manages network traffic, and stores heavy SQL database logs that would instantly exhaust an ESP32's flash memory.The 2026 Gold Standard: Designing a Hybrid IoT ArchitectureGraceful degradation is achievable because local edge nodes continue executing basic automations even when the central gateway fails.Achieving "Graceful Degradation"System architecture must account for failure. If the Raspberry Pi 5 gateway crashes or the local router loses internet, a properly designed hybrid system exhibits "graceful degradation." The local ESP32 edge nodes, programmed via ESP-IDF or the Arduino core, continue to operate basic automations (like turning on a relay when a motion sensor triggers) because the logic is processed locally on the bare-metal hardware.The Arduino Abstraction LayerDevelopers streamline hybrid deployments by leveraging the Arduino IDE’s abstraction layer. Functions like digitalWrite execute seamlessly across an ESP32, a Raspberry Pi Pico, or an Atmel chip without requiring developers to rewrite the core logic. For instance, utilizing standardized hardware abstraction simplifies cross-platform deployment, allowing engineers to prototype rapidly before committing to a specific silicon architecture.Scaling to Production: BOM Costs and Compute ModulesBill of Materials cost is decisive because scaling single-board computers drastically reduces profit margins compared to microcontrollers.From Breadboard to 10,000 UnitsPrototyping costs differ vastly from production costs. According to 2026 benchmarks and Raspberry Pi release data, the Compute Module 5 (CM5) released in late 2024 eliminated the 1GB tier and officially starts at $45 for the base 2GB LPDDR4X RAM model.If an engineer scales a smart-thermostat product to 10,000 units, opting for a $5 ESP32 module over a $45 CM5 yields exactly $400,000 in hardware savings.Compute Module EvolutionFor projects that genuinely require Linux at scale, the physical footprint matters. Visual hardware timelines show the transition of Raspberry Pi Compute Modules from the bulky SODIMM (laptop RAM style) socket on the CM3 to the highly compact dual surface-mount connectors used on the CM4 and CM5, enabling denser PCB designs for industrial gateways.Hardware Comparison: ESP32 vs Raspberry Pi 5Hardware selection is critical because power consumption and clock speed dictate the operational boundaries of the deployment.SpecificationESP32-C6 (Edge Node)Raspberry Pi 5 (AI Gateway)ArchitectureSingle-core RISC-V (Bare-metal)Quad-core ARM Cortex-A76 (Linux OS)Clock Speed160 MHz2.4 GHzRAM512 KB SRAM4GB / 8GB LPDDR4XPower Consumption~2.5 μA (Deep Sleep)3 to 4 Watts (Idle)Boot Time< 300 milliseconds20 - 60 secondsPrimary Use CaseBattery-powered sensors, relaysMachine vision, data aggregationConclusion: The Hybrid VerdictThe ESP32 and Raspberry Pi are not competitors; they are complementary pillars of modern IoT design. Use the ESP32 to touch the physical world. Its bare-metal determinism and microamp power draw make it the definitive choice for edge processing and battery-powered sensors. Conversely, use the Raspberry Pi 5 to touch the digital world. Its PCIe bandwidth, AI processing capabilities, and Linux environment make it the ultimate local gateway for data aggregation and machine vision. By networking them together, developers achieve a resilient, cost-effective, and production-ready architecture.Frequently Asked Questions (FAQ)Which board is actually viable for a 24/7 battery-powered monitor?The ESP32 is the only viable option for continuous battery operation. It utilizes a deep sleep mode that draws roughly 2.5 μA, allowing it to run for months or years on a single battery, whereas a Raspberry Pi will drain a standard battery pack in hours.Why should I use an ESP32 if I already know Python and have a Pi Zero W?Using a Pi Zero W for simple GPIO tasks introduces operating system overhead, 30-second boot times, and the risk of SD card corruption upon sudden power loss. The ESP32 executes code instantly on bare-metal hardware, ensuring deterministic reliability.How do I integrate local, non-cloud voice AI without melting my board?To run local AI without thermal throttling or cloud latency, pair a Raspberry Pi 5 with the Hailo-8 AI HAT+. This combination delivers 26 TOPS of processing power, enabling real-time voice and vision processing directly on the local gateway.What causes Raspberry Pi SD card corruption in IoT projects?SD card corruption occurs when a Raspberry Pi loses power while the Linux operating system is actively writing logs or system data to the card. Microcontrollers like the ESP32 avoid this entirely because they do not run a traditional OS.ESP-IDF vs Arduino Core: Which should IoT developers use?Beginners and cross-platform developers should use the Arduino Core for rapid prototyping and hardware abstraction. Professional engineers scaling to production should use ESP-IDF to unlock advanced power management, dual-core task scheduling, and precise memory allocation.
Kynix On 2026-06-20   104
Motors, Solenoids, Driver Boards/Modules

Servo Motors:Control with an Arduino and Raspberry Pi

Introduction In this lesson, we'll look at what a servo motor is and how it works. First, let's define what a servo motor is and look at some of the unique characteristics of the different types of servo motors and their applications. You will also learn how to control Servo Motors with an Arduino and a Raspberry Pi in this blog. Introduction Ⅰ What is a Servo Motor? Ⅱ Servo Motor Related Video: Ⅲ Types of Servo Motors 3.1 AC or DC 3.2 Brushed or Brushless 3.3 Synchronous or Asynchronous Ⅳ Servo Motor Working Principle Ⅴ Applications of Servo Motors Ⅵ Difference Between Stepper Motor and Servo Motor  Ⅶ Servo Motors Control with an Arduino  7.1 Experiment 1 Ⅷ Control with  Raspberry Pi 8.1 PWM (Pulse Width Modulation) 8.2 Components Required 8.3 Circuit Diagram 8.4 Working and Programming Explanation 8.5 Code Ⅸ FAQ   Ⅰ What is a Servo Motor? A servo motor is a self-contained electrical device that rotates machine parts with high efficiency and precision. This motor's output shaft can be moved to a specific angle, position, and velocity that a standard motor cannot. The Servo Motor  combines a standard motor with a sensor to provide positional feedback. The most important component of the Servo Motor  designed and used specifically for this purpose is the controller  . Figure1:Servo Motor      Ⅱ Servo Motor Related Video:   How servo motor works   Servo Motor Video Description: This movie gives an overview of how RC servo motor works and how it's made.   Ⅲ Types of Servo Motors Servo motors are classified into two types based on their application: AC servo motors  and  DC  servo motors. There are three major factors to consider when evaluating servo motors. The first type of consideration is the current type –  AC  or  DC – and the second type of consideration is the type of commutation used, whether the motor uses brushes. The third type of consideration is the motor's rotating field, the rotor, and whether the rotation is synchronous or asynchronous.   3.1 AC or DC Let's start with the first servo consideration. The most fundamental classification of a motor is based on the type of current it will use. When it comes to performance, the primary distinction between  AC and DC motor  s is their inherent ability to control speed. Figure2:DC or AC Servo Motor  With a constant load, the speed of a DC motor  is directly proportional to the supply voltage. The frequency of the applied voltage and the number of magnetic poles determine the speed of an alternating current motor.   Figure3:DC or AC Servo Motor  While both AC and DC motor  s are used in servo systems, AC motors  can handle more current and are more commonly used in servo applications such as robots, in-line manufacturing, and other industrial applications requiring high repetitions and precision.   3.2 Brushed or Brushless The next step is to decide whether to use a brushed or brushless finish. A DC Servo Motor  can be commutated mechanically with brushes, electronically without brushes, or mechanically with a commutator. Brushed motors are less expensive and easier to operate in general, whereas brushless designs are more reliable, have higher efficiency, and are quieter.   Figure4:brushed or brushless Servo Motor  A commutator is a rotary electrical switch that reverses the current direction between the rotor and the drive circuit on a regular basis. It is made up of a cylinder made up of multiple metal contact segments on the rotor. Two or more electrical contacts known as "brushes" made of a soft conductive material such as carbon press against the commutator, making sliding contact with commutator segments as it rotates. Figure5:brushed or brushless Servo Motor  While the majority of servo motors are AC brushless designs, brushed permanent magnet motors are occasionally used as servo motors due to their simplicity and low cost. The permanent magnet DC motor  is the most common type of brushed DC motor  used in servo applications. Figure6:brushed or brushless Servo Motor  Brushless DC motors replace the physical brushes and commutator with an electronic commutation method, typically using Hall effect sensors or an encoder. Figure7:brushed or brushless Servo Motor  AC motors are generally brushless, though some designs do have brushes and are mechanically commutated, such as the universal motor, which can run on either AC or DC power. Figure8:brushed or brushless Servo Motor      3.3 Synchronous or Asynchronous While DC motor  s are generally classified as brushed or brushless, AC motors  are often distinguished by the rotational speed of their synchronous or asynchronous field. If we recall from the AC-DC discussion, the frequency of the supply voltage and the number of magnetic poles determine the speed of an AC motor. This speed is known as the synchronous speed. As a result, in a synchronous motor, the rotor rotates at the same rate as the rotating magnetic field of the stator. Figure9:synchronous or asynchronous Servo Motor  In an asynchronous motor, also known as an induction motor, the rotor rotates at a slower rate than the stator's rotating magnetic field. However, the speed of an asynchronous motor can be varied using a variety of control methods, including changing the number of poles and changing the frequency, to name a few. Figure10:synchronous or asynchronous Servo Motor      Ⅳ Servo Motor Working Principle A servo is made up of a motor (either DC or AC), a potentiometer, a gear assembly, and a control circuit. First and foremost, we use gear assembly to reduce RPM and increase motor torque. Assume that at the initial position of the servo motor shaft, the position of the potentiometer knob is such that no electrical signal is generated at the potentiometer's output port. An electrical signal is now applied to the error detector amplifier's other input terminal. The difference between these two signals, one from the potentiometer and one from other sources, will now be processed in a feedback mechanism and output will be provided in the form of an error signal. This error signal serves as the motor's input, and the motor begins to rotate. The motor shaft is now connected to the potentiometer, and as the motor rotates, so does the potentiometer, generating a signal. As a result, as the potentiometer's angular position changes, so does its output feedback signal. After a while, the position of the potentiometer reaches a point where the output of the potentiometer is the same as the external signal provided. There will be no output signal from the amplifier to the motor input because there is no difference between the externally applied signal and the signal generated at the potentiometer in this condition, and the motor will stop rotating. Figure11:synchronous or asynchronous Servo Motor    Ⅴ Applications of Servo Motors Servo Motors are used in a variety of applications, some of which are listed below:In robotics, the servo motor is used to activate movements, giving the arm its precise angle.The servo motor is used to start, move, and stop conveyor belts that transport the product through multiple stages. As an example, consider product labeling, bottling, and packaging.The servo motor is built into the camera to correct a lens and improve out-of-focus images.In a robotic vehicle, the servo motor is used to control the robot wheels, producing enough torque to move, start, and stop the vehicle as well as control its speed.In a solar tracking system, the servo motor is used to correct the angle of the panel so that each solar panel faces the sun.The servo motor is used in metal forming and cutting machines to provide milling machines with precise motion control.Textiles use servo motors to control spinning and weaving machines, knitting machines, and looms.The Servo motor is used in automatic door openers in public places such as supermarkets, hospitals, and theaters to control the door.   Ⅵ Difference Between Stepper Motor and Servo Motor  Comparison Chart Basis for ComparisonStepper MotorServo MotorBasicStepper motor operates in steps.It is continuous operating machine.System configurationOpen loopClosed loopPower requirementMoreComparatively lessDesignSimpleComplexAbility to responseHighComparatively lowCostInexpensiveExpensiveReliabilityMoreLessNoise and vibrationHighComparatively lessOperating speedSlowFastFeedback mechanismNot existExistHeat generationMoreComparatively lessNumber of polesGenerally 50 to 150Around 4 to 12Life spanMoreLessDamage due to overloadLess prone to get damaged.Comparatively more prone to get damaged.Torque producedHighLowEfficiencyLessMoreTolerance towards moment of inertiaHighLowApplicationsIn gaming, textile, welding machineries, medical and 3D printing equipments, etc.In robotics, antenna positioning systems, automatic doors, cameras, remote controlled equipments, etc. Ⅶ Servo Motors Control with an Arduino  You can connect small servo motors directly to an Arduino  to control the shaft position very precisely. Most servo motors have the following three connections: Black/Brown ground wire.Red power wire (around 5V).Yellow or White PWM wire. In this experiment, the power and ground pins will be connected directly to the Arduino  5V and GND pins. The PWM input will be connected to a digital output pin on the Arduino,  7.1 Experiment 1 Hardware Required1 x TowerPro SG90 servo motor1 x Arduino  Mega25603 x jumper wires   Wiring Diagram The best thing about servo motors is that they can be directly connected to an  Arduino ,  Connect the motor to the Arduino  in the manner shown in the table below: Servo red wire – 5V pin Arduino          Servo brown wire – Ground pin Arduino          Servo yellow wire – PWM(9) pin Arduino  Caution: Do not try to rotate the servo motor by hand, as you may damage the motor.     Figure12: Wiring Diagram Code When the program starts, the servo motor will slowly rotate from 0 to 180 degrees, one degree at a time. When the motor has rotated 180 degrees, it will start rotating in the opposite direction until it reaches the home position. #include //Servo library Servo servo_test; //initialize a servo object for the connected servo int angle = 0; void setup() { servo_test.attach(9); // attach the signal pin of servo to pin9 of arduino} void loop() { for(angle = 0; angle < 180; angle += 1) // command to move from 0 degrees to 180 degrees { servo_test.write(angle); //command to rotate the servo to the specified angle delay(15); } delay(1000); for(angle = 180; angle>=1; angle-=5) // command to move from 180 degrees to 0 degrees { servo_test.write(angle); //command to rotate the servo to the specified angle delay(5); } delay(1000);} Ⅷ Control with  Raspberry Pi In this tutorial, we will use the Raspberry Pi  to control a servo motor. Before we get to the servo, let's talk about PWM because it's the basis for controlling a servo motor.   8.1 PWM (Pulse Width Modulation) PWM is an abbreviation for 'Pulse Width Modulation.' PWM is a technique for obtaining variable voltage from a steady power supply. Consider the circuit below to better understand PWM.   Figure13:PWM   In the figure above, if the switch is closed continuously for a period of time, the LED will be 'ON' during that time. If the switch is closed for half a second and then opened for the next half a second, the LED will be turned on only for the first half a second. The percentage of time the LED is on over the total time is known as the  Duty Cycle , and it can be calculated as follows:   Duty Cycle =Turn ON time/ (Turn ON time + Turn OFF time) Duty Cycle = (0.5/ (0.5+0.5)) = 50% As a result, the average output voltage will be 50% of the battery voltage. When we increase the ON and OFF speed to a certain level, the LED will dim instead of being ON and OFF. This is because our eyes cannot clearly detect frequencies higher than 25Hz. Consider a 100ms cycle with an LED that is off for 30msec and on for 70msec. We will have 70% stable voltage at the output, so the LED will glow continuously at 70% intensity. The Duty Ratio ranges from 0 to 100. '0' denotes complete inactivity, while '100' denotes complete activation. This Duty Ratio is critical for Servo Motor,  This Duty Ratio determines the position of the Servo Motor,    8.2 Components Required We're running Raspbian Jessie on a Raspberry Pi  2 Model B. All of the basic hardware and software requirements have already been discussed, and you can find them in the Raspberry Pi  Introduction; however, we will need: Connecting pins 1000uF capacitor SG90  Servo Motor  Breadboard   8.3 Circuit Diagram Figure14:Circuit Diagram If A1000F is not connected across the +5V power rail, the  PI  may shut down unexpectedly while controlling the servo.   8.4 Working and Programming Explanation Once everything is connected according to the circuit diagram, we can power on the  PI and begin writing the program in PYHTON. We will go over a few commands that we will use in the PYHTON program. We will import a GPIO file from the library, and the function below will allow us to program the GPIO pins on the PI. We're also renaming "GPIO" to "IO," so in the program, whenever we refer to GPIO pins, we'll say "IO." import RPi.GPIO  as IO When the GPIO pins that we are attempting to use are performing other functions. In that case, we'll get warnings while running the program. The following command instructs the PI to disregard the warnings and continue with the program. IO.setwarnings(False) We can refer to the GPIO pins of the PI by either their pin number on the board or their function number. On the board, for example, 'PIN 29' is 'GPIO5'. So we specify whether we want to represent the pin here by '29' or '5'. IO.setmode (IO.BCM) PIN39 or GPIO19 is selected as the output pin. This pin will provide PWM output. IO.setup(19,IO.OUT) After we have set the output pin, we must configure it as a PWM output pin. p equals IO. Power-Wave Modulation (PWM) (output channel, frequency of PWM signal) The above command is for configuring the channel as well as the frequency of the channel." 'p' is a variable that could be anything. We'll use GPIO19 as the PWM "Output channel," and the "Frequency of PWM signal" will be 50, because the SG90's working frequency is 50Hz. The command below is used to initiate PWM signal generation. 'DUTY CYCLE' is used to specify the 'Turn On' ratio, as previously explained. p.start(DUTYCYCLE) The following command is used to create a forever loop, which means that the statements inside the loop will be executed indefinitely.   8.5 Code import RPi.GPIO  as IO        # calling for header file for GPIO’s of PI import time                           # calling for time to provide delays in program IO.setwarnings(False)          # do not show any warnings IO.setmode (IO.BCM)            # programming the GPIO by BCM pin numbers. (like PIN29 as‘GPIO5’) IO.setup(19,IO.OUT)             # initialize GPIO19 as an output p = IO.PWM  (19,50)              # GPIO19 as PWM output, with 50Hz frequency p.start(7.5)                             # generate PWM signal with 7.5% duty cycle while 1:                                                       # execute loop forever                                             p.ChangeDutyCycle(7.5)                   # change duty cycle for getting the servo position to 90º         time.sleep(1)                                      # sleep for 1 second         p.ChangeDutyCycle(12.5)                  # change duty cycle for getting the servo position to 180º         time.sleep(1)                                     # sleep for 1 second         p.ChangeDutyCycle(2.5)                  # change duty cycle for getting the servo position to 0º         time.sleep(1)                                     # sleep for 1 second   Ⅸ FAQ 1. Are servo motors AC or DC? AC servo motors depend on an AC power source whereas DC Servo motors depend on DC power source (like Batteries). AC servo motors performance is dependent upon voltage as well as frequency whereas DC servo motors performance mainly relies upon voltage alone. 2. Can servo motors rotate 360? The position of the servo motor is set by the length of a pulse. ... The end points of the servo can vary and many servos only turn through about 170 degrees. You can also buy 'continuous' servos that can rotate through the full 360 degrees. 3. Which motor is used in servo motor? While the majority of motors used in servo systems are AC brushless designs, brushed permanent magnet motors are sometimes employed as servo motors for their simplicity and low cost. The most common type of brushed DC motor used in servo applications is the permanent magnet DC motor.
kynix On 2022-01-08   2252
Sensor

How to Wire Ultrasonic Sensor-HC-SR04-with Raspberry Pi3?

Ⅰ Introduction In this project, we will use hardware ultrasonic sensor and  Raspberry Pi 3, Software Python code. Not everyone is familiar with ultrasonic sensor and Raspberry Pi3. Therefore, in the front part ,we will introduce some basic knowledge about ultrasonic sensor and Raspberry Pi3. This is conducive to understanding the project better. And then, we will have a look at the project of wiring Ultrasonic Sensor  (HC-SR04) with Raspberry Pi3 Catalog Ⅰ Introduction Ⅱ Ultrasonic Sensor Related Video Ⅲ Basic Guide to Ultrasonic Sensor  3.1 What is an ultrasonic sensor? 3.2 How Ultrasonic Sensors Work? 3.3 Using Multiple Sensors & Avoiding Disruption 3.4 How are Ultrasonic Sensors Used? Ⅳ Basic Guide to Raspberry Pi3 4.1 What is  Raspberry Pi3? 4.2 What Is the Raspberry Pi3 Capable of? 4.3 How do I Get Started With the Raspberry Pi 3? 4.4 How Is the Raspberry Pi 3 Different From Its Predecessors? Ⅴ Ultrasonic Sensor (HC-SR04) + Raspberry Pi3 5.1 Hardware 5.2 Wire Setup 5.3  Breadboard  5.4 Software Ⅵ FAQ     Ⅱ Ultrasonic Sensor Related Video   Ultrasonic Sensor Video Description: Connecting the Ultrasonic Sensor( HC-SR04) to the Raspberry Pi to measure distance. Equipment you need One 1 kilo-Ohm resistor One 2 kilo-Ohm resistor 8 Female-Male Jumper Wire   Ⅲ Basic Guide to Ultrasonic Sensor  3.1 What is an ultrasonic sensor? An ultrasonic sensor is a device that uses ultrasonic sound waves  to determine the distance between two objects. An ultrasonic sensor employs a transducer to send and receive ultrasonic pulses that relay information about the proximity of an object. High-frequency sound waves  reflect off boundaries, resulting in distinct echo patterns. Fihure1: Ultrasonic Sensor   3.2 How Ultrasonic Sensors Work? Ultrasonic sensors  operate by emitting a sound wave at a frequency  that is above the range of human hearing. To receive and transmit an ultrasonic sound, the sensor's transducer functions as a microphone. Like many others, our ultrasonic sensors  use a single transducer to send a pulse and receive the echo. The sensor calculates the distance to a target by measuring the time elapsed between sending and receiving the ultrasonic pulse. Figure2:How Ultrasonic Sensors Work This module's operation is straightforward. It emits a 40kHz ultrasonic pulse that travels through the air and, if it encounters an obstacle or object, bounces back to the sensor. The distance can be calculated by multiplying the travel time by the speed of sound. Ultrasonic sensors  are an excellent solution for detecting clear objects. Because of target translucence, applications that use infrared sensors.  for example, struggle with this particular use case for liquid level measurement. Ultrasonic sensors  detect objects regardless of color, surface, or material for presence detection (unless the material is very soft like wool, as it would absorb sound.) Ultrasonic sensors  are a reliable choice for detecting transparent and other items where optical technologies may fail.   3.3 Using Multiple Sensors & Avoiding Disruption When putting multiple sensors  into an application, it's critical to connect them in a way that prevents crosstalk and other interference. To prevent the ultrasonic signals from your sensor from being disrupted, keep the face of the ultrasonic transducer clear of any obstructions. Common obstructions include: DirtSnowIceOther Condensation We recommend our Self Cleaning sensors  for this application. Our self-cleaning function is designed to run continuously for the self-cleaning feature to be active. They are intended specifically for applications requiring condensation resistance in high moisture environments. Please keep in mind that the Self Cleaning function is not intended to remove dirt from the transducer's surface. Its purpose is to clear the transducer's face of moisture so that it can operate normally.   3.4 How are Ultrasonic Sensors Used? Our ultrasonic distance, level, and proximity sensors  are frequently used in conjunction with microcontroller platforms such as Raspberry Pi,  ARM , PIC,  Arduino , Beagle Board, and others. Ultrasonic sensors send sound waves  toward a target and measure the time it takes for the reflected waves to return to the receiver to determine their distance. This sensor is an electronic device that transmits ultrasonic sound waves  to measure the distance to a target and then converts the reflected sound into an electrical signal. Our sensors are frequently used as proximity detectors. Ultrasonic sensors are also used in obstacle detection systems and in manufacturing. Our ShortRange sensors provide the option for closer range detection in situations where a sensor that ranges objects as close to 2cm is required. These are also designed with very low power requirements in mind, as well as environments requiring noise rejection.   Ⅳ Basic Guide to Raspberry Pi3 4.1 What is  Raspberry Pi3? The  Raspberry Pi 3 Model B is the most recent model of the $35 Raspberry Pi computer. The Pi isn't your typical machine; in its most basic form, it lacks a case and is simply a credit-card-sized electronic board, similar to those found inside a PC or laptop but much smaller.   4.2 What Is the Raspberry Pi3 Capable of? Surprisingly large. For starters, the Pi 3 can be used as a low-cost desktop, media center, retro gaming console, or router, as shown below. That, however, is only the tip of the iceberg. There are hundreds of projects where people have used the Raspberry Pi to build tablets, laptops, phones, robots, smart mirrors, take pictures on the edge of space, and run experiments on the International Space Station.   Figure3:The Raspberry Pi 3.   4.3 How do I Get Started With the Raspberry Pi 3? One thing to keep in mind is that the Pi is merely a bare board. You'll also need a power supply, a monitor or TV,  HDMI  cables to connect to the monitor, and a mouse and keyboard. After connecting all of the cables, the simplest way for new users to get up and running on the Pi is to download the NOOBS (New Out-Of-Box Software) installer. Once the download is complete, follow the instructions to learn how to install an operating system on the Raspberry Pi. The installer makes it simple to install various operating systems, though the official OS Raspbian is a good choice for first-time users—other operating systems are listed below. Raspbian's appearance and feel should be familiar to any desktop computer user. The operating system, which is constantly being updated, recently received a graphical makeover and now includes an optimized web browser, an office suite, programming tools, educational games, and other software.   4.4 How Is the Raspberry Pi 3 Different From Its Predecessors? The Raspberry Pi 3 quad-core processor is both faster and more capable than its predecessor, the Raspberry Pi 2. For those interested in benchmarks, the Pi 3's CPU—the board's main processor—outperforms the Pi 2 by roughly 50-60% in 32-bit mode, and is 10x faster than the original single-core Raspberry Pi (based on a multi-threaded CPU benchmark in SysBench). Real-world applications will see performance increases ranging from 2.5x for single-threaded applications to more than 20x when video playback is accelerated by the chip's NEON engine when compared to the original Pi. Unlike its predecessor, the new board can play 1080p MP4 video at 60 frames per second (with a bitrate of around 5400Kbps), further enhancing the Pi's media center credentials. That's not to say that all videos will playback this smoothly; performance will vary depending on the source video, the player used, and the bitrate. With built-in Wi-Fi and Bluetooth, the Pi 3 also supports wireless internet right out of the box. The most recent board can also boot directly from a USB-attached hard drive or a pen drive, as well as from a network-attached file system via PXE, which is useful for remotely updating a Pi and sharing an operating system image between multiple machines.   Ⅴ Ultrasonic Sensor (HC-SR04) + Raspberry Pi3 A distance measurement is required or advantageous for many (outdoor) projects. These small modules, which start at 1-2 dollars and can measure distances of up to 4-5 meters using ultrasound, are surprisingly accurate. The connection and control are demonstrated in this tutorial. 5.1 Hardware Raspberry pi 3Ultrasonic Sensor(s) - HC-SR04A set of resistors for each sensor you are connecting330Ω and 470ΩJumper wires to connect the sensor(s) to the piBreadboard to connect the sensor(s) to the pi   5.2 Wire Setup Pins The sensor has four (labeled) pins that must be connected to the Raspberry Pi's pins. Pin 2 to VCC (5v - power)Pin 6 to GND (ground)Pin 12 receives a TRIG signal (GPIO18) The ECHO resistor 330 - Attach it to Pin 18 at one end (GPIO24) - Connect it to Pin6 as well, using a 470 resistor (ground). - This is done because GPIO pins can only withstand a maximum voltage of 3.3V.   5.3  Breadboard  As shown in the circuit diagram, connect the sensor to the pi using a breadboard. By replicating this exact setup on the other half of the breadboard, an additional sensor can be connected to the pi. Connect the VCC and GND pins together (2 and 6) For the TRIG and ECHO connections, use any two GPIO pins. Just make sure to include the correct GPIO pins in your code. Figure4: Connecting resistors and jumper wires between sensors and pi       5.4 Software Python Create a new script Figure5:Creating a new script in Python 3 Choose Menu → Programming → Click on Python 3 to create a new scriptWhen you run the code, the script below will print the distance of the object in front of the sensor.Because this code is easily manipulated to add another sensor, all variables have a "1" after them.Simply copy and paste each section of code, renaming variables with a "2."Make sure to connect a TRIG2 and an ECHO2 to the pi's two new GPIO Pins and to mirror the circuit diagram on the other half of the breadboard. import  RPi.GPIO  as GPIO import time GPIO.setmode(GPIO.BCM) TRIG1 = 18 ECHO1 = 24 #print ("Distance Measurement In Process") GPIO.setup(TRIG1, GPIO.OUT) GPIO.output(TRIG1, False) GPIO.setup(ECHO1, GPIO.IN) #print ("Waiting For Sensor1 To Settle") time.sleep(.1) GPIO.output(TRIG1, True) time.sleep(0.00001) GPIO.output(TRIG1, False) while GPIO.input(ECHO1) == 0:     pass     pulse_start1 = time.time() while GPIO.input(ECHO1) == 1:     pass     pulse_end1 = time.time() pulse_duration1 = pulse_end1 - pulse_start1 distance1 = pulse_duration1 * 17150 distance1= round(distance1, 2) print ("Distance1:",distance1, "cm") time.sleep(10) GPIO.cleanup()   Make a copy of your script and save it as ultrasonic distance.py. Go to File and click on Save as In the Save in field, navigate to the C: drive and then select a folder to save in. In the File name field, enter ultrasonic distance.py. Select All Files in the Save as type field. Click the Save button. To run the script, use the terminal. Clicking on the monitor icon at the top of the screen will launch the terminal. Enter cd "folder name" to change directory to your pythonpractice folder, then enter ultrasonic distance.py to run your program. Ⅵ FAQ 1. Does HC-SR04 need resistor? If you are using the ultrasonic transmitter from a HC-SR04 , I think you will find it needs between 5 and 12V to drive it. So you don't need a resistor you actually need a transistor circuit to provide the greater voltage under the control of the gpio. 2. What is the range of HC SR04? 2 cm to 400 cm The HC-SR04 ultrasonic sensor uses SONAR to determine the distance of an object just like the bats do. It offers excellent non-contact range detection with high accuracy and stable readings in an easy-to-use package from 2 cm to 400 cm or 1” to 13 feet. 3. Is ultrasonic sensor digital or analog? The output of the Ultrasonic Sensor is digital. Two of the four pins are forsupplying power to it, one is for sending an echo signature to it, and the other is for getting output from it. 4. What is ultrasonic sensor HC-SR04? The HC-SR04 Ultrasonic Distance Sensor is a sensor used for detecting the distance to an object using sonar. ... The HC-SR04 uses non-contact ultrasound sonar to measure the distance to an object, and consists of two ultrasonic transmitters (basically speakers), a receiver, and a control circuit. 5. What are the types of ultrasonic sensor? All together there are four types of ultrasonic sensors, classified by frequency and shape: the drip-proof type, high-frequency type, and open structure type (lead type and SMD type). 6. Is HC SR04 analog or digital? One of them is digital and the other is analog. We choose to use two sensors that measure: The UltraSonic Sensor (HC-SR04): Digital Sensor.
kynix On 2022-01-06   1746
Motors, Solenoids, Driver Boards/Modules

Is Raspberry Pi a MCU? Uses Analysis

Introduction Do you use Raspberry Pi? or What are doing with it? Is it a microcontroller (MCU for microcontroller unit) or microcomputer? or SoC (system-on-chip)? As a beginner, is it better to buy a microcontroller or a Raspberry Pi? Look at the following content. Raspberry Pi Explained Catalog Introduction Ⅰ Basic Definition Ⅱ Raspberry Pi vs MCU Ⅲ What Can We Do with Raspberry Pi? Ⅳ Where do I start to Learn Raspberry Pi? Ⅴ FAQ Ⅰ Basic Definition Raspberry Pi is actually a tiny embedded computer. It uses ARM microcontroller chip, and linux operating system or windows. It can regard as a small desktop computer when connects with a monitor, keyboard, and network (network port or wifi). With the release of Windows 10 IoT, Raspberry Pi can also run Windows.The single-chip microcomputer refers to the central processing unit core with some peripheral interface circuits on it, which is also called the microcontroller unit (MCU), or SoC. 8051 chips, avr chips, arm chips, etc. are all called single-chip microcontrollers, while Intel’s 80x86 series are central processing unit (CPU) and cannot be called MCU.It uses very large-scale integrated circuit technology to integrate the central processing unit CPU with data processing capabilities, RAM, ROM, multiple I/O ports and interrupt systems, timers/counters and other functions (may also include display driving circuits, pulse width modulation circuits, analog multiplexers, A/D converters and other circuits) are integrated on a silicon chip to form a small and complete microcomputer system. It is widely used in the field of industrial control. Figure 1. Raspberry Pi Setting Ⅱ Raspberry Pi vs MCU Next, let's take a look at the difference between the Raspberry Pi and the MCU and introduce in detail what can we do with the Raspberry Pi?The single-chip microcomputer is an microcontroller, and the Raspberry Pi is a single-board computer with arm-architecture processor. Early MCUs were peripherals for ROM and IO with slow speed, and it could not run time-sharing operating systems such as Linux or Windows. But the Raspberry Pi can run an operating system like Linux, or deploy servers or cloud computing. That is, the Raspberry Pi can perform many operations that cannot be done by a single-chip microcomputer.The size of the single-chip microcomputer is relatively small, and the internal chip is used as a computer system. Its structure is simple, but the function is perfect, it is very convenient to use, and it can be modularized. The most important thing is that although the development cycle of the single-chip microcomputer is relatively short, it is basically based on a specific task and the code must be re-programmed every time, which is very troublesome.The Raspberry Pi is actually a computer motherboard. It can be programmed, compiled, and run directly locally. If you want to add or delete functions to the original program, or switch from the current task to a different new task, you do not need to burn programs like a single-chip microcomputer according to different tasks or updates. Use Raspberry Pi to control peripherals by operating GPIO basically through various libraries, and if you connect it to the Internet, you can operate it remotely. Figure 2. Raspberry Pi GPIO In general, each has its own advantages. The MCU is cheap and suitable for general consumer products. After all, the Raspberry Pi is a card-type computer with an embedded operating system running on it. That is, a low-power general-purpose computer. For electronic geeks, the back-end data processing and GUI for complex control systems are still very good for satisfying embedded learning. Ⅲ What Can We Do with Raspberry Pi? After reading the above, since Raspberry Pi has the features of a computer, this means you’re able to do most things a desktop computer can do such as document editing, playing HD video, playing games, coding and much more.Obviously it won’t have as much power as a desktop PC but since it is a lot cheaper they make for great little computers you can play around with.Here lists some items you can do:1) Wireless HotspotUsing the Internet cable and USB wireless network card, after configuration, it can be used as a wireless hotspot.2) Mechanical ProsthesesMIT Media Lab researchers use it as a controller for mechanical prostheses.3) Easy Homemade NotebookConnect the Raspberry Pi to the LCD panel, add the mouse, keyboard and power supply, and find a beautiful case and put it on, finally it becomes a simple homemade notebook.4) WiFi CarAn IBM engineer installed it on a model car, and then used WiFi signals to control the car’s actions.5) Send Dynamics RemotelyWeather enthusiasts tied it to a detection balloon and used it to send a tweet in the stratosphere.6) Control Door SwitchThere are also people who use the Raspberry Pi to control the garage door and combine it with Siri to remotely control the garage switch.7) Surveillance ShootingA camera is connected as a small shooting device, which is small in size and easy to hide.8) Back Up EmailsOne of the most important functions of my Raspberry Pi is to back up emails. Use a software called getmail to check every mail using POP or IMAP protocol, and check the mail of each account regularly. Then save the email to an mbox file, which can be copied to another computer at any time for long-term email archiving.9) Build a RSS ReaderMiniflux, a self-hosted web-based RSS client that can be installed on the Raspberry Pi. Like many people, when Google announced that it would close Google Reader on July 1st, I also started to migrate personal data. I used rss2email for a while and let it send every item of RSS to my mailbox. But in fact, I don't like this method very much, so I spent some time looking for alternatives to Google Reader and tried rss2email and found miniflux finally. Installing miniflux on the Raspberry Pi is very simple, you only need to install PHP and a web server software in advance, such as nginx or Apache.10) Build a WebsiteOne obvious use of Raspberry Pi is as a backend server for websites. Because it has enough capacity to handle static websites, some web frameworks are not a problem. I built a Flask framework on it, and I even heard that some people built a Wordpress directly on the Raspberry Pi.11) Home Network StorageOnly consumes very low power, Raspberry Pi can become a perfect NAS (Network Attached Storage). Before I connected a 500GB laptop hard drive to the Raspberry Pi and installed an operating system on it. I can store many files on it that need to be transferred between different computers. Then connect via SFTP, you can access it on any machine at home (even if you are not at home, it will not be a problem as long as the routing settings are correct). You can also install Samba on your Pi so that both Mac and PC can access it more easily.12) Site MonitoringUse Raspberry Pi is to detect websites that are important to me. I wrote a Python script and ran it regularly to make sure that these websites responded with a 200 status code (which means everything is normal). If the script determines that there is a problem with the website or cannot be accessed, it will email me the overall situation of the incident. The Python module I use is Requests, and the email module is smtplib.13) Event ReminderUse Raspberry Pi to email me important events that I need to remember. I used Google Calendar before, but I only use it for simple events. So I replaced it with a Raspberry Pi, and a Python script for timed tasks is enough. I set the date, time, and message to remember. These parameters will be passed to my Python script, and on that day it will send the message to my mailbox to remind me of the day’s events.14) Family AlbumMy Raspberry Pi also supports a private website that contains all my family photos. I set up verification information so only people I want them to see can enter the site. This is much more reliable than your Facebook photo album, because your account on Facebook may be deleted, and the photos will be seen by strangers by chance. Here is a method, just use PHP to get the photos in a folder on the Raspberry Pi.15) JukeboxI mentioned above that I use Pi as a network storage, so all my music is also on it. I connected a stereo speaker to my Pi and used mpg123 to play music on the command line of the Raspberry Pi. Although there are many other mp3 players and graphical interfaces, I still choose mpg123 because it is easy to install and use. Figure 3. Raspberry Pi Projects Ⅳ Where do I start to Learn Raspberry Pi? If you are really interested in it and want to get started. How, and what do you need? 1) A Raspberry Pi. So, obviously you’ll need he actual board. If you don’t have it, you cant really do what you want. So find a website or store and buy one. Depending on the type and model you get, they can range from as low as 10$ to 50$. Pretty affordable.2) A monitor. So, you don’t actually need a monitor. But it is going to be so much easier. You can actually buy displays the Pi company has made specifically made for the Pi. These however are a little more expensive.You could also use your TV as a monitor, providing both the TV and the Pi can be hooked up via HDMI. VGA to HDMI would work too. Many different solutions can be used when it comes to the cable you use for a monitor, or all around screen. Adapters come in all shapes, sizes and forms. 3) A power source. You’ll need to power the Pi to use it. Most of the time, you will get a little charger to use with the Pi. Using this specific charger will probably be the best, as it will always pull enough power from the wall into your Pi.4) A mouse, and keyboard. You will need a mouse and keyboard. This is pretty much mandatory. Well, only for the actual screen portion of the Pi. Models 3 B+ and up have built in Bluetooth, so you can have cordless mouse and keyboard if you would like. That’s pretty cool.5) Depending on the model, you will need an Ethernet cable to have internet. Models 3 B+ and up have a built in WiFi chip. So you can have a wireless internet connection if you so please.6) A microSD card with the image you want to use. When you buy the Pi, you will need to have an SD card. The newer models use microSD cards. Putting the SD card into the Pi without anything on it wont do anything though, you'll need an image. Images for the Pi can be found along the internet for downloads. The standard image used for the Pi right now is NOOBS Debian.7) Time, patience and dedication. These are very important when working with the Pi. Why? Because the Pi is powerful, yet it can be confusing at times, especially for a “noob”.   Ⅴ FAQ 1. What is Raspberry Pi mainly used for?The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. It is a capable little device that enables people of all ages to explore computing, and to learn how to program in languages like Scratch and Python. 2. What are some good Raspberry Pi projects?Best Raspberry Pi Projects for BeginnersMusic Streaming.Security System.Weather Station.Arcade Machine.NAS.Digital Photo Frame.Retro Handheld Console.Robot. 3. Can a Raspberry Pi run Windows?The Raspberry Pi 4 can handle Microsoft Edge, the calculator app, and more, all via the power of Windows 11. It can even run Minecraft, albeit in an undesirable state. 4. Can Raspberry Pi go on Internet?If you want to connect your Raspberry Pi to the internet, you can plug an Ethernet cable into it (if you have a Raspberry Pi Zero, you'll need a USB-to-Ethernet adapter as well). If your model is a Raspberry Pi 4, Raspberry Pi 3, or Raspberry Pi Zero W, you can also connect to a wireless network. 5. How do I setup a Raspberry Pi network?Configuring the Raspberry Pi Ethernet Port With a Static IP.Step 1: Review Current Network Settings.Step 2: Backup the Current Network Configuration.Step 3: Modify the Network Settings. To edit the network setting you must edit the dhcpcd.Step 4: Restart the Raspberry Pi.Step 5: Test the New Network Setup. 6. How is Raspberry Pi different from microcontroller?The main difference between them is: Arduino is microcontroller board, while Raspberry Pi is a microprocessor based mini computer (SBC). The Microcontroller on the Arduino board contains the CPU, RAM and ROM. 7. Is Raspberry Pi zero a microcontroller?A Raspberry Pi is not a microcontroller, it is a single board computer. Neither. The chip itself is an SOC or system on chip, so it has almost all the parts of a computer on a single die. 8. Is the Raspberry Pi a system on a chip?Raspberry Pi SBCs feature a Broadcom system on a chip (SoC) with an integrated ARM-compatible central processing unit (CPU) and on-chip graphics processing unit (GPU), while Raspberry Pi Pico has a RP2040 system on chip with an integrated ARM-compatible central processing unit (CPU). 9. Can you use a microcontroller with a Raspberry Pi?Meet the Raspberry Pi Pico, a tiny little microcontroller that lets you build hardware projects with some code running on the microcontroller. Unlike computers, microcontrollers don't run traditional operating systems. 10. Is Raspberry Pi 3b a microcontroller?The Raspberry Pi is a single board computer with Microprocessor whereas Arduino is considered as Microcontroller unit. The Raspberry Pi can run an OS (Linux Distribution) and also consumes more power. Since Arduino is microcontroller device it has no operating system and can only run a single program or sketch. 11. What is Raspberry Pi used for in IoT?How can IoT Applications use Raspberry Pi? With an in-built quadcore processor, Raspberry Pi can serve as the “Internet Gateway” for IoT devices. Powered by a cloud network, Pi acts as a web server for uploading and transiting sensor data on IoT platforms. 12. What is the difference between microprocessor and microcontroller?KEY DIFFERENCESMicroprocessor consists of only a Central Processing Unit, whereas Micro Controller contains a CPU, Memory, I/O all integrated into one chip. ... Microprocessor uses an external bus to interface to RAM, ROM, and other peripherals, on the other hand, Microcontroller uses an internal controlling bus. 13. What kind of computer is Raspberry Pi?The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. It is a capable little device that enables people of all ages to explore computing, and to learn how to program in languages like Scratch and Python. 14. Can I use a Raspberry Pi as my main computer?Aside from the hard drive crash, the Raspberry Pi was a perfectly serviceable desktop for web browsing, writing articles, and even some light image editing. ... 4 GB of ram is just enough for a desktop. My 13 Chromium tabs, including a Youtube video, are using just over half of the 4 GB of available memory. 15. Which OS is better for Raspberry Pi?Raspbian. Raspbian is a Debian-based engineered especially for the Raspberry Pi and it is the perfect general-purpose OS for Raspberry users.
kynix On 2021-12-30   1160
Motors, Solenoids, Driver Boards/Modules

Complete Tech Guide of Raspberry Pi in 2021

IntroductionThe Raspberry Pi is a small and powerful computer that you can use to learn programming through fun, practical projects. It is designed for encouraging people in computing and creating easier access to computing education. Pi is a microcomputer and its size is like a credit card. Its system is based on Linux and has all functions such as video and audio. With the release of Windows 10 IoT, we will also be able to use the Raspberry Pi on Windows.Raspberry Pi - All You Need To KnowCatalogIntroductionⅠ Who Invented the Raspberry Pi?Ⅱ Different Pi Versions2.1 Early Stage2.2 Pi Model B vs Pi Model B+2.3 Pi 22.4 Pi 2 Model B vs Pi Model B2.5 Pi 3 Model B2.6 Pi 4 Model B vs Pi 3 Model B+2.7 Pi 4 Model B Rev1.2 (8GB RAM Version)Ⅲ What can I do with Raspberry Pi?Ⅳ Raspberry Pi Programming Language4.1 Python4.2 C Language4.3 Java/BlueJ4.4 PERL4.5 ScratchⅤ Guide for Beginners: Use Raspberry Pi to Control LED Lights5.1 Model Selection5.2 Accessories5.3 Electronic Components5.4 System Installation5.5 SSH Login In5.6 Install Node5.7 Light LED5.8 LED Control Script5.9 HTTP ServerⅥ FAQⅠ Who Invented the Raspberry Pi?The Raspberry Pi was developed by the Raspberry Pi Foundation, an British charity. In March 2012, Eben Upton of the University of Cambridge officially launched the world’s smallest desktop computer, also known as a card computer, which has all the basic functions of a computer. This is Raspberry Pi. The purpose of this foundation is to promote the education of computer science and related subjects in schools and make computers interesting. The foundation expects that this computer will continue to be developed and applied to more fields in the world.The early concept of Raspberry Pi in 2006 was based on ATmega644 microcontroller. It is an ARM-based microcomputer motherboard, with SD/MicroSD card as the memory hard disk. There are 1/2/4 USB ports and a 10/100 Ethernet port around the card motherboard (type A does not have a network port), which can be connected keyboard, mouse and network cable, as well as a TV output interface for video analog signals and an HDMI high-definition video output interface. All the above components are integrated on a motherboard that is only slightly larger than a credit card. It has all the basic functions of a PC and only needs to be connected to the TV. And the keyboard can perform many functions such as spreadsheets, word processing, games, high-definition video and so on.The Raspberry Pi is produced through three companies with production licenses Element 14/Premier Farnell, RS Components and Egoman. The Raspberry Pi Foundation provides ARM-based distributions of Debian and Arch Linux for the public to download. It is also planned to provide support for Python as the main programming language, support for programming languages such as Java, BBC BASIC (via RISC OS image or "Brandy Basic" clone of Linux), C and Perl. Ⅱ Different Pi Versions2.1 Early StageIn the early days of the Raspberry Pi, there were two types, model A and model B. The main differences between them.Model A: 1 USB, no wired network interface, power 2.5W, 500mA, 256MB RAM.Model B: 2 USB, support wired network, power 3.5W, 700mA, 512MB RAM. In addition, the Raspberry Pi B model provides a computer board, power supply, keyboard, case or connection, but no RAM.In July and November 2014, the Raspberry Pi launched two models, B+ and A+, respectively. The main difference: Model A has no network interface, so the four USB ports are reduced to one. In addition, compared to Model B, Model A has reduced RAM capacity and has a smaller size. Model A can be said to be a cheap version of Model B, but the new model Model A also supports the same MicroSD card reader as Model B, 40-pin GPI port, Broadcom BCM2385 ARM11 processor, 256MB of memory and HDMI output port.In terms of configuration, model B+ uses the same BCM2835 chip and has 512MB RAM as model B. But compared with the previous generation, the B+ version has lower power consumption and more interfaces. Model B+ has increased the general-purpose input and output pins to 40, and the USB interface has also increased from 2 to 4. In addition, the power consumption of model B+ has been reduced by about 0.5W to 1W. The old SD card slot has been replaced with a more beautiful push-in microSD card slot, and the audio part uses a low-noise power supply. From the appearance point of view, the USB interface has been moved to the side of the motherboard, the composite video has been moved to the position of the 3.5mm audio port, and four independent mounting holes have been added.2.2 Pi Model B vs Pi Model B+In July 2014, the Pi Model B+ was released, still using the BCM2835 processor and the same system software as the previous generation. The RAM is still 512MB. But improvements have been made in the following key points:Figure 1. Raspberry Pi Model B1) More GPIO pins, a total of 40 pins. (The old version is 26 pins)2) 4 USB ports, and the hot swap and overcurrent protection have been improved.3) Use Micro SD slot not the SD.4) Lower power consumption, reducing power consumption by 0.5 to 1W.5) Audio optimization, the audio circuit uses a dedicated low-noise power supply.6) A more concise appearance, the B+ aligns the USB interface with the edge of the circuit board, removes the AV interface, and makes 4 fixing holes on the motherboard.2.3 Pi 2Figure 2. Raspberry Pi 2It is compared to previous generations.1) CPU single thread speed is increased by 1.5 times (up by 1.5x).2) Sunspider running score increased 4 times (4x faster).3) Multi-core video decoding rate based on NEON is increased by 20 times (20x faster).4) The overall multi-threaded CPU score of SysBench is 6 times (6x) that of the old version.2.4 Pi 2 Model B vs Pi Model BFigure 3. Raspberry Pi 2 Model B1) Equipped with a 900MHz quad-core ARM Cortex-A7 CPU, the performance is expected to be 6 times that of the previous B+ version.2) 1GB LPDDR2 SDRAM, twice the previous B+ version.3) Fully compatible with the Pi 1 generation.Since the CPU has been upgraded to the ARM Cortex-A7 series, the Raspberry Pi 2 will support the full range of ARM GNU/Linux distributions, including Ubuntu and even Windows 10.2.5 Pi 3 Model BFigure 4. Pi 3 Model BIn February 2016, the Raspberry Pi 3 Model B was released.1) Equipped with ARM Cortex-A53 1.2GHz 64-bit quad-core ARMv8 CPU.2) Add 802.11b/g/n wireless network card.3) Add low-power Bluetooth 4.1 adapter.4) The maximum drive current is increased to 2.5A.2.6 Pi 4 Model B vs Pi 3 Model B+Figure 5. Pi 4 Model B1) Equipped with Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz.2) VideoCore VI GPU, supports H.265 (4Kp60 decode), H.264 (1080p60 decode, 1080p30 encode), OpenGL ES 3.0 graphics.3) 1GB/2GB/4GB LPDDR4 memory.4) Full throughput Gigabit Ethernet (PCI-E channel).5) Support Bluetooth 5.0, BLE.6) Two USB 3.0 and two USB 2.0 ports.7) Dual micro HDMI output, support 4K resolution.8) The microSD storage system adds double data rate support.9) The previous version of the microUSB power supply interface has been changed to a USB Type-C interface in Pi 4 Model B.10) Increase driving current to 3A.2.7 Pi 4 Model B Rev1.2 (8GB RAM Version)On May 28, 2020, the Raspberry Pi Foundation announced the launch of the new Raspberry Pi 4B SKU, which is the 8GB RAM version. In order to make full use of it, Raspberry Pi also developed a dedicated 64-bit operating system based on Debian. In other respects, compared with the previous version, the power supply problem has been improved.Figure 6. Pi 4 Model B Rev1.2TMHW's test on the Pi 4B 8GB version shows that in terms of web performance, 7zip compression, and APP opening speed, 8GB does not even increase but decrease compared to 4GB. In addition, in a 32-bit system, the available RAM is 7.8GB, and a 64-bit system is reduced to 7.6GB. Ⅲ What can I do with Raspberry Pi?Just like any other desktop or portable computer running a Linux system, there are many things you can do with the Raspberry Pi. Of course, it is inevitable that there is a little difference. Ordinary computer motherboards rely on hard drives to store data, but for Raspberry Pi, SD cards are used as "hard drives", and you can also connect an external USB hard drive. Use Raspberry Pi to edit documents, browse the web, play games, etc. That is to say, it has a wide range of uses. So it is also a good choice to make it an excellent multimedia center. For example, the Pi can be used to play video, and it can even be powered through the USB interface of the TV.Figure 7. Raspberry Pi 4Ⅳ Raspberry Pi Programming Language4.1 PythonThe Pi in Raspberry Pi stands for Python. It has become one of the most famous programming languages used for coding. After all, it has been in continuous use for the past 20 years. Python has an easy-to-read syntax, which is very suitable for novices in the field. Now, it is widely used in modern applications, windows and online applications.4.2 C LanguageC is one of the most widely used computing languages in the world. It is widely used to create operating systems and even simple programming languages. As we all know, Raspberry Pi runs on Linux system, in fact, it is also written with C. Therefore, it is easily compatible with all Linux and Unix systems including Pi.4.3 Java/BlueJWhen it was first released, Java was hailed as the first language that allowed programmers to write code for any platform or operating system. Regardless of whether the platform is a windows machine or a Unix machine. You can run the program without rewriting the code. Once the code is compiled, it can be run anywhere. Java runs on the Raspberry Pi, but cannot be developed on it. By 2013, BlueJ was released. Once installed, it can be programmed in Java on the Raspberry Pi.4.4 PERLPERL is a high-level programming language. It can be conveniently used on the Raspberry Pi when building an automated process or analyzing and debugging its output. Perl has a better library and ecosystem. It is the default setting of Raspberry Pi. Through a simple meta-analysis of the quality of existing libraries, PERL can be updated to a better version, because the default library may be incomplete or of low quality.4.5 ScratchScratch is the second programming language that suitable for Raspberry Pi. Because this coding language is included with the Raspberry Pi kit. It is a visual programming tool. With it, you can create animations and games. The latest version allows programmers to control Raspberry Pi's GPIO (General Purpose Input and Output) pins. Ⅴ Guide for Beginners: Use Raspberry Pi to Control LED Lights5.1 Model SelectionRaspberry Pi is a tiny computer integrated on a circuit board. Currently, there are two latest (1) Raspberry Pi 3 Model B(2) Raspberry Pi zero (zero w)Although the latter is cheap, it lacks a lot of interfaces (for example, only one USB port), the CPU and memory are relatively low-capacity, and the accessories are also few. Therefore, it is recommended to buy the third-generation B-type. But zero w can also meet most of the needs.5.2 AccessoriesThe Raspberry Pi itself is just a host. If you want to run it, there must be accessories.(1) Power SupplyA mobile phone charger with a Micro USB interface can be used as a power source, but the output must be 5V voltage and at least 2A current. It’s okay to use a power bank as a power source.Figure 8. Micro USB(2) Micro SD CardThe Raspberry Pi does not have a hard drive, and the Micro SD card is the hard drive. The minimum capacity is 8G, and 16G and 32G cards are recommended.Figure 9. Micro SD(3) DisplayThe Raspberry Pi has HDMI output, and the display must have it. If there is an HDMI to VGA adapter cable, then the VGA monitor will also work. Here I use a 7-inch LCD monitor.Figure 10. LCDHowever, the monitor is only needed when installing the system, and SSH can be used to log in later.(4) Wireless Keyboard and MousePi has built-in Bluetooth, so USB or Bluetooth wireless keyboard and mouse can be used.Figure 11. Wireless Keyboard and MouseJust like the monitor, if the Pi has been installed with the system and only used as a server, the wireless keyboard and mouse are not required.5.3 Electronic ComponentsIn addition to accessories, the following experiment also requires some electronic components.(1) Breadboard (one piece)(2) Electrical Cable (several)Note that the connection cable must be female to male.Figure 12. Electrical Cable (Female)Figure 13. Electrical Cable (Male)In addition, it is best to prepare some cables with male to male.(3) LED Diodes (several)(4) 270Ω Resistors (several)5.4 System InstallationIf the merchant has already installed the system, you can skip this step, otherwise you need to install the operating system.The official operating system is Raspbian, which is a customized version of the Debian system.The official also provides an installer NOOBS. It is recommended to install Raspbian through it, which is relatively simple.Download NOOBS:1) Format the Micro SD card into FAT format (operation guide).2) Unzip NOOBS.zip to the root directory of the Micro SD card.3) Insert the Micro SD into the slot at the bottom of the Raspberry Pi, turn on the power, and start the system.4) Under normal circumstances, follow the prompts on the screen and press Enter all the way to install the system.5.5 SSH Login InAfter installing the system, the Pi can access the Internet (Wifi or network cable). At this time, you need to check its LAN IP address, you can use the following command.    $ sudo ifconfigThen, change the system settings and turn on SSH login (default is forbidden).Then, login the Raspberry Pi from another computer SSH. The following command is executed on another computer in the LAN.    $ ssh pi@192.168.1.5In the above code, 192.168.1.5 is the address of my Raspberry Pi, so you need to replace it with yours. The default user of the Raspberry Pi is pi, and the initial password is raspberry. Under normal circumstances, you can log in to it. Then, you can perform various server operations, such as changing the password.    $ passwdThe following experiments need to add users to the gpio user group.    $ sudo adduser pi gpioThe above code means adding user pi to the gpio user group.5.6 Install NodeIn order to run Node scripts, Raspberry Pi must install Node. You can refer to this.    $ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -    $ sudo apt install nodejsUnder normal circumstances, Node 8.x has been installed successfully.    $ node -v    v8.1.05.7 Light LEDPi provides a set of external IO interfaces, called GPIO (general-purpose input/output).Figure 15. GPIO PinsThe definition of its 40 pins is shown in the figure below.Figure 16. Raspberry Pi 40 PinsNote that the first pin (3.3V) in the upper left corner is a square, and the other pins are round. Turn the Raspberry Pi over, and you can see that one corner of the GPIO is square. In this way, you can confirm which pin eye is 3.3V.Through GPIO, the Pi can be connected with other electronic components. Next, according to Jonathan Perkin's article, connect LED diodes.Figure 17. Raspberry Pi BackA breadboard is needed here. In essence, a breadboard is just a few wires with many holes that can be connected to the wires.Figure 18. Connect with BreadboardThe + pole and the-pole are two vertical wires, the row marked with the numbers 1, 5, and 10 is a horizontal wire. The wires are not connected to each other, and the left and right halves of the breadboard are also not connected to each other.Then, connect the Raspberry Pi, breadboard, LED lights, and resistors according to the diagram below.Figure 19. Parts ConnectionIn the above figure, the red wire represents the positive electrode of the current, which is connected from the first pin (3.3V) of the GPIO to the breadboard. The black wire represents the negative electrode of the current, which is connected from the 6th pin (ground) of the third row of the breadboard. It does not matter which hole they connect to the breadboard, but it must be ensured that a complete circuit can be formed (the direction of the arrow in the figure above). Note that LED diodes also have positive and negative poles, with the long pin indicating the positive pole and the short pin indicating the negative pole. The resistor has no positive and negative poles.After the connection is complete, turn on the power and the LED should light up.5.8 LED Control ScriptNext, we use the Node script to control the LED.First, unplug the positive wire from pin 1 (3.3V) and plug it into pin 11 of row 6 (GPIO 17 in the figure above). The current of this pin can be controlled by the script.Then, create a new experiment directory on the Pi, and install the Node module rpio that controls GPIO.    $ mkdir led-demo && cd led-demo    $ npm init -y    $ npm install -S rpioNext, create a new script led-on.js.    // led-on.jsvar rpio = require('rpio');    // Turn on pin 11 (GPIO17) as output    rpio.open(11, rpio.OUTPUT);    // Specify the output current of pin 11 (HIGH)    rpio.write(11, rpio.HIGH);Run this script and you can see the LED bulbs light up.    $ node led-on.jsCreate a new led-off.js script, just change one line (see here for the complete code).    // led-off.js    //...    // Designate Pin 11 to stop output current (LOW)    rpio.write(11, rpio.LOW);Run this script and the LED bulb should be off.    $ node led-off.jsWith these two scripts, it is easy to make the LED blink. Create a new led-blink.js script.    // led-blink.js    var rpio = require('rpio');    rpio.open(11, rpio.OUTPUT);    function blink() {      rpio.write(11, rpio.HIGH);      setTimeout(function ledoff() {        rpio.write(11, rpio.LOW);      }, 50);    }    setInterval(blink, 100);The above script makes the LED blink 10 times per second.    $ node led-blink.js5.9 HTTP ServerMany things can be done by controlling the LED, such as setting up an HTTP server. Whenever someone visits, the LED will blink.First, install a server module in the directory just now.    $ npm install -S serverThen, create a new script server.js.    // server.js    var server = require('server');    var { get } = server.router;    // ...    server({ port: 8080 }, [      get('/' ,  ctx => {        console.log('a request is coming...');        blink();      }),    ]);    console.log('server starts on 8080 port');Run this script.    $ node server.jsThen, open a command line terminal, access port 8080, and the LED will flash.    $ curl http://localhost:8080After reading the tutorial, you can try it yourself. For example, if you write a test case script, the LED will stay light as long as the test fails, or you can assemble an 8-bit adder. Ⅵ FAQ1. What is Raspberry Pi and how does it work?The Raspberry Pi is a tiny computer about the size of a deck of cards. It uses what's called a system on a chip, which integrates the CPU and GPU in a single integrated circuit, with the RAM, USB ports, and other components soldered onto the board for an all-in-one package.2. What is the Raspberry Pi used for?The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. It is a capable little device that enables people of all ages to explore computing, and to learn how to program in languages like Scratch and Python.3. Can Raspberry Pi replace PC?Of course, the Raspberry Pi can't replace most professional desktops, but in general, it can run almost all programming languages and frameworks, from Python to Fortran.4. What do I need to use a Raspberry Pi?What you will need:A Raspberry Pi computer with an SD card or micro SD card.A monitor with a cable (and, if needed, an HDMI adaptor)A USB keyboard and mouse.A power supply.Headphones or speakers (optional)An ethernet cable (optional)5. Which Raspberry Pi is best for beginners?Best Raspberry Pi Starter KitsCanaKit Raspberry Pi 3 B+ Starter Kit 32GB EVO+ Edition Premium Black Case.Vilros Raspberry Pi 3 B+ Complete Starter Kit with Clear Case and 16GB SD Card.Smraza Raspberry Pi 3 B+ Starter Kit, Compatible Pi 3 Model B Case, 16GB SD Card, 2.5 A Power Supply.6. What projects can you do with Raspberry Pi?Best Raspberry Pi Projects for 2021Google Enabled Magic Mirror.Solar-Powered Pi.Game Console.Remote-Controlled 3D Printer.Language Translator.Satellite Tracking Globe.PC Hardware Stats Monitor.Security Camera.7. Which is cheaper Arduino or Raspberry Pi?The two most popular among them are: Arduino and Raspberry Pi. Arduino is based on the ATmega family and has a relatively simple design and software structure. Raspberry Pi, basically is a single-board computer.8. Which programming language is used for Raspberry Pi?Python. One of the most widely used programming languages on the Raspberry Pi is none other than Python. Python has an easy, beginner-friendly syntax (arrangement of words, phrases, in sentences) and a wide adoption rate among the community, giving access to libraries, frameworks, and tools to help users get started.9. Can a Raspberry Pi run Windows?The Raspberry Pi 4 can handle Microsoft Edge, the calculator app, and more, all via the power of Windows 11. It can even run Minecraft, albeit in an undesirable state.10. Can you watch Netflix on Raspberry Pi?Although there are some Android images for the Raspberry Pi, Linux distributions (distros) for the Pi are more stable. And with newfound Widevine DRM support, the Raspberry Pi can comfortably stream Netflix, Hulu, Disney+, HBO Max, and Spotify.11. Can you hack with Raspberry Pi?The Raspberry Pi also runs Raspbian, the official OS of the Raspberry Pi. This Debian-based OS can also be used to learn basic Linux and hacking tools, although it requires much more customization before it's suitable for this.12. Which is better for beginners Arduino or Raspberry Pi?The Arduino board is much simpler to use in comparison to Raspberry Pi. The Arduino board can easily be interfaced with analog sensors and other electronic components using only a few lines of code. ... The coding in Arduino is also easier than Raspberry Pi, the latter requiring knowledge of Linux and its commands.13. How do I put codes into my Raspberry Pi?Open IDLE by selecting the Raspberry Pi logo in the top-left, and click Programming > Python 3 (IDLE). You should be presented with the Python interactive interpreter. To write a program, go to File > New File. Enter in your code.14. Can I run Android on Raspberry Pi?First Look: You Can Now Run Android 12 on Your Raspberry Pi 4 Computer. Even if your smartphone doesn't run Android 12 yet, you can now use Google's latest mobile operating system on a Raspberry Pi 4, 400 or CM4 computer.15. What is the advantage of Raspberry Pi over Arduino?Raspberry Pi is 40 times faster than Arduino, with PI, you can send mails, listen music, play videos, run internet etc. Also as we have stated earlier that it has memory, processor, USB ports, Ethernet port etc. and it doesn't require external hardwares for most of the functions.16. How do I use Raspberry Pi with IOT?Connecting the Raspberry Pi to the Outside World - GPIO PinsTo connect the GPIO to external sensors, you can: Connect the sensors directly to the GPIO pins using jumper wires. Connect the GPIO pins to a ribbon cable, which in turn connects it to a breadboard.17. Which is more powerful Raspberry Pi or Arduino?Given those differences you might think a Raspberry Pi is so much more powerful and capable than Arduino, so you should use that. ... Raspberry Pi has 8. Individual I/O pins in Arduino can drive 40mA while Raspberry Pi GPIO pins can each drive a maximum of 16mA18. How many devices can connect to Raspberry Pi?There is a limit of 30 simultaneously connected devices on Pi 4 - the hardware supports 32 device address slots but one address is kept free for unconfigured devices and one address is reserved by the internal USB2. 0 hub for the USB2. 0 ports.19. How many pins are there on Raspberry Pi board?40 pinsOf the 40 pins, 26 are GPIO pins and the others are power or ground pins (plus two ID EEPROM pins, which you should not play with unless you know your stuff!).20. How much RAM does the Raspberry Pi has?The Raspberry Pi 2 has 1 GB of RAM. The Raspberry Pi 3 has 1 GB of RAM in the B and B+ models, and 512 MB of RAM in the A+ model. The Raspberry Pi Zero and Zero W have 512 MB of RAM. The Raspberry Pi 4 is available with 2, 4 or 8 GB of RAM.21. Why is Raspberry Pi 4 so expensive?Due to supply shortages, the Raspberry Pi Foundation can no longer afford to produce them at that price, and so have had to increase the price to $45. ... To help mitigate this price increase, the company is reintroducing the 1GB version of the RPi 4, which was retired in February 2020.22. How do you do Pi in Google Sheets?Creating the PI Symbol with the CHAR FunctionThe amazing CHAR function, which converts numbers into characters per the Unicode table, can output the symbol for pi in your Google Sheet.
kynix On 2021-12-27   939
Resistors

How Do I Read Pinouts?

IntroductionIn electronics, a pinout (sometimes written "pin-out") is a cross-reference between the contacts, or pins, of an electrical connector or electronic component. It describes the functions of transmitted signals and the circuit input/output (I/O) requirements. The number of pins is divided into 8-pin, 14-pin, 16-pin, etc. Every pin must be properly matched to a connector that has the same function. Pinout types include Universal Serial Bus (USB) pinout, PS/2 pinout, ATX power supply pinout, VGA pinout, and Digital Visual Interface (DVI).How to Read Pinouts?CatalogIntroductionⅠ Pinout Arrangement DescriptionⅡ Arduino Pinout and Raspberry Pi Pinout2.1 Arduino Nano Pinout and Arduino Uno Pinout2.2 Arduino Pinout Series2.3 Raspberry Pi Pinout and Diagram2.4 Difference between an Arduino and a Raspberry PiⅢ Example: AT89S52 PinoutsⅠ Pinout Arrangement DescriptionA pinout generally has descriptions in a diagram or table, which specifically indicates whether it is the back-side or front-side view, or if it is the mating face of the connector, or it stands for? Generally speaking, the more pins, the larger the size of the IC chip, the stronger the circuit function, and of course, the higher the price.What these pins stand for? Look at the following Common PIC Pin Descriptions:Pin NumberSymbolDescription1AUDIOAudio Signal Output2FM OUTFM Detection Output3IF AGCIF Signal Input4RF AGCRF AGC Voltage Output5IF INIF Signal Input6IF GNDIF Circuit Ground7IF VccIF Circuit Power Supply8FM FILTERFM Detector Filter Terminal9AFT OUTAFT Control Power Output10SDAI2C Bus Data Terminal11SCLI2C Bus Clock Terminal12ABLAutomatic Brightness Control13R INRed Character Input14G INGreen Character Input15B INBlue Character Input16BLACK INCharacter Blanking signal Input17RGB VccDecoding Circuit Power Supply18R OUTRed Primary Color Signal Output19G OUTGreen Primary Color Signal Output20B OUTBlue Primary Color Signal Output21IDWhite Balance Adjustment Signal Input22VER OUTField Sawtooth Wave Output23V RAMP ALCField Sawtooth Wave Formation24H/BUS VccLine Start Power25AFC FILTERLine AC Low-pass Filtering26HOR OUTLine Excitation Pulse Output27FBP INLine and Reverse Pulse Input28REFReference Current Formation29CLK OUT4MHz Clock Signal Output Pin NumberSymbolDescription301H DL VccBuilt-in Baseband Delay Line +5V Power Supply311H DL Vcc OUTBaseband Delay Line Boost Circuit Output Terminal321H DL GNDBaseband Delay Line Ground33SECAM INComponent Signal Input34C APC FILTERChroma Subcarrier Phasedetector (APC1) Low-pass Filter35SECAM INTERFACE4.43MHz CW Signal Output or SECAM Achromatic Signal Input36X TAL4.43MHz Crystal Terminal37SEL VIDEO OUTVideo Output38V/C/DEF GNDGround39EXT V IN/Y INAV Video or Y Signal Input Terminal40V/C/DEF VccVideo/Chroma/Scan Part Power41INT V IN/C INAV Video or C Signal Input Terminal42BLACK STECHFilter End of Black Level Extension Circuit43VIDEO OUTVideo Detector Output44VCO FILTERIF Lock Detection Filter45VCOExternal VCO Resonant Network46PIF APCIF APC Filter47EXT AUDIO INAV Audio Signal Input48SIF OUTAudio Accompanying Sound IF Output49SIF INAudio Accompanying Sound IF Input50SND APCAccompanying Sound Discrimination Filter Pin NumberSymbolDescription1BASSBass Control Output2MUTEMute (High Level) Control Output350/6050Hz/60Hz Identification Output4SECAMSECAM Recognition5VOLVolume Control6COMB.FDigital Filter on/off Control7POWERPower On/Standby Control8TUNEPWM Tuning Voltage Output9GNDGround10XTAL132kHz Crystal Connection Terminal11XTAL232kHz Crystal Connection Terminal12VDDPower Supply13KEY-IN1Key Scan Signal Input 114KEY-IN2Key Scan Signal Input 215AFT-INAFT Control Voltage Input16RESETReset Terminal17FILTERCharacter Oscillation Low Pass Filter18NCEmpty Pin19V-SYNCCharacter Vertical Positioning Pulse Input20H-SYNCCharacter Horizontal Positioning Pulse Input21OSD-BLKCharacter Blanking Pulse Output22SDAI2C Bus Data Terminal23SCLI2C Bus Clock End24SAFTYOverload Detection Terminal25CSProduction Debugging Chipselect Signal Input Terminal26REM INRemote Control Signal Input27SIFAudio IF Switching Control28TV/AV1AV/TV Switch29TV/AV2AV/TV Switch303.58/4.433.58/4.43 Control31UHFUHF Band Control32VHVHF-H Band Control33VLVHF-L Band ControlⅡ Arduino Pinout and Raspberry Pi Pinout2.1 Arduino Nano Pinout and Arduino Uno PinoutThe Arduino Nano is a small, complete, and breadboard-friendly board. It is based on the ATmega328 8-bit microcontroller by Atmel. It has a total of 36 pins. Out of these 8 are analog input pins and 14 digital input/output pins (of which 6 can be used as PWM outputs). Nano has a 16 MHz SMD crystal resonator, a mini USB-B port, an ICSP header, 3 RESET pins and, a RESET button. The Arduino digital pins can read/output only two states: when there is a voltage signal and when there is no signal.Figure 1. ATMEGA328 PinoutArduino UNO is based on the ATMEGA328 by Atmel. The Arduino UNO pinout consists of 14 digital pins, 6 analog inputs, a power jack, USB connection and ICSP header. The function of Analog pins is to read the value of the analog/digital input used in the connection.Figure 2. Arduino UNO Pinout2.2 Arduino Pinout SeriesDigital PinsPower:  Mini USB  VinICSP:  MISO (Master In Slave Out)  Vcc (Supply Voltage)  SCK (Clock from Master to Slave)  MOSI (Master Out Slave In)  RST (Reset (Active Low)  GND (Supply Ground)Serial Communication PinsPWM (Pulse Width Modulation) PinsExternal InterruptsSPI (Serial Peripheral Interface) pinsBlinking LED Analog PinsRESETI2C ProtocolAREF (Analog Reference) PinsPower2.3 Raspberry Pi Pinout and DiagramThe Raspberry Pi is a tiny and affordable computer that you can use to learn programming through fun, practical projects, which is the go-to microcomputer for all ages and abilities. You can plugs it into a computer monitor or TV, and uses a standard keyboard and mouse. Over the years the header has expanded from 26 pins to 40 pins while maintaining the original pinout. As you can see, the Pi not only gives you access to the bi-directional I/O pins, but also Serial (UART), I2C, SPI, and even some PWM ("analog output").Figure 3. Raspberry Pi GPIO PinoutRaspberry Pi is as small as the size of a credit card, and works as if a normal computer at a relatively low price. It is possible to work as a low-cost server to handle light internal or web traffic. What’s more, grouping a set of Raspberry Pi to work as a server is more cost-effective than a normal server. Although Raspberry Pi board has so many advantages, it also has the following disadvantages:1) Not able to run Windows Operating system2) Impractical as a Desktop Computer3) Graphics Processor Missing4) Missing eMMC Internal Storage2.4 Difference between an Arduino and a Raspberry PiThe main difference between them is: Arduino is microcontroller board, while Raspberry Pi is a microprocessor based mini computer (SBC). The Microcontroller on the Arduino board contains the CPU, RAM and ROM. ... Raspberry Pi needs an Operating System to run. Arduino doesn't need any operating system.If you're coming to the Raspberry Pi as an Arduino user, you're probably used to referencing pins with a single, unique number. Programming the Pi's hardware works much the same, each pin has its own number...and then some.Ⅲ Example: AT89S52 PinoutsThe pin functions of AT89S52 are diverse. For example, the intermediate frequency signal can be demodulated from the pin to the internal FM circuit in an unbalanced manner. At the same time, it is also the control pin for AVTV conversion and PAL, NTSC, SECAM chroma system conversion in the block, and its input impedance is about 3.4K.Figure 4. AT89S52 Pinouts1) For Recognition OutputThe pin outputs image recognition signal in OC gate mode. When the video TV signal has been received, this pin presents high impedance to the outside, and a high level signal can be obtained through an external pull-up resistor; when no signal is received, this pin presents a low impedance and outputs a low level.2) As APC1 Filter TerminalThe chip generates a 38MHz switching signal in an oscillating manner to complete the demodulation of the image IF signal. Whether the generated switching signal is accurate depends on the automatic phase control circuit (APC) control. Among them, the filtering of the APC1 error signal is completed on this pin.3) As APC2 Filter TerminalThe filter terminal of the second-stage APC circuit4) An external pin for the quartz crystal oscillatorThe external quartz crystal and internal circuit will oscillate in the form of series resonance. The oscillation frequency is a quarter of the carrier frequency of the image intermediate frequency signal. The frequency of the quartz crystal required is different under different signal systems.5) For AFT Signal OutputThe image IF signal compare with the internal frequency, and then the pin outputs AFT error signal.6) Full TV Signal OutputThe signal in the image is demodulated, and finally the video signal and the accompany audio intermediate frequency signal are output from the pin, and the output signal level is 2V.7) Radio Frequency AGC Delay AdjustmentBy adjusting the external potentiometer, the AGC delay amount can be adjusted.8) For the Input of Internal and External Video SignalsThe signal input needs to be separated from the DC. The coupling capacitor capacity is 1uF. When the internal input level is the peak, the max value is 2V. And when the external input is the peak and the peak is 1V. The input impedance is about 50kΩ. Inside the integrated circuit, the blanking level is fixed at 4.5V.9) The Output of Contrast Control Voltage can also be used to control ACL.10) The pin is the standard level of the built-in filter and the switch of S-VHS. It needs a 1Uf capacitor to be grounded to set the standard level. When it is in the S-VHS mode, the pin voltage must be led by an external circuit is set below 2V. When it is in the normal AV state, the voltage level should be set above 2V.11) Input Pin for S-VHS Chroma Signal and DC ControlWhen inputting chroma signal, a 0.01Uf capacitor should be used to cut off the DC input. At PAL format, the chroma signal level should be 300mV peak-to-peak, and should be 286mV peak-to-peak under the NTSC system.12) As a Delayed Video Signal OutputIt can also achieve ABL control. The output video signal level is 2V peak-to-peak, and a current of 0.5mA or more is necessary.13) The Output of the Decolorization ControlAfter the internal decolorization circuit is activated, a low-level signal will be output from the pin.14) Address Input for Analog Bus Control15) Data Input of Analog Bus Control16) The Output of the Internal Field Scanning PulseThe external resistance value can set the sensitivity of the internal field synchronization separation. If you don't need the internal field pulse, you can also input other field pulse signals from the pin, and the internal field output is automatically cut off at this time. The pin can also be an automatic trigger mode release switch and a row AFC strobe release switch.17) To connect the oscillating quartz crystalThe crystal frequency should be 500Hz.18) Separate power supply pins for line oscillation and line pre-excitation circuits. A higher voltage provides a DC voltage to the pin through a resistor, which is stabilized to 7V by the internal voltage regulator circuit for use by the above circuits. The selection calculation of resistance is: R1=(+B1-7.0V)/13mA.19) The output of line pre-excitation pulse is output in push-pull mode.20) Line and Reverse Pulse InputThe line and reverse pulse signal is output from this pin after forming a sand castle pulse internally. As a unified working sequence of some circuits, this pin is also the output of the integrated circuit pulse in the SECAM system.21) Character Background Blanking Pulse InputThe standard control voltage is 1V, when the input voltage is higher than 1V, the image display stops, and the character is displayed at the current position. When the pin voltage is lower than 1V, the image is displayed at the current position.22) The input of the three-color signal of the on-screen character display (OSD). When using the analog character display mode, the DC input needs to be cut off. When using the digital character display mode, the high level needs to be set to a certain value.23) Negative brightness signal output, and at the same time the input of the de-trap signal.24) Color difference signal output, respectively output the R-Y, G-Y, B-Y of the TV image or the R, G, B three-color screen character display dot matrix after character display conversion.25) After the input of the ALC amplifier (CCD delay adjustment) is delayed and calculated by the integrated one-line delay line, the two color difference signals return to the LA7687 from these two lead pins.26) Output the Color Difference Signal to the Integrated Delay Line.In the PAL system, the two incompletely demodulated color difference signals are output from two pins to the delay line for further processing. When in the SECAM system, the color difference signal does not come from LA7687. Therefore, the two pins present a high impedance state under this system, and the output dc voltage is 3.6V.27) The subcarrier recovery circuit needs to be connected to 4.43MHz and 3.58/MHz quartz crystals.28) For the Color Demodulation Circuit APC FilterThe filter composed of the external resistance container can set the synchronization range of the subcarrier oscillation.29) The AGC Filter Pin of the First Stage Mid AmplifierThe AGC detection circuit separates the synchronization signal by detecting the peak value of the video signal, and filters it into the AGC voltage at the pin. The second stage AGC filter is hidden inside the integrated circuit.30) Image IF Signal InputThrough the surface acoustic filter to form a specific image IF signal, in a balanced way from  two lead pins amplify the collector circuit. Inside the integrated circuit, there are a total of three amplifiers, and the total amplification gain is above 60dB.31) The output of the radio frequency AGC is output in an open-collector mode.32) Audio Signal OutputThe integrated circuit completes the demodulation of the FM signal, and the audio signal is output from the pin, and there should be a de-emphasis circuit composed of resistive components on the outside.33) Audio Filter PinIt is used to eliminate the DC feedback of the preamplifier, in addition, a 1uF capacitor is required to be connected externally. In addition, when this pin is set to high level, the image IF gets into the SECAM mode. Frequently Asked Questions about Electronic Pinout1. What does pinout mean?In electronics, a pinout (sometimes written "pin-out") is a cross-reference between the contacts, or pins, of an electrical connector or electronic component, and their functions. "Pinout" now supersedes the term "basing diagram" that was the standard terminology used by the manufacturers of vacuum tubes and the RMA. 2. What is pin configuration?Devices support both analog input and digital I/O line modes on several configurable pins. The following table provides typical parameters for the pin configuration commands (D0 - D9, P0 - P2). 3. What is a pinout cable?Pinout or pin-out is a term used in electronics to describe how an electrical cable is wired, or the function of each wire (pin) in a connector. An electrical connector typically consists of several electrical contacts or pins that can be used to carry electrical power or signals. 4. What are the pins on Arduino Uno?Arduino/Genuino Uno is a microcontroller board based on the ATmega328P (datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header and a reset button. 5. How many digital and analog pins are in Arduino Uno?Microcontrollers
kynix On 2021-04-07   10562

Kynix

Kynix was founded in 2008, specializing in the electronic components distribution business. We adhere to honesty and ethics as our business philosophy and have gradually established an excellent reputation and credibility in our international business. With the accurate quotation, excellent credit, reasonable price, reliable quality, fast delivery, and authentic service, we have won the praise of the majority of customers.

Follow us

Join our mailing list!

Be the first to know about new products, special offers, and more.

Kynix

  • How to purchase

  • Order
  • Search & Inquiry
  • Shipping & Tracking
  • Payment Methods
  • Contact Us

  • Tel: 00852-6915 1330
  • Email: info@kynix.com
  • Follow Us

authentication

Kynix

© 2008-2026 kynix.com all rights reserve.