Phone

    00852-6915 1330

ram Related Articles

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

Power

Grounding Analysis in Electricity with Circuit Diagrams

Introduction The introduction of grounding technology was originally a protective way to prevent electrical or electronic equipment from being struck by lightning. At the same time, it is also an effective means to protect personal safety. When the phase line (such as poor wire insulation, aging, etc.)  touches the equipment shell for some reason, dangerous voltage will be generated on the equipment shell, thus the generated fault current will flow through the PE line to the ground, thus playing a protective role. With the development of electronic communication and other digital fields, only considering lightning protection and safety in the grounding system is far from meeting the requirements. Electrical Grounding Explained | Basic Concepts Catalog Introduction Ⅰ Basic: Q&A Related to Electrical Ground Ⅱ DC Power Supply Ground 2.1 Basic Overview 2.2 DC Power Supply Ground Analysis with Diagrams 2.3 Ground Bounce for Buck Converters 2.4 Ground Bounce for Boost Converters 2.5 Summery Ⅲ Useful Concepts for Grounding Analysis Ⅳ Conclusion Ⅴ FAQ Ⅰ Basic: Q&A Related to Electrical Ground The signal between each device needs a "ground" as the reference ground of the signal. Moreover, with the complexity of electronic equipment, the signal frequency is getting complicated. Therefore, in the grounding design, special attention must be paid to electromagnetic compatibility issues such as mutual interference between signals. Otherwise, improper grounding will seriously affect the reliability of system operation. Here the following are doubts that may arise in the power grounding. Q1: What is the definition of grounding?A: As for grounding concepts, to line engineers, the term usually means "reference point for line voltage". For system designers, it is often a cabinet or rack. For electrical engineers, it means green safety ground or connection to the earth. A more general definition is "A ground is a low impedance path for current to return to its source", and the key points are "low impedance" and "passage". Q2: What are the common grounding symbols in circuit?A: PE, PGND, FG-protective ground or chassisBGND or DC-RETURN-DC-48V (+24V) power supply (battery) returnGND: working groundDGND: digital groundAGND: analog groundLGND: lightning protection ground Q3: What is the appropriate grounding method?A: There are many ways to ground, including single-point grounding, multi-point grounding and mixed types of grounding. Among them, the single is divided into series single-point grounding and parallel single-point grounding. Generally speaking, single-point grounding is used for simple circuits, while grounding distinction between different functional modules, and multi-point grounding or multi-layer boards (complete ground plane layer) are used in low-frequency (f10MHz) circuits. Q4: Why should the analog ground and digital ground be separated?A: Both the analog signal and the digital signal return to the ground, the digital signal changes fast with large noise, while the analog signal needs a clean ground reference to work. If the analog and digital grounds are mixed, noise can affect the analog signal.According to the above mentioned, the analog ground and the digital ground should be processed separately, and then connected together through thin wires, or together at a single point. The general idea is to try to block the noise on the digital ground from flowing to the analog ground. Of course, this is not a very strict requirement that they must be separated, because it depends on the actual situation. Q5: How to ground the signal on the board?A: Under normal circumstances, it is best to use the nearest ground when designing, and after a complete multi-layer board design, it is very easy to ground common signals. The basic principle is to ensure the continuity of the traces and reduce number of vias, close to ground plane or power plane, etc. Q6: How to ground the interface devices of the board?A: Some single boards have external input and output interfaces, such as serial port connectors, network port connectors, etc, if they are not properly grounded, it will also affect normal work, such as network port interconnection errors, packet loss, etc., and will become an external source of electromagnetic interference, sending the noise inside the board to the outside. Generally speaking, an independent interface ground will be divided, and the connection with the signal ground will be connected by thin traces, and a o small resistance or 0ohm resistor can be connected in series. Thin traces can be used to block signal ground noise from passing to the interface ground. Similarly, the filtering of interface ground and interface power should also be carefully considered. Q7: How to ground the shielding layer in the cable with shielding layer?A: The layer of the shielded cable must be connected to the interface ground of the single board, not the signal ground. This is because there are various noises on the signal ground. If the shielding layer is connected to the signal ground, the noise voltage will drive the common mode current along the shielding. Therefore, cables with unreasonable design are generally the largest noise output source of electromagnetic interference.   Ⅱ DC Power Supply Ground 2.1 Basic Overview In power supply design, safety is often in the first place, and the same is true in switching power supplies. Grounding can protect the personal safety of users and ensure the normal operation of power equipment. So what is the appropriate grounding method in switching power supplies? What are the common ground symbols in circuits? This article will popularize the grounding basic in DC power supplies.DC-DC is a commonly used power supply circuit in electronic hardware design. It has high efficiency in realizing high input voltage and low output voltage. It is widely used, from power adapters, mobile phone chargers, and internal power conversion of electronic equipment to DC-DC circuits. Each semiconductor manufacturer has its own DC-DC chips, and also there are many optional chips. For a well-designed DC-DC circuit, not only the peripheral resistance, capacitance, but also the inductance parameters of the DC-DC circuit should be considered. There are also high requirements for the PCB layout design. This paper proposes a method to guide the grounding in the PCB layout from the perspective of the current flow in DC circuits. 2.2 DC Power Supply Ground Analysis with Diagrams Circuit grounding looks simple in a circuit schematic, but the actual characteristics of a circuit are determined by the layout of its PCB. And the analysis of the grounding point is very difficult, especially for the DC-DC converter circuit, the grounding point of the circuit will gather a large current that changes rapidly. When grounded nodes move, system performance suffers and the system radiates EMI. Here a good understanding of the physical nature of "ground" induced ground noise can provide an intuitive understanding of ground noise reduction problems.The change of the transmission current in the ground loop will generate a magnetic field in the loop. The magnetic field strength is proportional to the current, and the magnetic flux is proportional to the product of the loop area and the magnetic field strength, which is expressed by the formula: Figure 1. Right Hand Rule Suppose there is a sudden break in the current loop, as shown in Figure 2. When the switch is turned off, the magnetic flux disappears, which will generate a large transient voltage along the wire. If part of the wire is a grounding return pin, the voltage referenced to the ground level will have a spike, resulting in a false signal in any circuit that uses that pin as a ground reference. Figure 2. Function of Start Switch The traces on the PCB circuit board are not ideal wires and have resistance. 1 ounce (oz) copper has a resistance of 500 microohms/square, so a 1 amp change in current will only produce a bounce voltage of 500uV/square -- the problem only exists if you use long thin traces or daisy chain grounds or Precision electronic circuits.The best way to reduce ground bounce in a DC-DC switching circuit is to control the magnetic flux variation—minimizing current loop area and loop area variation. The principle of DC-DC circuit buck or boost is to use electronic switches to quickly switch to charge and discharge the energy storage element to achieve voltage conversion, and at the same time change the loop area of the current in the circuit, resulting in ground bounce and electromagnetic radiation.In some cases, as shown in Figure, the current remains constant, while the switching causes a change in the loop area and therefore a change in the magnetic flux. In switching state 1, an ideal voltage source is connected to an ideal current source through an ideal conductor. In addition, current flows in a loop that includes a ground return.In switch state 2, the same current flows in different paths when the switch changes position. The current source is DC and there is no change, but the loop area has changed. A change in the loop area means a change in the magnetic flux, so a voltage is generated. Because the ground loop is part of the change loop. Figure 3. Figure Loop Area In the case of switching changes, the loop area changes. Everywhere along the wire in the lower left, when the current I1 becomes 0, a voltage is generated where the magnetic field disappears. 2.3 Ground Bounce for Buck Converters The buck converter (step-down converter) circuit is very similar to the circuit structure in Figure 3 above, and the circuit of the step-down converter is simplified, as shown in Figure. Figure 4. Step-down Converter Circuit At high frequencies, a large capacitor such as the input capacitor Cin of the step-down converter can be regarded as a DC voltage source. Similarly, an inductor such as the output inductor LBuck can be regarded as a DC current source. These approximations help to visualize understanding and theoretical analysis.As shown in Figure 5, when the switch alternates between the two positions, the change in the path through which the current flows causes a change in the magnetic flux. The large inductor LBuck keeps the output current approximately constant. Similarly, the large capacitor Cin holds the voltage approximately equal to Vin. Since the voltage across the input lead inductance does not change, the input current also remains approximately constant. Figure 5. Effect of Switch on Loop Area Although the input current and output voltage are essentially constant, when the switch is switched from position 1 to position 2, the total loop area rapidly changes by half. Loop area changes imply rapid changes in magnetic flux, causing ground bounce along the loop circuit.In practice, a buck converter consists of a pair of semiconductor electronic switches, as shown in Figure 6. Although the complex procedure increases in each figure, the analysis method for ground bounce caused by changes in magnetic flux remains simple and intuitive. Figure 6. Magnetic Flux Changes Cause Ground Bounce The fact that changes in magnetic flux create voltages along the ground loop raises an interesting question: where is the real ground? Because ground bounce means that, to some ideal point called ground (that point needs to be defined), a bounce voltage is created on the ground return trace. In a power regulator circuit, the real ground should be connected to the low-voltage side of the load. After all, the purpose of a DC-DC converter is to provide a stable voltage and current to the load. All other points on the current loop are not true ground, but the part of ground loop.Since the low-voltage end of the load is grounded and the change in the loop area is the cause of the ground bounce, then reducing the ground bounce and electromagnetic radiation, and optimizing the grounding of the circuit are to minimize the current loop area in the DC-DC circuit. Here is a way to optimize the layout. For example, the location of the input capacitor, output capacitor, and energy storage inductor reduces the current loop area. Figure shows how to carefully place the input capacitor Cin to reduce the loop area and ground bounce. Figure 7. Reduce Ground Bounce Capacitor Cin in Figure bypasses the high-side switch on the top layer of the PCB directly to both ends of the bottom low-side switch, thereby reducing the variation in loop area and isolating it from the ground return. When the switch switches from one state to another, from the bottom of Vin to the bottom of the load, there is no loop area change or switch current change. Therefore no ground bounce occurs in the ground loop.Figure is an unreasonable PCB layout. When the high-side switch is turned on, the DC current flows along the red loop of the outer ring. When the low-side switch is turned on, the DC current flows along the blue loop. It can be seen that this circuit layout produces a large loop change when the switch changes, causing a change in the magnetic flux, resulting in ground bounce and electromagnetic radiation interference. Figure 8. Unreasonable Layout For the clarity, in single-layer PCB routing, even using a second-layer monolithic ground plane cannot solve the bounce caused by grounding. Figure 9 is a simple box to illustrate that the ground plane cannot solve the problem. Here we use a double layer PCB to add a bypass circuit at the top level power line vertical. Figure 9. Ground Floor In the Figure 9 (a), the ground plane is monolithic and uncut. The top layer print current flows through the capacitor, through the via, and to the ground plane. Because AC always flows along the path of least impedance, ground return current returns to the power source around the corners of its path. So when the amplitude or frequency of the current changes, the magnetic field of the current and its loop area change, thereby changing the magnetic flux. The regularity of current flow along the path of least impedance means that ground bounce can occur even with a monolithic ground plane - independent of its conduction.In the Figure 9 (b), a properly cut ground plane limits the return current to minimize loop area, thus greatly reducing ground bounce. Any residual ground bounce voltage developed within the cut return line is isolated from the common ground plane.The PCB layout in Figure 10 uses a double-layer PCB to mount the input capacitor and two switches on islands in the ground plane. This wiring doesn't have to be the best, but it works well and speaks to key points. It should be noted that the loop area surrounded by the red and blue currents is large, but the difference between the two loop areas is small. A small change in loop area means a small change in magnetic flux—small ground bounce. However, in general, keep the loop area small. Figure 10. is just to illustrate the importance of AC current path matching. Figure 10. Converter Layout   Additionally, ground bounce along any ground loop is limited by ground cutting within ground loop islands where magnetic fields and loop areas vary. Also, it may appear at first glance that the input capacitance Cin is not located between the top-level high-side switch and the lower-level low-side switch shown in Figure 10. Although physical proximity can be fine, what really works is the electronic proximity achieved by minimizing the loop area. 2.4 Ground Bounce for Boost Converters A boost converter (step-down converter) is actually a reflection of a buck converter, as shown in Figure 11, where the output capacitor must be placed between the top high-side switch and the bottom low-side switch to minimize loop area change. Figure 11. Changes in Loop Area In the same way that a buck converter places Cvin at a critical position, a boost converter places Cvout at a key position. 2.5 Summery The ground bounce voltage is mainly due to changes in the magnetic flux. In a DC-DC switching power supply, the magnetic flux variation is caused by switching the DC current at high speed between different current loop areas. But careful placement of the buck converter's input capacitors and the boost converter's output capacitors, and a good cut of the ground plane can isolate ground bounce. Pay attention to, it is important to be careful when cutting the ground plane to avoid increasing the loop area for other return currents in the circuit.Another reasonable layout should place the real ground on the bottom layer connecting the load, which will not cause changes in loop area or current. Any other point related to conduction can be called "ground", but it's just a point along the return path.   Ⅲ Useful Concepts for Grounding Analysis If you follow the basic concepts, you will have a clear idea of what will cause ground bounce. Figure 12. shows that two conductors that are perpendicular to each other are not subject to the mutual influence of the magnetic field. Figure 12. Two Conductors Perpendicular to Each Other   The magnetic field lines created around two parallel wires carrying equal currents in the same direction traditionally cancel each other out between the two wires, so the total energy stored by the two wires is less than the energy stored by one wire alone. Therefore, the inductance of PCB wide traces is smaller than that of narrow traces. Figure 13. Two Parallel Wires with Current Flowing in Same Directions   The magnetic field lines generated around two equal conductors carrying equal currents in opposite directions cancel each other out of the two conductors, and strengthen between the two conductors. If the inner loop area is reduced, so does 4the total magnetic flux. This phenomenon can explain why the return current of the AC ground plane always flows under the trace conductors on the top layer of the bath. Figure 14. Two Parallel Wires with Current Flowing in Opposite Directions Figure 15. shows why corners add inductance. A straight wire only sees its own magnetic field, but at the corners, the magnetic field of a vertical wire is also visible. Therefore, the corners store more magnetic field energy, and their inductance is greater than that of straight wires. Figure 15. Add Inductance at the Corners Figure 16. shows that cutting the ground plane under the transmission line conductor increases the loop area by diverting the loop current, thereby increasing the loop size and contributing to ground bounce. Figure 16. Return Current Flows Along the Path of Least Impedance   Figure 17. Effect of Component Orientation   Ⅳ Conclusion Ground bounce has always been a potential problem. For monitors or TVs, it means the image is noisy, for audio equipment it means the noise floor. In digital systems, ground bounce can cause calculation errors -or even system crashes. Careful estimation of parasitic elements and simulation are effective methods for predicting the magnitude of ground bounce.First, when designing the PCB, the low-voltage side of the load should be set to true ground. Then, replace the large inductors and capacitors with current and voltage sources to simplify the circuit dynamics. Observing the current loop under each switch combination, the loops should be made to overlap, and if this is not possible, an island should be carefully cut out in the ground plane to ensure that only islands of DC inflow and outflow are present.In most cases, good grounding performance can be obtained with these efforts. If that doesn't work, the resistance of the ground plane should be considered first, then the displacement currents flowing across all switches and parasitic capacitors entering the return path. In short, no matter what circuit, the principle is the same, that is, to reduce the loop area and its difference when the switch changes.   Ⅴ FAQ 1. Does power supply need to be grounded?While it will likely be fine (I've run many computers in old houses that had no grounding), it's not advised. A static charge will build up, and depending on where it discharges may cause damage to the electronics. 2. What is the purpose of a ground wire?The ground wire offers an additional path for the electrical circuit to flow into the earth so as to not endanger anyone working with the electricity nearby in the event of a short circuit. Without ground wire, your body could instead complete the ground path and may cause shock or electrocution. 3. Which wire is ground on power supply?In a DC circuit, the convention in most of the world is that black is the “ground” and any other color carries a signal or power rail of some sort, with red and yellow being popular for power wiring, but it can really be any color on any particular connector. For example, for a typical PC “ATX” power supply. 4. What is the purpose of a ground?Grounding gives electricity the most effective way to return to the ground via your electrical panel. A grounding wire gives an appliance or electrical device a safe way to discharge excess electricity. 5. Should you ground the negative of a DC power supply?As long as both the negative terminal of the LED and the negative terminal of the battery both have good enough connections to ground then the ground will carry enough current between the two connection to complete the circuit and light the LED. The same applies in the mains electricity supply. 6. How do I know if my power supply is grounded?Insert one probe of the circuit tester into the small slot and the other probe into the large probe. If the circuit tester lights up, you have power to the outlet. Now place one probe in the small slot and the other probe into the "U" shaped ground hole. The indicator should light up if the outlet is grounded. 7. Can you ground yourself by touching PSU?It looks pretty, but it's impossible to ground yourself to a case that has no bare metal. Instead, I just installed my power supply and touched the ground prong every now and then. All that said, if all you're doing is touching a metal part on the computer, you aren't really grounding yourself. 8. Can I tie the neutral and ground together?No, the neutral and ground should never be wired together. This is wrong, and potentially dangerous. When you plug in something in the outlet, the neutral will be live, as it closes the circuit. If the ground is wired to the neutral, the ground of the applicance will also be live. 9. What is ground in DC circuit?Traditionally, "ground" is the lowest potential in a circuit, e.g. the minus side of a battery or DC supply. 10. What happens when electricity goes to ground?The majority of the energy of the lightning discharge is dissipated in the air as it travels from the clouds to the ground through the air. The remainder is dissipated in the ground in the area surrounding the location of the strike, over a fairly short distance. 11. What is difference between earthing and grounding?Earthing and grounding are similar terms. ... The main difference between earthing and grounding is that the earthing refers that the circuit is physically connected to the ground with Zero Volt Potential. But, grounding refers that the circuit is not physically connected to ground, but still has zero potential. 12. Does a DC power supply need a ground?The answer comes from the NEC section 250.162, referring to the grounding of two-wire DC systems, which includes the 5V and 24V outputs, depending on your case. ... So, the short answer for a 24V DC system is no, the output is not required to be connected to ground. 13. How do you ground a DC power supply?You ground the device by connecting a grounding cable to earth ground and then attaching it to the grounding point on the DC power supply. You must provide the grounding cables. The cable lug used on the grounding cable should have a #10 stud hole and accommodate a minimum of 12-AWG wire.
Ivy On 2022-01-21   876
General electronic semiconductor

