A power supply needs a display

In my second instalment of the power supply project, I’ve constructed the volts display. I’m kind of working back to front, as I’ve already been though much designing and I also built the AC-DC module which I will detail in a post to come soon.

What I’ve built is just a voltmeter and a display for it on a single piece of protoboard using the popular ICL7107 IC which is a voltmeter, ADC, and LED display driver in a monster of a 40-pin dip package from Intersil. This was quite a godsend as the power supply was already getting quite complicated and I wanted a simple, one-chip solution for the volts and amps display.

I had previously breadboarded it up and it works well. Actually, very little hassle considering what it’s actually doing. I did, however, run into problems with obtaining the IC briefly. I payed a visit to Creatron at Spadina and College (in Toronto) and they only had one in stock for $17! I stupidly bought it thinking “ok, it’s an expensive IC” but as soon as I got home, I looked it up online and found it for $2 something at Jameco. Bah! I was so pissed.

A couple of weeks later, I went to Supremetronic (for those who don’t know, it used to be on Queen Street West and moved to College St. then amalgamated with the Home Hardware. It now lives in the basement of the Home Hardware at College and Spadina) to grab some more parts. They not only had the ICL7107, but had it for $3 and change! So I bought four of them. Lesson learned: shop around.

I still like Creatron, especially for their nice protoboards, but it really does pay to shop around. Also, I have this horrible need to shop at brick and mortars for some reason. It’s more fun.

Back on topic.

So last night I actually go to solder the thing up. It was a bit fiddly to get it all to fit on two sides of one protoboard. Lots of ugly resistor forests which hide under the elevated 7-segment displays. I chose 1″ 7-segs just because I could and they look cool.

The font view, note the crappy soldering

The font view, note the crappy soldering

I modified the circuit to have a switchable range: 0-200V (199.9V), 0-20V (19.99V) and 0-2V (1.999). The last one I’ll use purely for calibrating it as the supply has a minimum voltage of 1.2V the last range is sort of useless for day to day use. I wired it via an 8pin pcb connector to a 2P3T band switch to change the range and set the decimal point. Lovely.

Rear view. Monster of a DIP

Rear view. Monster of a DIP

Took me about 8 hours of soldering, the last two of that finding and fixing cold or otherwise inadequate solder joints. I’m not the best at soldering as you can see, it’s a fine art I’m still developing skill in. When I first powered it on, it was intermittent and displayed junk characters. Fixing the joints stabilized it nicely. The oscillator is working fine, the auto-zero is auto-zeroing.

It’s not without it’s problems however. I did note that the calibration seemed off for the different ranges as well as it measured voltage non-linearly. A big problem and most perplexing. As with most things, the reasons and solutions are rather simple.

When test measuring, I made the beginners mistake of measuring it’s own supply. So when the calibration trimpot was set to a reference voltage of 1V, 5V read ok on the 200 and 20V range (with minor error) but 12V (again measured from the same supply) was horribly off on the 20V range. What’s more, the 2V range was off by a mile, displaying numbers about 1/2 of what they should be in the wrong range. Drove me mad.

I started reflowing joints and yanking out caps and resistors trying to find the problem. I realized only later that the problem wasn’t me or my build, but the schematic I was using. The must frustrating “trap for young players” (as Dave Jones from the EEVBlog would say) is that schematics you find online are frequently wrong, or the idea is right but whomever drew up the schematic forgot something or got a part value wrong. The error then gets multiplied as you modify the circuit to suit your application. Shit happens.

I used the following schematic which was deceptively simple and did (sort of) work on breadboard. Works reasonably well for the 200V and 20V range as presented provided the following:

  • you don’t be a smartass and replace the 1M input resistor with a 10k thinking that it will set the range to 2V (100k sets it to 20V)
  • you don’t measure the voltage of the same supply (or without a high impedance input and even then expect some error)

These two traps are something an experienced design engineer or seasoned hobbyist would know, but I’m just learning. After a couple hours swearing at the thing and bodging in new caps (unnecessarily) I realized that I can actually troubleshoot this. Going through it logically, the IC is working fine. The clock works, the displays work, the measurements are just off. The reference voltage reads 1V as it should so it MUST be the voltage divider on the input!

Looking at the schematic, and comparing it to the official data sheet, I notice a discrepancy. This guy (he isn’t mentioned on that page) modified the scale by changing the 1M input resister, rather than the resistor between the IN HI and IN LOW pins. This will work, after a fashion, but check what happens when you want a 2V scale. 200V scale is 1M, 20V is 100k, so I thought “duh i’ll put a 10k in there for 2V”. Logical right? Not really. The two resistors form a voltage divider which needs to scale the input by a factors of 10. So 1M/10k is 100:1, 100k/10k is 10:1, and 10k/10k is … 1:1! No wonder I was getting such an off reading, it was dividing the input by half instead of 10. Thus, it was half the proper reading and in the wrong range. Yes, I’m an idiot.

Fortunately, to correct the problem all I have to do is move a few resistors around and move a couple of jumper wires. Fortunately, I saw someone with a similar problem and a kind gent (goes by Ron H) posted a solution for correct values for the resistor that will yield the same ranges here. he even provided exact (I assume calculated) values to further reduce error. The new values are: 200V = 10.1k, 20V = 111k, 2V = infinite (open). I’ll put in the next closest values with 1% and/or series resistors to get close to that. Best part – it keeps the input high impedance (1MΩ) as any voltmeter should be!

I’ll post the results of my tinkering in a future (soon to come) post.

Comments are closed.