257 Delta Sigma Comparator Based ADC

257 : Delta Sigma Comparator Based ADC

Design render
  • Author: Pawel Kozlowski
  • Description: Evaluating the feasibility of implementing a delta-sigma analog-to-digital conversion using two switched-capacitor lines. One line serves as a reference, while the other is intended for current measurement, such as from a photodiode. The project also explores how process, voltage, and temperature (PVT) variations affect flip-flop behavior, whether these effects can be mitigated through the reference channel, and what additional insights or phenomena may emerge from this investigation.
  • GitHub repository
  • Open in 3D viewer
  • Clock: 10000000 Hz

How it works

This project explores the implementation of a delta-sigma ADC entirely in a digital environment. A flip-flop is used as the quantizer. Due to the strong DVT (device voltage threshold) dependency of flip-flops, a reference line is introduced. Assuming identical behavior across flip-flops, this helps mitigate vDVT variance.

Of course, in practice, flip-flops and capacitors are never perfectly matched. The goal is to evaluate how these mismatches affect ADC linearity, beyond the non-linearity introduced by the RC constant, and to observe the threshold behavior of the flip-flops. This is a quick, exploratory project, so some assumptions may be oversimplified or incorrect. However, in digital simulations, the concept appears to function as intended.

Implementing this on-chip (rather than on an FPGA) offers better control over parasitics at the silicon level, which could improve overall conversion accuracy.

The data output is 13 bits wide, but only 12 bits are effectively used. This is to account for potential overflow, especially in cases where simulation might not catch it. Additionally, since the system operates in bipolar mode, one more bit is reserved to represent the sign. As a result, the effective resolution of the ADC is 11 bits.

How to test

Start by defining the current range to be measured. For example, if the range is 0–100 µA, the baseline of the delta-sigma oscillation should be around 0.6 V (half of a 1.2 V supply). This gives:

R1 = Vc2 / I = 0.6 / (100e-6) = 6000 Ω

The current sink could a reverse-biased photodiode (as shown on the diagram below), but an SMU (source measure unit) can also be used to characterise the system. The circuit is designed to operate in bipolar mode, meaning it can measure both positive and negative currents.

To begin operating the system, first connect the discrete components — resistors, capacitors, and a current source or sink. Once all components are connected, perform a system reset. After resetting, verify that both capacitor lines produce similar values (filtered_a and filtered_b) even without applying an external current source or sink. This confirms the system is functioning correctly. If the outputs are as expected, you can proceed to apply a current with your chosen polarity to begin active operation.

To start data acquisition, send a pulse in the clk clock domain to uio__in[7]. This will trigger the transmission of three filtered data signals in the next clock cycle: filtered_a, filtered_b, and filtered_ab_subtr. For synchronisation, a valid_out signal is sent during the transmission of the first bit of data. This simple approach was chosen to simplify the implementation.

If the internal logic for data transmission fails, components like the CIC filter can be implemented on an FPGA. This can be done by routing the inverter output not only to the capacitor but also to the FPGA. Be mindful of additional parasitics introduced in this setup.

External hardware

  • Two identical capacitors: Test values ranging from picofarads to nanofarads. A similar analog-based design supported values from 30 pF (resulting in higher peaks between clock cycles) up to 1300 pF or more.
  • Two identical resistors, e.g., 6000 Ω.
  • A current source/sink

IO

#InputOutputBidirectional
0Capacitor a input portpdm_a - pulse density modulated signal connected to capacitor a
1Capacitor b input portpdm_b - pulse density modulated signal connected to capacitor a
2filtered_a - 13 bit value of a line after summing (13 to avoid overflow)
3filtered_b - 13 bit value of b line after summing
4filtered_ab_subtr represents the difference between the 'a' and 'b' lines after summation (i.e., a - b). The direction of current flow (or polarity), which determines how each capacitor is connected to the respective UI input, must align with this formula to prevent overflow or incorrect charge accumulation.
5filtered_a valid signal saying that from this bit on the user can expect the integrated value from the first capacitor line
6filtered_b valid signal saying that from this bit on the user can expect the integrated value from the second capacitor line
7Data triggger for adc data streaming. Asserting it causes filtered_a, filtered_b and filtered_ab_subtr to be serialised and sent.filtered_ab_subtr valid signal saying that from this bit on one can expect the difference between the vaules (effectively the ADC code)

Chip location

