Phone

    00852-6915 1330

The Kynix Blog

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

Resistors

Popularization of Science - MCU

CatalogIntroductionⅠ What is a Microcontroller(MCU)?Ⅱ The History of the Microcontroller (MCU)Ⅲ The Classification and Application of MCUⅣ China MCU Technology and Well-known ManufacturersⅤ  The Basic Functions of MCUⅥ Learning Methods - Using MCUⅦ Six Main Dimensions of MCU Products for Future ImprovementⅧ Programming of MCUⅨ Summary of the MCU Programming EngineerⅩ How to Develop MCU Ⅺ 5 Tips to Solve the Questions About the MCU CrystalⅫ Summary of Chip OperationFAQIntroductionA microcontroller (MCU) is a small computer built on a single metal-oxide-semiconductor (MOS) integrated circuit (IC) chip. A microcontroller is made up of a CPU  (processor core), memory, and programmable input/output peripherals. On chip, a small amount of RAM, as well as ferroelectric RAM, NOR flash, or OTP ROM , is commonly included. Microcontrollers  , in contrast to microprocessors  used in personal computers  or other general-purpose applications, are designed for embedded applications and are made up of a number of discrete chips. This article will delve deeper into the MCU.Ⅰ What is a Microcontroller(MCU)? Microcontroller UnitThe microcontroller unit (MCU) appropriately reduces the frequency and specifications of the CPU  and integrates peripheral interfaces such as memory, counter, USB, A/D conversion, UART, PLC, and DMA. At the same time, even the LCD driver circuit is integrated on a single chip to form a chip-level computer, which can be controlled in different combinations for different applications, such as mobile phones, PC peripherals, remote controls, automotive electronics, industrial stepping motors, machines The control of the arm, etc., can be seen in the MCU.Figure 1 MCU componentsⅡ The History of the Microcontroller (MCU)Microcontroller Unit has a short history, but it has evolved quickly. Its generation and development are roughly synchronized with that of microprocessors  (CPUs). Since Intel Corporation of the United States first introduced 4-bit microprocessors  in 1971, its evolution can be roughly divided into five stages. The following is an overview of the development of Intel's MCU.1971-1976  The initial stage of MCU developmentIn November 1971, Intel introduced the Intel 4004, a 4-bit microprocessor with an integration level of 2000 transistors/chips and equipped with RAM, ROM, and shift registers, which served as the first MCS-4 microprocessor. The Intel 8008 8-bit microprocessor was introduced, followed by other 8-bit microprocessors  from various companies.1976-1980  Low-performance MCU stageThe MCS-48 series, introduced by Intel Corporation in 1976, has a monolithic structure that integrates an 8-bit CPU.  an 8-bit parallel I/O interface, an 8-bit timer/counter, RAM, and ROM on a semiconductor chip. Its addressing range is limited (no more than 4 KB), there is no serial I/O, the RAM and ROM capacity is limited, and the interrupt system is simple, but its functions can meet the needs of general industrial control and intelligent instruments and meters.1980~1983  High-performance MCU stageHigh-performance 8-bit microcontrollers introduced at this stage typically include serial ports, multi-level interrupt processing systems, and multiple 16-bit timers/counters. The capacity of the on-chip RAM and ROM  is increased, and the addressing range can reach 64 KB. A/D conversion interfaces are also available on individual chips. 1983~late 1980s  16-bit microcontroller stage.In 1983, Intel introduced a high-performance 16-bit microcontroller MCS-96  series. The chip integration level was as high as 120,000 transistors/chips due to the use of the most recent manufacturing process.1990sCPUs are developing to a higher level in all directions, such as integration, function, speed, reliability, and application fields. Ⅲ The Classification and Application of MCUMCUs are classified into two types based on their memory type: those with no on-chip ROM  and those with on-chip ROM,  The chip without on-chip ROM  must be used externally with EPROM (typically 8031); the chip with on-chip ROM  is classified as on-chip EPROM (typically 87C51), MASK on-chip mask ROM  (typically 8051), on-chip Flash (typically 89C51), and other types.MCUs are classified into two types based on their intended use: general-purpose and special-purpose. It is classified into4, 8, 16, and 32-bit MCUs based on the width of the data bus and the number of data bytes that can be processed at the same time.Figure 2 MCU product category At present, the most widely used MCU market in China is in the consumer electronics  field, followed by the industrial field and the automotive electronics  market. Consumer electronics  include home appliances, televisions, game consoles, and audio and video systems. Industrial fields include smart homes, automation, medical applications, and new energy generation and distribution. The automotive field includes automotive powertrains and safety control systems. Industrial MCU Industrial MCU products  are primarily used for motor control operation, data acquisition control, and other functions in motor control, instrumentation, low-voltage power distribution, power tools, industrial robots, and other application scenarios.Figure 3 Electric-Vehicle-ChargerThe number of MCU devices is increasing as the complexity of industrial equipment increases. Consider industrial robots: at least ten MCU products  are used in a single industrial robot.Home Appliance MCU MCU is widely used in household appliances, mainly used to realize system control, motor control, panel display control, and other functions.The home appliance market is mainly divided into small household appliances and everyone electricity, small household appliances including kitchen appliances (microwave oven, induction cooker, soybean milk machine, etc.), household appliances (vacuum cleaner, electric fan, electric heater, etc.), personal life small household appliances (electric toothbrush, hairdryer, etc.), everyone electricity mainly for air conditioning, refrigerator, washing machine, and other white appliances.Figure 4 Induction-heating-cooker-app-block-diagramAt the moment, 32-bit MCUs have become the market's mainstream due to their higher specifications and performance, as well as their constantly decreasing cost, and are widely used in automotive electronics.  industrial control/medical, and other fields; however, there are still a large number of application scenarios requiring simple control, and low-value MCUs have cost advantages, so they continue to occupy a large market.BitApplication4Calculator, auto instrument, auto anti-theft device, pager, wireless phone, CD player, LCD dynamic controller, children's toys, scales, chargers, Tire gauge, thermometer, remote control, etc8Electrical appliances, ammeter, motor controller, electric toy machine, pager, fax machine, telephonograph, keyboard and USB, etc16Mobile phones, digital cameras and video recorders, etc32Smart home, IoT, motor and frequency conversion control, security monitoring, fingerprint identification, touch keys, Modem, GPS, STB, Workstation, ISDN telephone, laser printer and color fax machine, etc64Advanced workstation, multimedia interactive system, advanced TV game instrument, advanced terminal, etc.According to IC Insights, the global MCU market is about 16.4 billion dollars in 2019 and could reach about 20 billion dollars by 2023.The scale of China's MCU market was about 25.6 billion yuan in 2019, accounting for about 26% of the global market, with a compound growth rate of 9% from 2015 to 2019.In terms of the global market, the auto circuit accounts for 33% of the global MCU market. According to IC Insights data, the automotive MCU market space will reach $8.1 billion in 2023, the overall growth rate is considerable; At the moment, 32-bit MCUs have become the market's mainstream due to their higher specifications and performance, as well as their constantly decreasing cost, and are widely used in automotive electronics.  industrial control/medical, and other fields; however, there are still a large number of application scenarios requiring simple control, and low-value MCUs have cost advantages, so they continue to occupy a large market.Figure 5  MCU Market StructureFrom the perspective of pattern, the top five global automotive MCU market shares in 2020 were Renesas, NXP, Infineon, Texas Instruments and Microchip, accounting for 87% in total.Ⅳ China MCU Technology and Well-known ManufacturersMCU market is still dominated by overseas leaders, and Chinese high-quality manufacturers are gradually making breakthroughs in the segmented fields, and their share is expected to increase rapidly under the background of accelerated localization in China.The global MCU market is expected to grow further, with the global MCU market size reaching $16.4 billion in 2019 and $20 billion in 2023.On the demand side, improvements in automotive electrification, accelerated IoT  penetration, increased demand for intelligent frequency conversion in home appliances, rapid iteration of wearable devices, and steady growth in industrial control continue to drive the rapid growth of the MCU industry. (Using MCU as an example, the global market compound growth rate from 2020 to 2023 is 7.7 percent, and the market space is expected to be 8.1 billion dollars by 2023)On the supply side, the MCU industry is experiencing a continuous shortage due to the epidemic in 2020. Infineon, NXP.  and ST  , as well as other overseas MCU large factories, have appeared several times to dozens of times the price, with delivery times of more than 50 weeks; persistent shortages are expected to last at least through the end of 2021 and the first quarter of 2022.In terms of circuit barriers, the requirements of automobile circuits in the MCU downstream field are the highest, followed by industrial and home appliance circuits, and the relative requirements of consumer electronics  are slightly lower, according to MCU product environmental temperature, yield, and service life, and other parameters.According to the industry competition pattern, Chinese MCU manufacturers have a low market share, benefit from accelerated replacement due to stock shortages in the short term, and have ample room for improvement in the long term:The global MCU market is more concentrated, with a microchip, ST  MICROELECTRONICS, Renesas, TI, NXP  , Infineon, and other manufacturers occupying more than 80% of the market share; China's MCU market is approximately 25 billion yuan, and the total market share of domestic MCU manufacturers is less than 12%, primarily concentrated in the consumer market, which has ample room for expansion.The shortage of goods leads to the acceleration of the pace of China's MCU manufacturers, in the automotive, industrial, and consumer circuit, the pace of China's MCU certification continues to accelerate. Renesas Electronics - the world's first automotive MCU manufacturer Renesas was founded in 2003 by the merger of Hitachi Semiconductor division and Mitsubishi Electric Semiconductor division. Its main business covers automotive, industrial, communications, and other fields. Renesas is the world's first automotive MCU manufacturer, accounting for 30% of the automotive MCU market in 2020.Renesas MCU has a complete product line covering EV/HEV, powertrain, electric vehicle, vehicle dashboard, vehicle network, chassis control, ADAS, and other application fields.Microchip technology -8 bit MCU main features, acquisition of Atmel to supplement the strength of 32 bit MCUMicrochip Technology Corporation (Microchip) was founded in 1989, Microchip technology is the world's leading supplier of single-chip and analog semiconductors. The company's main business is the microcontroller, memory products, analog interface, and mixed information products, technology licensing, and so on.The products are mainly used in embedded control systems and IoT-related industries, including data processing, Medical Internet + (IoT), smart city, Industry 4.0, intelligent healthcare, etc. Major customers include Intel, Dell, Lockheed Martin, HP, Boeing, etc. STST -ARM architecture MCU king ST was founded in 1987, its products are mainly used in automotive products, computer peripherals, communication systems, consumer products, industrial automation control systems, and other aspects. Its major customers include Apple, blackberry, Bosch, Cisco, Conti, HP, Nokia, Obata, Samsung, and Western Digital.MCU vehicle grade products accounted for 32.13% of the company's revenue. St holds 8.5% of the current MCU market and is the leader in the segmented 32bitMCU  market.ST has been deeply engaged in the automotive semiconductor field for many years, and the company has a complete industrial chain, its products have a very high-cost performance ratio, and occupy a dominant position in the MCU of vehicle regulation level. Its customers include Nissan, Audi, SAIC, Tesla, and many other companies. NXP - the world's leading automotive MCU manufacturer NXP Semiconductor was founded in 2006. It was formerly the semiconductor division of Philips. NXP's main business is MCU, MPU, and other products, which can be widely used in automotive electronics  , industrial control, smart city, smart home, and wearable products. Its MCU/MPU based on the S32 automotive platform has obvious advantages in safety and efficiency and has been adopted by mainstream OEMs around the world.The industry's first crossover MCU was independently developed by NXP: I. MX RT series. Such products have been recognized by many Internet platforms (such as Amazon) for their high integration, cost performance, and security.NXP's acquisition of Freescale (founded by MOTOROLA) in 2015 gives it a deeper presence in the automotive industry. In 2020, 47% of its revenue came from vehicle MCU. At present, the company accounts for 27.8% of the global automotive MCU industry, ranking second in the world. NXP  provides complete semiconductor solutions for intelligent vehicles including automotive entertainment systems, Advanced Driver Assistance Systems (ADAS). Sino Wealth Electronics - China's largest home appliance MCU manufacturer Sino Wealth Electronic Ltd. is an MCU integrated circuit design company, the main products include 8-bit Flash MCU, 8-bit OTP/Mask MCU, 16-bit  DSP , 4-bit OTP/Mask MCU, widely used in household appliances, automotive, industrial control, security, and other fields;In the field of small household appliances, the company's competitors are mainly ABOV from Korea and Holtek from Taiwan. In the field of white household appliances, the company's competitors are mainly from Europe and America, including Renesas, NEC, TI, STM, and so on. Ⅴ The Basic Functions of MCUInternal-function diagramFor most MCUs, the following functions are the most common and basic. The description methods for different MCUs may differ, but the essence is essentially the same.1. Timer: Although there are many different types of Timers, they can be divided into two categories. The first is a Timer with a fixed time interval, which means that its timing is set by the system and cannot be controlled by the user program. The system only provides a few different types of Timers. The user program is given a fixed time interval, such as 32Hz, 16Hz, 8Hz, and so on. Because Timers of this type are relatively common in 4-bit MCUs,they can be used to implement clock, timing, and other related functions.The other type is Programmable Timer. The timing of this type of Timer can be controlled by the user's program. The control methods include the selection of the clock source, the selection of the prescale number, and the setting of the preset number, etc. There are Most MCUs have all three at the same time, and some may have one or both of them. This kind of Timer application is very flexible, and the actual use is also ever-changing. One of the most common applications is to use it to achieve PWM  output.Since the clock source can be freely selected, such Timers are generally combined with the Event Counter.2. IO port: Any MCU has a certain number of IO ports. Without IO ports, the MCU will lose the channel of communication with the outside world. According to the configurable situation of the IO port, it can be divided into the following types:Pure input or pure output : This type of IO port is determined by the MCU hardware design, and can only be input or output, and cannot be set in real-time by software.3. Directly read and write IO port: For example, the IO port of MCS-51 belongs to this type of IO port. When the read IO port command is executed, it is an input port; when the write IO port command is executed, it is automatically an output port.Program programming to set the direction of input and output: the input or output of this type of IO port is set by the program according to the actual needs, the application is more flexible, and can realize some bus-level applications, such as12C bus, various LCD, LED Driver control bus, etc.When using the IO port, this point must be kept in mind: for the input port, there must be a clear level signal to ensure that it cannot be floated (this can be achieved by adding a pull-up or pull-down resistor); and for the output port, the output state level must be Considering its external connection, it should be ensured that there is no source current or sink current in Standby or static state.External interrupts: External interrupts are a basic function of most MCUs. They are commonly used for real-time signal generation, data sampling, and state detection. Rising edge, falling edge, and level triggering are all interrupting methods. In most cases, the external interrupt is handled via the input port. If it is an IO port, the interrupt function will only be enabled when it is set as an input port; if it is set as an output port, the external interrupt function will be automatically closed (with some exceptions in ATMEL's ATiny series, where the output port can also trigger the interrupt function). The application of external interrupt is as follows:Detection of external trigger signals: One is based on real-time requirements, such as thyristor control, detection of sudden signals, and so on, while the other is based on power savings.Measurement of signal frequency:: To ensure that the signal is not missed, an external interrupt is the best option.Decoding data: To reduce design costs in the field of remote control applications, it is frequently necessary to use software to decode various encoded data, such as Manchester and PWM encoding.Button detection and system wake-up: In order for the MCU to enter the Sleep state, it must be woken up via an external interrupt. The most basic form is a button, and the level change is caused by the button's action.4. Communication interface: The communication interface provided by MCU generally includes SPI interface, UART. I2C interface, etc., which are described as follows:SPI interface: This type of interface is the most basic communication method provided by most MCUs. Its data transmission is controlled by a synchronous clock. The signals include SDI (serial data input), SDO (serial data output), SCLK (serial clock), and Ready signal; in some cases, there may be no Ready signal; this type of interface can work in Master mode or Slave mode, the popular saying is to see who provides the clock signal, the party providing the clock is the Master, and the opposite party It is Slaver.UART(Universal Asynchronous Receive Transmit):It belongs to the most basic asynchronous transmission interface. Its signal lines only have two Rx and Tx lines. The basic data format is: Start Bit + Data Bit(7-bits/8-bits) + Parity Bit(Even, Odd or None) + Stop Bit(1~2Bit). The time occupied by one bit of data is called Baud Rate .For most MCUs, the length of data bits, data check mode (odd check, even check or no check), Stop Bit length and Baud Rate can be flexibly set through program programming. Certainly. The most common way of this type of interface is to communicate with the serial port of the PC.I2C interface: I2C  is a data transmission protocol developed by Philips. It also uses two signals to implement: SDAT (serial data input and output) and SCLK (serial clock). The biggest advantage is that multiple devices can be attached to this bus, and they can be identified and accessed through addresses; one of the biggest advantages of the I2C  bus is that it is very convenient to use software to implement through the IO port, and the data rate of its transmission is completely controlled by SCLK. To control, it can be fast or slow, unlike the UART  interface, which has strict rate requirements.5. Watchdog: Watchdoga basic configuration of most MCUs, can only allow the program to reset it but not close it (some are set when the program is burned in, such as Microchip PIC  series MCUs), while some MCUs are It is determined by a specific method whether it is turned on or not. For example, in Samsung's KS57 series, as long as the program accesses the Watchdog  register, it is automatically turned on and cannot be turned off again. Generally speaking, the reset time of the watchdog can be set by the program. The most basic application of Watchdog  is to provide a self-recovery ability for the MCU to crash due to unexpected failure.Ⅵ Learning Methods - Using MCUThe basic principles and functions of any MCU are similar. The only difference is the configuration and quantity of its peripheral function modules and the instruction system.For the instruction system, although it seems to be different in form, it is only a difference in symbols, and the meanings it represents, the functions to be completed, and the addressing modes are similar.To learn about an MCU, the first thing you need to know is its ROM space, RAM space, number of IO ports, number of timers and timing methods, peripheral function modules (Peripheral Circuit) provided, interrupt sources, operating voltage, and power consumption, etc.After understanding these MCU Features, the next step is to compare the functions of the selected MCU with the required functions of the actual project development and clarify which resources are currently required and which are not used in this project.For the functions that need to be used in the project but are not provided by the selected MCU, it is necessary to carefully understand the relevant information of the MCU, to use an indirect method to achieve it. For example, the developed project needs to communicate with the COM port of the PC, and If the selected MCU does not provide a UART  port, it can be implemented through external interrupts.For the resources needed for project development, you need to carefully understand and read the Manua*, while for the unneeded function modules, you can ignore or browse. For MCU learning, the application is the key and the main purpose.For beginners or designers who use this MCU for the first time, they may encounter a lot of ambiguous descriptions of the functions of the MCU. For this kind of problem, there are two ways to solve it, one is to write a special verification program to understand the functions described in the data; the other can be ignored for the time being. Leave it to modify and improve when debugging. The former method is suitable for projects with loose time and beginners, while the latter method is suitable for those who have some experience in single-chip development or when the project schedule is more urgent.Don't take the time to learn the command system in particular. The instruction system is simply a logical description symbol. During programming, you can only check the relevant instructions in accordance with the logic requirements of the program. As your programming skills improve, you will become more proficient in the instruction system.Ⅶ Six Main Dimensions of MCU Products for Future ImprovementStronger computing performance: MCU towards 500Mhz main frequency, MPU increase more processor cores;Additional wireless connection functions: More RF modules have been integrated.Low power consumption, high energy efficiency ratio: integrated analog chip, and low power analog peripheralsContinued support for hardware accelerators: high integration of algorithms and toolsSafety: improve anti-interference ability and safetyCost-effective: reduce costⅧ Programming of MCUThe programming of MCUs and PCs differ significantly. Although C-based MCU development tools are becoming more popular, assembly language remains the most concise and efficient programming language for designers who are efficient program code and like to use assembly.Circuit diagram to build your own microcontroller programmerThe basic framework for MCU programming is roughly the same, divided into the initialization part (the biggest difference between MCU programming and PC programming), the main program loop body, and the interrupt handler. as shown below:1.Initialization: The most basic and important step in the design of all MCU programs is an initialization, which generally includes the following:Mask all interrupts and set the stack pointer to In general, the initialization section does not want any interruptions to occur.Clearing the system's RAM and displaying the Memory: Although it is not always necessary, it is recommended to develop good programming habits for the sake of reliability and consistency, particularly to avoid accidental errors.IO port initialization: Set the input and output modes of the relevant IO port based on the project's application requirements. Set the pull-up or pull-down resistance for the input port, and the initial resistance for the output port.Interrupt setup: Enable and set interrupt trigger conditions for all interrupt sources required by the project, and close unnecessary interrupts that are not used.Initialization of other functional modules: For all peripheral functional modules of MCU that need to be used, corresponding Settings must be carried out according to the application requirements of the project. For example, Baud Rate, data length, verification mode and Stop Bit length should be set for communication of UART  , and clock source should be set for Programmer Timer. Frequency and Reload Data, etc.Initialization of parameters: after completing the initialization of MCU hardware and resources, the following is the initialization of some variables and data used in the program. This part of initialization needs to be designed according to the specific project and the overall arrangement of the program. For some applications that use EEPROM to store the number of prefab items, it is recommended to copy the relevant data to THE RAM of MCU during initialization to improve the speed of data access and reduce the power consumption of the system (in principle, access to the external EEPROM will increase the power consumption of the power supply).2.Main program loop body: Most MCUs run continuously for a long time, so their main program bodies are basically designed in a looping manner. For applications with multiple working modes, there may be many Each loop body is converted between each other through state flags. For the main program body, the following modules are generally arranged:Calculation procedures: Calculation procedures are generally time-consuming, so it is strongly opposed to processing in any interrupt, especially multiplication and division operations.Processing programs with low or no real-time requirements;Display transfer program: mainly for applications with external LED and LCD Driver.3. Interrupt handler: The interrupt program is mainly used to handle tasks and events with high real-time requirements, such as detection of external sudden signals, detection, and processing of buttons, timing counting, LED display scanning, etc.Under normal circumstances, the interrupt program should keep the code as concise as possible. For functions that do not need to be processed in real-time, the trigger flag can be set in the interrupt, and then the main program executes the specific transaction - this is very important, especially for low-power, low-speed MCUs, is necessary to ensure timely responses to all interrupts.4. There are various MCU processing methods for various task bodies.For example, for low-speed, low-power MCU (Fosc=32768Hz) applications, considering that such projects are handheld devices and use ordinary LCD, the response to buttons and display response requires high real-time performance, so generally Timed interrupts are used to process button actions and data display; for high-speed MCUs, such as Fosc>1MHz applications, since the MCU has enough time to execute the main program loop body at this time, it can only be interrupted at the corresponding Various trigger flags are set in the program, and all tasks are executed in the main program body.5. In MCU programming, special attention should be paid to:Avoid situations where the same variable or data is accessed or set in both the interrupt and the main body. The effective prevention method is to arrange the processing of such data in a module, and decide whether to execute the relevant operation of the data by judging the trigger flag; In other bodies (mainly interrupts), only the trigger flag is set where the processing of the data is required. This ensures that data execution is predictable and unique.Ⅸ Summary of the MCU Programming EngineerTo develop a good habit of summarizing, summarizing is not only a summary of their learning, but also a review and deepening of the learning process, but also to avoid the second error.Before writing the program, we should have a solid understanding of the project so that we can start with a solid idea and a general framework. It is critical to consider the layout and what makes the most sense. To determine which module should be completed first, specific steps for the module, how to name each function, and the relationship with other modules. Take a piece of paper and scribble down significant progress.For C language modular programming, we should first divide each module, a module programming, determine a sequence, and then write the next module based on the success of the previous one. When it comes to header files, write the module's header file after you've finished writing the module.Do not ignore the fact that the program must be unreasonable to comprehend its origins and find a solution. When looking for a source, it should be pertinent; you can search for relevant data on the Internet or consult with others. For example, the primary function of another project was incorporated into this project. Some functions are named multiple times. Step by step analysis of the cause, also according to the experimental phenomenon. When defining the port, the incorrect interface was selected. When you can't solve a problem, it's sometimes good to take a break. Things can go wrong no matter how simple they seemThe problems of code utilization efficiency, anti-interference, and MCU reliability continue to plague MCU application development. Ⅹ How to Develop MCU 1How to reduce program bugsThe following are the over-arching management parameters that should be considered during system operation in order to reduce program bugs.Physical parameters: These are primarily system input parameters that include excitation parameters, acquisition and processing operating parameters, and result parameters at the end of processing.Resource parameters: These are primarily the resources of the system's circuits, devices, and functional units, such as memory capacity, storage unit length, and stacking depth.These application parameters are frequently expressed as the application conditions of some single-chip microcomputers and functional units. The term "process parameter" refers to a parameter that changes in an orderly manner during the system's operation.2How to improve the efficiency of C language programming codeIt is an inevitable trend of the development and application of MCU to use C language to design MCU. If you are programming in C, it is best to be familiar with the C compiler you are using to achieve maximum efficiency. First test the number of statement lines in the assembly language corresponding to each C language compilation, so that you can clearly know the efficiency. When programming in the future, use the statement with the highest compilation efficiency. Each C compiler will have certain differences, so the compilation efficiency will also be different. The code length and execution time of an excellent embedded system C compiler is only 5-20% longer than the same functional degree written in assembly language.C language can be used for complex and time-critical projects, but the premise is that you are very familiar with the C language and C compiler of the MCU system and that you pay special attention to the data types and algorithms that the C compiler system can support. Although C is the most commonly used high-level language, the C language compilation system varies due to MCU manufacturer differences, particularly in the operation of some special function modules. As a result, if you don't understand these features, you'll have a lot of trouble debugging, which will result in lower execution efficiency than assembly language.3 How to Solve the MCU Anti-Interference ProblemThe most effective way to prevent interference is to remove interference sources and cut off interference paths, but this is often difficult to do, so we can only conclude that MCU's anti-interference ability is insufficient. While improving the anti-interference capability of hardware systems, software anti-interference has received increasing attention due to its flexible design, ability to save hardware resources, and high reliability.As for the program run fly, in fact, can also use software trap and watchdog to pull the program back to reset state, so the MCU software anti-interference is the most important to deal with the reset state.In most cases, MCU will have some sign registers that can be used to determine the reason for the reset; alternatively, you can bury some tokens in RAM yourself. Different reset causes can be determined in each program reset by judging these signs. You can also use different flags to jump directly to the corresponding program. In this manner, the program will run indefinitely, and the user will be unaware that it has been reset.4How to test the reliability of the MCU systemWhen a MCU system design is completed, there will be different test items and methods for different MCU system products, but some must be tested:lTest the completeness of the software functions of the MCUlPower-on and power-off testlAging testlTests such as ESD and EFT Sometimes, we can also simulate the damage that may occur in human use. For example, the contact port of the MCU system is intentionally rubbed with the human body or clothing fabric, thereby testing the antistatic ability. Use a high-power electric drill to work close to the MCU system to test the anti-electromagnetic interference ability.To sum up, the MCU has become an important aspect of the development and application of the computer.Most of the functions that must be realized by analog circuits or digital circuits in the past can now be realized by software methods using a single-chip microcomputer. This control technology in which software replaces hardware is also called micro-control technology, which is a revolution of traditional control technology.In addition, in the process of development and application, we must master the skills and improve the efficiency, so as to facilitate its wider use.Ⅺ 5 Tips to Solve the Questions About the MCU CrystalCrystal oscillator for MCUCommon causes of the crystal can not vibratePCB wiring error;Microcontroller quality issues;Crystal vibration quality issues;The load capacitance or matching capacitance does not match the crystal oscillator or the capacitor quality is incorrect;PCB board damp, resulting in impedance mismatch and inability to vibrate;The crystal oscillator circuit is too long;There is a line between the feet of crystal;Influence of peripheral circuit.You are advised to rectify faults one by one as follows: 1Remove the possibility of circuit error so that you can compare the recommended circuit of the corresponding type of microcontroller.2 Rule out the possibility of poor peripheral components; because peripheral components are nothing more than resistance and capacitance.3Rule out the possibility of using a crystal oscillator as a stop oscillator because you will not be experimenting with just one or two crystal oscillators.4Try changing the capacitor at both ends of the crystal; perhaps the crystal oscillator will begin to vibrate; please refer to the crystal oscillator capacitor size instructions.5In PC  B wiring, crystal oscillator circuit wiring should be as short as possible and as close to IC as possible, not between crystal oscillator feet. Ⅻ Summary of Chip OperationThe operation of the chip is mainly the operation of the registers in the chip. The registers in the chip have their unique address mapped on the memory, which is the operation of the corresponding address. To learn the chip, first look at the sequence diagram, then understand the corresponding registers, understand how to operate, define the required port (the program can recognize), write and read the operation program.Cross-sectional-views-of-chip-operationHow data is written to the chip, how it is read out, and through which port it is input or read.When connecting a chip through a bus, the first step is to understand the protocol of the bus. The chip connected to the I2c bus is controlled by the bus.1One 74HC595 lattice is used for column selection, and the other two are used for color selection. The lattice is equivalent to a set of diodes.The diode lights up only when one end is switched to a high level and the other to a low level. Just one end of the selection of different, bright different colors.Timer working mode selection: Set timer T1 in the high four digits and timer T0 in the low four digits. Then the last two characters of each mode set the working mode. When using interrupts, note that after entering the interrupt, the reset should be reset.2Serial port transceiver: Baud rate is generally set in mode 2 (automatic reloading initial value) because different devices have different data processing capabilities, the baud rate is set mainly to take care of low-speed devices and for communication between each other. The interrupt flag bit should be cleared by the software. When setting the serial port interrupt, either sending or receiving can enter the interrupt function, so pay attention to setting the interrupt function. (Self-sense generally sets a function, as the upper machine or lower machine).If you send interrupts, you have to figure out how to enter interrupts the first time, so you send them once and then you can enter interrupts. Only one byte can be sent at a time, and only after TI is set to one can the next byte be sent.3Pcf8591ad conversion, there are four channels of input, read PC  F8591, which channel, read is that channel input voltage, after the conversion of data stored in the chip, then read. Read to write the address of the chip, the son writes device address (0 x40 | channel number) and then reads the data.4Da conversion is to write the device address into the chip first, then write the sub-address (0x40) and then write the digital quantity to be converted. Device address chip information is introduced.5For the liquid crystal display, write data display, he will always display, do not continue to refresh, to change, only re-input.6For THE DS1302 clock chip, reading data is read out of the first data at the falling edge of the eighth clock when writing data, and then prepare for the next output. Pay attention to the writing of the program, but also pay attention to the position of the return value.7In Ds1302, the register is specified first, and then data is written to it. The registers on the chip data indicate the address. 8Initialization is best to write, in case you forget later. When reading or writing, the first operation is the lowest or highest bid, which can be judged according to the sequence diagram.9For the infrared transceiver, receiving, he is according to the length of time between the two falling edges to determine the high level or low level, write a program, first with the timer to determine the length of time, save, and then into binary (the program written to see more, very good).10Stepper motor: mainly used as switches, stepper motor torque decreases with the increase of speed. It is mainly used for automatic feeding of parts processing on machine tools. It can also be used in high-precision control places.Stepper motor is an open-loop control element stepper motor that converts electric pulse signal into angular displacement or linear displacement. In the case of the overload, motor speed, stop position depends only on the pulse signal frequency and pulse number, and are not affected by load change, when the stepper driver receives a pulse signal, it is driving a stepper motor according to set the direction of a fixed Angle, known as the "step Angle", its rotation is based on the Angle of the fixed step by step. The angular displacement can be controlled by controlling the number of pulses to achieve accurate positioning. At the same time, the speed and acceleration of the motor can be controlled by controlling the pulse frequency, achieving the purpose of speed regulation.11Servo motor : Servo motor refers to the engine that controls the operation of mechanical components in a servo system. It is an indirect transmission device for auxiliary motors. Servo motors can control speed, position accuracy is very accurate, voltage signal can be converted into torque and speed to drive the control object. Servo motor rotor speed is controlled by the input signal, and can respond quickly, in the automatic control system, used as an executive element, and has the characteristics of mechanical and electrical time constant is small, high linearity, starting voltage, etc., can receive the electrical signal into the motor shaft angular displacement or angular velocity output. It is divided into DC and AC servo motors. Its main characteristic is that when the signal voltage is zero, there is no rotation phenomenon, and the speed decreases uniformly with the increase of torque.12Chinese Characters overview: To output Chinese characters on display or printer, Chinese characters are designed into a dot matrix graph according to graphic symbols, and corresponding dot matrix codes (glyphs) are obtained.The unified encoding for the representation of Chinese characters in the computer is called the internal code (such as national code), and the internal code is unique (equivalent to the id number of the character). The encoding of Chinese characters formed to facilitate the input of Chinese characters is the input code, which belongs to the external code of Chinese characters. The input code varies with the encoding mode and is diverse. The Chinese character code formed for displaying and printing Chinese characters is the character code, and the computer finds the character code in the character library through the character code and realizes its conversion.Machine code: According to the GB code, each Chinese character has a certain binary code, but this code will conflict with THE ASCII code when handled internally by the computer. To solve this problem, the first byte of each GB code is incremented by 1. Because ASCII code only uses 7 bits, the "1" on the first digit can be used as a symbol to identify Chinese character codes. When the computer processes the code with the first digit of "1", it will be interpreted as the information of Chinese characters, and when it processes the code with the first digit of "0", it will be interpreted as the ASCII code. After such processing, the national code (internal code) is the machine's internal code.If put this "mouth" word graphic "." With "0" instead, you can very vividly get the "mouth" glyphs :0000H 0004H 3FFAH 2004H2004H 2004H2004H 2004H2004H 2004H2004H 2004H 3FFAH 2004H 0000H 0000H. Computer to output "mouth", find shows that character first address, according to the "mouth" machine code after calculation, to find a "mouth" glyph code, and then according to the glyph code (to) in binary character generator, in turn, scan control on the screen, which is where the "0" of the binary empty, is a place where "1" swept out of the window, Then you get the character graph of the mouth.Chinese characters are arranged according to the order of national standard codes and stored in the memory in the form of binary files, which constitute the Chinese character font library, also known as the Chinese character font library, called the Chinese character library1312864 liquid crystal: Each display point corresponds to a binary number, with 1 indicating on and 0 indicating off. The RAM that stores this lattice information is called the display data memory. To display a graph or Chinese character is to write the corresponding lattice information into the corresponding storage unit.When the horizontal address = 0FH, it will be reset to 00H, but it will not automatically add one to the vertical address. Therefore, when writing multiple data in a row, the program needs to determine whether the vertical address needs to be reset14GDRAM: Drawing display RAM provides 128×8 bytes of memory space. When changing the drawing RAM, the horizontal and vertical coordinate values are successively written, and then two bytes of data are written to the drawing RAM. The address counter (AC) will automatically increment the horizontal address (X address) and reset to 00H when the horizontal address is 0XFH. Vertical addresses will not be carried automatically plus 1. The drawing display must be turned off during writing to the drawing RAM,For C, a defined variable is automatically allocated space and its address is the name of the variable. Through this name, the data can be recruited in memory, and the new data can be obtained through an operation. In assembly, the programmer needs to define the storage space and send the data to the accumulator for operation, and the programmer needs to operate every step. In C, this is done by the compiler.FAQ1. What is the main function of microcontroller?Microcontroller is a compressed micro computer manufactured to control the functions of embedded systems in office machines, robots, home appliances, motor vehicles, and a number of other gadgets. A microcontroller is comprises components like - memory, peripherals and most importantly a processor.2. What is an example of a microcontroller?The examples of 8-bit microcontrollers are Intel 8031/8051, PIC1x, and Motorola MC68HC11 families. The 16-bit microcontroller performs greater precision and performance as compared to the 8-bit.3. What are the elements of a microcontroller?Therefore, the microcontroller must also satisfy the five basic elements of input, calculation, storage, output, and control. These are called five elements of microcontrollers.4. Which is best microprocessor or microcontroller?If you need access to large amounts of really fast memory then a microprocessor is likely your best option. A microcontroller is already embedded with memory so the memory choices are fewer than with a microprocessor. The maximum amount of FLASH memory available with most microcontrollers is usually around 2MB.5. What is difference between BIOS and CMOS?The BIOS is the program that starts a computer up, and the CMOS is where the BIOS stores the date, time, and system configuration details it needs to start the computer. ... CMOS is a type of memory technology, but most people use the term to refer to the chip that stores variable data for startup.6. Is CMOS a RAM or ROM?RAM and ROM are the products, but Complimentary Metal Oxide Semiconductor (CMOS) is the process they are built in. CMOS uses two different types of transistors to achieve a lower overall power consumption.7. Whats an RTC battery?The Real Time Clock (RTC) battery provides power for the internal clock/calendar and for maintaining system configuration settings. This error can occur when a machine has been left turned-off for an extended period of time (approximately one to four months), and it is the result of a depleted RTC battery.            
kynix On 2022-01-12   1689
Optoelectronics

