There seems to be very little information on the drive capability of a digital to analogue converter (DAC). I have found that they are good at sourcing current into a resistance connected to ground but are very poor at sinking current from a resistor connected to Vcc.
I measured a DAC with open circuit (except digital multimeter) and with a 220Ω resistor to ground. There was good linearity. The minimum output voltage was 0.05V and the maximum 3.16V (Vcc measured as being 3.28V), so not quite full swing from ground to Vcc.
The small drop in output voltage with the resistor connected indicated an output resistance of about 20Ω. However at higher output voltages there appeared to be a current limit of 12.7mA. This is shown in the graph below. Measurements were made at intervals of 16 (decimal), the red line being with the resistive load . . . .
I used a much higher value of resistor to assess the ability of the DAC output to sink current: 22kΩ. Even with this relatively very high resistance, performance was very poor. The red line is with the resistor connected . . . . .
Digital To Analogue Converter Characteristics
Re: Digital To Analogue Converter Characteristics
Hello, does any one know what is the DAC maximum output value? And for ADC what is the maximum input value?
I do not see those in the datasheets.
This is for ESP-WROOM-32 and ESP-WROOM-32U
Thank you
Best regards
I do not see those in the datasheets.
This is for ESP-WROOM-32 and ESP-WROOM-32U
Thank you
Best regards
- ESP_krzychb
- Posts: 400
- Joined: Sat Oct 01, 2016 9:05 am
- Contact:
Re: Digital To Analogue Converter Characteristics
Hello mlibby,
http://esp-idf.readthedocs.io/en/latest ... _t7uint8_tmlibby wrote:Hello, does any one know what is the DAC maximum output value?
http://esp-idf.readthedocs.io/en/latest ... dc_atten_tmlibby wrote:And for ADC what is the maximum input value?
Re: Digital To Analogue Converter Characteristics
The maximum DAC output value on the graph in my original post was 3.16V with VDD=3.28V. So the maximum output value is not VDD as stated in the Espressif guide. The minimum value was 0.05V.mlibby wrote:Hello, does any one know what is the DAC maximum output value?
Re: Digital To Analogue Converter Characteristics
Thank you so much.
Best regards
Best regards
Re: Digital To Analogue Converter Characteristics
I came across the same problem with a ESP32-S2-WROVER, mounted on the ESP32-S2-Saola-1 development module. I guess the DAC is the same as in the original ESP32. Using a 10K load to GND gives a linear response, no curvature at the high end with the 220 ohm load as pictured above. So, if you need to sink current, or source more than a few mA, an output buffer would be necessary.
Re: Digital To Analogue Converter Characteristics
This is a problem I ran into with the esp32s2 mini (wemos / lolin -- at least the Chinese version). According to the schematic, the dac channel 2 (GPIO18) is tied to VCC through a 10K resister as is recommended on pg 13 of the ESP32s2 hardware design guide (https://www.euromobile.ru/upload/iblock ... nes_en.pdf). I couldn't get an output below 1.7V. Channel 1 (GPIO17) worked fine.
Re: Digital To Analogue Converter Characteristics
Glad I found this thread. I have been down the rabbit hole on this problem with DAC2 distortion.
Here is a link to the issue thread I made on the espressif github page. I thought the problem was somehow Arduino related, so I posted there.
https://github.com/espressif/arduino-esp32/issues/9324
Someone said that they were able to operate both of the DACs with no issues using an Espressif made board, the ESP32-S2 Soala, so I got one. Turns out it has the same problem. The Soala has GPIO-18, DAC2, wired to drive the on-board neopixel. Also, it has a 10K pullup. Here's the espressif schematic of the Soala board.
https://dl.espressif.com/dl/schematics/ ... matics.pdf
Only after I pulled off the 10K and the jumper connected to the neopixel, I was able to get clear full range of both ADCs.
The problem started when I was using the Adafruit Feather ESP32-S2, which has an 'ESP32-S2 Mini 1' radio module.
There is no circuitry added by Adafruit to the DAC1 or DAC2 pins, but I can measure a 10K pullup to 3V3 on DAC2. There is no pullup on DAC1 (measured in the tens of megaohms between DAC1 and 3V3. It looks like the Mini 1 has a 10K pullup under the can.
Why would Espressif break the DAC2? Why?
I already plan to buffer the output of the DACs, and assumed I would have to anyway, but the out-of-the-box distortion is super messed up.
Here is a link to the issue thread I made on the espressif github page. I thought the problem was somehow Arduino related, so I posted there.
https://github.com/espressif/arduino-esp32/issues/9324
Someone said that they were able to operate both of the DACs with no issues using an Espressif made board, the ESP32-S2 Soala, so I got one. Turns out it has the same problem. The Soala has GPIO-18, DAC2, wired to drive the on-board neopixel. Also, it has a 10K pullup. Here's the espressif schematic of the Soala board.
https://dl.espressif.com/dl/schematics/ ... matics.pdf
Only after I pulled off the 10K and the jumper connected to the neopixel, I was able to get clear full range of both ADCs.
The problem started when I was using the Adafruit Feather ESP32-S2, which has an 'ESP32-S2 Mini 1' radio module.
There is no circuitry added by Adafruit to the DAC1 or DAC2 pins, but I can measure a 10K pullup to 3V3 on DAC2. There is no pullup on DAC1 (measured in the tens of megaohms between DAC1 and 3V3. It looks like the Mini 1 has a 10K pullup under the can.
Why would Espressif break the DAC2? Why?
I already plan to buffer the output of the DACs, and assumed I would have to anyway, but the out-of-the-box distortion is super messed up.
Who is online
Users browsing this forum: No registered users and 90 guests