Controller Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux tt_um_chip_rom (Chip ROM) tt_um_factory_test (Tiny Tapeout Factory Test) tt_um_oscillating_bones (Oscillating Bones) tt_um_tt_tinyQV (TinyQV - Crowdsourced Risc-V SoC) tt_um_rejunity_atari2600 (Atari 2600) tt_um_rejunity_lgn_mnist (LGN hand-written digit classifier (MNIST, 16x16 pixels)) tt_um_izh_neuron_lite (LIF Neuron) tt_um_blptrk_weaving01 (weaving in silicon #1) tt_um_rte_eink_driver (E-ink display driver) tt_um_bleeptrack_prism (Prism) tt_um_zerotoasic_logo_screensaver (VGA Screensaver with Zero to ASIC Logo) tt_um_kianV_rv32ima_uLinux_SoC (KianV uLinux SoC) tt_um_nefelimet_updown_cntr (3-bit up-down counter) tt_um_wokwi_434917577229968385 (LIF neuron) tt_um_wokwi_434917320361309185 (TinyTapeout 2025) tt_um_wokwi_434917171311441921 (MC first Wokwi) tt_um_wokwi_434917344830882817 ('') tt_um_wokwi_434918300941464577 (WowkiProject) tt_um_wokwi_434917453767462913 (Mini Calculator v1) tt_um_wokwi_434917219039482881 (and) tt_um_wokwi_434917025263649793 (DigOTA) tt_um_wokwi_434917044822739969 (TinyTapeoutWorkshop) tt_um_wokwi_434921821909078017 (and gate) tt_um_wokwi_434917167895180289 (Encoder) tt_um_wokwi_434917143298726913 (Chip design from Wokwi) tt_um_wokwi_434921804663145473 (Tapeout try) tt_um_wokwi_434917374201501697 (dummy) tt_um_wokwi_434917318393129985 (Tiny Tapeout Template Copy) tt_um_wokwi_434917632188986369 (Timo 1) tt_um_wokwi_434917842159020033 (And Gate) tt_um_wokwi_434917427319226369 (Tiny Tapeout Chip) tt_um_wokwi_434917260383792129 (Tiny Tapeout Workshop Project by Nick Figner) tt_um_wokwi_434917040492120065 (4 bit incrementer) tt_um_wokwi_434917990496885761 (Projekt) tt_um_wokwi_434917381796339713 (Nils Tinytapeout Proj) tt_um_wokwi_434917317189363713 (tinytapeoutchip) tt_um_wokwi_434917679388544001 (tiny tapeout chip) tt_um_wokwi_434917506576906241 (ToDo) tt_um_wokwi_434917139713644545 (in progress) tt_um_wokwi_434917382645687297 (numbers) tt_um_wokwi_434917816595781633 (number display) tt_um_wokwi_434918311072808961 (GG) tt_um_wokwi_434917362908337153 (noclue) tt_um_wokwi_434917682511205377 (Random) tt_um_wokwi_434925031692840961 (demo-tiny) tt_um_wokwi_434917760986646529 (Barans erster Template Design) tt_um_wokwi_434917419779963905 (Tapeout Test1) tt_um_wokwi_434917684709021697 (Tiny Tapeout Template Copy_Orion) tt_um_wokwi_434918956220790785 (Simple classification perceptron ) tt_um_wokwi_434918068909406209 (Tiny Tapeout) tt_um_parx (example-verilog) tt_um_wokwi_434917624377094145 (brostarscard) tt_um_urish_simon (Simon Says memory game) tt_um_emmk_riscv (ENSEIRB-MATMECA RISC-V ASIC) tt_um_abhinav8prasad_dds (8-bit DDS sine wave generator) tt_um_wokwi_436554456427191297 (OCDCpro TT key lock test design IHP) tt_um_wokwi_434391222509479937 (4-Bit Adder) tt_um_ihp_logo_screensaver (VGA Screensaver with the IHP Logo) tt_um_pqn (PQN Model with Verilog) tt_um_Xelef2000 (RNG) tt_um_gamepad_pmod_demo (Gamepad Pmod Demo) tt_um_anujic (Morse Code Trainer) tt_um_rodald_cpr (CRP - Custom Risc Processor) tt_um_alif_dual_unileak (LIF Neuron) tt_um_riscv_mini_ihp (RISC-V Mini IHP) tt_um_wokwi_434917200607612929 (test_design) tt_um_alif_single_dualleak (Simple LIF Neuron) tt_um_blptrk_weaving02 (weaving in silicon #2) tt_um_blptrk_weaving03 (weaving in silicon #3) tt_um_blptrk_weaving04 (weaving in silicon #3) tt_um_dumbrv_yliu_hashed (DUMBRV) tt_um_iz_neuron (IZH Neuron) tt_um_test_chip_pius (Verilog OR-Gate) tt_um_pwm_block (PWM_SPI) tt_um_2048_vga_game (2048 sliding tile puzzle game (VGA)) tt_um_dpi_adexp (AdExp DPI Neuron ) tt_um_urish_sic1 (SIC-1 8-bit SUBLEQ Single Instruction Computer) tt_um_cedrichirschi_sar (SAR ADC Controller) tt_um_htfab_yadge (Yet Another Diffraction Grating Experiment) tt_um_ds_comp_adc (Delta Sigma Comparator Based ADC) tt_um_tinytapeout_logo_screensaver (VGA Screensaver with Tiny Tapeout Logo) Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available