Managing Power, Ground, and Noise in Microcontroller/Analog Applications
[Copy link]
In addition to the microcontroller, microcontroller applications often include low-level sensor signals and appropriate power drive circuits, which require careful design of power and ground. This article will discuss noise sources and the paths through which noise propagates. We will touch upon the theory behind good layout practices and their impact on noise. We will also discuss proper selection and layout methods for isolating and limiting noise components. Figure 1 is a block diagram of the system used in this article. The function of this system is to collect weight and display the results on an LED array and a laptop computer. A fan controller can be used to cool the board when necessary. This design example includes both analog and digital sections. One of the difficulties of this design is how to isolate these two sections. Let's first look at the analog section of the design, where the analog input signal enters the circuit to implement weighing. The analog interface circuit in Figure 1 includes a weighing scale, a gain circuit, an artifact filter, and a 12-bit analog-to-digital converter (ADC). The weighing scale uses a Wheatstone bridge, as shown in Figure 2. 740)this.width=740" border=undefined> Figure 1 Circuit model of the system including noise sources. The analog interface circuit uses a weighing sensor to measure the weight. The interface then transmits the measurement result to the microcontroller. The microcontroller sends the sensor results to the LED display and laptop computer. The entire circuit also includes the fan motor driver circuit. 740)this.width=740" border=undefined> Figure 2 This is the analog portion of the block diagram shown in Figure 1. The amplifier and reference voltage are connected to the ADC, which is connected to the microcontroller. To build a second-order low-pass filter (A3), two resistors, two capacitors, and the MCP6022 operational amplifier are required. Another amplifier forms an instrumentation amplifier, in which bypass capacitors are used. In the digital section, the microcontroller generates a digital representation of the weighing value. One of the functions of the microcontroller is to display the measurement results on the LED array. The microcontroller also transmits data to the desktop computer using the RS-232 connection port. The desktop computer obtains the analog measurement data from the microcontroller and displays this data in the form of a bar graph. Finally, the digital section also includes the PWM driver output for the fan. This design includes sensitive analog circuits, a high-power LED display, and a potentially noisy digital interface to the laptop computer. The difficulty lies in designing a circuit and layout that can allow these conflicting elements to coexist. We will start by designing the analog portion of this circuit and then move on to discuss issues related to layout. Analog Circuit Design The analog portion of this circuit has a load cell, dual op amps (MCP6022) forming an instrumentation amplifier, a 12-bit 100 kHz SAR ADC (MCP3201), and a voltage reference. The SPI port of the ADC is directly connected to a microcontroller (see Figure 2). The full-scale output range of the load cell is ±10mV. The gain of the instrumentation amplifier (A1 and A2) is 153V/V. This gain allows the full-scale output swing of the instrumentation amplifier circuit to match the full-scale input range of the ADC. The SAR ADC has an internal input sampling mechanism. With this feature, each conversion can be performed with a single sample. The microcontroller collects the data from the converter and converts the data into a format that can be used for tasks such as LED display or PC interface. If the circuit and layout design of this system is implemented with defects (no ground plane, no bypass capacitors, and no aliasing filters), noise problems will definitely occur. Flawed implementations will result in intolerable uncertainty in the ADC digital output. Assuming this situation occurs, it is obvious that the last device in the signal chain has noise problems. However, in reality, the root cause of noisy conversion results is the PCB layout problem. In the worst case, when no precautions are taken to suppress noise, the output code distribution of the 12-bit system shown in Figure 2 for a DC input signal is very scattered. Figure 3 shows the data output from the converter. 740)this.width=740" border=undefined> Figure 3 Data output by the converter. Ground and Power in Analog Layout : Implementation of ground plane layout is critical to designing low noise solutions. Ignoring the ground plane is a dangerous practice with analog and/or mixed signal devices. Ground planes can solve problems such as offset errors, gain errors, and circuit noise. Since analog signals are usually referenced to ground, errors will be more severe when a ground plane is missing. When developing a grounding strategy for the board, you should first determine whether the circuit requires a single ground plane or multiple ground planes. If the circuit contains very little digital circuitry on the board, a single ground plane and triple-wide power traces will suffice. The danger of connecting the digital and analog ground planes together is that the analog circuits will be affected by the noise of the digital circuit return currents. In either case, the analog ground, digital ground, and power supply should be connected together at one or more points on the board. A ground plane is a must in a 12-bit system. ADC Layout: ADC layout techniques vary with the converter technology. When using a SAR ADC, the entire device should reside on the analog power and ground planes. ADC manufacturers usually provide analog and digital ground pins. If a high-resolution SAR converter is used, a digital buffer should be used to isolate the converter from the bus activity in the digital portion of the circuit. This is also the correct approach to take when using a delta-sigma ADC. Figure 4 shows the performance of a board designed with these considerations in mind. This data shows that the analog portion of the circuit works very well. 740)this.width=740" border=undefined> Figure 4 Result data obtained from the circuit design of Figure 2. The improved results show that our low-noise layout strategy is effective. Analog Design Conclusion In summary, it is important to verify that the circuit components have low noise performance from the beginning of the design. In this case, the key factors are resistors and amplifiers. After selecting the appropriate components, ensure that the signal path is properly filtered. This includes the signal path and the power supply line. An uninterrupted ground plane is key to all analog designs. This will eliminate noise, otherwise it is necessary to find out what the problem may be. Finally, keep the bypass capacitor leads short and as close to the power supply pins as possible. Digital Design We now begin the first step of the digital/analog design integration. In this first step, we will add the digital portion to the layout strategy using common rules of thumb. This portion of the design adds LEDs, motor drivers, RS-232 transmitters/receivers, and a microcontroller. The design uses bypass capacitors and flyback diodes on the motor drive side. The bypass capacitors are kept close to the IC power supplies, and the ground traces are short. This does not change the layout of the analog circuits. Figure 5 shows the bar graph results of the first step of the digital/analog layout. 740)this.width=740" border=undefined> Figure 5 Noise code width = 35 (total number of samples = 1024) The new board's ADC output results are worse than the first attempt at the analog portion. We will restore the original analog performance by redesigning the power and grounding strategy. The first corrective action is to separate the digital portion of the power supply circuit from the analog portion. Figure 6a shows the first attempt to combine the analog and digital. Figure 6b reflects the second, more successful approach. 740)this.width=740" border=undefined> Figure 6. The first and second strategies for power and grounding. Note that the second strategy separates noise from sensitive circuits as much as possible. The first analog/digital layout connects the 5V and ground of the digital section through the analog section. In this configuration, the high currents of the LEDs, the switching of the motor, and the noise of the digital controller are overlaid on the sensitive analog power and ground paths (see Figure 6a). The noise paths on the PCB traces are the power and ground currents interacting with the trace impedance and inductance. This causes AC offsets in the power and ground of the analog portion of the circuit. A quick solution to this problem is to re-layout the power and ground traces so that the analog and digital traces are independent and then connected together to a central location. At this central location, connect them together (see Figure 6b). This strategy takes advantage of trace impedance, inductance, and bypass capacitors to create RC and LC low-pass filters on the power and ground traces. This further isolates the sensitive parts of the design from noise. The main radiated noise to consider is the LED traces (which carry high currents), the charge pump in the RS-232 interface (which can sink some current), and the I/O from the microcontroller (which has a fast rise time). The LED and RS-232 driver traces can inductively couple noise to adjacent traces that run close to the board. This coupling manifests as voltage noise. The fast rise time signal from the microcontroller capacitively couples onto the high impedance and sensitive traces. If the traces are too tight, this coupling manifests as current noise. If these factors are considered in the circuit layout, the noise coupling from the noisy digital section to the sensitive analog section can be reduced. The analog circuitry of this new layout remains unchanged, as does the layout of most of the digital circuitry. The difference is that the LED traces are now routed around the analog circuitry instead of through it. The power and ground for the RS-232 interface are also separated from the sensitive analog and digital functions on the board. The power and ground strategy of Figure 6b can be used to guide the layout. 740)this.width=740" border=undefined> Conclusion The first step in suppressing analog noise is to select low-noise analog components. Filters can be used to eliminate noise in signals and power supplies. Anti-frequency filters should also be used appropriately. In the power bus, bypass capacitors and inductors can be used when necessary. At the same time, use ground planes. When adding digital circuits, develop a ground and power strategy for the entire circuit. The impedance and inductance of the traces need to be considered in combination with the current density through each path. The goal of the synthetic layout is to minimize path noise, such as capacitance and inductance coupled between traces, while using the inductance and impedance of the traces together with bypass capacitors to reduce and isolate noise.
|