What Is Optocoupler and Its Application with Examples

Ⅰ IntroductionThis article focuses on the electronic component known as the Optocoupler. (For the fiber-optic networking component, please refer to Optical Isolators). This guide covers the fundamentals of optocouplers, their working principles, specifications, and practical examples of how to implement them in your circuits.Optocoupler Related VideoVideo: How an Optocoupler Works and Example CircuitⅡ Photocouplers, Opto-couplers & Opto-isolatorsThese devices are known by a variety of names, including optoisolator, photocoupler, and optocoupler.An optocoupler is a semiconductor device that transmits an electrical signal between two isolated circuits using light. This process ensures there is no direct electrical connection between the input (source) and the output (load), effectively protecting sensitive low-voltage components.While often used interchangeably, there is a technical distinction in the industry:Optocoupler: Typically refers to devices used to transfer analog or digital information between circuits with voltage differentials below 5,000 Volts.Optoisolator: Often refers to devices specifically designed to withstand very high voltage differentials (5,000V to 50,000V+) for safety isolation in power systems.Optocouplers are typically housed in small packages ranging from standard DIP (Dual Inline Package) to tiny SMD (Surface Mount Device) packages. Despite their small size, they play a massive role in linking data, optical encoding, and detecting position transitions on encoder wheels.They are also the core technology inside Solid-State Relays (SSR), allowing low-power logic signals to switch high-power AC or DC loads without any mechanical parts.Figure 1: Typical Photocouplers in DIP packagingⅢ Photocoupler / Optocoupler BasicsAn optocoupler consists of two main internal elements encased in a light-tight body:The Emitter: Usually a Near-Infrared LED (Light Emitting Diode) that converts the electrical input signal into light.The Detector: A photosensitive device (such as a phototransistor, photodiode, or TRIAC) that detects the light and generates an electrical output.These two components are separated by a transparent dielectric barrier (glass, plastic, or air gap). Because the connection is made via light photons rather than electrons, the input and output sides are electrically isolated. This isolation prevents high voltages or rapidly changing voltage spikes on one side from damaging components on the other.Ⅳ Optocoupler SymbolIn circuit diagrams, the optocoupler symbol illustrates its internal functionality. The left side typically shows the LED (Emitter), and the right side shows the receiver (Detector).Figure 2: Optocoupler circuit symbol (Phototransistor output)Common Variations:Phototransistor: The most common type for DC signal switching (shown above).Photo-Darlington: Uses a Darlington pair transistor for much higher gain (sensitivity) but slower switching speed.Photo-TRIAC / Photo-SCR: Used for controlling AC power mains.Figure 3: Photo-TRIAC circuit symbol (used for AC control)Ⅴ Optocoupler Specifications to WatchWhen selecting a component, consult the datasheet for these critical parameters:1. Current Transfer Ratio (CTR)This is the equivalent of "gain" (Beta) in a standard transistor. It is the ratio of the output collector current ($I_C$) to the input LED forward current ($I_F$), expressed as a percentage.Standard Phototransistor: CTR ranges from 10% to 100%.Photodarlington: CTR can range from 500% to 5000% (high sensitivity).Design Note - CTR Degradation: The efficiency of the internal LED decreases over time (aging). A good engineering practice is to design your circuit assuming the CTR will drop by 50% over the product's lifespan.2. Bandwidth and SpeedThis determines the maximum data rate.Phototransistors: Generally limited to about 250 kHz.Photodarlingtons: Slower, often limited to < 20 kHz due to long turn-off times.High-Speed Optocouplers: Devices like the 6N137 use a photodiode + logic amplifier architecture and can handle 10 MHz or more.3. Input Current ($I_F$)This is the current required to light up the internal LED. You must calculate a series resistor to limit this current, typically between 5mA and 20mA for standard devices.4. Isolation Voltage ($V_{iso}$)The maximum voltage difference the component can withstand between the input and output pins without electricity jumping the gap. Common ratings are 2500V to 5000V RMS.Ⅵ How It WorksThe operation is straightforward:Current is applied to the input side, flowing through the internal infrared LED.The LED emits infrared light inside the package. The intensity of this light is proportional to the input current.The light strikes the photosensitive base of the output transistor (or Triac).The photosensitive device "turns on" and conducts current.Figure 4: The internal light pathWhy is the Base pin unconnected?In many 6-pin optocouplers (like the 4N25), the base of the transistor is broken out to a pin (Pin 6). However, in most applications, this pin is left floating (unconnected) because the light serves as the base current. Connecting a resistor from the base to the ground can reduce sensitivity but increase switching speed.Figure 5: Effective isolation between Input and OutputⅦ Benefits and TypesPrimary Benefits:Ground Loop Elimination: Breaking the ground path between two circuits prevents hum and noise (critical in audio and instrumentation).Safety: Protects low-voltage microcontrollers (3.3V/5V) from high-voltage spikes (110V/220V).Level Shifting: Allows a 3.3V signal to switch a 24V or 48V circuit effortlessly.Common Types:Photo-Transistor: General-purpose DC switching.Photo-Darlington: High gain for very low input currents.Photo-SCR / Photo-TRIAC: Designed for interfacing with AC power mains.Logic Gate Output: (e.g., 6N137, H11L1) Includes internal logic buffers for high-speed digital communications.Figure 6: Common output configurationsⅧ Typical ApplicationsMicroprocessor I/O: Protecting GPIO pins on Arduinos or PLCs.Switch Mode Power Supplies (SMPS): Used in the feedback loop to maintain voltage regulation while keeping the mains side isolated from the low-voltage side.Motor Driving: Isolating the control logic from the noisy high-current motor drivers.Example: Triac Optocoupler for AC LoadsBy using a device like the MOC3020, a 5V digital signal can trigger a large external Triac, which in turn controls an AC motor or lamp. Many Triac optocouplers feature Zero-Crossing Detection, which ensures the device only switches when the AC voltage is at zero, significantly reducing Electromagnetic Interference (EMI).Figure 7: A basic DC switching configurationⅨ Differences Between Optocouplers and Solid State Relays (SSR)While they operate on the same principle, the distinction lies in power capability and integration.Figure 8: Solid State Relays (SSRs)Optocouplers: Low power. Used for signal transmission. Usually requires external components (external Power Triacs or MOSFETs) to switch heavy loads.Solid State Relays: High power. They contain an optocoupler plus the high-power switching components and protection circuitry inside a single, larger block. They can switch tens of Amps directly.Ⅹ How to Use an Optocoupler with ArduinoConnecting a load directly to an Arduino is risky. If the load is a motor or a solenoid, "flyback" voltage spikes can destroy the microcontroller. Using an optocoupler like the 4N25 or PC817 resolves this.The Circuit Concept:The Arduino drives the internal LED of the optocoupler. The optocoupler's output transistor acts as a switch for the secondary circuit.Figure 9: 4N25 OptocouplerWiring Guide (4N25 to Arduino):1. Input Side: Connect Arduino Pin -> 220Ω Resistor -> Optocoupler Pin 1 (Anode). Connect Pin 2 (Cathode) to Arduino GND.2. Output Side: Connect the device you want to control. Important: If you are using the optocoupler to send a signal into another digital pin, you must use a Pull-up Resistor on the collector (Pin 5) because the phototransistor can only pull voltage down to ground; it cannot "source" voltage effectively.Figure 11: Basic wiring diagram for isolating a signalⅪ FAQ1. What are the disadvantages of an optocoupler?The main disadvantages are speed and power handling. Standard optocouplers have a relatively slow frequency response compared to digital isolators. Also, the output phototransistor cannot handle high currents directly; it usually requires an external transistor or relay to switch heavy loads.2. Is an optocoupler the same as a relay?Not exactly. While both isolate circuits, a mechanical relay uses a physical electromagnet and moving contacts (clicking sound). An optocoupler uses light and has no moving parts. Optocouplers are faster and last longer but handle much less current than relays.3. How do you use an optocoupler for analog signals?While mostly used for digital switching, linear optocouplers exist. To send audio or analog data, you set up a specific bias current (standing current) through the LED and modulate that current with your signal. Specialized "Linear Optocouplers" use feedback photodiodes to linearize the output.4. How do I ensure the optocoupler switches fully (Saturation)?To use an optocoupler as a solid switch, you must drive it into "saturation." This means ensuring the input current ($I_F$) is sufficient and the output collector load resistor is high enough so that the phototransistor turns completely on. Always check the CTR curve in the datasheet.5. Are optocouplers analog or digital?They are fundamentally analog devices (light intensity varies with current), but they are most commonly used in digital applications (On/Off switching). Specialized high-speed digital optocouplers (logic-output) are available specifically for data transmission. ul { margin-bottom: 20px; } li { margin-bottom: 10px; } .caption { text-align: center; font-size: 14px; color: #7f8c8d; margin-top: -15px; margin-bottom: 25px; font-style: italic; } .note-box { background-color: #e8f6f3; border-left: 5px solid #1abc9c; padding: 15px; margin: 20px 0; font-size: 16px; } .warning-box { background-color: #fff3cd; border-left: 5px solid #ffc107; padding: 15px; margin: 20px 0; } strong { color: #d35400; } .faq-item { margin-bottom: 20px; background: #fff; padding: 15px; border: 1px solid #eee; border-radius: 5px; } .faq-question { font-weight: bold; color: #e67e23; font-size: 18px; display: block; margin-bottom: 10px; }
Kynix On 2022-01-12   5027
Connectors

Automotive Connectors Basic and Performance Standards Overview

Introduction Automotive connectors are a component that very common for electronic engineering technicians. Its function is very simple: it sets up a bridge of communication between the blocked or isolated circuits in the circuit, so that the current flows and the circuit realizes the predetermined function. The form and structure of automotive connectors are ever-changing. They are mainly composed of four basic structural components, namely: contacts, shells (depending on the types), insulators, and accessories. Common Automotive Electrical Connections Catalog Introduction Ⅰ Automotive Connectors Ⅱ Basic Structure Ⅲ Design Criteria Ⅳ Automotive Connector Development Trends Ⅴ Connector Selection Ⅵ Performance Standard for Automotive Electrical Connectors Ⅶ FAQ Ⅰ Automotive Connectors There are nearly 100 types of connectors used in general automobiles, and there are hundreds of connectors used in a single model. As people have higher and higher requirements for safety, environmental protection, comfort, and intelligence in automobiles, the application of automotive electronic products is increasing, which make the number of automotive connector applications increase. Figure 1. Automotive Connector Type Ⅱ Basic Structure The four basic structural components of automotive connectors, it is these four basic structural components that enable automotive connectors to act as a bridge to make cars run stably.First, the contact piece is the core part of the automobile connector to complete the electrical connection function. Generally, a contact pair is composed of a male contact piece and a female contact piece, because the electrical connection is completed by the insertion of two parts.The male contact is a rigid part, and its shape is cylindrical (round pin), square column (square pin) or flat (insert). The male contacts are generally made of brass and phosphor bronze. The female contact piece is the jack, which is the key part of the contact pair. It relies on the elastic structure to elastically deform when it is inserted into the pin to generate elastic force to form close contact with the male contact piece to complete the connection. There are many types of jack structures, including cylindrical type (split slot, necking), tuning fork type, cantilever beam type (longitudinal slotting), folding type (longitudinal slotting), box type (square jack) and hyperboloid wire spring jacks, etc.Second, the shell, is the outer cover of the automotive connector. It provides mechanical protection for the built-in insulating mounting plate and pins, and provides alignment when the plug and socket are inserted, thereby fixing the connector to the device.Third, insulators, are also often referred to as automobile connector bases or inserts. Its function is to arrange the contacts according to the required position and spacing, and to ensure the insulation performance with the shell. Good insulation resistance, withstand voltage performance and ease of processing are the basic requirements for selecting insulating materials to be processed into insulators.Fourth, accessories, are divided into the structural part and the installation part. Structural accessories such as retaining rings, positioning keys, positioning pins, guide pins, coupling rings, cable clamps, sealing rings, gaskets, etc. Mounting accessories such as screws, nuts, spring rings, etc. Most of the accessories have standard parts and general parts.   Ⅲ Design Criteria With the rapid development of the automobile industry, various functional parts and various components on the automobile are constantly developing in the direction of intelligence, refinement and reliability. The structural design, appearance design and material of automobile connectors are also proposed. higher requirement. Automotive connectors must meet the USCAR-20 standard, which is the performance standard of automotive electrical connector systems. It is necessary to stipulate that the electrical connector contact surface of automotive connectors should always be reliable throughout the service cycle, including the following factors:1) The material of the connector contacts is stable and reliable.2) Positive force stability.3) The voltage and current of the circuit are stable.4) The temperature requirements are within the specified range, including the surrounding temperature and its own temperature rise.5) Better robustness.6) It must be the same as the connector used for high-speed and long-distance communication computers, and the automotive connector must be able to work reliably under harsh conditions.7) Connector insertion force: below 20.5kg8) Connector retention force: 2.5kg or more9) Heat resistance: -40~120℃ Figure 2. Automotive Connectors Ⅳ Automotive Connector Development Trends The "Miniaturization", "High Speed" and "Intelligence" of connector products are the trends of future development. The future technological innovation of the industry is mainly concentrated in the following directions:1) Miniaturization DevelopmentThis technology is mainly developed for the miniaturization trend of connectors, and can be applied to micro-miniature connectors below 0.3mm, which belongs to the new varieties of MINI USB series products. It can be used for multi-contact expansion card slot connectors, which can meet and exceed the strict requirements of multi-contact surface mount technology butt joint coplanarity, with high accuracy and low cost.2) Wireless TransmissionThe high-frequency and high-speed wireless transmission of connector technology is mainly aimed at a variety of wireless device communication applications and has a wide range of applications.3) Simulation Application TechnologyIt is based on a variety of disciplines and theories, using computer and its corresponding software such as AutoCAD, Pro/E program stress analysis software as tools, through the establishment of product models and corresponding boundary conditions, to its mechanical, electrical, high-frequency simulation analysis and confirmation of other performances, thereby reducing the cost of product development failure caused by factors such as material selection and unreasonable structure, improving the development success rate, and helping to provide support for the realization of complex system applications for products.4) Connector Intelligence TechnologyThis technology is currently mainly used in DC series power connector products. Intelligent signal detection can be performed before power transmission to ensure that the positive and negative poles are turned on and the power is turned on after the plug is inserted in place. In the future, enterprises will need to develop similar intelligent technologies for other products because of the adverse consequences of arc damage and burn-in caused by conductive contact.5) Precision connector technologyPrecision connectors involve many aspects such as product design, process technology and quality control technology. The main technologies include the following aspects:a. Precision mold processing technology: Adopt CAD, CAM and other technologies, introduce high-precision processing equipment in the industry, and use personnel production experience and advanced equipment and technical means to achieve high-precision high-quality mold products.b. Precision stamping and injection molding technology: realize precise, efficient and stable all-round control and perfect surface quality of various stamping parts and injection molding parts to ensure product quality.c. Automated assembly technology: Through the application of precision control technology, semi-automatic testing machine technology, etc., the problem of manual operation of precision products is overcome and the core competitiveness is improved.6) Manufacturing Process ResearchThe competitiveness of products depends to a certain extent on the level of manufacturing technology. Continuously developing new manufacturing processes and improving existing production and processing technologies can greatly improve the manufacturing efficiency and quality assurance capabilities of products.a. Fine manufacturing process: This process is mainly aimed at technologies such as small spacing and thin thickness. Some companies have carried out research on the process of connectors with a spacing of less than 0.4mm. This type of technology can ensure that the company reaches the advanced level of the international industry in the field of ultra-fine manufacturing.b. Integrate development technology of light source signal and electromechanical structure. It can be applied to audio connectors placed in electronic components. By adding IC, LED and other electronic components to the audio connectors, which can also transmit analog signals and the function of digital signal. It breaks through the current design of audio connector conduction transmission in the form of mechanical contact.c. Low temperature and low pressure molding process technology. The sealing and physical and chemical properties of the hot-melt material are used to achieve the functions of insulation and temperature resistance. After packaging, the wire protects the welding point from being pulled by external forces, and the packaging of the DC connector body and the wire has a insulation, temperature resistance, impact resistance and other functions ensure product quality and reliability, and will continue to be developed and applied in different products in the future. Figure 3. Automotive Connectors Ⅴ Connector Selection 1) Electrical FactorCurrent requirements: high current, low current, signal level; Steady state, cyclic, transient.They determine the type of terminal/size of contact segment/plating (0.64mm to 8.0mm pin and male terminal).Wire diameter/insulation requirements: voltage drop and/or corrosion resistance, which determine the center distance of the connector.2) Location/EnvironmentTemperature: Engine compartment – sealed, ambient temperature >105℃; vibration, fluid compatibility, passenger compartment – unsealed, ambient temperature <85℃.Sealing: Potential for high pressure jet/splash, potential for immersion, humidity; fluid type, sealed or not for device connectors.3) StandardStandards: Customer StandardsInstitutional StandardsDomestic StandardsInternational StandardsConnector performance test requirements are included in system-level specifications. For GM, Ford and Chrysler are usually USCAR specifications, that is, engine-related applications have relatively high vibration requirements. Other OEMs generally have their own standards (similar to USCAR). What’s more, equipment-side suppliers are responsible for the performance of mating-side connectors.4) Customer PreferencePreferred product strategy: Reduce cost of connector systems with different methods:Ford: Design competition for door connectors.Ford: Prefer terminal design/supplier (focus on contact interface).General: Prefer the terminal design (focus on the hole position of the connector).Chrysler: Strategies for favoring terminal/plastic Part suppliers.5) Regional preferenceNorth America: USCAR Drawing/Performance/Design Criteria —Tangless Terminals, TPA, CPA regulations. In many instances the harness supplier has a significant influence.Europe: Design influence of contact contacts/development with major OEMs; preference for two-piece contacts, even if cost pressures and North American porting operations force OEMs to consider U.S technology, that is, accepting Tangled contacts. Long-term relationships between OEMs and suppliers.Asia: Traditionally influenced by Toyota. Focus on assembly ability (ergonomics) that affects quality assurance; North America influences China to change the status, like low-cost solutions.6) Physical factorsSize, number of circuits, mating position, wire harness docking or equipment connection, mechanical main features: levers, bolts; manual docking capability; multiple types of connectors for high input/output applications.7) AssemblyWire Harness: Insertion force of connectorVisual, audible and tactile operational feedback for users. Figure 4. Terminals & Connectors Ⅵ Performance Standard for Automotive Electrical Connectors For a connector, the specification parameters such as the ambient temperature, current carrying capacity, protection level, anti-vibration level, etc. will be defined in its specifications at the beginning of research and development, because when the connector is selected according to different requirements. The following are three most widely used standards USCAR-2-6, QC/T1067-2017 and GMW3191-2012.🔺QC/T-1067 Temperature Classification Class Ambient Operating Temperature Typical Installation Position A -40~85℃ Passenger compartment (Not recommended) B -40~100℃ Passenger compartment C -40~125℃ On engine D -40~150℃ On engine (hot locations) E -40~175℃ and above Negotiate   🔺QC/T-1067 Vibration Classification Class Typical Installation Position V1 On elastic parts of the body but not to the engine V2 On engine but not to heavily vibrating parts V3 Components subject to serve vibration V4 Components subject to extreme vibration V5 On Wheel   🔺QC/T-1067 Sealing Classification Class Description Typical Installation Position S1 Unsealed Passenger compartment or trunk S2 Sealed Exposed areas S3 Sealed (with high pressure spray) Exposed areas (with high pressure spray)   🔶GMW-3191 Temperature Class Class Ambient Operating Temperature Typical Installation Position 1 -40~85℃ Passenger compartment or trunk 2 -40~100℃ Underhood, chassis 3 -40~125℃ On engine, transmission 4 -40~150℃ On engine (hot locations) 5 Per connector CTS Per CTS GTS=Component Technical Specification   🔶GMW-3191 Vibration Class Class Typical Installation Position 1 On body or chassis 2 On engine 3 On wheel, Unsprung Mass 4 Severe applications (e.g., ECU, Throttle Body, EGR) 5 Transmission (internal and external) ECU=Engine Control Unit, EGR=Exhaust Gas Recirculation   🔶GMW-3191 Sealing Class Class Description Typical Installation Position 1 Unsealed Unsealed Passenger Compartment or trunk 2 Submersion Sealed Underhood or exposed areas, including door 3 High Pressure Spray Protected Exposed areas where high pressure spray is expected   🔻USCAR-2 Temperature Classification Class Ambient Operating Temperature Typical Application T1 -40~85℃ T1 is not recommended for new applications T2 -40~100℃ Typical suitable for use in passenger component T3 -40~125℃ Typical suitable for use in engine component T4 -40~150℃ Needed for some on-engine applications near hot components T5 -40~175℃ For use as needed   🔻USCAR-2 Vibration Classification Class Common Name Typical Application Other Requirements Met V1 Chassis Profile Components on sprung portions of vehiele not coupled to Engine None V2 Engine Profile Components coupled to Engine with no severe vibration possible Pass on V2 - pass also for V1 V3 Severe On-Engine Components subject to serve vibration Pass on V3 - pass also for V1 and V2 V4 Extreme Vibration Used as needed to correlate to extreme vibration areas Pass on V4 - pass also for V1 and V2 and V3 V5 Unsprung Component Wheel-mounted components None   🔻USCAR-2 Sealing Classification Seal Class Common Name Typical Application S1 Unsealed S1 is suitable for use in passenger components or other dry areas on a vehicle such as the trunk S2 Sealed S2 (meets requirements of 5.9.7) is for exposed locations S3 Sealed (with high pressure spray) S3 is for exposed locations. It meets Sections 5.9.7 plus 5.6.7; S3 is applications when robustness to direct splash is needed Regarding the vibration test, the main purpose is to check whether the performance of the connector system under the simulated actual vehicle vibration conditions meets the requirements. In the case of vibration or in shock, it will cause the coating wear of the terminal contact surface, the positive pressure attenuation, the failure of the mechanical system performance of the supporting plastic material, etc. Therefore, it is necessary to continuously monitor the contact resistance in the vibration experiment and ensure that it does not exceed 7Ω (or 1Ω) in the line for more than 1 microsecond. According to the definition and analysis of the connector using environment through the above different standards, it is necessary to understand that the use position, the temperature level, vibration level, and protection level should be considered to make the best choice.   Ⅶ FAQ 1. What are connectors in cars?Connectors used in automotive applications enable everything from stereo systems to drivetrains. As these systems become more connected, more automated, and more energy-efficient, they require connectors that can deliver high-speed connectivity in rugged, lightweight, and easy-to-install designs. 2. How do I choose a car connector?There are several criteria to consider when selecting electrical interconnect components, including:Current rating (current density)Connector size (circuit density)Engagement forceWire sizeConfiguration and circuit sizeOperating voltageAgency approvalsPrice per circuit 3. What are the different types of automotive electrical connectors?Automotive TerminalsContactsCrimp Wire Pins, Tabs & FerrulesFoil TerminalsInterconnect DevicesKnife DisconnectsMagnet Wire TerminalsPCB Terminals 4. How many connectors does a car have?Today, there are an average of 274 connectors in a vehicle. 5. Are all car stereo connectors the same?All aftermarket car stereos can use the same car stereo wiring harness, but it all depends on what the owner of the vehicle wants to do for one main reason. 6. What is uscar standard?SAE USCAR-2. May 1, 2004. PERFORMANCE STANDARD FOR AUTOMOTIVE ELECTRICAL CONNECTOR SYSTEMS. Procedures included within this specification are intended to cover performance testing at all phases of development, production, and field analysis of electrical terminals, connectors, and so on.
kynix On 2022-01-11   3279
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   2159
Power

