EEVblog Electronics Community Forum
Electronics => Projects, Designs, and Technical Stuff => Topic started by: Microcheap on November 30, 2018, 04:09:06 am
-
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
-
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.
-
You can of course buy relatively cheap panel meters but if it is an excersize then fair enough.
-
You can of course buy relatively cheap panel meters but if it is an excersize then fair enough.
Yeah 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 up
Sent from my iPhone using Tapatalk
-
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.
-
Hahaha more than likely once every 2 seconds eye to brain to hand ... on a good day
-
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.
-
He'll be ok with 1nF it's 6.5nf - 6µF range that will cause oscillation.
-
Thanks Kleinstein for your comments
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.
I 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.
There is no need for D5/D6 - the OP has the same supply as the µC, so no higher voltage expected here.
Yes, you are right those zeners can be omitted.
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.
I 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.
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.
When 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.
-
You can of course buy relatively cheap panel meters but if it is an excersize then fair enough.
Of 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.
Be careful with the capacitor value in parallel with the TL431.
Well 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.
-
Yes power supplies are a typical first project and a good learning experience but getting the meter right is kind of important.
-
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.
-
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.
-
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.