Three-state Buffer Basic and Verilog HDL Simulation

Introduction In the computer field, a buffer refers to a buffer register, which is divided into two types: input buffer and output buffer. The function of the former is to temporarily store the data sent by the peripheral so that the processor can take it away; the latter is to temporarily store the data sent by the processor to the peripheral. With the numerical control buffer, the high-speed CPU and the slow-speed peripherals can coordinate and buffer to realize the synchronization of data transmission. Since the buffer is connected to the data bus, it must have a three-state output function. Catalog Introduction Ⅰ Three-State Buffer Meaning Ⅱ Buffers in the Java Language 2.1 Buffer 2.2 Data Transmission 2.3 Mark and Reset 2.4 Invariants 2.5 Clear Reverse Rewind 2.6 Read-Only Buffer 2.7 Thread Safety 2.8 Call Chain Ⅲ EDA Code Ⅳ Verilog HDL Model and Simulation of Tri-state Buffer 4.1 Tri-state Buffer IC 4.2 Application Example of 74LS541 as Input Port 4.3 Multiplexer (MUX) Ⅴ FAQ Ⅰ Three-State Buffer Meaning Three-state buffer (tri-state buffer), also known as three-state driver, its three-state output is controlled by the enable output terminal. When the enable output is valid, the device realizes normal logic state output (logic 0, logic 1); when the enable input is invalid, the output is in a high-impedance state, which is equivalent to disconnecting from the connected circuit. Figure 1. Tristate Buffers A buffer is one of the digital components, it does not perform any operation on the input value, and its output value is the same as the input value. It plays an important role in the design of the computer. There are two types of buffers. In addition to tri-state buffers, there are also conventional buffers (regular buffers).Conventional buffers always output the value directly, which is used to output current to higher-level circuitry. The tri-state buffer has an optional card input, denoted by E, in addition to the functions of a conventional buffer. E=0 and E=1 have different output values. Figure 2. Tristate Buffer Symbols When E=1, it is gated, and its input is directly sent to the output.If E=0, the buffer is blocked. No matter what value is input, the output is always high impedance. The high-impedance state can drop the current low enough that the buffer-like output is not connected to anything.In the design of the CPU, the DC load capacity of the general output line can drive a TTL load, and in the connection, an address line or data line of the CPU may be connected to multiple memory chips, but the memory chips are all MOS circuits. It is a capacitive load, and the DC load is much smaller than the TTL load. Therefore, in a small system, the CPU can be directly connected to the memory, but a buffer needs to be added in a large system.In order to reduce the number of information transmission lines, the information transmission lines in most computers are in the form of buses, that is, all the same type of information to be transmitted goes through the same group of transmission lines, and the information is transmitted in time-sharing. There are generally three groups of buses in the computer, namely the data bus, the address bus and the control bus. In order to prevent information from interfering with each other, it is required that any register or memory hung on the bus, etc., its transmission end can not only show two information states of 0 and 1, but also should be able to show a third state-high impedance state. That is, it seems that their outputs are disconnected at this time, which has no effect on the bus state, and the bus can be occupied by other devices at this time. The above functions can be realized. In addition to the input and output terminals, it also has a control terminal, please see the figure below. Figure 3. Three-state Output Buffer Register When E=1, the output=input, the bus is driven by the device at this time, and the data on the bus is determined by the input data.When E=0, the output terminal is in a high-impedance state, and the device has no effect on the bus. When the output terminal of the register is connected to the three-state gate, and then the output terminal of the three-state gate is connected with the bus, the stage-rush register of the three-state output is formed. Since the one-way tri-state gate is used here, the data can only be output from the register to the data bus. If you want to achieve bidirectional transmission, you will use a bidirectional tri-state gate. Figure 4. Three-state Gate Ⅱ Buffers in the Java Language 2.1 Buffer Directly known subclasses of java.nio.Buffer: ByteBuffer, CharBuffer, DoubleBuffer, FloatBuffer, IntBuffer, LongBuffer, ShortBuffer public abstract classBufferextendsObject. A container for data of a specific basic type.A buffer is a linear finite sequence of elements of a particular primitive type. In addition to content, the basic properties of a buffer include capacity, limitation, and location.1) The capacity of a buffer is the number of elements it contains. The capacity of the buffer cannot be negative and cannot be changed.2) The limit of the buffer is the index of the first element that should not be read or written. A buffer's limit cannot be negative and cannot be larger than its capacity.3) The position of the buffer is the index of the next element to be read or written. The buffer's position cannot be negative and cannot be larger than its limit. This class has a subclass for each non-boolean primitive type. 2.2 Data Transmission Each subclass of this class defines two get and put operations:A relative operation reads or writes one or more elements, starting at the current position and incrementing the position by the number of elements transferred. If the requested transfer exceeds the limit, a relative get operation will throw a BufferUnderflowException, and a relative put operation will throw a BufferOverflowException. In both cases, no data is transferred.Absolute operations take explicit element indices, which do not affect position. Absolute get and put operations will throw IndexOutOfBoundsException if the index parameter exceeds the limit. Of course, I/O operations through the appropriate channel (usually related to the current position) can also transfer data to and from the buffer. 2.3 Mark and Reset The mark is an index to which the buffer's position is reset when the reset method is called. It is not always necessary to define a marker, but when defining a marker, you cannot define it as a negative number, and you cannot make it larger than the position. If a marker is defined, it will be discarded when the position or limit is adjusted to a value less than the marker. Calling the reset method will cause an InvalidMarkException to be thrown if the mark is not defined. 2.4 Invariants Mark, position, limit, and capacity values obey the following invariants:0<=mark<=position<=limit<=capacity, newly created buffers always have a 0 position and an undefined mark. The initial limit can be 0 or some other value, depending on the buffer type and how it is built. In general, the initial contents of the buffer are undefined. 2.5 Clear Reverse Rewind In addition to methods for accessing position, limitation, capacity values, and methods for marking and resetting, this class defines the following operations that can be performed on buffers.clear() prepares the buffer for a series of new channel reads or relative put operations. It sets the limit to the capacity size and the position to 0.flip() prepares the buffer for a series of new channel write or relative get operations. It sets the limit to the current position, then the position to 0.rewind() prepares the buffer for rereading already contained data. It leaves the limit unchanged, setting the position to 0. 2.6 Read-Only Buffer Every buffer is readable, but not every buffer is writable. The mutate method of each buffer class is designated as an optional operation and will throw a ReadOnlyBufferException when called on a read-only buffer. A read-only buffer does not allow changes to its contents, but its tag, position, and limit values are mutable. Its isReadOnly method can be called to determine whether the buffer is read-only. 2.7 Thread Safety It is not safe for multiple current threads to use the buffer. If it is used by more than one thread, access to that buffer should be controlled through appropriate synchronization. 2.8 Call Chain Specifies that methods in this class return the buffer on which they were called (otherwise they would return no value). This operation allows method calls to be formed into a chain, like a sequence of statementsb.flip(); b.position(23); b.limit(42); can be replaced by the following short statement b.flip().position(23).limit(42);   Ⅲ EDA Code library ieee;use IEEE.STD_LOGIC_1164.all;ENTITY BUF3S ISPORT (INPUT:IN STD_LOGIC;ENABLE:IN STD_LOGIC;OUTPUT:OUT STD_LOGIC);END BUF3S;ARCHITECTURE BHV OF BUF3S ISBEGINPROCESS(ENABLE,INPUT)BEGINIF ENABLE='1'THEN OUTPUT<=INPUT;ELSE OUTPUT<='Z';END IF;END PROCESS;END BHV;   Ⅳ Verilog HDL Model and Simulation of Tri-state Buffer Figure 5. Verilog HDL Model and Simulation of Tristate Buffer 4.1 Tri-state Buffer IC Tristate buffers are often used for multiple data sources to share a (group) common line (bus). Figure 6. For Multiple Data Sources When all enable terminals of the decoder are valid, the combination of SS2~SS0 makes only one of /SELP~/SELW valid at the same time, so that one of the 8 data sources P~W drives SDATA. When the enable terminal is invalid, then none of the three-state gates are enabled, and the outputs are all high impedance.The MSI device 74LS541 contains 8 independent tri-state gates and shares two enable inputs. The logic diagram and logic symbols are as follows: Figure 7. 74LS541 Logic Diagram and Logic Symbol 4.2 Application Example of 74LS541 as Input Port Figure 8. Application Example of 74LS541 as Input Port The MSI device 74LS245 is an 8-bit tri-state bus transceiver with an enable output G and a direction selection input DIR to determine the transmission direction: when DIR=1, data is transmitted from A to B; when DIR=0, data is transmitted from B passed to A. The logic diagram and logic symbols are as follows: Figure 9. 74LS245 Logic Diagram and Logic Symbol   Figure 10. Bus   Figure 11. Verilog HDL Model of 8-bit Tri-state Bus Transceiver 4.3 Multiplexer (MUX) Multiplexers are also called data selectors, and are often abbreviated as MUX. It is a combinational logic circuit with multiple inputs and single outputs, denoted as n/1 or n-1.Logic function: Since the enable terminal EN is valid., when selecting the control variable, select one of the multiple input data to the output terminal. Figure 12. MUX Each value group of the n selection control variables corresponds to select one of the m=2n input data and then send it to the output terminal.Design of Commonly Used Multiplexers🔺8 to 1 Multiplexer Figure 13. 8 to 1 Multiplexer Function Description   Figure 14. 8 to 1 Logic Circuit Diagram Circuit package, Logic symbol Figure 15. Circuit Package   Figure 16. Logic Symbol 1 Out of 8 Verilog HDL Models Figure 17. 1 Out of 8 Verilog HDL Model   Figure 18. 8 Out of 1 Functional Simulation 🔺8 Out of 1 Multiplexer with Tri--state Output Figure 19. Function Description   Figure 20. 8 to 1 Logic Circuit Diagramof Three-state Output Circuit Package, Logical Symbol Figure 21. 74LS251 Circuit Package and Logical Symbol 1 Out of 8 Verilog HDL Model for Tri-state Output Figure 22. Verilog HDL Model Ⅴ FAQ 1. What is a buffer software?A reserved segment of memory within a program that is used to hold the data being processed. Buffers are set up in every program to hold data coming in and going out. In a video streaming application, the program uses buffers to store an advance supply of video data to compensate for momentary delays. 2. Is buffer safe to use?Buffer is a reliable, fast way to manage multiple social media accounts, from a user-friendly dashboard. 3. Why do we need buffering in OS?Computers have many different devices that operate at varying speeds, and a buffer is needed to act as a temporary placeholder for everything interacting. This is done to keep everything running efficiently and without issues between all the devices, programs, and processes running at that time. 4. Is a buffer hardware or software?A buffer is a data area shared by hardware devices or program processes that operate at different speeds or with different sets of priorities. The buffer allows each device or process to operate without being held up by the other. This term is used both in programming and in hardware. 5. What is tri-state buffer?A tri-state buffer is a logic inverter or a non-inverting buffer with a tri-state output stage. ... When the enable line is not activated the buffer output stage has a high output impedance (i.e., the Z state, as described above in section 10.15) and transmission of data is prevented. 6. What is the difference between buffer and tri-state buffer?A tri-state buffer is similar to a buffer, but it adds an additional "enable" input that controls whether the primary input is passed to its output or not. If the "enable" inputs signal is true, the tri-state buffer behaves like a normal buffer. 7. What is meant by tri-state buffer how it helps in reading and writing data from a register?Definition: A three-state bus buffer is an integrated circuit that connects multiple data sources to a single bus. The open drivers can be selected to be either a logical high, a logical low, or high impedance which allows other buffers to drive the bus. 8. What is tri-state TTL?Tri-state gates have additional circuitry via which the gate outputs can be enabled or disabled. This is very useful in digital systems where devices communicate via common wires called busses. Only one device can talk at a time; the others are disabled. 9. Which of the following is also known as tri-state?Explanation: The progression in the parallel ports provides a third register or an individual control bit which can make the pin in a high impedance state. An output port which can do this is also known as tri-state, that is, logic high, logic low and a high impedance state. 10. What is tri-state in microprocessor?Tristate means three states viz. Logic 0, Logic 1 and high impedance states. In high impedance state, the pin neither connected to supply nor to ground. Hence impedance at this pin is very high with respect to suppy as well as ground. Some pins of 8085 have three states. 11. How many buffer may active at any given time?At any one time, one buffer is actively being displayed by the monitor, while the other, background buffer is being drawn. 12. What is tri-state circuit?Tristate means a digital circuit output that can have 3 states: 0, 1 and High-Z or high impedance which is the circuit equivalent of “disconnected”. There are times when you want to have multiple digital circuits connected on a bus but not interfering with each other.
kynix On 2022-01-13   3412
Motors, Solenoids, Driver Boards/Modules