Current Sampling in Field Oriented Control (FOC) Approach

Introduction In the FOC(Field Oriented Control) algorithm, the sampling current is the basis of the algorithm implementation and a very important part. So accurate current sampling can bring better result to the algorithm. In other words, if the current sampling is accurate, it will be very helpful for the subsequent coordinate transformation to obtain required results. From this we can see the role of current sampling in the entire FOC algorithm. Understanding Field-Oriented Control Catalog Introduction Ⅰ Current Sampling Method Ⅱ Three Sampling Methods and Precautions 2.1 Single-resistor Sampling 2.2 Dual-resistor Sampling 2.3 Triple-resistor Sampling Ⅲ The Key to Sampling Ⅳ Delay Source Ⅴ Delay Type and Typical Time Ⅵ Analysis in Details 6.1 PWM Dead Time Insertion 6.2 Optocoupler Delay and Pre-Driver Delay 6.3 Transistor Switching Delay 6.4 Other Delays Ⅶ FAQ Ⅰ Current Sampling Method In motor control, the current sampling method is generally to use PWM to trigger ADC to convert. Taking SoC(System-on-a-Chip) as an example, the ADC module will be configured to automatically sample and trigger conversion. When the trigger point set by the PWM module matches, the signal will be given to the ADC module. At this time, the sampling switch in circuit will be disconnected, and then the ADC module will start to convert, and the voltage of the corresponding sampling current can be obtained after the conversion is completed. The AD value of the signal, you can use this value in the program to write and verify the algorithm. Figure 1. Current Sampling Time Ⅱ Three Sampling Methods and Precautions Current sampling is the basis of FOC, including current sensor sampling and resistor sampling. Resistor sampling is widely used for its simple and low-cost characteristics. The method includes single-resistor sampling, dual-resistor sampling, and triple-resistor sampling. 2.1 Single-resistor Sampling The biggest difference between the single-resistor and the other two methods is that it cannot obtain two current signals at the same time. Even if two current signals are obtained, there is an error in estimating the third current signal. The formula Iu+Iv+Iw=0 is conditional, that is, the three currents must be recorded at the same time. When the inductance of the motor is larger, the two currents obtained are closer to the real situation. When the inductance is small, the deviation may be relatively large. So if the inductance of the current is large, single-resistor sampling can be selected.This method requires two samplings in one PWM cycle. In this case, it is necessary to analyze the switch state in the algorithm to clarify which phase current the reconstructed current corresponds to at the time of sampling. 2.2 Dual-resistor Sampling In the case of dual-resistor sampling, the sampled two-phase current must be used directly. Even if there is a deviation, it needs to be used. This method cannot be used to calculate the third-phase current based on the other two-phase sampling like the triple-resistor sampling. That is to say, this method needs to consider the problem of the sampling window. If the sampling current is to be guaranteed to be accurate, the sampling window must be large enough. To make the sampling window large enough, the PWM waveform needs to be deformed. But this will increase the execution time of the algorithm. The advantage of this approach is to reduce a current-sense resistor and an op amp.As shown in the figure below, the front of the red circle is the oscillating area. If the sampling window is small, only the oscillating area will not be able to obtain an accurate current. To process the sampling window, you can refer to the following figure, so that the obtained current will be more accurate. Figure 2. Current Sampling Zone 2.3 Triple-resistor Sampling This method is the simpler among the three methods. It directly uses three current-sensing resistors to sample the three-phase phase current of the motor, and the result obtained in this way is relatively straightforward. Using the formula Iu+Iv+Iw=0, recalculate the phase current of one phase with a small sampling window. So that the accuracy of the result obtained is the highest, and the implementation of the following related algorithms is easier. It is the advantage of this method. However, three current-sense resistors and three op amps are used, the hardware cost will be higher than the other two.   Ⅲ The Key to Sampling The current sampling includes peak current and average current sampling. Generally, the most common is the average current sampling and its control, so there are actually two ways to sample the average current. One is that the current-sense resistor is placed on the upper bridge of the inverter bridge. The other is that the current-sense resistor of the inverter bridge is connected to the lower end of the lower bridge.The general method is the latter. The current detection circuit corresponding to this method is relatively simple, and the corresponding power consumption will also be reduced. In this case, the freewheeling current is collected at the lower end, and then we can sample at the midpoint of the lower bridge opening. At this time, the corresponding current reflects the average current, so the corresponding current control is the average.Then, if we use the three-resistor sampling method, the selected ADC module must have at least the function of simultaneous sampling of three channels. So as to ensure that the three-phase currents obtained by sampling are the currents at the same time, and at this time, to meet the condition, Iu+ Iv+Iw=0.In the case of dual-resistor sampling, there are only two sampling resistors, and the obtained current cannot use the formula Iu+Iv+Iw=0. Therefore, even if the sampling window is small, if the algorithm is not processed, the double-resistor scheme has limitations. In order to get a better adaptation to the scene, algorithm compensation must be performed on the dual-resistor method, which is also the key point of it.Similarly, for the single-resistor sampling way, the corresponding current needs to be obtained according to different switch combinations, and it needs to be sampled twice in a PWM cycle. This method cannot satisfy Iu+Iv+Iw=0, and can only be determined by an algorithm. Compensation and correction are performed, so the single-resistor method is more difficult to take. However, if the difficulty can be solved, this method is the best and cheapest one.   Ⅳ Delay Source During the development of the motor-driven FOC control, have you encountered the situation that the motor is too noisy, inefficient or even unable to operate? All of this may be due to sampling anomalies of the phase currents, resulting in the inability to reconstruct the correct three-phase currents in the FOC algorithm. Here is an analysis of a factor that affects current sampling: the delay source.In the motor drive FOC control of double-resistor sampling, the sampling point is set as the middle moment when the lower tube of the drive bridge is turned on. Note that this is the middle moment when the lower tube of the drive bridge is turned on, not the middle moment of the PWM cycle output by the MCU. There are as many as seven delay sources in this typical drive topology because the PWM is calculated from the MCU to the ADC module where the current signal is sent to the MCU. Figure 3. MCU Output Ⅴ Delay Type and Typical Time The table below details the seven sources of delay that exist in motor drive system topologies and their typical timings. These delays will be superimposed together, and the effect is that the actual output PWM waveform lags behind the PWM waveform that the MCU calculates the expected output. According to this calculation, the phase current sampling point needs to lag the middle moment of the MCU calculating the expected output PWM waveform. Delay Type Typical Time PWM Dead Time Insertion 100ns-2μs Optocoupler Isolation to Pre-driver 40ns-300ns Pre-driver Switch Delay About 50ns MOSFET Switching Time 100ns-1μs Amplifier Delay <1μs Low-pass Filter Delay 1-2μs ADC Delay 50ns-200ns   Ⅵ Analysis in Details 6.1 PWM Dead Time Insertion In the three-phase brushless motor drive system, three bridge arms are required to control the current flow of the phase line, and there are two power devices on each bridge arm, such as MOSFET and IGBT. The pair of power devices cannot be turned on at the same time, otherwise a short circuit will occur. Here MOSFET is used as a power device to illustrate. In the control, dead time must be inserted to ensure that the upper and lower MOSFETs are not turned on at the same time. Typical values of dead time may be between 100ns and 2μs, depending on various factors in the system, such as MOSFET drive voltage and type.After the required PWM waveform is inserted into the dead time, what you get is that both the PWM midpoint and the rising edge are shifted to the right. When using the FOC control algorithm calculates the proper PWM, we start seeing the first delay, recording the dead time. Figure 4. Dead Time Insertion 6.2 Optocoupler Delay and Pre-Driver Delay The signal response of the various optocouplers and pre-drivers causes additional delays between the moment the MCU controls the FTM module to output the PWM waveform and the moment the MOSFET gate is controlled. The output of the pre-driver is delayed by a period of time (Delay1) compared to the waveform output from the MCU pins. Figure 5. Delay 1 6.3 Transistor Switching Delay Through the pre-driver, the PWM waveform reaches the MOSFET transistors, but due to their inherent characteristics, all transistors take a certain amount of time to turn on and off. This delay time varies depending on the transistor type and the voltage level required to switch between on/off. Delay 2 is the total delay between the theoretical switching point (CMP2) of the phase line voltage and the instant of the actual switching point. Figure 6. Delay 2 Finally, the gate voltage reaches the level that can make the transistor turn on, the current passes through the phase line and the sampling resistor, and a voltage difference is generated across the sampling resistor. The red waveform is the phase current waveform in an ideal state. At this time, there is a total delay time between the midpoint of the PWM cycle calculated and generated by the MCU, and the "phase current midpoint shift" is shown in the figure. Figure 7. Phase Current Midpoint Shift 6.4 Other Delays As shown in the figure below, the final delay chain that affects the current sampling is formed by the amplifier slew rate, the low-pass filter on the MCU pins, and the ADC slew rate. The time marked by the red circle in the figure is the correct current sampling time. It can be seen that the phase current sampling point is greatly delayed compared with the PWM midpoint output by the FTM. Figure 8. Other Delay In all and electrical and electronic circuits, there will be signal delay problems. And it is impossible to completely eliminate them, but the impact can be reduced by selecting low-delay devices. In the motor drive, in addition to selecting the appropriate device, it is also necessary to perform software compensation for the signal delay. The precise delay time of these delay sources mentioned in the article can be obtained by oscilloscope and calculation, and the correct current sampling time can be obtained by compensating for these delays in software. In this way, the data collected at the correct moment can be used as the data source for reconstructing the three-phase current of the motor in the FOC control.   Ⅶ FAQ 1. What is FOC algorithm?Field-oriented control (FOC), or vector control, is a technique for variable frequency control of the stator in a three phase AC induction motor. 2. What is FOC drive?Vector control, also called field-oriented control (FOC), is a variable-frequency drive (VFD) control method in which the stator currents of a three-phase AC or brushless DC electric motor are identified as two orthogonal components that can be visualized with a vector. 3. What is FOC brushless motor?FOC implementation allows the BLDC motor to run more efficiently (high power factor and better light load efficiency), more smoothly (lower torque ripples) with quick dynamic response (better dynamic performance to load and speed changes). 4. What is FOC in BLDC motor?Field oriented control (FOC) is an important control approach for Brushless DC motors. It resembles sinusoidal commutation but adds a major mathematical twist. Figure 3a shows control schemes for both sinusoidal commutation and field oriented control. 5. How is Bldc phase current measured?With a BLDC motor use an ac voltmeter to measure the voltage between any 2 wires of the 3 motor wires and then convert the line-to-line voltage to the phase voltage value by dividing the line-to-line voltage by 3 =1.73. 6. Do BLDC motors have inrush current?Handle Peak Inrush Current of a BLDC Motor to protect the Power Supply. Summary: BLDC motors have a Peak current on startup which is 3x or more the rated current. The motor has a rated current of 7.3A. 7. What causes motor inrush current?When an electrical device, such as an AC induction motor, is switched on, it experiences a very high, momentary surge of current, referred to as inrush current. ...The interaction of these two magnetic fields produces torque and causes the motor to turn.
kynix On 2022-01-08   2539
Resistors

