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 a microcontroller. Similar to the 24C02 mentioned earlier, the three 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 circuits. The device address, control, and data are all transmitted through the I2C bus. Let's first look at the schematic diagram of the 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 a high level, it means that the external clock input is used, and if it is connected to a low level, the internal clock is used. 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 is a more complex analog circuit, the AGND part must be specially handled in the layout and wiring, and there are many ways to connect it to GND. You can understand it here first. There is no complex analog circuit 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 its conversion rate is medium-speed, but its speed bottleneck is in I2C communication. Since I2C communication speed is slow, the final conversion speed of PCF8591 directly depends on the I2C communication rate. Due to the limitation of I2C speed, PCF8591 is a low-speed AD and DA integration, mainly used in some occasions where the conversion speed requirement is not high and the cost is expected to be low, such as battery-powered equipment, measuring the battery supply voltage, and when the voltage is lower than a certain value, an alarm prompts to replace the battery and similar occasions.
There are two ways to provide Vref reference voltage. One is to use the principle of simplicity and connect it directly to VCC. However, since VCC will be affected by the power consumption of the entire circuit, it is not an accurate 5 V, and the actual measurement is mostly around 4.8 V. Secondly, it will fluctuate with the change of the load of the entire system, so it can only be used in simple occasions where the accuracy requirement is not high. The second method is to use a special reference voltage device, such as TL431, which can provide a very accurate 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
In the figure, J17 is a double-row pin. You can choose to short-circuit with a jumper cap or use a Dupont line to connect other external circuits according to your needs. Both are acceptable. At this point, 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 short-circuited with jumper caps, then our AIN0 actually measures the voltage divider value of the potentiometer, AIN1 and AIN2 measure the value of GND, and AIN3 measures the value of +5 V. It should be noted here 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, that is, 255, which means that it cannot actually measure voltage signals that exceed 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.
Previous article:Temperature sensor DS18B20
Next article:PCF8591 Applications
- Popular Resources
- Popular amplifiers
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- Teach you to learn 51 single chip microcomputer-C language version (Second Edition) (Song Xuefeng)
- 51 Single Chip Microcomputer Basic Experiment and Comprehensive Practice (Edited by Li Zuojin, Nie Ling, and Zhai Yuan)
- Introduction to Artificial Intelligence and Robotics (Murphy)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [Fudan Micro FM33LG0 Series Development Board Review] Driving RGB TFT Display
- Newbies need help with a few questions about RA2A1
- The virtual machine started to freeze again
- How to solve the problem of solder balls caused by mismatched pads during production
- How speakers work
- [Home smart lighting control and indoor environment monitoring system]--4. [RSL10] I2C control PCA9685 PWM output
- Design of PCI Bus Interface Based on FPGA
- Vim developed entirely in Python
- [ESK32-360 Review] 5. Run a real serial port example
- Google Translate no longer provides translation services to China (temporary solution)