Complete Tech Guide of Raspberry Pi in 2021

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

Arduino Complete Guide for Beginners with Examples

IntroductionAs the most popular open-source hardware in the world, Arduino is not only an excellent hardware development platform, but also a trend in hardware development. Its simple development method makes developers pay more attention to creativity and realization, complete their own projects and get experiments faster, which greatly saves the cost of learning and shortens the development cycle. There are too many want to say, in short, arduino provides a lot of convenience for many electronics enthusiasts and creators, and also provides a platform for sharing their results. So what exactly is it? How does it work?CatalogIntroductionⅠ What is Arduino?Ⅱ Who Make the Arduino?Ⅲ Why Use Arduino?Ⅳ What Does Arduino Have?Ⅴ Arduino Programming LanguageⅥ Arduino Basic ArchitectureⅦ Copyright and PaymentⅧ Simple Arduino Projects8.1 Video Demonstration8.2 Examples and Programming CodesⅨ FAQⅠ What is Arduino?Arduino is a tool that can be used to sense and control the physical world more than your desktop computer. It consists of an open source-computer platform based on a simple single-chip microcomputer, and a development environment for writing programs for the Arduino board.Arduino can be used to develop interactive products. For example, it can read a large number of switches and sensor signals, and can control a variety of lights, motors, and other physical devices. The Arduino project can be a standalone project, or it can communicate with programs running on your computer (for example: Flash, Processing, MaxMSP) at runtime. You can choose to manually assemble the Arduino board yourself or buy a productthe, because open-source IDE can be downloaded for free.The Arduino programming language seems to be correspondingly connected to a physical computing platform, which is based on a programming environment that handles multimedia.Learn Arduino in 15 MinutesⅡ Who Make the Arduino?Massimo Banzi was a teacher at a high-tech design school in Ivrea, Italy. His students often complain about not being able to find cheap and easy-to-use microcontrollers. In the winter of 2005, Massimo Banzi discussed this problem with David Cuartielles. He is a Spanish chip engineer who was a visiting scholar in this school at the time. The two decided to design their own circuit boards and introduced David Mellis (Banzi student) to design a programming language for the circuit boards. Two days later, David Mellis wrote the code. After another three days, the circuit board was completed. Massimo Banzi likes to go to a bar called di Re Arduino, which was named after the Italian king Arduin 1,000 years ago. To commemorate this place, he named this circuit board Arduino.Figure 1. The Making Arduino Core Team Ⅲ Why Use Arduino?There are many single-chip microcomputers and their platforms that are suitable for the design of interactive systems. For example: Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's Handyboard and others provide similar functions. With all these tools, you don't need to care about the cumbersome details of MCU programming. Arduino provides you a set of easy-to-use toolkits. Arduino also simplifies the process of working with a single-chip microcomputer, but compared with other systems, it has many advantages in many places. In fact, it is especially suitable for teachers, students and some amateurs:0️⃣Cheap1️⃣Cross-platform2️⃣Simple programming environment3️⃣The software is open-source and expandable.4️⃣Hardware is open-source and expandable. Ⅳ What Does Arduino Have?At the beginning of Arduino development, its application environment was clarified, and an open-source platform was designed to facilitate its secondary development. The main features of Arduino are as follows:1) Open-source circuit diagram design. The program development interface is free to download, or you can modify it according to your needs. Arduino carries low-priced microcontrollers (ATmega8 or ATmega128). It can be powered by a USB interface, no external power supply, and an external 9VDC input can also be used.2) Support ISP online programming, making the Bootloader firmware into the chip. The Arduino controller contains the Bootloader program, which is the first piece of code that runs after the system is powered on. It is like the program in the BIOS of the PC. It performs self-check after startup, configures the port, and so on. Of course, the microcontroller relies on programming the fuse. Set the startup from the boot area after power-on, and use this program to directly store the program sent from the serial port in the flash area. Therefore, when using the Arduino compilation environment to download the program, first reset the microcontroller and start the Boodoader program to guide the program sent from the serial port to be successfully written into the flash area. The flash can be programmed repeatedly, so it is very convenient to update the software. After having Bootloader, you can update the firmware through the serial port or USB to RS232 line.3) According to the official PCB and SCH circuit diagrams, the Arduino module can be simplified to complete independent micro-processing control.4) It can be easily connected with sensors and various electronic components, such as infrared, ultrasonic, thermistor, photoresistor, servo motor, etc.5) Support a variety of interactive programs, such as Flash, Max/MSP, VVVV, PurEDAta, C, Processin, etc.In terms of application, the use of Arduino can break through the interactive content of devices that can only use mouse, keyboard, CCD and other input devices in the past. For example, it can achieve single-player or multi-player game interaction more simply. The functional characteristics of Arduino make it more and more widely used. Ⅴ Arduino Programming LanguageUsually, the Arduino language we say refers to a collection of various application programming interfaces (APIs) provided by the Arduino core library files. Arduino uses C/C++ to write programs. Although C++ is compatible with C language, these are two languages. C language is a process-oriented programming language, and C++ is an object-oriented programming language. The early Arduino core library was written in C language, and later object-oriented ideas were introduced. At present, the latest Arduino core library is written in a mixture of C and C++.The Arduino language is a program framework that starts with setup() and loop() as the main body. setup() is used to initialize variables, pin modes, call library functions, etc. This function only runs once, and its function is similar to "main()" in C language. For the loop() function, the statements in the function are executed in a loop.Arduno language modularizes some parameter settings related to AVR microcontroller, including EEPROM, Ethernet, LED matrix, steering gear, stepping and TWI/I2C control library. It does not require the user to directly deal with the underlying system, which can improve the efficiency of application development. Ⅵ Arduino Basic ArchitectureThe Arduino system has also developed different versions based on different application environments. The "Arduino Duemilanove" version is used as an example to introduce the Arduino system. This version was developed in 2009 and is based on the atmega328 microcontroller board. During use, connect the computer with a USB cable or use a power adapter to power it.1) One 9V DC input provides external power output for the Arduino board, so that the Arduino control board has the ability to drive high-power external devices such as steering gear.2) One USB port used to connect the computer. The Arduino IDE uploads the control program written by the user to the control board, and at the same time, it can also supply power to the circuit board and drive low-power external devices through this port.3) 14 digital input/output terminals, among which ports 0 (RX) and 1 (TX) are respectively connected to the serial pins of the main control chip to receive and send TTL serial data. Among them, ports 2 and 3 can receive external signals to realize external interrupt function. Ports 3, 5, 6, 9, 10, 11 are used as PWM ports, which can be used for motor PWM speed regulation or music playback. Port 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK) can provide SPI communication mode with the support of SPI module library. Port 13 is connected with an LED indicator, which can open and close with the change of the level on pin 13.4) 6 analog input/output ports, of which port 4 (SDA) and port 5 (SCL) can realize I2C communication.5) One 5V DC output and one 3.3V DC output, which can provide 3.3V and 5V DC power supplies for other circuits.6) One reset interface.The Arduino system is developed based on a single-chip microcomputer, and a large number of common and standard electronic components are used on it. The entire design, including hardware and software, is released in an open source manner. Therefore, the cost of procurement is relatively low. In various electronic production competitions, Arduino is used as a development platform for creative design of electronic artwork.Figure  2. Arduino Board Terminals🔺Arduino Hardware✔️There are many motherboard, such as:Arduino UnoArduino NanoArduino LilyPadArduino Mega 2560Arduino EthernetArduino DueArduino LeonardoArduinoYún✔️There are many expansion boards for Arduino, such as:Arduino GSM ShieldArduino Ethernet ShieldArduino WiFi ShieldArduino Wireless SD ShieldArduino USB Host ShieldArduino Motor ShieldArduino Wireless Proto ShieldArduino Proto Shield Ⅶ Copyright and PaymentIn order to maintain the open-source concept of the design, Arduino decided to adopt the Creative Commons license, which is a license similar to GPL that appears to protect open copyright activities. Because copyright law can regulate open-source software, but it is difficult to use it on hardware. Having this license, anyone is allowed to produce copies of circuit boards, redesign, and even sell copies of the original design. You don't need to pay royalties, or even get permission from the Arduino team. However, if you republish the reference design, you must sign the original Arduino team. In addition, if you adjust or modify the circuit board, your latest design must use the same or similar license to ensure that the new version of the Arduino circuit board will be free and open. In other words, only the name Arduino is reserved, and it is a trademark now. If someone wants to sell a circuit board under this name, they must pay a small trademark fee to the Arduino core development members. Ⅷ Simple Arduino Projects8.1 Video DemonstrationBasic Projects with Arduino8.2 Examples and Programming Codes🔺Water Lamp ControlInsert 6 LED lights on the breadboard, among which the long pins are assigned to the 6, 7, 8, 9, 10, 11 ports of arduino respectively, the short pins are all connected to the blue wire of the breadboard, and then one port of the blue wire is connected to the GND port of the arduino. Figure  3. Water Lamps ConnectionCode:void setup(){ pinMode(6,output);pinMode(7,output);pinMode(8,output);pinMode(9,output);pinMode(10,output);pinMode(11,output);}void loop(){digitalWrite(6, LOW);digitalWrite(7,HIGHT);delay(200);digitalWrite(7, LOW);digitalWrite(8,HIGHT);delay(200);digitalWrite(8,LOW);digitalWrite(9,HIGHT);}🔺Using the Buzzer to Realize the AccordionThe buzzer is set according to different frequencies, so set the corresponding buzzer frequency based on the level of the switch interface.void setup(){pinMode(8,INPUT);  //switch setdigitalWrite(8, HIGH);pinMode(9,INPUT);digitalWrite(9, HIGH); piMode(10,INPUT);digitalWrite(10, HIGH); pinMode(11,OUTPUT) //light setpinMode(12, OUTPUT)pinMode(13,OUTPUT)}void loop(){if(digitalRead(8)==LOW){tone(7,2093);  //the buzzer frequency is set to 2093digitalWrite(11, HIGH);}else{notone(7);digitalWrite(11,LOW);}Repeat 2 switch values down;;; 🔺Breathing LightThe so-called breathing is relatively stable, so it cannot flicker and go off like a flashing LED. So analog output is used, and the current changes continuously.Figure  4. Breathing Light ConnectionCode:void setup(){pinMode(11,OUTPUT);  }void loop(){for(int i=0;i<30;i++){analogWrite(11,i);   //analog signal input, the range of i is [0,255];delay(10);}for(int j=29;j>0;j--){analogWrite(11,j);delay(10);}} Among them, the corresponding relationship between the analog signal voltage and the digital signal voltage:How is the analog signal realized to control the voltage within a range in a cycle?Figure  6. PWMAs shown in the figure, “on” belongs to 5V, and “off” belongs to 0V. In a time period, that is, when a pulse is sent, the duration of “on” in the previous figure is 25%, and the “off” is 75%. The voltage value calculated like this: v0=5*25%+0*75%=1.25(v). It can be simply understood like this. 🔺Breathing Water Lampvoid  setup(){pinMode(3, OUTPUT);pinMode(5, OUTPUT);pinMode(6, OUTPUT);pinMode(9, OUTPUT);pinMode(10, OUTPUT);pinMode(11, OUTPUT);}int  ports[6]=[3,5,6,9,10,11];int i=0,level=0; set loop(){ analogWrite(ports[i], level);delay(10);++level %=7;++i %=6;  i is incremented first, and then modulo 6, that is, i is always in the range of 0~5;}🔺Vibrating LEDPhotoresistor, resistor, LED are required;Connect one end of the photoresistor to 5V, the other end to the resistor, and the resistor to GND. Pull out a wire between the two and connect to analogIn;Figure  7. Vibrating LED ConnectionCode:void setup(){Setrial.begin(9600);}void loop(){Setril.printIn(analogWrite(0));  //the middle wire is connected to port 0, which is the serial output port;delay(200);} 🔺Electric BellWhen energized, electromagnetic induction produces magnetic force, the switch (oscillator) is attracted and pulled down; When the power is cut off, the coil loses its magnetism, the switch is restored, and then energized. That is, repeat the cycle. This is also the principle of crystal oscillator.Figure  8. Electric Bell DiagramCode:void setup(){pinMode(9,OUTPUT);Setrail.begin(9600);}void loop(){Setrail.printIn(analogRead(0));analogWrite(9, map(analogRead(0), 400,700,0,255);   //map(a1,b1,a2,b2), that is, the original range of values [a1,b1] is mapped to [a2,b2];delay(200);} Ⅸ FAQ1. What is an Arduino used for?Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online.2. Is Arduino illegal?The hardware designs of Arduino are open source; it is allowed to copy and further develop the designs. Note that in case a copy uses the Arduino name and/or logo on it, this board is no longer a copy but a counterfeit which is illegal to manufacture and sell.3. Can Arduino run C++?First, the Arduino compiler/IDE accepts C and C++ as-is. In fact many of the libraries are written in C++. Much of the underlying system is not object oriented, but it could be. Thus, "The arduino language" is C++ or C.4. Is Arduino easy to learn?Arduino is cost-effective and easily accessible. Arduino is easier to learn as a programming language as it is a simplified version of the C++ programming language. Arduino is cross-platform which makes it easy to run on any sort of device compared to other microcontrollers which can only run on windows.5. What is the difference between Arduino and Raspberry Pi?The main difference between them is: Arduino is microcontroller board, while Raspberry Pi is a microprocessor based mini computer (SBC). The Microcontroller on the Arduino board contains the CPU, RAM and ROM. All the additional hardware on Arduino Board is for power supply, programming and IO Connectivity.6. Why is Arduino so popular?So the Arduino hardware is easy, the Arduino IDE is simple, and the code itself is much easier to comprehend (than trying to program an off-the-shelf microcontroller). ... Another reason Arduino is so popular is because there are many people using it which means there's a lot of examples out there to work with.7. Can I sell my Arduino project?Yes, with the following conditions: Physically embedding an Arduino board inside a commercial product does not require you to disclose or open-source any information about its design. ... You may manufacture and sell the resulting product.8. Do you have to use the Arduino IDE?Can I program an Arduino board without the Arduino IDE? Yes, you can use Create web editor to program your board without the need of download the classic IDE.9. Can I use Python in Arduino?Arduino uses its own programming language, which is similar to C++. However, it's possible to use Arduino with Python or another high-level programming language. In fact, platforms like Arduino work well with Python, especially for applications that require integration with sensors and other physical devices.10. What language does Arduino code in?Arduino is programmed with a c/c++ 'dialect'. Most c/c++ will work but much of the standard libraries will not work.11. Which language is best for Arduino?Any language that has a compiler that generates Arduino compatible machine code will be perfect. As of this moment , a subset of C / C++ is the only language that is supported by the Arduino IDE.12. How do I program an Arduino?1) Use your Arduino Uno on the Arduino Web IDE.2) Use your Arduino Uno on the Arduino Desktop IDE. Install the board drivers. Open your first sketch. Select your board type and port. Upload the program. Learn more on the Desktop IDE.3) Tutorials.13. Can Arduino connect to WiFi?Connect your Arduino to the internet by adding ESP8266 WiFi Module ... Adding this module to your Arduino UNO will open you to more and exciting projects.14. Can an Arduino run Linux?Arduino have a couple of boards that support running a variant of Linux called Linino: The Arduino Yún is a microcontroller board based on the ATmega32u4 and the Atheros AR9331. The Atheros processor supports a Linux distribution based on OpenWrt named Linino OS.15. What should I learn before Arduino?Before learning Arduino you need to have knowledge of basic programming. You can choose any language like C, C++ or Java. And apart from that you need to have basic idea about electronic devices like which part it is?, How it works? etc.16. Where do I program Arduino?Arduino programs are written in the Arduino Integrated Development Environment (IDE). Arduino IDE is a special software running on your system that allows you to write sketches (synonym for program in Arduino language) for different Arduino boards.17. How many types of Arduino are there?Top 6 Different Types of ArduinoArduino UNO. The development of Arduino UNO board is considered as new compared to other Arduino boards.LilyPad ArduinoArduino MegaArduino LeonardoArduino Red BoardArduino Shields18. Is Arduino good for beginners?Arduino is easily accessible - even for those who don't know much about electronics. Arduino boards are simple a type of microcontroller. They are able to read inputs from the sensors and turn those inputs into output. Arduino is the best for beginners looking to get started with electronics for the first time.19. Which is more powerful Raspberry Pi or Arduino?Given those differences you might think a Raspberry Pi is so much more powerful and capable than Arduino, so you should use that. ... Raspberry Pi has 8. Individual I/O pins in Arduino can drive 40mA while Raspberry Pi GPIO pins can each drive a maximum of 16mA.
kynix On 2021-12-22   1112
Relays

