{"id":1666,"date":"2013-01-04T22:20:30","date_gmt":"2013-01-05T06:20:30","guid":{"rendered":"http:\/\/pididu.com\/wordpress\/?p=1666"},"modified":"2017-10-16T14:14:52","modified_gmt":"2017-10-16T22:14:52","slug":"fix-a-cheap-supply-2","status":"publish","type":"post","link":"http:\/\/pididu.com\/wordpress\/blog\/fix-a-cheap-supply-2\/","title":{"rendered":"Fix a Cheap Supply 2"},"content":{"rendered":"<p>If you missed the introduction to this problem, it&#8217;s <a title=\"Fix a Cheap Switching Power Supply\" href=\"http:\/\/pididu.com\/wordpress\/blog\/fix-a-cheap-switching-power-supply\/\">here<\/a>.<\/p>\n<p>[8:35 pm January 4, 2013] Okay, I&#8217;m back to this one.\u00a0 Here is the schematic again for reference.<\/p>\n<figure id=\"attachment_1658\" aria-describedby=\"caption-attachment-1658\" style=\"width: 928px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/pididu.com\/wordpress\/blog\/fix-a-cheap-switching-power-supply\/powersupply\/\" rel=\"attachment wp-att-1658\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-1658\" title=\"Inexpensive Switching Power Supply Schematic\" src=\"http:\/\/pididu.com\/wordpress\/wp-content\/uploads\/2012\/12\/PowerSupply.gif\" alt=\"Inexpensive Switching Power Supply Schematic\" width=\"928\" height=\"460\" srcset=\"http:\/\/pididu.com\/wordpress\/wp-content\/uploads\/2012\/12\/PowerSupply.gif 928w, http:\/\/pididu.com\/wordpress\/wp-content\/uploads\/2012\/12\/PowerSupply-100x49.gif 100w, http:\/\/pididu.com\/wordpress\/wp-content\/uploads\/2012\/12\/PowerSupply-300x148.gif 300w, http:\/\/pididu.com\/wordpress\/wp-content\/uploads\/2012\/12\/PowerSupply-500x247.gif 500w\" sizes=\"(max-width: 928px) 100vw, 928px\" \/><\/a><figcaption id=\"caption-attachment-1658\" class=\"wp-caption-text\">My best guess at reverse-engineering. Remember, this supply does not work, so everything shown is suspect.<\/figcaption><\/figure>\n<p>My first theory was that R2 (1.5 M\u03a9) was too large.\u00a0 Perhaps it was erroneously loaded, instead of a smaller value.\u00a0 My reasoning was that if the rectified high voltage was about 150 volts, then the current into the base of Q2 would be about 100 uA.\u00a0 If Q2, which was unknown, had a current gain of 100, then that would mean 10 mA through the collector, and even if the entire 10 mA was drawn by the primary of T1, that would be 1.5 watts.\u00a0 But the output rating of the supply is 5 volts @ 1 amp, or 5 watts.\u00a0 Also, in looking at the voltage divider between R2 and R3 at startup, we would have a maximum of 0.55 volts at the base of Q2 at initial startup, not enough to drive it into saturation.<\/p>\n<p>Since I didn&#8217;t have an oscilloscope, I decided to open up a similar cheap supply to see if my supposition was reasonable.\u00a0 To my surprise, the other supply had <strong>10 M\u03a9<\/strong> to the base of its transistor!\u00a0 This brought me back to one of the basic principles of debugging: <em>When you see hoof prints, think horses, not zebras.<\/em>\u00a0 In other words, I should look for the simple and common, not the esoteric.\u00a0 And another debugging principle is known as the Eureka Principle: <em>When you find the true root cause, you just <strong>know<\/strong>.<\/em>\u00a0 On resistor R2, I was not sure, which was why I looked at another supply for guidance.\u00a0 When I have a &#8220;kinda, could be, maybe think so&#8221; feeling about a theory, then it&#8217;s usually not right.<\/p>\n<p>Here is my present thinking, which satisfies the Eureka principle.\u00a0 It would not have been possible to arrive at this theory from the information I&#8217;ve supplied so far on this blog.\u00a0 So here is a shot of the top of the board, and the bottom.\u00a0 The bottom picture has been flipped left to right, so that it matches the top in orientation.<\/p>\n<figure id=\"attachment_1667\" aria-describedby=\"caption-attachment-1667\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/pididu.com\/wordpress\/blog\/fix-a-cheap-supply-2\/hpim0603\/\" rel=\"attachment wp-att-1667\"><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-1667\" title=\"Top of Power Supply Board\" src=\"http:\/\/pididu.com\/wordpress\/wp-content\/uploads\/2013\/01\/HPIM0603-300x208.jpg\" alt=\"component side of power supply board\" width=\"300\" height=\"208\" srcset=\"http:\/\/pididu.com\/wordpress\/wp-content\/uploads\/2013\/01\/HPIM0603-300x208.jpg 300w, http:\/\/pididu.com\/wordpress\/wp-content\/uploads\/2013\/01\/HPIM0603-100x69.jpg 100w, http:\/\/pididu.com\/wordpress\/wp-content\/uploads\/2013\/01\/HPIM0603-431x300.jpg 431w, http:\/\/pididu.com\/wordpress\/wp-content\/uploads\/2013\/01\/HPIM0603.jpg 1006w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-1667\" class=\"wp-caption-text\">Component side of board. Note transistor Q2, and the silkscreen under it indicating correct orientation.<\/figcaption><\/figure>\n<figure id=\"attachment_1668\" aria-describedby=\"caption-attachment-1668\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/pididu.com\/wordpress\/blog\/fix-a-cheap-supply-2\/hpim0602\/\" rel=\"attachment wp-att-1668\"><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-1668\" title=\"Bottom of power supply board\" src=\"http:\/\/pididu.com\/wordpress\/wp-content\/uploads\/2013\/01\/HPIM0602-300x197.jpg\" alt=\"solder side of power supply board\" width=\"300\" height=\"197\" srcset=\"http:\/\/pididu.com\/wordpress\/wp-content\/uploads\/2013\/01\/HPIM0602-300x197.jpg 300w, http:\/\/pididu.com\/wordpress\/wp-content\/uploads\/2013\/01\/HPIM0602-100x65.jpg 100w, http:\/\/pididu.com\/wordpress\/wp-content\/uploads\/2013\/01\/HPIM0602-456x300.jpg 456w, http:\/\/pididu.com\/wordpress\/wp-content\/uploads\/2013\/01\/HPIM0602.jpg 737w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-1668\" class=\"wp-caption-text\">This picture of the bottom of the same board has been digitally reversed so that the traces match the positions of components in the other picture.<\/figcaption><\/figure>\n<p>During the reverse-engineering of this circuit, I didn&#8217;t know which leads of Q2 were emitter, base, and collector, so just connected them to a circle at first, then assigned them by looking at the circuit. That is the schematic that is shown above. However, when looking at the similar working supply, I noticed an xw-13001 transistor being used as the switch, and was able to find a datasheet for it. 400V NPN transistor, gain of 100, but the pins go B-C-E when read left to right on the front, not E-C-B. I looked again at the transistor on my failed assembly. It had &#8220;13001&#8221; stamped on it, and was probably the same thing. But still, it was inserted in an orientation that matched the silkscreen.<\/p>\n<p>Here is what I will do. I will unsolder the Q2 from the board, and see if it is really B-C-E on my DVM, which has transistor sockets on it.<\/p>\n<p>[10:14 pm January 4, 2013] All right, I unsoldered the transistor and tested it. In fact, the pinout does seem to be E-C-B. However, the transistor showed a gain of 1 on the tester. I tried another transistor from my parts box to verify that the tester was okay. Yes, gain of 308 on the known good transistor. So my theory now is that it was a bad transistor.<\/p>\n<p>[9:12 pm January 5, 2013] I unsoldered the XW13001 from the similar supply. In fact, that transistor has the B-C-E pinout on the data sheet. And the DVM shows a gain of 18. That seems low, but maybe that&#8217;s how it is with high voltage transistors. Wait, maybe it&#8217;s B-E-C, and I was measuring the reverse transistor. Let me check.<\/p>\n<p>[11:05 am January 7, 2013] It turned out to be too difficult to bend the leads to test whether the pinout on the XW 13001 was actually B-E-C, but I would think that the datasheet would be accurate. \u00a0This type is supposed to have a gain from 40 &#8211; 80, so at least it had something. \u00a0I soldered it into the circuit, and energized. \u00a0Nothing. \u00a0No output voltage, and voltage across C2 basically zero. \u00a0I think this oscillator is basically not starting at all. \u00a0I&#8217;m pretty sure that the transistor I removed was bad, with a gain of 1. \u00a0And a third principle of debugging comes into play here: <em>Usually, only one thing is broken<\/em> (unless the original failure led to a cascade of other failures). \u00a0I was starting to doubt whether the R2-R3 combination was right, whether that was preventing the oscillator from starting, but what are the chances of having a bad transistor AND loading an incorrect value of resistor(s)? \u00a0Quite low. \u00a0Unless, this was a cascade failure. \u00a0Could having too little bias on the base of Q2 have led to its failure originally? \u00a0I think not, but I will unsolder the replacement transistor to see if it now has burned out and has a gain of 1. \u00a0If not, then maybe a gain of 18 is simply not enough, and I need to find another transistor to try.<\/p>\n<p>[5:18 pm January 13, 2013] Tried changing R3 to 82k, and replacing the transistor. \u00a0It still doesn&#8217;t produce 5 volts, although I do see something like 14 mV at the output. \u00a0That&#8217;s interesting, because it is <em>not<\/em> zero. \u00a0The output capacitor rapidly decays to zero volts when left alone, so that must mean that there&#8217;s at least a little oscillation going on. \u00a0My friend Phil recommended checking the Zener. \u00a0I thought that couldn&#8217;t be it, since it read ok as a diode, but now I think I&#8217;ll unsolder it and actually check the avalanche voltage.<\/p>\n<p>[2:47 pm January 14, 2013] I was able to test the zener in-circuit (but not powered).\u00a0 It&#8217;s 6.75 volts, which seems reasonable enough.\u00a0 I should try measuring the voltage across the zener when the circuit is powered.\u00a0 This blog jumps in time, as I only get back to this project occasionally.<\/p>\n<p>[10:16 am January 17, 2013] I measured the voltage across C2 with the power turned on. -2.7 volts. \u00a0Repeat, <strong>negative<\/strong> 2.7 volts, i.e., the capacitor is reverse-biased. \u00a0WTF?? \u00a0I had changed Q2 to a brand new transistor, and changed R3 to 82k. \u00a0What should I measure next?<\/p>\n<p>[2:16 pm January 17, 2013] What could possibly have reverse-charged C2? \u00a0There&#8217;s no path to it, not without going the wrong way through a diode. \u00a0And even if there was a path for charging, the base of Q2 should be clamping the voltage to 0.6 or 0.7 volts max. \u00a0With the power turned off, I checked Q2. \u00a0It&#8217;s OPEN CIRCUIT now. \u00a0I burned it out. \u00a0And Zener ZD1 is now a dead short. \u00a0Looks like that burned out, too. \u00a0I remember Q2 feeling hot when I first energized the circuit. \u00a0My theory is that it went into thermal runaway, and dumped a ton of current into the zener, burning it out, too. \u00a0I know that the zener wasn&#8217;t always bad &#8211; I had just tested it a few days ago. \u00a0Other duties call &#8211; I&#8217;ll return to this sleuth later.<\/p>\n<p>The conclusion of the saga is <a title=\"Fix a Cheap Switching Power Supply\" href=\"http:\/\/pididu.com\/wordpress\/blog\/fix-a-cheap-supply-3\/\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you missed the introduction to this problem, it&#8217;s here. [8:35 pm January 4, 2013] Okay, I&#8217;m back to this one.\u00a0 Here is the schematic again for reference. My first theory was that R2 (1.5 M\u03a9) was too large.\u00a0 Perhaps it was erroneously loaded, instead of a smaller value.\u00a0 My reasoning was that if the &hellip; <a href=\"http:\/\/pididu.com\/wordpress\/blog\/fix-a-cheap-supply-2\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Fix a Cheap Supply 2<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1667,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[204,202],"tags":[38,35,37,36,34],"_links":{"self":[{"href":"http:\/\/pididu.com\/wordpress\/wp-json\/wp\/v2\/posts\/1666"}],"collection":[{"href":"http:\/\/pididu.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pididu.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pididu.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/pididu.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1666"}],"version-history":[{"count":0,"href":"http:\/\/pididu.com\/wordpress\/wp-json\/wp\/v2\/posts\/1666\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/pididu.com\/wordpress\/wp-json\/wp\/v2\/media\/1667"}],"wp:attachment":[{"href":"http:\/\/pididu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pididu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1666"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pididu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}