PCF8591 hardware interface (circuit diagram pin diagram)
Source: InternetPublisher:aerobotics Keywords: Microcontroller power supply and other power circuits communications Updated: 2021/11/19
PCF8591 is a single-power low-power 8-bit CMOS data acquisition device with 4 analog inputs, 1 analog output and a serial I2C bus interface for communicating with the microcontroller. Similar to the 24C02 mentioned earlier, the 3 address pins A0, A1, and A2 are used to program the hardware address, allowing up to 8 devices to be connected to the I2C bus without the need for additional chip select circuitry. The address, control and data of the device are all transmitted through the I2C bus. Let's first take a look at the schematic diagram of PCF8591, as shown in Figure 17-3.
Figure 17-3 PCF8591 schematic diagram
Pins 1, 2, 3, and 4 are 4 analog inputs, pins 5, 6, and 7 are the hardware addresses of the I2C bus, pin 8 is the digital ground GND, and pins 9 and 10 are the SDA and SCL of the I2C bus. Pin 12 is the clock selection pin. If it is connected to high level, it means the external clock input is used, and if it is connected to low level, it uses the internal clock. Our circuit uses the internal clock, so pin 12 is directly connected to GND, and pin 11 is left floating. Pin 13 is the analog ground AGND. In actual development, if there are more complex analog circuits, the AGND part must be specially processed in the layout and wiring, and there are many ways to connect to GND. You can understand it first. There are no complex analog circuits on our board, so we connect AGND and GND together. Pin 14 is the reference source, pin 15 is the analog output of the DAC, and pin 16 is the power supply VCC.
The ADC of PCF8591 is a successive approximation type, and the conversion rate is considered medium speed, but its speed bottleneck is I2C communication. Since I2C communication speed is slow, the final conversion speed of PCF8591 directly depends on the communication rate of I2C. Due to the limitation of I2C speed, PCF8591 can be regarded as a low-speed integration of AD and DA. It is mainly used in some occasions where the conversion speed is not high and the cost is low, such as battery-powered equipment. To measure the battery supply voltage, the voltage is lower than At a certain value, an alarm will prompt battery replacement and other similar situations.
There are two ways to provide the Vref reference voltage. One is to adopt a simple principle and connect it directly to VCC. However, since VCC will be affected by the power consumption of the entire line, it is not accurate 5 V. Most actual measurements are around 4.8 V. Secondly, it changes with the load of the entire system. Changes in circumstances will cause fluctuations, so it can only be used in simple situations that do not require high accuracy. The second method is to use a specialized reference voltage device, such as TL431, which can provide a high-precision 2.5 V voltage reference. This is the method we usually use. As shown in Figure 17-4.
Figure 17-4 PCF8591 reference and external interface schematic diagram
J17 in the picture is a double row of pins. You can choose to short-circuit the jumper cap or use Dupont wire to connect to other external circuits according to your own needs. Both are acceptable. At this place, we directly short-circuit pins 3 and 4 of J17 with a jumper cap, so now the reference source of Vref is 2.5 V. If 5 and 6, 7 and 8, 9 and 10, 11 and 12 are shorted with jumper caps respectively, then what our AIN0 actually measures is the divided voltage value of the potentiometer, and AIN1 and AIN2 measure the value of GND. AIN3 measures the value of +5 V. What needs to be noted here is that although AIN3 measures the value of +5 V, for AD, as long as the input signal exceeds the Vref reference source, it always gets the maximum value, which is 255, which means that it actually cannot Measures the voltage signal exceeding its Vref. It should be noted that the voltage value of all input signals cannot exceed VCC, that is, +5 V, otherwise the ADC chip may be damaged.
- 220V Remote Load Monitor
- Driving circuit of switching power supply field effect tube
- Simple and practical LED lamp driving circuit
- LED Driver ZD1680
- Dual forward converter schematic diagram
- CNC regulated power supply production
- Adjustable voltage power socket
- Production of backup power supply for cordless phone
- MAX762 Solar Sealed Lead-Acid Battery Charger
- Solar Charger
- Analysis on solving various electromagnetic interference problems of electronic equipment
- How to use the inrush current limiter NTC
- Automotive electronic fuel saver circuit diagram and principle
- Microcontroller buzzer control program and drive circuit diagram
- Reset circuit design of the smallest microcontroller system
- Dual audio decoding electronic circuit
- Stepper motor drive circuit composed of LB1836M
- Microcontroller speech synthesis integrated circuit HM2068 manual operation mode application circuit
- Bicycle measuring meter circuit using EPSON microcontroller
- SMC62T3 microcontroller basic line connection