Latching Relay Definition, Basic Functions and Selection

Introduction Latching relay is a new type of relay and also an automatic switch. Like other electromagnetic relays, it turns on and off the circuit automatically. The difference is that the normally closed or normally open state of it is completely dependent on the action of permanent magnets, and the switching state of it is triggered by a pulse electric signal of a certain width. It has the characteristics of power saving, stable performance, small size, large carrying capacity, and superior performance than general relays. Latching Relay Basics in 2 Minutes Catalog Introduction Ⅰ Working Principle 1.1 Action Principle 1.2 Action Process Ⅱ Main Functions and Advantages 2.1 Average View 2.2 Function Lists 2.3 Application Area Lists 2.4 Latching Relay Advantages Ⅲ Tech Parameters Ⅳ Latching Relay Test 4.1 Measuring Contact Resistance 4.2 Measuring Coil Resistance 4.3 Set Voltage and Current 4.4 Reset Voltage and Current Ⅴ Relay Selection 5.1 The Necessary Conditions 5.2 Relevant Information Search 5.3 Installation Layout Consideration Ⅵ FAQ Ⅰ Working Principle 1.1 Action Principle The on and off state of the latching relay is usually held by the magnetic force generated by the permanent magnet. When the contacts of the relay need to be opened or closed, only the positive (reverse) DC pulse voltage is needed to excite the coil, and the relay completes the state transition between opening and closing in an instant. Usually when the contact is in the holding state, the coil does not need to continue to be energized, and the state of the relay can be maintained unchanged only by the permanent magnet force.   1.2 Action Process When the contacts of the relay need to be set, it is only necessary to excite the coil J2 with a positive DC pulse voltage. The magnetic poles generated by the coil J2 after excitation interact with the magnetic poles of the permanent magnet. As we all known, the same polarities repel each other, but the opposite polarities attract each other. The state transition from reset to set is completed in an instant. The following schematic diagrams demonstrates the specific state transition process. The process of the latching relay changing from the set state to the reset state, which are the same. Figure 1. Reset Latching Relay Figure 2. Constant-Current Pulse Monment Figure 3. Constant-Current Pulse Monment Figure 4. Latching Relay Reset   Ⅱ Main Functions and Advantages 2.1 Average View Latching relay is an automatic switching element with isolation function. It is widely used in remote control, telemetry, communication, automatic control, mechatronics and power electronic equipment. It is one of the most important control elements in electricity.Magnetic latching relays generally have an induction mechanism (input part) that can reflect certain input variables (such as current, voltage, power, impedance, frequency, temperature, pressure, speed, light, etc.). It has the ability to turn on/off the controlled circuit. In addition, between the input part and output part of the relay, there is an intermediate mechanism (drive part) for coupling and isolating the input, functional processing and driving the output part. 2.2 Function Lists The latching relay has the following functions:1) ExpansionFor example, when the control signal of a multi-contact relay reaches a certain value, multiple circuits can be switched, disconnected, and connected at the same time according to different forms of contact groups.2) AmplificationFor example, magnetic latching relays can control a large-power circuit with a very small control quantity.3) IntegrationFor example, when a plurality of control signals are input to a multi-winding relay in a prescribed form, they will be compared and integrated to achieve a predetermined control effect.4) Automation, remote control and monitoringFor example, on the automatic device and other electrical appliances, magnetic latching relays can form a program control circuit to realize automatic operation. 2.3 Application Area Lists 1) Smart meters: IC card meters, prepaid meters, single-phase meters, three-phase meters.2) Reactive power compensation: synchronous switch, composite switch, smart capacitor.3) Intelligent control: smart home, solar street light control, automation equipment, etc. 2.4 Latching Relay Advantages 1) They only need pulse excitation, and can work with single and double coils.2) Small size, easy installation.3) Low power consumption and strong load capacity.4) Safe and reliable, long service life. Figure 5. General Relay Structure Ⅲ Tech Parameters 1) Rated VoltageIt refers to the voltage required by the coil when the relay is working normally. Depending on the model of the relay, it can be AC voltage or DC voltage.2) DC ResistanceIt refers to the DC resistance of the relay coil, which can be measured by a multimeter.3) Pull-in CurrentIt refers to the minimum current that the relay can produce the pull-in action. In normal use, the given current must be slightly larger than the pull-in current, so that the relay can work stably. As for the working voltage applied to the coil, generally do not exceed 1.5 times the rated working voltage, otherwise it will generate a larger current and burn the coil.4) Release CurrentIt refers to the maximum current that the relay generates to release the action. When the current in the pull-in state of the relay is reduced to a certain level, it will return to the unpowered release state. The current at this time is much smaller than the pull-in current.5) Switch Voltage and CurrentThis refers to the voltage and current that the relay allows to load. It determines the magnitude of the voltage and current that the relay can control, and you cannot be exceeded this value during use, otherwise it is easy to damage the contacts of the relay.6) Coil Resistance RThe resistance produced by winding a T circle with an enameled wire with a diameter of Φ: R=£*(T/Φ).7) TemperatureThe higher the temperature, the greater the resistance, and the lower the resistance, the smaller the resistance. Generally speaking, the coil resistance refers to the coil resistance at 20°C. When the temperature is higher or lower than 20℃, there is a calculation formula: Rt=R20[1+(T℃-20℃)×0.004].8) Contact Resistance CRIt is the resistance between the contacts of the relay. And it is the sum of the shrinkage resistance Re and the surface film resistance Rf: Rk=Re+Rf.Note:🔺The factors that form shrinkage resistance Re:♦️The size of the contact pressure determines the size of the shrink resistance. The relationship between the two is inversely proportional, the greater the contact pressure, the smaller the shrinkage resistance.🔺The factors that form the surface film resistance Rf:♦️Dust in the air.♦️Harmful gases in the air: H2S, SO2, etc.♦️Organic vapor in the air: plastic, glue and rosin.♦️Oil stains on the contact surface during the production process.9) Pull-in VoltageThe minimum voltage required to close the relay contacts.10) Release voltageThe minimum voltage required to open the relay contacts.11) Insulation ResistanceThe resistance value that appears when measured with a specified DC voltage between conductive parts that are insulated from each other.12) Medium Withstand VoltageAlso known as dielectric degree, it refers to the maximum voltage that can withstand between two conductive parts without breakdown.13) Reversing RetentionThe minimum force applied on the armature assembly handle to open or close the contacts.14) Contact PressureThe interaction force generated between the moving and static contacts is equal to the contact pressure equal to the reaction force generated by the over-travel of the reed head. Figure 6. Latching Relay Product Ⅳ Latching Relay Test 4.1 Measuring Contact Resistance Use the resistance profile of the universal meter to measure the resistance of the normally closed contact and the moving point, which should be 0. The contact resistance can be measured in a more accurate way within 100 milliohms, while the resistances of the normally-open contact and the moving point should infinite. From this, it can be distinguished which is a normally-closed contact or a normally-open contact.   4.2 Measuring Coil Resistance The resistance value of the relay coil can be measured with the universal meter R×10Ω, so as to judge whether there is an open circuit phenomenon in the coil.   4.3 Set Voltage and Current Get an adjustable regulated power supply and an ammeter, input the set voltage to the relay, and insert an ammeter in the power supply loop for monitoring. Slowly increase the power supply voltage, and when you hear the sound of the relay picking up, write down the set voltage and set current. In order to be accurate, you can try several times. Pay attention to, the setting current should be the average value, and the setting voltage should be the maximum value.   4.4 Reset Voltage and Current Repeat the above operation. But there is a little difference that the reset current is the average value, and the reset voltage is the maximum value.   Ⅴ Relay Selection 5.1 The Necessary Conditions ① The power supply voltage of the control circuit, the maximum current that can be provided.② The voltage and current in the controlled circuit.③ How many sets and types of contacts are needed for the controlled circuit. When selecting a relay, the power supply voltage of the general control circuit can be used as the basis for selection. The control circuit should be able to provide enough working current to the relay, otherwise the relay will be unstable when it is closed.   5.2 Relevant Information Search After consulting the relevant information to determine the conditions of use, you can search for the relevant information to find out the model and specification number of the required relay. If you already have a relay on hand, you can check whether it can be used based on the data. Finally, consider whether the size is appropriate.   5.3 Installation Layout Consideration If it is used for general electrical appliances, in addition to considering the volume of the case, it is necessary to consider the installation layout of the circuit board. For small electrical appliances, such as toys and remote control devices, ultra-small relay products should be used.   Ⅵ FAQ 1. What is magnetic latching?The design of a Magnetic Latching Relay is such that when a short pulse of electrical energy is applied to the solenoid coil, sufficient magnetic force is generated to over-come the force of the relay' return mechanism. 2. How does a latching relay work?One latching type has two opposing coils with an over-center spring or permanent magnet hold the contacts in position after the coil is de-energized. A pulse to one coil turns the relay on and a pulse to the opposite coil turns the relay off. 3. Where is latching relay used?This type of relay is most suitable in applications like ON/OFF devices from multiple places with push-button or momentary switch. For example, it is used in a lighting circuit or conveyer to control from different locations. 4. What is a magnetic latching relay used for?A magnetic latching relay is a device in which the solenoid principle is applied to open and close light-current electrical circuits. The same device applied in heavy-current circuits is called a contactor, or circuit breaker. 5. How does a latching relay reset?Resetting is very simple. The coil circuit needs to be opened and shortened to the coils ground potential. The capacitor will be discharged through the coil and drives a current pulse with opposite polarity through the coil.
kynix On 2021-12-18   1818
potentiometer

