Digital Voltimeter project

Discussion in 'General Electronics Chat' started by adam555, Oct 26, 2013.

  1. adam555

    Thread Starter Active Member

    Aug 17, 2013
    858
    39
    Hi,

    I was planning on making a simple digital voltimeter (DC only and up to about 30v will do), but without using any ICs. Well, maybe except for the display decoders and other components like opamps or comparators, if these were necessary. I looked through the internet, but all I can find are designs using a variety of different ICs before the decoders.

    I would appreciate if anyone could point me in the right direction to any alternatives for the design of this project.

    I know they sell them already made, and I know it's easy with PIC/ATmega or Arduino; I'm just looking to make it from scratch with as few ICs as possible.

    Thanks in advance.
     
  2. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,804
    The heart of a digital voltmeter is the analog-to-digital converter (ADC). Do you want to make that from scratch, as well? That's the part of this project that I think you would learn the most from.
     
  3. adam555

    Thread Starter Active Member

    Aug 17, 2013
    858
    39
    Yes, thanks. I've been all day trying to figure out how to make an A/D converter equivalent, and I think I can get pretty close using comparators or opamps. But I found 2 problems to this approach: first, I can't get around the fact that I would need 10 steps -one for each decimal figure-; and second, I would have to multiply it by the number of digits in the display (I was planning on using 3).

    Am I anywhere close?

    By the way, just found a priority encoder IC at home, which I won't mind using; but it's only one, and it only has 3 outputs (it's 4-2-1 octal).
     
    Last edited: Oct 26, 2013
  4. adam555

    Thread Starter Active Member

    Aug 17, 2013
    858
    39
    Just found this...

    [​IMG]

    If I do it this way I will need 10 x 3 comparators... plus the 3 encoder, and then the 3 decoders.

    See what I mean?

    Is there any way to make it simpler and smaller; apart from just using ICs for everything?
     
  5. adam555

    Thread Starter Active Member

    Aug 17, 2013
    858
    39
    By the way, just made one on screen with Arduino... it just takes 2 resistors!!! :D

    This is the reason I don't like learning electronics with microcontrollers; it feels like cheating!
     
  6. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,804
    The first thing to do would be to read up on the diffrerent approaches used for ADCs and consider how practical it would be to build up something similar. Next, consider whether you really want three digits given the added complexity coupled with the inherent lack of accuracy you are going to likely have.

    You will need to sit back and weigh performance against feasibility of implementation and a big part of that will be deciding if the main point is to have something that works okay but that you understand everything about it and learned a huge amount along the way or to have something that works pretty good but that you don't quite understand everything about it and you learned a lot, but not as much, along the way (but that you might have learned even more about using off-the-shelf integrated solutions).

    Either approach is reasonable.
     
  7. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    There are many ways to design an A/D converter.

    One simple technique you can use to design a digital voltmeter is using a single ramp converter. Use a constant current source to charge a capacitor until the voltage matches the voltage you wish to measure. Increment a counter from zero and stop counting when the capacitor voltage exceeds the input voltage.
     
  8. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,804
    It's much worse than you thought.

    The voltage you are trying to convert is all-in-one. For your approach to work, you have to first split it up. Let's say that you want to measure something that is 3.14V. Using your approach, you would need to get this split into 3.00V, 0.10V, and 0.004V and send each of those off to the respective digit's circuitry.

    To get three digits of resolution using this approach, you need to have not 10*3 comparators, but 10^3 comparators!
     
  9. adam555

    Thread Starter Active Member

    Aug 17, 2013
    858
    39
    That was quite helpful. Now that I know that the main problem is the A/D converter, and that there are many different approaches without using ICs, I have were to start. Thanks.

    I think I was approaching it in the wrong way from the beginning. Rather than an A/D converter I was looking at from the point of view of a voltage divider.

    I don't understand why you say 10^3... shouldn't it be just 10 per digit? I mean, 10 comparators for the tens, 10 for the units, and then 10 for the decimals (a display with one decimal would be enough)?
     
  10. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,804
    But your signals for all three of your digits are in the same signal. What signal are you going to apply to your 1's digit circuit, your 0.1's digits circuit, and your 0.01's digit circuit?

    Use the example I gave. Your signal is 3.14V and you need to produce a 3, a 1, and a 4 in order to display it on your three segments. How are you going to do that starting from a single signal that is 3.14V? There are some ways to do it, but none of them terribly practical (though for a two digit signal that might not be the case).
     
  11. adam555

    Thread Starter Active Member

    Aug 17, 2013
    858
    39
    I think I see what you mean now. The way I saw it I was assuming that once you got the first digit -e.g. the 3- it would be subtracted from the signal, leaving the 43; then getting the 4 and subtracting it again from the signal; and leaving the 3. But that's not what that circuit above does; is it? It would just produce the first 3 and leave the signal intact; from which you can't just simply produce the next 4 and 3.
     
  12. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,804
    But what you CAN do it produce the first three from the 3.14V for the first digit and then the output of the priority encoder can use the 3 to tell a circuit to produce 3.00V that is then subtracted from the input to get the 0.14V that is then applied to the second circuit. The problem is that it has to be 3.00V. Not 2.99V or 3.01V because either of those will introduce an error in the final digit.

    The type of converter you are looking at right now is called a "flash converter". It is a very brute force approach but has the advantage of being very fast -- at the expense of a lot of components.

    You want the opposite. A very simple converter with very few components at the expense of being very slow.

    Perhaps the simplest converter that fits this bill for what you have in mind would be a TDC (time to digital converter), often called a ramp-compare ADC.
     
  13. panic mode

    Senior Member

    Oct 10, 2011
    1,321
    304
    did you look at ICL7xxx series chips? they integrate everything needed for simple voltmeter into one chip:
    http://www.circuitstoday.com/digital-voltmeter-using-icl7107

    but you still have not defined your project. for example what is the output?
    it could be
    led dot/bargraph
    vga crt monitor
    computer
    7segment LED
    7segment LCD
    led dot matrix
    lcd character display
    etc.

    each will require different driver. as you have noticed by now, there is a lot going on inside digital voltmeter and in general, multiple components are needed. component count can be reduced if ic is sufficiently complex and/or programmable (such as mcu). this is why ICL7xxx solutions are pretty much obsolete - you can get cheaper IC with lower pin count and way more flexibility.
     
  14. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,804
    Did you read the first post? His whole point in doing the project is specifically NOT to just grab an IC that does everything for him!
     
  15. adam555

    Thread Starter Active Member

    Aug 17, 2013
    858
    39
    The project is a simple DC voltmeter up to a minimum of 30v with one decimal and with a 3 digit 7-seg LED display. Well, let's make it up to 99.9v, since that's what the 3 digits will be able to display.

    I know you can buy an IC that does it all, and even buy the whole thing for under $1. Like this one:

    [​IMG]

    But I was trying to make it with common components and learn in the process.

    Yes, I've been reading about that approach, and it's definitely not the right option for this project. It seems that the number of comparators needed is the square of the number of output bits; for example: I would need at least 9 bits for the 3 digits, which would require 9^2, or 81 comparators.

    I'll keep on reading the section about A/D D/A converters that I found on this website's tutorial, and see if it also explains the TDC that you mentioned. I'll get back when I finish.
     
    Last edited: Oct 27, 2013
  16. adam555

    Thread Starter Active Member

    Aug 17, 2013
    858
    39
    Sorry, the number of comparators is not 9^2; it's 2 square the number of bits, that's 2^9, or 512;
     
  17. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    Last edited: Oct 27, 2013
    adam555 likes this.
  18. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,804
    You need one comparator for EACH different voltage level. If you want three digits then you have 1000 levels and need 1000 comparators.

    If you need N bits, then you need 2^N comparators, not N^2.

    For 3 digits you need 10 bits since 2^10=1024. 2^9 would be 512 which might be good enough, but you would still need over 500 comparators.
     
  19. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,804
    Ah, you already spotted your mistake. Good!
     
  20. adam555

    Thread Starter Active Member

    Aug 17, 2013
    858
    39
    Yes, the tutorial says that for each bit you add to the A/D converter you will need to double the number of comparators; I thought that the mathematical formula would be bits^2, but when I did a couple of examples I saw the results were way too short; so realized it had to be 2^bits... ((2^bits) - 1) to be precise.

    You're also right about the need for 10 bits, instead of the 9 I calculated; it does need that extra bit to cover the display's full range (000 to 999)

    I think I'm going to set aside this project for a few days until I reach the digital volume of this website's tutorials (I'm still on volume III about semiconductors). I keep on jumping ahead of myself with electronics, thinking that because I know what each component does, I won't need to study the particular techniques involved in each circuit. :)
     
    Last edited: Oct 27, 2013
Loading...