# Build digital read out display

I had an idea to build an A/D circuit where an analog voltage is converted to digital, then displayed on a seven segment display - similar to a volt
meter only I'm manually inserting voltage.
My basic idea is simple but I'm having problems with it. Currently I have 15 volts going through a pot, into a unity gain op-amp, and into an A/D.
My resolution (at the moment) is not important, however, I'd like to display one digit after the decimal point.
I believe I need to add 6 to any number over 9 to allow for a carry, but I'm unsure how to achieve it. I guess I'd need a logic circuit to determine if the number is beyond 9, then an adder, and then a binary to seven segment chip?
TIA
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>

Are you doing this just for fun, or is your goal the finished result? There's single chip solutions for digital panel meters, IIRC Dallas/Maxim makes a few for both LED and LCD displays.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Steve wrote:

Ok, so you want to measure around 15 volts with an accuracy of about 0.05v. That is 300 steps - but you can probably make do with 256 values and a little bit less accuracy.
That's an 8 bit converter. It will give an output in the range 0 to 255, where 0 is 0.0v in and 255 is full scale - say 15.0 volts
One easy way of arranging that is to use the 8 output lines of the A/D as the *address* lines of three pre-programmed EPROMs.
The first EPROM is programmed to produce the correct 7 segment outputs for the tenths of volt display.
The second EPROM is programmed to produce the correct 7 segment outputs for the unit volts display.
The third EPROM is programmed to produce the correct 7 segment output for the tens of volts display.
You arrange suitable pre-scaling and level shifting of the input voltage, to meet the requirements of the A/D. You set the A/D to autoconvert every, say second.
It produces an output byte which is used by the EPROMS to lookup the correct 7 segment outputs for that input.
And, with a little bit of display driving electronics, the output of the EPROMs lights the appropriate segments of the displays.
So, for, example -
when 0v is applied, the A/D produces 00000000 on its output lines. That selects address 00H on the EPROMS.
Location 00H on the tenths EPROM is programmed with the right bit pattern to produce a "0" on its seven segment display.
Location 00H on the units EPROM is also programmed with the right bit pattern to produce a "0" on its seven segment display.
Location 00H on the tens EPROM is programmed with the right bit pattern not to light any segments.
However, when 15.0v is applied, the A/D produces 11111111 on its output lines. That selects address FFH on the EPROMS.
Location FFH of the tenths EPROM is programmed to produce a "0" seven segment pattern
Location FFH of the units EPROM is programmed to produce a "5" seven segment pattern.
Location FFH of the tens EPROM is programmed to produce a "1" seven segment pattern.
Of course, the PIC brigade will do the whole lot in a PIC and have it driving the seven segment displays directly..
But the EPROM route is easier to experiment with, when starting electronics.
-- Sue
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>

I'm doing this out of curiosity - so for fun.
I was trying to avoid using a PIC or EPROM because I thought it could be done somewhat easy with regular chips.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Steve wrote: <snip>

OK. Then use an A/D converter with built-in conversion to BCD. Such as the ICL7135.
Otherwise, the problem is that converting between 8 bit binary (such as a "regular" A/D produces) and BCD (such as a display driver needs) is not as trivial as it may appear. The equation is actually;
dbcd = (m*9256 + I*516 + b*26 + cc)*6 + x
In this equation, x = the actual decimal value; cc = the integer value of (x modulo 100)/10; b = the integer value of (x modulo 1000)/100; I the integer value of (x modulo 10000)/1000; and m = the integer value of x/10000.
Which is trivial to do in software (eg a PIC) or in a lookup table (eg an EPROM) but "quite tricky" to do in logic chips.
-- Sue
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>

This is facinating. I assumed this was easily done by a few carry outs and ins followed by a segment driver.
Sue, how long have you been in electronics to know all this stuff?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Steve wrote:

Ah, but did you know that carrots grow particularly well in old buckets?
Lacing the soil in the bottom with plant food will encourage them to grow down towards it. The sides of the bucket stop (low flying) carrot fly from getting at the growing plants. Start with the buckets indoors (or a greenhouse/cold frame if you have one) to aid germination and then move them outside when it gets warmer. A bare copper wire wound around the bucket will stop slugs and snails climbing up..
My point being, the binary to multi-digit decimal display problem is an old chestnut, included in most electronics courses at some point. Any electronics engineer should be familiar with it - just as any gardener forced to live in a flat knows how to still grow carrots. ;)
-- Sue
-- Sue
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>

I spent quite some time researching this. I assumed I can find a similar circuit if I found a voltmeter schematic, researched half and full adders, etc...
This was never covered in my courses (keep in mind I'm an EET) so I'm not sure how to attempt it without programming.
I was first trying to simulate it, however, your recommended chip (ICL7135) will prevent this since the program doesn't contain it.
Guess if I learn PIC programming and/or C, I'll attempt this circuit.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>

Would this work? http://www.utm.edu/staff/leeb/DM74185.pdf
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>

You might want to investigate dual-slope analog to digital conversion. The idea is that you convert your input voltage into a proportional current, and use it to charge a capacitor for a fixed time. Then you switch to a known voltage, which produces a known current, and use it to discharge the capacitor while counting the time it takes. When the voltage reaches zero, the time elapsed is proportional to the input voltage.
For example, suppose the reference voltage is 2.0 V, and your counter counts to 1999 full scale - 2000 counts total. Suppose your input voltage is 0.4 volts. So you charge the capacitor while counting from 0 to 2000 at a current proportional to 0.4 V. Then you switch to the 2 V reference, so the current is 5 times larger, and count up from zero while the capacitor voltage drops back to zero volts. Since the current is 5 times larger, it takes 1/5 as long to reach zero, and the counter will only be at 400 - which is the measured voltage to display.
It's a nice technique, if you're not in a hurry, because drift in most of the circuit components is automatically cancelled out. The only "digital" part of the circuit is the counter, so you can easily use 3 digits of decade counters plus a flipflop to get a 2000-count counter with decimal outputs ready to drive LED display drivers directly. No binary to digital conversion needed - just count in decimal!
Dave
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>

The nice thing about dual-slope A/D converters is that the conversion cancels noise (with a frequency > 2x the conversion rate). The technique is limited by the reference current and quality of the capacitors used. It's also slow, which is usually fine for most meters. It's not so great if you want to do true RMS reading, though.

Classical A/D converters can do direct decimal conversations by using a decimal (BCD) weighted digital to analog converters, as well.
--
Keith

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>

## Site Timeline

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.