DIY Voltmeter/Ammeter for lab power supply - Page 1
Forum section: electronics / projects

author: Microcheap
author_rank: Frequent Contributor
timestamp: November 30, 2018, 04:09:06 am
content: Recently I've decided to revive an old project that was abandoned for some time. It is a simple voltmeter and ammeter display to be used in a bench power supply I was putting together.I was not worried with high precision my main concern was to make some thing easy to assembly with what I already have on hands so I tried to use only jellybean parts.Schematics and source files are linked bellow.I'm using this project more as an exercise to learn how to use Kicad and this is also the first board that I make using SMD components. I have used a bit of assembly and the CCS PIC-C to program PICs before, but I took the opportunity to learn the xc8 compiler too. So please, forgive me for any mistakes I have made and any critique/suggestion of improvements will be more than welcome.cheers

author: Kleinstein
author_rank: Super Contributor
timestamp: November 30, 2018, 08:08:01 am
content: The capacitors C10 and C14 are perfectly fine and do not cause oscillation. Usually they should be same size, so more like 1 nF both.There is no need for D5/D6 - the OP has the same supply as the µC, so no higher voltage expected here.Before the voltage regulator it might take another 100 nF capacitor to ground.C15 at the fan control is a little odd. For just on/off use it would be more like a problem. For linear control, it would need another resistor at the transistor (at the emitter or base) to get more voltage swing to work with and the transistor likely needs to be a little higher power for linear control.It is a little odd to use an HC595 shift register for the 5 lines to the LCD - the more normal way would be having enough pins at the µC.There may be enough pins, when using those for ISP. The CAL switch might use a different way.

author: Simon
author_rank: Unknown
timestamp: November 30, 2018, 02:38:36 pm
content: You can of course buy relatively cheap panel meters but if it is an excersize then fair enough.

author: wasyoungonce
author_rank: Frequent Contributor
timestamp: November 30, 2018, 03:11:14 pm
content: Quote from: Simon on November 30, 2018, 02:38:36 pmYeah but aren’t those cheap panel meters very low refresh rate?Would be good for 3 times or more per second. Depends how the calculations are performed. Averaging will quicken them upSent from my iPhone using Tapatalk

author: Simon
author_rank: Unknown
timestamp: November 30, 2018, 03:14:13 pm
content: why how fast can your brain process a reading and care about it? I think several times a second on a 20 quid meter is usual.

author: wasyoungonce
author_rank: Frequent Contributor
timestamp: November 30, 2018, 03:58:06 pm
content: Hahaha more than likely once every 2 seconds eye to brain to hand ... on a good day

author: schmitt trigger
author_rank: Super Contributor
timestamp: November 30, 2018, 04:04:16 pm
content: Be careful with the capacitor value in parallel with the TL431.The datasheets include a graph of stability boundary conditions vs. capacitance and cathode current.It may be fine, but double check it.

author: Simon
author_rank: Unknown
timestamp: November 30, 2018, 04:12:58 pm
content: He'll be ok with 1nF it's 6.5nf - 6µF range that will cause oscillation.

author: Microcheap
author_rank: Frequent Contributor
timestamp: December 01, 2018, 05:24:17 am
content: Thanks Kleinstein for your commentsQuote from: Kleinstein on November 30, 2018, 08:08:01 amI tested some values for C10 and C14 and I don't know why but I was getting the output to oscillate, removing both caps solved the problem, that's why I added that note. I will do some more tests tomorrow, maybe I made a mistake somewhere else.Quote from: Kleinstein on November 30, 2018, 08:08:01 amYes, you are right those zeners can be omitted.Quote from: Kleinstein on November 30, 2018, 08:08:01 amI tried to use pwm and a MOSFET to control the speed of the fan, it worked but the pwm switching caused too much noise in the circuit so I added C15 to make a low pass filter and replaced the mosfet by a BJT to try to do a linear control. The idea is to change the fan speed proportionally to the temperature on the heat-sink.Quote from: Kleinstein on November 30, 2018, 08:08:01 amWhen I started drawing this schematic I used another micro which had less pins so I applied this solution with the shift register, when I decided to use only smd parts I changed the µC and I kept the hc595 to test this alternative. But yes, the circuit could easily be change to accommodate the extra lines to the lcd.

author: Microcheap
author_rank: Frequent Contributor
timestamp: December 01, 2018, 05:46:43 am
content: Quote from: Simon on November 30, 2018, 02:38:36 pmOf course you could, and it will probably be cheaper, easier and work better, but then there would be not much to learn from it. I think the first project for almost everyone who is starting to learn electronics is to try to build a power supply and I believe this project could be an interesting complement for it.Quote from: schmitt trigger on November 30, 2018, 04:04:16 pmWell noted, I was ware of that (I had a problem with a TL431 oscillating in another project before) so I have checked the stability graph in the datasheet, the 1nF value is fine.

author: Simon
author_rank: Unknown
timestamp: December 01, 2018, 08:18:06 am
content: Yes power supplies are a typical first project and a good learning experience but getting the meter right is kind of important.

author: Kleinstein
author_rank: Super Contributor
timestamp: December 01, 2018, 08:51:54 am
content: Using PWM and linear control of the fan is perfectly fine. However this would likely need a beefier transistor (e.g. BD135 or BCP56 like (SOT223) as there can be quite some heat. To make the linear control work better at least another resistor (e.g. 470 ohms) in front of the base would be a good idea, as it helps filter.

author: Simon
author_rank: Unknown
timestamp: December 01, 2018, 08:58:35 am
content: I know they are old hat but an IRL540 will run any size fan you want and will interface well with a µC. With regard to noise keep it's routing away from anything sensetive, traces carrying PWM'd power close together in pairs and twist any cables. You can of course get fans with built in controllers like say 4 wire PC caso fans, this takes the power control headache away and is what would be recomended on a pro design. anything bigger and you can look at ebmpapst fans that are grunty little speed controllable fans.

author: cdev
author_rank: Super Contributor
timestamp: December 01, 2018, 02:25:43 pm
content: It would be useful in a bench supply to have a record of peak current draw and /or if the current limit had been reached and activated, and maybe current x voltage x time. (watt hours or its equiv.) That way you would avoid the inevitable "why didn't you buy the meter on ebay" questions. The two line display you're using has the room for lots of additional info to be displayed beyond simply voltage and current. Since you likely dont have or need additional decimal places you could add additional functionality in the display. Even just a time display (clock) would be useful. A timer would also be very useful for some things.