ADC pins on Milk-V Duo S

Hi all.

Due to lack of information I’ve bought Milk-V Duo S PCB and want to clarify some info.

  1. Is there ADC input on GPIO pins? I’ve seen that Milk-V Duo 256M have ADC pins but the same pins are GND on Milk-V Duo S. Please, clarify. I need at least one ADC channel.

  2. Also there’s no adequate explanation about ADC resolution. Does it suport 12-bit ADC or less?

  3. If there’s no direct access to ADC input on GPIO connector, where can I find solder pins to use ADC directly

Thanks

1 Like

https://vyndragon.github.io/data/sg2000.pdf — here’s the translation, it is likely the best we have to date.
If I get it right, we don’t even have the ADC pin 59 wired on this board…

SG2000 has 3 ADC inputs, but I need to know if I will be able to solder or maybe there’s other ways to connect to ADC. It’s interesting if there are some of the developers or milk-v support. I also found Radxa ROCK Pi S and it has 2 ADCs on GPIO and it looks much better for my project

Milk-V Duo S Pinout (no traces of ADC pins):
https://milkv.io/duo-s/duos-pinout.webp

Milk-V Duo Pinout (ADC pins are there):
https://milkv.io/duo/duo-pinout.webp

1 Like

Yes, if you can check the board layout and don’t find a single trace of the ADC pins wired to any solder point on it, the other board may appear more suitable.

I myself will offload ADC measurements to CH32V003 chips, but it is a workaround due to having many CH32V003s, lol. It should not be considered a proper solution. :slight_smile:

1 Like

I’m still waiting for those boards with hope to hear from Milk-V Support and if there will be no support from Milk-V I will ask electronics engineer to re-check if there’s a chance to use ADCs or switch to adequate boards of other manufacturers, because it looks like dumb idea to not wiring ADCs on GPIO connector

1 Like

Well, Duo Module 01 appears to have it — both on the compute module and on the board.

If you look at the Duo module link, you will find that the Duo module has ADCs. Since it has the same chip as the DuoS, and also uses the same firmware, duoS should have the same ADC pins.Link of duo module: Duo Module 01 | Milk-V

Comparing the pins, the DuoS ADC pins should be the 449, 450 and 451 (B1, B2 and B3).
It makes sense, since they are inputs for audio.

If you test, please let me know.

2 Likes

Jorge, thanks for clarification. I clarified my task and I need much more precise ADC, so I decided to use external SPI ADC. But anyway I will need those ADCs for other projects. I will let you to know

Yeah, I’ve found that this module has GPIO ADC pins but it has no emmc and 256MB RAM, so it looks like very week for my task. I better use Radxa or any other board like Raspberry PI instead of this board. I don’t know even now how hard will be able to start external ADC for Raspberry pi on this board. I will let you know :slight_smile:

1 Like

The Duo S schematic shows that XGPIOB[1],[2],[3] which are broken out on J4 can also be used as ADC inputs. Here’s a screenshot from the schematic showing which pins they’re on.

You can see those on the documentation site here: Duo S | Milk-V - just scroll down the page to the J4 diagram which breaks out all the pins but interestingly doesn’t mention the ADC capabilities.

I’ve played around with the ADC driver code in the duo-examples repository and it appears to work just fine. It has 12-bit resolution and seems to work reasonably well, although for some reason they’ve built the Linux kernel driver as a character device that reports the values as 4-digit decimal characters instead of a 12-bit binary. Weird.

1 Like

i’ve teste myself, and it Works fine. the result goes from 0 to 4095.

1 Like

Just saying, the voltage is from 0 to 1.8V, its not 3,3…

2 Likes