Skip to main content

Posts

Showing posts from December, 2022

XTR117 4-20mA Current Loop Transmitter

 The XTR117 is a precision current output converter designed to transmit analog 4-20mA signals over an industry-standard current loop. Figure 1 shows basic circuit connections with representative simplified input circuitry. The XTR117 is a two-wire current transmitter. Its input current (pin 2) controls the output current. A portion of the output current flows into the V+ power supply, pin 7. The remaining current flows in Q1. External input circuitry connected to the XTR117 can be powered from VREG. Current drawn from these terminals must be returned to IRET, pin 3. The IRET pin is a local ground for input circuitry driving the XTR117. The XTR117 is a current-input device with a gain of 100. A current flowing into pin 2 produces IO = 100 x IIN. The input voltage at the IIN pin is zero (referred to the IRET pin). A voltage input is converted to an input current with an external input resistor, RIN, as shown in Figure 1. Typical full-scale input voltages range from 1V and upward. Full-s

Pulse Counter,ESP32,PCNT

  Pulse Counter The PCNT (Pulse Counter) module is designed to count the number of rising and/or falling edges of an input signal. Each pulse counter unit has a 16-bit signed counter register and two channels that can be configured to either increment or decrement the counter. Each channel has a signal input that accepts signal edges to be detected, as well as a control input that can be used to enable or disable the signal input. The inputs have optional filters that can be used to discard unwanted glitches in the signal.

Digital To Analog Converter,DAC,ESP32

  Digital To Analog Converter Overview ESP32 has two 8-bit DAC (digital to analog converter) channels, connected to GPIO25 (Channel 1) and GPIO26 (Channel 2). The DAC driver allows these channels to be set to arbitrary voltages. The DAC channels can also be driven with DMA-style written sample data, via the I2S driver when using the “built-in DAC mode”. For other analog output options, see the Sigma-delta Modulation module and the LED Control module . Both these modules produce high frequency PWM output, which can be hardware low-pass filtered in order to generate a lower frequency analog output. Setting DAC channel 1 (GPIO25) voltage to approx 0.78 of VDD_A voltage (VDD * 200 / 255). For VDD_A 3.3V, this is 2.59V: https://docs.espressif.com/projects/esp-idf/en/v4.2/esp32/api-reference/peripherals/dac.html

I2C Driver ,ESP32

  I2C Driver Overview I2C is a serial, synchronous, half-duplex communication protocol that allows co-existence of multiple masters and slaves on the same bus. The I2C bus consists of two lines: serial data line (SDA) and serial clock (SCL). Both lines require pull-up resistors. With such advantages as simplicity and low manufacturing cost, I2C is mostly used for communication of low-speed peripheral devices over short distances (within one foot). ESP32 has two I2C controllers (also referred to as ports) which are responsible for handling communications on two I2C buses. Each I2C controller can operate as master or slave. As an example, one controller can act as a master and the other as a slave at the same time.

Analog to Digital Converter ,ESP32

  Analog to Digital Converter Overview The ESP32 integrates two 12-bit SAR ( Successive Approximation Register ) ADCs, supporting a total of 18 measurement channels (analog enabled pins). The ADC driver API supports ADC1 (8 channels, attached to GPIOs 32 - 39), and ADC2 (10 channels, attached to GPIOs 0, 2, 4, 12 - 15 and 25 - 27). However, the usage of ADC2 has some restrictions for the application: ADC2 is used by the Wi-Fi driver. Therefore the application can only use ADC2 when the Wi-Fi driver has not started. Some of the ADC2 pins are used as strapping pins (GPIO 0, 2, 15) thus cannot be used freely. Such is the case in the following official Development Kits: ESP32 DevKitC : GPIO 0 cannot be used due to external auto program circuits. ESP-WROVER-KIT : GPIO 0, 2, 4 and 15 cannot be used due to external connections for different purposes. Configuration and Reading ADC Each ADC unit supports two work modes, ADC-RTC or ADC-DMA mode. ADC-RTC is controlled by the

4-20mA Transmitter