DC Potentiometer Error Experiment Analysis with Steps

Introduction Potentiometer is a common instrument that uses compensation principle and comparison method to accurately measure DC potential difference or power supply electromotive force. It has high accuracy, convenient use, and stable and reliable measurement results. But even so, when we do potentiometer experiments, we still have to deal with different error problems. The content of this article tells you how to avoid too many errors without getting too large deviations in the experimental results. Potentiometer Experiment (Compare EMF of Two Cells) Catalog Introduction Ⅰ Potentiometer Principle Analyses 1.1 Compensation Principle 1.2 Operational Principle Ⅱ UJ25 DC Potentiometer Overview Ⅲ UJ25 DC Potentiometer Application 3.1 Working Current Adjustment 3.2 Experimental Content 3.3 Laboratory Apparatus Ⅳ Discussion of Experimental Results Ⅴ FAQ Ⅰ Potentiometer Principle Analyses If you want to firmly acquire the use of the basic potentiometer, you must first understand its compensation principle and operational principle. 1.1 Compensation Principle The electromotive force (EMF) of the power supply is theoretically equal to the voltage of the two poles when there is no net current flowing inside the power supply. If you directly use a voltmeter to measure it, the result is actually the terminal voltage not the EMF. Because the power supply has internal resistance r0, if the voltmeter is directly connected in parallel to the two ends of the power supply, there must be a current I through the inside of it, and also there is inevitably a potential drop Ir0 inside. So the indicated value of the voltmeter is only the terminal voltage of the power supply (U=E-Ir0) size. Obviously, in order to be able to accurately measure the EMF of the power supply, the current I must be zero. At this time, the terminal voltage U of the power supply is equal to its electromotive force E. Figure 1. Closed Loop As shown in the figure on the right, connect the electromotive force as Es, Ex and galvanometer G to form a closed circuit. When Es<Ex, the current direction is as shown in the figure, and the pointer of the galvanometer is biased to one side. When Es>Ex, the direction of current is opposite to the direction shown in the figure, and the pointer of the galvanometer is biased to the other side. Only when Es=Ex, there is no current in the loop. At this time, i=0, and the pointer of the galvanometer is not deflected. We call these two electromotive forces in a compensation state. Conversely, if i=0, then Es=Ex, this method is called zero-show method. 1.2 Operational Principle As shown in the figure, the compensation principle shows that Ex can be determined by measuring Vab. The next step is how to accurately measure Vab. Here, the comparative measurement method is used. Connect Ex to the tap of Rab. When the tap is slid to position Rab, no current flows in G, then Ex=I*Rab, where current I is the main circuit current. Then connect a standard battery EN with known EMF in the circuit, when the tap slides to the position Rcd, G is 0 again, then EN=I*Rcd, where This method is to obtain the ratio relationship between the voltage to be measured and the EMF of the standard battery through the comparison of resistance. Because R is a precision resistance, Rab/Rcd can be read accurately, EN is a standard battery with high-accuracy EMF. Therefore, as long as the auxiliary power supply E is stable and the galvanometer G has sufficient sensitivity during the measurement process, Ex can have a very high measurement accuracy. The voltage measuring instrument made according to the above principle is called a potentiometer. Figure 2. Auxiliary Circuit It should be pointed out that the condition for the establishment of  is that the working current of the auxiliary circuit in the two compensations must be equal. In fact, in order to facilitate the reading, I=EN/Rcd should be standardized, so that the corresponding resistance value can be directly read out abV, which is Ex.Actually, there is no sliding rheostat in the instrument provided to us in the experiment, only 2 resistance boxes. This experiment requires us to use a rheostat box to replace the sliding rheostat. Therefore, we will use a resistor box R1 instead of the compensation method to measure the sliding rheostat RP, the other resistor box R2 acts as Rab. Since the resistance of them can be read directly, we can easily keep the current through the auxiliary circuit unchanged, that is, keeping R1+R2 constant.   Ⅱ UJ25 DC Potentiometer Overview UJ25 DC Potentiometer is a kind of high potential device, the upper limit of measurement is 1.911110V, the accuracy is 0.01 grade, and the working current I=0.1mA. Its principle is shown in the figure, the bottom of the right figure is its panel, and the functions of the upper 12 binding posts have been indicated on the panel. The Rab in the figure is two step resistance knobs, marked with the value of the standard battery EMF at different temperatures for correction when adjusting the working current. RP is used to adjust the working current I. Rcd is the six large knobs marked with voltage values, used to measure the unknown voltage value at the lower left corner of the function switch. When it is off, the potentiometer does not work; when it is at N, it can be connected to check and adjust the working current. When it is at X1 or X2, it can measure the unknown voltage of the first channel and obtain the second channel. The three buttons marked G0, G1, and short circuit are the control switches for rapid current detection. By being in the off state and pressing G0, the galvanometer is on in the circuit, but a large resistor R is connected in series to compensate for the principle. At the same time, protect the galvanometer; press G1 down, the galvanometer is directly connected to the circuit, so that the potentiometer is in a high-sensitivity working state. When the damping switch turns on, the galvanometer coil is short-circuited, and the coil does not swing due to the large electromagnetic damping. Figure 3. UJ25 DC Potentiometer Circuit   Ⅲ UJ25 DC Potentiometer Application 3.1 Working Current Adjustment Turn the function switch to N, turn the temperature compensation resistor Rab to the last two digits of the corrected standard battery EMF "1.018V", press the "G0" and "G1" respectively, and adjust RP to zero for the galvanometer.Measure the voltage to be measured.Switch the function switch to X1 or X2, press the "G0" and "G1" buttons respectively, and adjust Rcd to the galvanometer zero, finally the displayed value is the voltage to be measured. 3.2 Experimental Content 🔺Assemble Potentiometer(1) Design and connect the potentiometer circuit, the following is the standard battery temperature correction formula: (2) Standardize the working current, and measure the electromotive force of the dry battery.(3) Measure the sensitivity of potentiometer. 🔺UJ25 DC PotentiometerUse UJ25 box-type potentiometer to measure dry cell electromotive force. 3.3 Laboratory Apparatus ZX-21 resistance box (two), pointer galvanometer, standard battery, regulated power supply, dry battery to be tested, double pole double throw switch, UJ25 box type potentiometer.Data Processing and Error Quantitative Analysis.🔺Raw DataStandard battery electromotive force: E20=1.01186V, UJ25 measurement Ex=1.469285V, accuracy level 0.01Ambient temperature: T1=20.5℃, T2=21.5℃ EN R1=1018.6Ω R2=1983.8Ω EX R'1=1469.8Ω R'2=1532.6Ω Sensitivity Measurement/14div R''1=1484.1Ω R''2=1518.3Ω 🔺Potentiometer Measurement ResultsStandard Electricity Correction Value where ,get EN=1.01857VPosition battery EMF calculation 🔺Error and Uncertainty Analysis(1) Instrument Error get Similarly Knowing that R1, R2, R'1, R'2 are independent of each other, then the data in (1) can be obtained: (2) Sensitivity ErrorSensitivity  (3) Effects of the Temperature Change Assuming the temperature is constant, then Because of , therefore, this part of the error and its uncertainty can be ignored.(4) EN Stability Because of therefore, this part of the error and its uncertainty can be ignored.(5) Error Analysis and Synthesis of UncertaintyFrom the calculation of (3) and (4), it can be seen that the combination of uncertainty can omit the error of EN indication, and omit the error caused by the change of the auxiliary power supply and the standard battery EN during the two zero indications. Also the sensitivity error of the circuit during the two times of zero display, and because the readings of multiple measurements are almost unchanged. So only one measurement result is recorded and used, and we do not consider the impact of EN error on the measurement of Ex.Compared with the uncertainty of (2) obtained by (1), the uncertainty of (2) is about one-tenth of the uncertainty of (3), but considering that the uncertainty of (3) is of the order of 10^(-3), it can ignore the magnitude of 10^(-4). In the end , get the final result of the measurement.   Ⅳ Discussion of Experimental Results The use of UJ25 potentiometer can more accurately measure the electromotive force of the unknown power source, so as to further analyze the measurement results of the self-assembled potentiometer.Knowing that the measurement result of UJ25 potentiometer is EX=1.469258, and calculate the sensitivity error of the instrument: Because the readings of multiple measurements are consistent, it is ignored.That is, the actual measurement result of UJ25 potentiometer is .The measurement result is .That is, the relative error is .The operation of this experiment is relatively simple, but the data processing is slightly complicated, especially the calculation of uncertainty. Because of its many sources, it is impossible to analyze the errors one by one, so the smaller influencing factors are ignored to simplify the calculation. In this process, we understand that the principle of compensation to eliminate the internal resistance of the electric meter and the battery will be of great help to subsequent experiments.   Ⅴ FAQ 1. What is a potentiometer in a circuit?A potentiometer is a three-terminal resistor with a sliding or rotating contact that forms an adjustable voltage divider. ... Potentiometers are commonly used to control electrical devices such as volume controls on audio equipment. 2. What is the purpose of the potentiometer?A potentiometer is a type of position sensor. They are used to measure displacement in any direction. Linear potentiometers linearly measure displacement and rotary potentiometers measure rotational displacement. 3. How does a potentiometer affect a circuit?The potentiometer is a three-wire resistive device that acts as a voltage divider producing a continuously variable voltage output signal which is proportional to the physical position of the wiper along the track. 4. What happens when you turn potentiometer?It will behave like a normal resistor. When the circuit is connected to a center lead, and an outside lead, the potentiometer will behave like a variable resistor - turning the post of the potentiometer will increase (clockwise), or decrease (counter-clockwise) the resistance of the potentiometer. 5. How does a potentiometer change resistance?As you turn the knob of a potentiometer, the change in the resistance can be either linear or logarithmic. The way the resistance changes is called the taper. With a linear taper potentiometer, turning a knob a certain amount will change the resistance by a set amount, no matter the position of the knob. 6. How much voltage can a potentiometer handle?The easiest way to think about it is that there is a maximum current through the pot. If you have a 1W 100 ohm potentiometer, the max. current is 100mA (full voltage = 10V); if you are using only 27 ohms of the potentiometer then the max. 7. How does current flow in a potentiometer?Assume V to be the voltage produced by the cell in the primary circuit across the length of the potentiometer wire, and E to be that produced by the cell of the secondary circuit. 8. What is the formula for potentiometer?It is calculated as V/L, where V is the potential difference between two points and L is the distance between two points. Also K = (IρL/A)/L = Iρ/A. 9. How is potentiometer power calculated?Imax = √(P/R) where Imax is the maximum amount of current that can pass safely through any part of the pot, P is the specified power rating of the pot, and R is the specified resistance of the pot. For example, a 10,000-ohm, 1-watt potentiometer can safely pass √[1/(1 x 104)] amperes, or 10 milliamperes. 10. How do you calculate the output voltage of a potentiometer?Measure the total battery voltage, and then measure the voltage between the same two points on the potentiometer (wiper and negative side). Divide the potentiometer's measured output voltage by the measured total voltage. 11. What is the working principle of potentiometer?The principle of a potentiometer is that the potential dropped across a segment of a wire of uniform cross-section carrying a constant current is directly proportional to its length. The potentiometer is a simple device used to measure the electrical potentials (or compare the e.m.f of a cell). 12. What is potentiometer calculate the internal resistance of a cell?To calculate internal resistance, we use a potentiometer to first calculate the voltage across the battery, with no current through it. Then we attach a resistor in parallel to the battery and recalculate the voltage across it. ... Using the battery equation, we calculate the internal resistance. 13. What are the two uses of potentiometer?The applications (uses) of the potentiometer:Voltage divider: The potentiometer can be used as a voltage divider to change the output voltage of a voltage supply.Audio control: Sliding potentiometers are commonly used in modem low-power audio systems as audio control devices. 14. How do you calculate the emf of a cell using a potentiometer?Using a potentiometer, we can determine the emf of a cell by obtaining the balancing length l. Here, the fall of potential along the length l of the potentiometer wire is equal to the emf of the cell, as no current is being drawn from the cell. 15. How can potentiometer be used to calculate potential difference?A Potentiometer can be to measure e.m.f of a cell which cannot be measured by a voltmeter. When a voltmeter is connected in a circuit it draws current through the circuit and thus can measure the potential difference across the cell terminals. ... Thus it measures the e.m.f. of the cell. 16. What is the principle of potentiometer support with equation?The basic potentiometer working principle is based on the fact that the potential across any piece of the wire is directly proportional to the length of the wire, which has a uniform cross-sectional area and the constant current flowing through it. 17. What is potentiometer write its principle and construction?The potentiometer is a device used to compare the e.m.f of two cells. It works on the principle that when a constant current flows through a wire of uniform cross-sectional area, a potential difference between its two points, is directly proportional to the length of the wire between the two points.
Lydia On 2021-12-07   2433

Kynix

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

Follow us

Join our mailing list!

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

Kynix

  • How to purchase

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

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

authentication

Kynix

© 2008-2026 kynix.com all rights reserve.