Digital To Analogue Converter Characteristics

Archibald
Posts: 110
Joined: Mon Mar 05, 2018 12:44 am

Digital To Analogue Converter Characteristics

Postby Archibald » Thu Mar 22, 2018 1:54 am

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 . . . .
220ohms.png
220ohms.png (42.98 KiB) Viewed 15178 times
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 . . . . .
22kohms.png
22kohms.png (31.11 KiB) Viewed 15178 times

mlibby
Posts: 5
Joined: Wed Apr 04, 2018 6:39 pm

Re: Digital To Analogue Converter Characteristics

Postby mlibby » Wed Apr 18, 2018 2:31 pm

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

User avatar
ESP_krzychb
Posts: 400
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: Digital To Analogue Converter Characteristics

Postby ESP_krzychb » Wed Apr 18, 2018 3:18 pm

Hello mlibby,
mlibby wrote:Hello, does any one know what is the DAC maximum output value?
http://esp-idf.readthedocs.io/en/latest ... _t7uint8_t
mlibby wrote:And for ADC what is the maximum input value?
http://esp-idf.readthedocs.io/en/latest ... dc_atten_t

Archibald
Posts: 110
Joined: Mon Mar 05, 2018 12:44 am

Re: Digital To Analogue Converter Characteristics

Postby Archibald » Wed Apr 18, 2018 4:16 pm

mlibby wrote:Hello, does any one know what is the DAC maximum output value?
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
Posts: 5
Joined: Wed Apr 04, 2018 6:39 pm

Re: Digital To Analogue Converter Characteristics

Postby mlibby » Thu Apr 19, 2018 2:06 pm

Thank you so much.
Best regards

Marc Boon
Posts: 2
Joined: Sat Aug 07, 2021 7:07 pm

Re: Digital To Analogue Converter Characteristics

Postby Marc Boon » Sat Aug 07, 2021 7:21 pm

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.

jlhavens
Posts: 2
Joined: Fri Apr 14, 2023 2:33 pm

Re: Digital To Analogue Converter Characteristics

Postby jlhavens » Fri Apr 14, 2023 2:48 pm

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.

biomurph
Posts: 2
Joined: Sat Mar 02, 2024 5:05 pm

Re: Digital To Analogue Converter Characteristics

Postby biomurph » Thu Mar 07, 2024 3:45 pm

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.

Who is online

Users browsing this forum: Apostal2008 and 24 guests