-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Appreciate such example. #1
Comments
Hey, If you can't access that this is the parent page: Could you clarify on the low/high side offsets? For my FPGA board, a 2.5 LVDS pair was able to digitize between ~0 to ~3.3V. It was able to handle that since the bank voltage for those pins on my FPGA board is set to 3.3V, regardless of the 2.5V IO standard. It would probably be a good idea to restrain that a bit and have some analog conditioning force the input to be within 1.5V +- 1V maybe. I did not record any DC response curves but I do recall the digital resolution would be what you expect for an unsigned ADC. |
Able to digitize between ~0 to ~3.3V is a tricky description. Which what I experience is a digitized offset range from 1xxx to 64xxx. |
Just so we're on the same page, this is what you should expect for DC if you have a 3.3V bank and 16-bit ADC (max = 65536)
I just updated the simulation under tb/adc/, pull it and modify the Makefile under that folder to match your test setup. For your case set OUTPUT_DIGITAL=1 and USE_DC=1 then run 'make clean sim plot'. In my quick testing now I've determined when you change the OVERSAMPLE_RATE and CIC_STAGES you should accordingly change the ADC_BITLEN parameter to match. The output is always going to be proportional to 2**(CIC_STAGES*$clog2(OVERSAMPLE_RATE). So for your next testing, set ADC_BITLEN=6 |
In my quick testing now I've determined when you change the OVERSAMPLE_RATE and CIC_STAGES you should accordingly change the ADC_BITLEN parameter to match. The output is always going to be proportional to 2**(CIC_STAGES*$clog2(OVERSAMPLE_RATE). So for your next testing, set ADC_BITLEN=6 Of cause when 16 bit resolution the bit width of the BITLEN is set to 16. |
So from simulation it shows a sine wave with offset range. No matter I use through-hole components nor smd to reduce parasitic it is still similar result with noisy modulated result + offset. |
Can you try using OVERSAMPLE_RATIO=256 in your next build and compare the result? Also could try making the capacitor large and see if there is an improvement. |
Dave, my default setup is using oversample = 256 otherwise 2 stage CIC cannot form a 16bit resolution as your code clearly suggested. So Dave, are you really achieving 14bit good ADC from 0V to 3V3 without losing or offset? |
Gotcha, thought you were using OVERSAMPLE_RATIO=8. What do you mean 'without losing or offset'? You can see here that that 1.0V amplitude is attenuated slightly: |
Gotcha, thought you were using OVERSAMPLE_RATIO=8. I am test such soft ADC only via a linear DC supply so from 0V It should return 0# but not really This is what the issue here. |
I see now. Will have to setup my station at some point and try it. For now I'd recommend testing different RC networks and seeing if there is an improvment |
according to Lattice manual, it is mention that time constant * freq >= 500 is good. |
Set the hardware back up and performed some DC measurements:
Since the 'offset' fixes itself as the voltage increases, I want to attribute this to ground noise. I've seen a really bad ground loop on my instrumentation device in the past, plus it's powered from a USB hub. |
Dave, now you are repeating what I am experiencing. My setup would require even high than the IO back supply voltage to reach max value. |
First really appreciate all the discussion here. I am very sure soft DAC is wonderful yet I haven't tried yours as I create mine as well before. |
I used the hardware setup as-is from here (no filter): It may also be a good idea to scope your ground pin, if possible. Depending on your hardware setup, making the circuit smaller + using shorter wires to the FPGA could help |
Dave would it possible to recapture the 0V noise and value from your 14bit? |
What good would recapturing be without changes? It is shown that if ILA is used and not sure if it is the sample point of ILA is not enough nor the logic usage do affect the soft ADC performance as well. I will try to preform automated power supply and point plot capture as we can see how this actually perform |
A few questions about the hardware setup picture, assuming you don't have a breadboard offscreen:
Regarding the plots,
|
A few questions about the hardware setup picture, assuming you don't have a breadboard offscreen: Is the resistor leg twisted around the male jumper pin? If that moves around at all you'll get noisy results, it might need to be soldered or plugged into a breadboard at least. ->Dave bread board is a highly capacitive test gear I will never suggest using bread board when you have a solder and all PCB test board you can work with (No offense but bread board is really a gear only for very harsh circuit build). Have you measured how clean the output supply is? Where is the capacitor of the integrator circuit? It looks like there is some systemic issue every 2000 (2048?) samples, could this be an issue with your sampling / uploader circuit? |
Dave just little update on my script and the result. It is true that there are some noise are injected to the ADC, and the response time of the ADC is inverse log behavior as RC proposed. |
Nice, it looks a bit better now. There still appears to be ~40 mV of noise riding your 0V PSU on signal, though. Could you eliminate the PSU from the mix and attempt to sample a digital LVCMOS pin at 0 and 3.3V? Maybe even put a voltage divider in the mix to sample at 1.67V so you can measure away from the either rail. |
But Dave, you can see no matter how good the test equipment it gets it is still considered as offset 200 - 400 decimal at low side aka 200 / 65536 * 3.3. It is still far usable compared to general 16 bit ADC. |
Hey Dave, Would you think this is a even better way to control? |
Hey, Other comment, have you ever measured the output of your PSU with an oscope? |
I had tested with 16 bit 2+8 setting of 2 stage CIC and 8 oversample under 6.25M.
Any detail formula of the RC selection and the low and high side offset?
From my setting I had investigate over Altera and Xilinx FPGA LVDS 2.5 standard and look like using CIC and reduce the low side offset to 1xxx over 16 bit resolution and high side to 64xxx range.
While I also found that from paper :
https://devzone.missinglinkelectronics.com/index.php/source-menu-ioconnect-adc
I would like to ask any detail DC response curves?
It looks like rail reach is far idle but paper do show a good 16 bit linearity.
The text was updated successfully, but these errors were encountered: