element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Community Hub
Community Hub
Member's Forum Discrete Analogue to Digital converter
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Leaderboard
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Community Hub to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 28 replies
  • Subscribers 594 subscribers
  • Views 998 views
  • Users 0 members are here
Related

Discrete Analogue to Digital converter

Knighthawk_140
Knighthawk_140 29 days ago

Hello.

I have made a 14bit single slope adc

  • Sign in to reply
  • Cancel

Top Replies

  • Knighthawk_140
    Knighthawk_140 25 days ago in reply to Knighthawk_140 +3
    Good Morning on this lovely Sunday, here is my ADC ramp in glorious 4K https://youtu.be/9aIZWxarzKU
  • Knighthawk_140
    Knighthawk_140 29 days ago in reply to genebren +2
    Thanks, Here it is working. , I'm measuring my power supply with my DVM as a reference https://youtu.be/xBYknsIEPy4
  • Knighthawk_140
    Knighthawk_140 11 days ago +2
    I am approaching 16bit Territory, with approximately 15.8bit ADC count, with stability to now see 1mV increments and decrements, amazing what you can do when your bored at home. Here is a little video…
Parents
  • dougw
    dougw 29 days ago

    That sounds cool. Can you post a picture of it or a schematic or do you have a question about it?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Knighthawk_140
    Knighthawk_140 29 days ago in reply to dougw

    I have a video up on youtube of this working, it is based on a ramp counter, constant current linear ramp with comparator. I used an STC89C52 running at 20Mhz in 6T mode, this is based on the old 8051 microcontroller. With 20x4 LCD

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett 29 days ago in reply to Knighthawk_140

    We need a schematic - it's like home work - you only get marks if we can see your workings out  Relaxed

    For an A++ grade - try making it logarithmic !

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Knighthawk_140
    Knighthawk_140 29 days ago in reply to michaelkellett

    Why would I want to convert a linear voltage scale to logarithmic 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Knighthawk_140
    Knighthawk_140 29 days ago in reply to michaelkellett

    Here you go

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett 29 days ago in reply to Knighthawk_140

    A long time ago when an 8 bit monolithic ADC was expensive and the best you could buy was 12 bit, I had to design an auto ranging audio frequency level meter for BT. We wanted to be able to cover 14dB in each range with a worst case accuracy of 0.1dB which needs at least 10 bit resolution if you use a linear ADC. But if you use  a logarithmic ADC you only need 140 divisions rather than 1024. A single slope log converter can be made by replacing the current source with a resistor. Two comparators rather than 1 enables you to auto-cal it on every conversion. But you needed a decent capacitor - think we used a 10nF polystyrene one.

    But now you can buy an I2C interfaced 16 bit converter with two differential input ports, one with very low offset for under £1 (an INA230) so the art of single, dual and even multi-slope converters has had its day Slight frown

    MK

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Knighthawk_140
    Knighthawk_140 29 days ago in reply to michaelkellett

    Nice, mine is a linear dc voltage display with raw A to D count of 19716 counts at 9V input to give me mV resolution, gives me just over 14bit resolution, no software filtering and no software linearity correction, pure raw Analogue linearity.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett 29 days ago in reply to Knighthawk_140

    Is it just for fun or do you need it for something ?

    I've seen people do similar things when they need an unexpected ADC and only have IO pins available. But they don't get very good results with standard pins and the processor supply for reference.

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Knighthawk_140
    Knighthawk_140 29 days ago in reply to michaelkellett

    I was bored, 5 iterations 10 days

    More like 2 Saturdays 2 Sunday's and few evenings after work, spread over 10 days

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Robert Peter Oakes
    Robert Peter Oakes 29 days ago in reply to michaelkellett

    but it is awesome to make and understand how these work, hp/agilent/keysight etc started out with dual slope adc and now have things like multislope or way more complex algorithms to significantly improve accuracy, how repeatable is your design both in accuracy and stability?

    you should be able to find old schematics and descriptions of the older HP bench meters if you want to understand more about auto cal etc.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • dang74
    dang74 29 days ago in reply to Knighthawk_140

    Thanks for sharing the schematic.  I am assuming that while Ramp control is 0V the capacitor charges and when the comparator trips it is detected in software... so my question is... is the ADC value obtained by a counter that runs during the capacitor charge cycle?  Or am I completely misunderstanding your design?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Knighthawk_140
    Knighthawk_140 29 days ago in reply to dang74

    thanks, this is loosely based on a 1954 ramp counter principle.

    begin, relese clamp start linear ramp charge, start For loop count, in the loop poll to detect comparator if not detected count increments, when comparator change detected stop count, display count value - reset counter and clamp ramp. repeat process.

    the more linear the ramp is, the more accurate the ADC becomes.

    i'm chassing the 1mV dragon.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Knighthawk_140
    Knighthawk_140 29 days ago in reply to dang74

    thanks, this is loosely based on a 1954 ramp counter principle.

    begin, relese clamp start linear ramp charge, start For loop count, in the loop poll to detect comparator if not detected count increments, when comparator change detected stop count, display count value - reset counter and clamp ramp. repeat process.

    the more linear the ramp is, the more accurate the ADC becomes.

    i'm chassing the 1mV dragon.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Children
  • dang74
    dang74 28 days ago in reply to Knighthawk_140

    Thanks.  I guess I was on the right track then.  I think commercial ADCs generally have an error that exceeds 1mV... so there is no shame in chasing 3mV or 4mV dragon.

    And I guess you are in good company.  Your Ramp Generator circuit resembles this one:

    https://incbtech.com/circuit-bench/285-ramp-generator-cb392e.html

    Of course yours is preceded by a micro and doesn't rely on 60Hz like this one does.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Knighthawk_140
    Knighthawk_140 28 days ago in reply to dang74

    Constant current linear charging of a capacitor over timeimage 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • dang74
    dang74 28 days ago in reply to Knighthawk_140

    Thanks, I will simulate your circuit to see the voltage ramp to satisfy my own curiosity.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Knighthawk_140
    Knighthawk_140 28 days ago in reply to dang74

    Go for it.

    Think of it like a CR timer, C x R = T (time to charge) but instaid of a curved ramp you get a Linear ramp because I = is a constant current.

    where R = V/I

    then you have C x R = Time.

    Sorry i can't give values but thats my secret sauce, being one of the very few to pull off a home built 14bit adc.

    if you have a signal generator, then use that to enable / disable the ramp at the input to R2 in my sketch. or just pull low to start ramp and pull high 5V to stop ramp. 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Jan Cumps
    Jan Cumps 28 days ago in reply to Knighthawk_140
    Knighthawk_140 said:
    Sorry i can't give values but thats my secret sauce, being one of the very few to pull off a home built 14bit adc.

    That's the part I don't get. Why post an experiment on a public forum, and then not share part of it "because secret". it's an ADC. What's the value of keeping this secret?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Knighthawk_140
    Knighthawk_140 28 days ago in reply to Jan Cumps

    Hello,

    This took me 10 days to figure this out, so I give a 10 day challenge to evey one.

    I have just one more thing to see if I can make this rock solid

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett 27 days ago in reply to Knighthawk_140

    A challenge would need a more detailed spec:

    • Integral non linearity
    • Differential non linearity
    • Noise
    • Temperature drift
    • Sampling rate
    • Gain error/drift
    • Offset
    • Calibration interval

    It's quite acceptable for any of these parameters to be unspecified but if you don't pin down some of them it's not much of a challenge.

    For example - in your design schematic the current source is unlikely to be very linear (see TI document SYLT768.pdf).

    Too busy right now to have a go but if I do I'll tell you when my 10 days start Slight smile

    MK

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Knighthawk_140
    Knighthawk_140 27 days ago in reply to michaelkellett

    This was just a diy build in my flat at weekends and evenings, I don't have an environmental chamber in my front room, i was seeing if it was possible to get a 14bit adc stable and fairly linear. If you analyse my video below you will see what I have achieved 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Knighthawk_140
    Knighthawk_140 25 days ago in reply to Knighthawk_140

    Good Morning on this lovely Sunday, here is my ADC ramp in glorious 4K

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube