Author Topic: A program to show why power supply efficiency is important.  (Read 4010 times)

0 Members and 1 Guest are viewing this topic.

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
A program to show why power supply efficiency is important.
« on: October 07, 2019, 01:08:16 pm »
So what are the numbers of power supplys that make them so important ?

80% is the lowest number you should buy as far as efficiency is concerned.
Buying 85% (gold) or better is better.

I wrote this to fiddle around with inputs and outputs of the variables which
determine that % number.  If you know 4 of the 5 important numbers the
fifth is easy to reverse determine.  And you can get a SIXTH one as well.
The importance becomes vivid if you plug in these numbers
55 Volts in, 12 volts out, 2 amps out, 80% eff.  These were the numbers
an idiot of YouTube used to describe why high voltage SMPS regulators
are garbage out of china.  SMPS (switch mode power supply).
As you run the program remember this 1.5 Watts is about the most
a standalone SMPS out of china can do without burning up.

Code: QB64: [Select]
  1. PRINT "Calculate power efficiency"
  2. PRINT "The formula % = (watts out) / (watts in) * 100"
  3.  
  4. TOP:
  5. PRINT "1. Calculate Input amps"
  6. PRINT "2. Calculate Output amps"
  7. PRINT "3. Calculate efficiency"
  8. PRINT "4. Exit"
  9. ON Q GOTO CIA, COA, CE, DONE
  10. GOTO TOP
  11.  
  12. DONE: SYSTEM
  13.  
  14. CIA:
  15. INPUT "% Eff "; ef
  16. INPUT "In Volts"; iv
  17. INPUT "Out Volts"; ov
  18. INPUT "Out Amps"; oa
  19. ow = ov * oa * 100
  20. x = ow / ef
  21. ia = x / iv
  22. PRINT "Input amps to expect "; ia
  23. GOTO RWCW
  24.  
  25. COA:
  26. INPUT "% Eff "; ef
  27. INPUT "In Volts"; iv
  28. INPUT "In Amps"; ia
  29. INPUT "Out Volts"; ov
  30. iw = iv * ia
  31. x = ef * iw
  32. oa = x / (ov * 100)
  33. PRINT "Output amps to expect "; oa
  34. GOTO RWCW
  35.  
  36. CE:
  37. INPUT "In Volts"; iv
  38. INPUT "In Amps"; ia
  39. INPUT "Out Volts"; ov
  40. INPUT "Out Amps"; oa
  41. ef = ((ov * oa) / (iv * ia)) * 100
  42. PRINT "Efficency "; ef; "%"
  43.  
  44. RWCW:
  45. PRINT "Regulator will consume watts "; (iv * ia) - (ov * oa)
  46. GOTO TOP
  47.  

The code was never meant to be elegant.  It was just a bang out.
K.I.S.S. I am not changing the program.  It works.
This will also show why SMPS are better than Linear supply.