The Best Guide to the Wireless Transmitter

IntroductionⅠ What is a Wireless Transmitter?Ⅱ How to Make a Transmitter and Receiver Ⅲ Wireless Transmitter vs Wireless Receiver    3.1 Wireless Transmitter    3.2 Wireless Receiver    3.3 What are Optical Transmitters and Receivers?    3.4 How do You Use a Wireless Transmitter? Ⅳ Transmitter Specifications Ⅴ The Types of Transmitter Based on Modulation Scheme and Conversion Technique Employed    5.1 AM Transmitter    5.2 FM Transmitter    5.3 SSB Transmitter    5.4 Direct Conversion Transmitter    5.5 Super Heterodyne TransmitterⅥ Smart Wireless Transmitters    6.1 What are Smart Transmitters?    6.2 What are the Main Features of Smart Transmitters?Ⅶ 5 Tips to Optimize Your Sennheiser Wireless System    7.1 Don’t Cover the Antenna    7.2 Fresh Batteries are Essential    7.3 Frequency Selection is Important When Using Multiple Systems    7.4 Maintain Line of Sight between Components    7.5 Keep Transmitters and Receivers as Close as PossibleⅧ Answers to 6 Questions about the Wireless TransmitterIntroduction A wireless transmitter is a telecommunications device that generates radio waves in order to broadcast or transfer data via an antenna.This article on the transmitter specs, usage, and other parts of a full introduction will allow you to have a more detailed grasp of the wireless transmitter.Ⅰ What is a Wireless Transmitter?A wireless transmitter and associated receiver are required for devices that communicate data without the use of cables. The transmitter converts the audio signal to a radio signal and broadcasts it via an antenna as a radio wave. The antenna may protrude from the transmitter's bottom or be hidden within the transmitter. Government rules regulate the strength of radio transmission. Depending on the conditions and signal quality, the signal can successfully go up to 1,000 feet. There are two types of transmitters available. A "body-pack" or "belt-pack" transmitter, for example, is a compact box the size of a deck of cards (or smaller in some cases). The transmitter is worn on the body or clipped to the user's belt. A body-pack transmitter is commonly hooked to a guitar strap or attached directly to an instrument such as a trumpet or saxophone for instrument applications. The transmitter is incorporated into the handle of a portable wireless microphone, resulting in a wireless microphone that is just slightly larger than a normal wired microphone. For handheld wireless microphones, a range of microphone elements or "heads" are usually offered. A battery (typically a 9-volt alkaline type) is required to run all wireless transmitters.Figure-1 A wireless routerA router with an integrated wireless transmitter and receiver is included in the home or office wireless local area network (WLAN). Most routers also include a modem, allowing a single, high-speed Internet account to be shared by all connected computers. Instead of using Ethernet cables to connect the computers, each has a wireless network card (or wireless adapter) that has its own transmitter and receiver on board. Now, for instance, an individual computer can send a data request to the router, and the router can receive the request, forward it to the appropriate party, and then send the return response.Ⅱ How to Make a Transmitter and ReceiverThe Video Shows: How to make a transmitter and receiveMake your very own transmitter and receiver! Ⅲ Wireless Transmitter vs Wireless Receiver3.1 Wireless TransmitterThe radio's transmitter is powered by an alternating current flowing through a conductor (in this case an antenna). The alternating current changes direction very quickly, frequently millions or billions of times per second. The energy contained in such a fastly alternating current can be converted into Electromagnetic (EM) radiation. Electrons flowing as current produce electromagnetic radiation in the form of photons (energy packets).The resulting waves are sinusoidal, but their amplitude and frequency can be altered through modulation.3.2 Wireless ReceiverReceivers operate in the inverse of how transmitters do.The incident radio waves generate a tiny alternating current in the receiver's antenna (the photons impart their energy onto the electrons in the wire, resulting in the current). An alternating current is generated because EM waves oscillate). This alternating current signal is routed to the receiver's input.It's vital to recognize that when you tune a radio, you're selecting a frequency to listen to. To get the clearest signal, set your radio to the circuit's resonant frequency.' This is determined by the components used.3.3 What are Optical Transmitters and Receivers?The optical fiber communication system consists primarily of a transmitter and receiver, with the transmitter located on one end of a fiber cable and the receiver located on the other end of the cable. The majority of systems make use of a transceiver, which is a module that includes both a transmitter and a receiver. The transmitter receives an electrical signal and converts it to an optical signal using an LED or laser diode.Figure-2 Fiber-optic-data-linkA connector connects the light signal from the transmitter end to the fiber cable, which is then broadcasted through the cable. The light signal from the fiber end can be connected to a receiver, and wherever a detector converts the light signal to an electrical signal, it is conditioned appropriately for use by the receiving equipment.3.4 How do You Use a Wireless Transmitter?An electromagnetic disturbance is a radio wave. It spreads out in the same way that ripples in water do.First, the current flows through a wire. The wire is then surrounded by an electromagnetic field.This can be used by transmitters. They can send a pulse of electricity through a copper antenna.Furthermore, one end of the antenna will be grounded. This will restrict the signal to a single pulse.Metal effectively traps any radio waves that come into contact with it because it is a conductor of both electricity and magnetism. As a result, large metal objects in the home, such as a refrigerator, will interfere with the Wi-Fi signal. The radio waves will then emit in a regular pattern, much like ripples. The frequency of the emission will be measured in hertz (Hz).Transmitters create a carrier frequency, which is then mixed with the data signal and broadcast. This signal will be received by the receiver, which will then divide the two frequencies into their individual portions.Ⅳ Transmitter Specifications1DC coupled LEDs are used.2A serial port is Max232 IC Driver. 3The wavelength of the source is 660nm. 4The data rate is 1 Mbps.5The highest input voltage is +5V.6The maximum supply current is 100 mA. 7The maximum input voltage is +5V.8The supply voltage is +15V DC.9The LED driver is on board IC Driver.10The interface connectors are 2mm sockets. 11The type of input signal is digital data.  Ⅴ The Types of Transmitter Based on Modulation Scheme and Conversion Technique Employed The following are the different types of transmitters based on the modulation scheme and conversion technique used.5.1 AM TransmitterFigure-3 Typical block diagram of AM transmitter systemThe frequency range of an AM radio system is 540 to 1700kHz, with an IF of around 455 kHz. The frequencies are separated by 10 kHz.To convert audio information into an AM modulated signal, an AM transmitter employs amplitude modulation. AM modulation employs audio as the modulating signal and a high-frequency signal as the carrier. To achieve AM modulated output, the amplitude of the carrier signal is varied by the amplitude of the modulating audio signal.5.2 FM Transmitter          Figure-4    FM transmitter system block diagramFM radio systems operate in the frequency range of 88 to 108 MHz, with an IF of approximately 10.7 MHz. To convert audio information into an FM modulated signal, an FM transmitter employs frequency modulation. FM modulation makes use of audio as the modulating signal (Fm) and a high-frequency signal as the carrier. To achieve FM modulated output, the frequency of the carrier signal (Fc) is varied in accordance with the amplitude of the modulating audio signal.5.3 SSB Transmitter Figure-5 SSB transmitter block diagramThe upper and lower sidebands are transmitted by the AM transmitter. The upper band represents the sum of Fc and Fm, while the lower band represents the difference between Fc and Fm. A single-sideband (either upper or lower) is transmitted by an SSB transmitter, not both. In comparison to an AM transmitter, an SSB transmitter saves bandwidth and power.5.4 Direct Conversion TransmitterLet's take a look at how a direct conversion transmitter works. The signal constellation produced by this transmitter type is known as QPSK, which stands for Quadrature Phase Shift Keying.The first bit of digital data to be transmitted is divided into I and Q signals.The I and Q signals are processed by DACs.Low pass filtering is used to feed the output of DACs to mixers.The architecture employs LO (local oscillator). Before the mixing process, the LO signal is phase-shifted by 90 degrees to one of the mixers.The mixed I and Q components are added together to produce a QPSK modulated signal.Before transmission into the air, the QPSK modulated signal is amplified using a PA (Power Amplifier).Figure-6 Direct conversion transmitter5.5 Super Heterodyne TransmitterFigure-7 Superheterodyne-transmitterAfter obtaining a modulated signal via direct conversion transmitter, this architecture employs one more mixing component. The signal is bandpass filtered both before and after mixing. This necessitates the inclusion of one more LO (Local Oscillator) in the design. This type, like other transmitter systems, employs PA (Power Amplification) prior to transmission. With the help of gain control, AGC is used to vary the amplitude of the output signal. AGC stands for Automatic Gain Control.Ⅵ Smart Wireless Transmitters6.1 What are Smart Transmitters?Smart transmitters are controlled by a microprocessor. They also include an in-built sensor. The sensor enables a transmitter to filter the surrounding atmosphere. Furthermore, the transmitters can store data in memory. You can program transmitters to retain a default setting using memory storage.6.2 What are the Main Features of Smart Wireless Transmitters?The following are the key features of OMNI's smart wireless transmitters:Multiple sensors can be added for varying measurement changes.The transmitter is then adjusted to produce linear results.The transmitters are self-calibration capable.The transmitters can self-diagnose. They are capable of detecting faults and maintenance alerts.Ⅶ 5 Tips to Optimize Your Sennheiser Wireless SystemFor years, Sweetwater has configured and used large-scale Sennheiser wireless microphone systems. There are some simple steps you can take to get the most out of your Sennheiser wireless system in terms of channel count, range, and sound quality.7.1 Don’t Cover the AntennaThe antenna on a transmitter should never be covered for optimal performance. When using a handheld microphone, take care not to cover the antenna with your hand. If you don't see an antenna on your microphone, it's most likely hidden inside the last few inches of its body. Hold the microphone closer to its head/capsule to avoid covering it with your hand as you pick it up.Figure-8 Don't cover the antennaWhen wearing a belt pack with an external antenna, make sure the antenna isn't wadded up or bent. This is not only bad for the antenna (bending a wire enough times will cause it to break), but it also severely reduces its transmission. With a wadded-up antenna, you'll get limited range and more dropouts.7.2 Fresh Batteries are EssentialFigure-9 BatterySignal strength and operational range decrease when the transmitter's battery expires, so even if the battery isn't fully dead, it's better to change it at the start of every performance, event, or service.7.3 Frequency Selection is Important When Using Multiple SystemsFigure-10 Frequency SelectionTo avoid interfering with each other, the frequencies of numerous wireless systems must be properly synchronized. It's not always enough to have distinct frequencies. Using wireless systems from the same manufacturer and series is usually the best way to do this — Sennheiser's wireless systems automatically use frequencies that are already pre-coordinated to avoid interference. Consult an expert if you're integrating systems from various manufacturers or series.7.4 Maintain Line of Sight between ComponentsImproper antenna installation is the most prevalent cause of signal losses. Between the antennas and the transmitters, there should always be a clear line of sight. If this isn't possible in your rack, the antennas should be put distant from the receivers, perhaps on a wall, on a balcony rail, from the ceiling, or somewhere else where line-of-sight placement is possible.Figure-11 Maintain line of sight between componentsKeep in mind that the human body is a great RF energy absorber. Your wireless transmitter is unlikely to have enough "oomph" to carry an entire audience of people on their feet. If your antennae are in the rear of the room, the pastor's back, which requires the signal to pass through his body on its way to the receiver, may not be the best place for the belt pack transmitter.7.5 Keep Transmitters and Receivers as Close as PossibleIf you're having trouble getting clear reception, consider placing the receivers closer to the stage to shorten the distance between the transmitters and receivers. If that isn't possible, consider moving the antennae closer together by mounting them remotely. If you need to run long antenna cables, don't skimp on quality to save money — obtain the lowest-loss cable you can find. It is suggested that you use RG-8. If the cable line is longer than 25 feet, an antenna booster may be required, and it's time to contact a professional.Ⅷ Answers to 6 Questions about the Wireless Transmitter1. What is a transmitter in a wireless system?A wireless system consists of two main components: a transmitter, and a receiver. The transmitter handles the conversion of the audio signal into a radio signal and broadcasts it as a radio wave via an antenna. The antenna may stick out from the bottom of the transmitter or it may be concealed inside.2. How do I connect Bluetooth kit to FM transmitter?Simply turn on the Bluetooth on your cellphone. Or whichever device you plan on using. And search for the t-ten. And just connect the t10 and and just like that is paired.3. Can any transmitter work with any receiver?You can use a transmitter with any receiver. BUT you have to have a way of changing the antenna when you transmit. There are antenna relays for this purpose that will automatically make the change for you. The power of the transmitter would quickly destroy your receiver.4. What are the main features of transmitter?What are the main features of a transmitter? Explanation: Some of the main features which make the transmitter complex are higher clock speed, higher transmit power, directional antennas and need for a linear amplifier.5. Is transmitter is same as sender?What's the difference between sender and transmitter here. Many times both terms are used for the same thing. Could it be here "Sender und Sendegeraet"? The HFN values in the sender and the transmitter are different,i.e. the HFN synchronization between the sender and receiver is lost.6. What is perfect transmitter?The important feature of the transmitter is extremely fast current, turn-off time, less than 1 μs for the shallowest depth, while the current after the ramp time is practically absent. douwdek0 and 6 more users found this answer helpful. 
kynix On 2022-01-07   2516

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 reserved.