Reverse Engineering of a PSU by a total beginner (QJ1502C) - Page 1
Forum section: electronics / beginners

author: dangrie
author_rank: Contributor
timestamp: September 25, 2015, 06:36:03 pm
content: Hi EEVBlog Community,this is my first Post in this Forum although I am a EEVblog viewer for a long time. I first want to introduce myself a little bit to give you an overview on what my knowledge with electronics is.I'm currently graduating in Computer Science and came to electronics about two years ago. Until now I've only done projects in the typical digital/Arduino Domain and some of them actually got featured on Hackaday:hereandhere.I wanted to dig into some more "analog stuff" and for this I thought about reverse engineering an already available product. I've chosen a small PSU because I thought it would be perfect for the purpose and it still is rather simple. I used the PSU that I bought some weeks ago. It runs under the name QJ1502C and is quite readily available on eBay and amazon. It is a 15V/2A unit.The internal construction of the PSU consists of 4 seperate boards:The main "power board"a voltage/current adjust board (that really only consists of 2 pots and 2 connectors)a output board that holds the shunt and also the 2 banana plugsthe display board with 2 ICL7107Other components are just a Fused IEC input jack (the Earth connection is properly secured with a shape proof washer to the case) and the main transformer. it has 4 different windings as it seems (I relly don't have any expirience with transformers):primary (obvious)0V/13V/22V as three fat wires0V/12V with thin wires0V/17V/17V with thin wiresAs a reverse engineering method I used the photo and print on transparent foil that Dave used in one of his videos. I started off by adding all the components on the board to the layout and give them the correct value/name that matches the real board. then i started to add the traces and tried to group the components together while i was moving on.The power board is only single layer so it was quite an easy task to get the schematic. The output and adjust board also was quite simple. I didn't bother to reverse engineer the display board for now but it basically consists of two identical configurations of the ICL7107 and a local 7805.I think I understand how the voltage regulation happens in the board but I'm struggling with the current limiting and a few other stuff (I've commented on the layout where I thought it was necessary and where I've thought I know that a component/section is good for.My questions (also commented on the schematic):The output of IC2B goes into a diode in reverse direction. Just today I've watched Daves video about the 4XXX-Series Clock and learned that you can use such a configuration to build an OR-Gate (very interesting), but for this you need a pull up resistor on the anode of the diode. In this configuration all diode anodes are connected together and nothing else is connected there (I've double checked this over and over...). How is the output of the OpAmp switching the transistor?V13 and V14 are in darlington arrangement and they switch the big transistor on the back of the unit (connected on SWITCH) which is a2N3055which has a base-emitter voltage of 1.5V. I understand that you maybe don't want to drive the 3055 directly with the opamp, but why the second (D313) transistor (which looks quite beefy (TO220) and also has a dedicated heatsink).How does the current limiting work? I think that it is handled by IC1A (Which is also connected to the 4 common anode arrangement) but it looks like IC1A is only connected to the voltage adjust pot. The current adjust goes directly into the non inverting input of IC2B. Am I wrong and IC1A actually is the voltage adjust and IC2B is the current adjust?Why did they use an extra chip for the third opamp (IC1A) when they still had 2 unused opamps in IC2how does IC2A switch the relay to the 22V rail? I noticed it switches when I set the voltage above ~7.3V but the voltage divider R24 and R35 produces a 4.6V at the inverting input of IC2A. However, if I would switch the values of R24 and R35, the math works out to ~7.3V (coincidence?).Why isn't the negative supply of IC1 and IC2 connected directly to ground but instead with the resistor and the diode? wouldn't then the negative supply be liftet by 0.6V due to the diode drop? But why are R2 and R3 then not the same value?I think thats all for now. I hope I'm not asking for too much.Of course I may have made some mistakes in the schematic. If you find something that doesn't make sense at all, please let me know.Again, I'm still a beginner, please don't be so hard to me for my missing knowledge in, what for you may be, basic electronics.Daniel

author: Kleinstein
author_rank: Super Contributor
timestamp: September 26, 2015, 01:19:48 pm
content: There seem to be quite some mistakes in the plan.The diodes all with the anode together can't work, likely V11 is the other way around. These diodes some kind of output the mimimum of the three input valtages.The supply to the OPs is likely more than 12 V - otherwise the maximum voltage would be limited to about 10 V.The ref. Section also does not look right.C7 and C16 also look odd - though this might be just a poor design.So ýou need to get a more reliable plan - otherwise it's to much guesswork.This is a linear regulated supply, so the output stage in not switching, but operating in anlog / linear mode.

author: dangrie
author_rank: Contributor
timestamp: September 26, 2015, 04:01:17 pm
content: Hi Kleinstein,Thank you very much that you took the time to look at the schematic and for your reply.Quote from: Kleinstein on September 26, 2015, 01:19:48 pmI think so too. But lets double check the stuff you noted together:Quote from: Kleinstein on September 26, 2015, 01:19:48 pmWell, I've attached the pictures I've used. They are cropped to remove the perspective and a bit color corrected but all traces and components are visible.I've double checked (quadruple checked at least actually) the segment with the diodes. You can find it in the lower right corner (V9-V11). In the mixed view you can see really good that the trace only connects the 4 anodes. Either I'm going totally stupid or there is something going on (or the manufacturer made a mistake).Quote from: Kleinstein on September 26, 2015, 01:19:48 pmYou're absolutely right. I did not notice this until now. But I've also double checked this in the schematic. The 7812 in in the top right corner. It's output pin is on the left (take a look at how the heatsink is oriented). The complete 12V rail is a single trace because there are no jumper links on the board.Maybe we get some kind of operating range the way the negative supply of the opamps are connected ( -0.6V? because there is a diode drop between the negative rail and GND???). But as I've wrote atop I don't quite understand this part of the circuit.Quote from: Kleinstein on September 26, 2015, 01:19:48 pmCould you be a little more specific on this? I've checked theDatasheet of the TL431and this configuration looks quite like the first "Typical Application" setup (Shunt Regulator).Quote from: Kleinstein on September 26, 2015, 01:19:48 pmFor C7: Parallel to C7 there was another capacitor that was connected to the Offset Null pin of the IC1 (HA17741) but this seems to be a very old model and the information I've found is that has to do something with the frequency compensation. Since most modern opamps are internally compensated I deleted this part of the circuit. Chances are that C7 and V10 are obsolete then, too. Or did I delete a non trivial part of the circuit there?Quote from: Kleinstein on September 26, 2015, 01:19:48 pmI thought it would be a nice project to reverse engineer the schematic and understand the parts, but I also couldn't find any schematics from someone else for this model.That this is a linear regulator is also really interesting. Does this mean that this is nothing else than a LM337 in a bigger case (very simplified). And does this mean that the heatsink in the back needs to dissipate (15V - ~0V) * 2A = 30W at most?In hindsight it is of course obvious that it is a linear regulator and sot a switcher because it is missing an inductor at least, but somehow the transistor stage always screamed switching mode in my head (and I've also thought linear regulation was too inefficient with the high difference between input/output voltage)PS: The mixed overlay isn't the picture I've used because there are some parts missing. I just created it, so you can have a quick look without needing to compare the two pictures or printing them out. I printed the top picture on paper and the bottom traces on transparent film, then glued them together using scotch tape on one side. This way I was able to flip the traces up and down.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 26, 2015, 06:11:48 pm
content: The diode V11 should be a low voltage zener diode - this enables the output only after the auxillary supply has reached something like 5 V. The diode only make sense if there is some source of posive current. Otherwise not current will flow.The slightly larger transistor just before the 2N3055 is correct. Though for just 2 A output a slightly smaller one in TO126 or possibly even TO39 might have been enough. Worst case the 3055 only has am amplification of slightly more than 20. So the driver must handle up to 100 mA. At a 20 V drop this is up to about 2 W of power dissipation.The supply for the OPs seems to provide a negative supply to (the Lm324 should be OP without it though. But this might be from old times when an other OP was used. V6 and V7 are likely zener diodes to stabilize the negative voltage. R2 should be considerably less than 10 M.The caps. C16 and C15 ssem to be there as in the plan - strange, but is might still work.The capacitor C4 at A/K of the TL431 with no direct feedback to the controll pin is calling for trouble.The circuit seem to one of the type floating regulator. This way 12 V and little negative for the OPs should be OK. The trick is, that these 12 V are relative to the posive output pin. So my guess is the GND line should be connected to out+ not out-.You should also check the resistor value for R10. This should be the shunt that measures the current - so this should be more like 0.38 Ohm.IC2B should be for Current cntrol, while IC1A is for voltage controll. There should be a few parts for conpensation at IC1A - these are important, even if they use the externall compensation of the OP.

author: dangrie
author_rank: Contributor
timestamp: September 26, 2015, 06:36:15 pm
content: Quote from: Kleinstein on September 26, 2015, 06:11:48 pmOk, maybe the symbol on the board for a normal diode made me think this in a standard diode. Does this mean all other diodes in this package are zener diodes, too? They all seam to be the same though.Quote from: Kleinstein on September 26, 2015, 06:11:48 pmI really have to read a good tutorial on how linear regulators work (tomorrow). Can you give me a good reference? The Wikipedia article (both german and english) seem to be a good starting point.Quote from: Kleinstein on September 26, 2015, 06:11:48 pmYeah, they are in a glass package, too. Strangely only under those diodes is a symbol. An exactly they have explicitly a symbol for a normal diode instead of a zener... I guess you should never trust the silkscreen.Quote from: Kleinstein on September 26, 2015, 06:11:48 pmCould you explain why it might cause trouble? I thought it was just there to avoid any oscillation of the referenceQuote from: Kleinstein on September 26, 2015, 06:11:48 pmI just double checked, and of course you are right: Ground is referenced to V+. I didn't see it earlier because it is only connected to the outputboard via a cable. This is the only point where they are joined.With the resistor you are right again: R35 not 35R. Duh...Quote from: Kleinstein on September 26, 2015, 06:11:48 pmOk, but what exactly is this Offset Null Pin for and why is it not available on modern opamps?I think I will redraw the schematic tomorrow. That I missed the ground reference made a lot harder.When I added the reference I replaced all V- pins with GND. Now I have to check what is V- and what GND.I will post again tomorrow with the new schematic but thanks so far.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 26, 2015, 07:49:40 pm
content: Wether an OP has pins for offset adjustament or not, is more a question of single OP or dual/quad. The dual OPs just don't have the pins free. So usually offset trimm in found in single OPs only, and most singel OPs (except auto zero or very small case) have pins for adjustment.The other thing is external compensation. Early OPs did not have internal compensation as it was rather difficult / expensive to include a capacitor in the 10s of pF range or larger on chip. So the µA741 was one of the first to include internal compensation. External compensation allows a little more freedom, so a few newer OPs still allow external compensation, but not many. Sometimes there are special versions compensated for higher gain (e.g. OP37, LF357,...).Ein Netzteil nach ähnlichem Prinzip wurde hier:http://www.mikrocontroller.net/topic/354091mal diskutiert. Da hat man wenigstens schon mal einen halbwegs fehlerfreien Plan und kann daran das Prinzip gut verstehen.On voltage regulators there are some quite good application notes from LT, Ti and National Semiconductors (e.g. AN1148).Wenn man viel lesen mag gibt im Netz ggf. noch ein Kopie vom HP AN90B Powersuppy Handbook - da werden vor allem Regler nach dem Prinzip hier ausführlich beschrieben. Viel HP Netzteile nutzen ein ähnliches Prinzip.

author: calli
author_rank: Regular Contributor
timestamp: April 02, 2016, 10:29:02 am
content: Sorry to dig out this thread.I am just trying to add a arduino+encoder knobs to this puppy (newest version 2.0). Roughly following Daves PSU-uC-PWM path from PSU design issue #3(?).I have the Arduino running with two encoders (and buttons) and Highres PWM, filtered and OpAmped (Buffer). I am just before connecting it...On the Voltage var resistor I measure 2.2 Volts outer pins. On the Amp var resitor nothing?So, do you know maybe a site/forum where a new version of this PSU is discussed or where I can find the schematics?Cheers,Carsten

author: Kleinstein
author_rank: Super Contributor
timestamp: April 02, 2016, 03:55:18 pm
content: The voltage at the shunt is usually rather low (e.g. 100 mV range) and so the voltage at the pot to set the current limit is often of similar size. So there should be some voltage at the pot, but it can be a low one.To change to voltage setpoint to a µC control you might need to replace the pot with a fixed resistor and apply the DAC ouput voltage somewhere, where the reference voltage is applied to the divider.With so little information on the supply you have to find or draw the schematics yourself.

author: calli
author_rank: Regular Contributor
timestamp: April 02, 2016, 04:45:15 pm
content: Hrmmm. Ok. I had the hope that it would have been same principle as in Daves PSU episodes.May need to rethink the project.Carsten

author: calli
author_rank: Regular Contributor
timestamp: April 02, 2016, 05:19:57 pm
content: The voltage at the Current Pot is 0 to 0,13xxxV this seems to come from the shunt as you pointed out. What I don't understand is that this is not changing while changing the volts (and so the current through my test resistor (CV)).A noob idea: I have a OP amp anyhow in my control circuit so could I use resitors so that the op amp is not amplifing but damp (word?). So 0-5V from PWM is 0-0.13V on the point where the middle Pot pin is now?Carsten

author: Kleinstein
author_rank: Super Contributor
timestamp: April 02, 2016, 08:14:40 pm
content: The current pot is likely setting a voltage in the low range (0-130 mV), independent of the actual current. This voltage just sets the upper limit for the voltage that can appear at the shunt.Going done from the 0-5 V (or 0-3.3 V) the 130 mV range is easy, with just two resistors as a divider. So no need for am additional OP here.For the voltage setting one might need an extra OP - here it depends on the circuit.Usually it is not that difficult to draw a plan for a simple power supply. The LT3080 based supply Dave proposed is a rather unusual one. Not likely to find something similar in a cheap chinese supply. The circuit is more likely one as shown at the top, e.g. using a second supply (like 8-12 V) for the regulator part.For the modification to µC control the interesting part is more if the pot for the voltage is used as a variable resistor or at a pot / divider.

author: calli
author_rank: Regular Contributor
timestamp: April 03, 2016, 04:37:00 pm
content: The VOltage Pot is very likely a voltage divider pot.I have a dual OpAmp as buffer anyway so no problem so.I now have to figure out how to calculate the resitors on the OpAmps so that I translate 0-5V to 0-2.13 and 0-0.13V I guess. But there will be a formula or even calculator online I think.Carsten

author: calli
author_rank: Regular Contributor
timestamp: April 03, 2016, 05:25:26 pm
content: Hrmp. I guess I need a voltage divider (I think I use a trim pot to fine tune it). I think it is not possible to have a aplification below 1.0?Also I use a rail to rail op amp, but it has quite a bit voltage loss. 0.7V is that normal? Seems quite a bit (0-4.7V on input)Carsten

author: calli
author_rank: Regular Contributor
timestamp: April 04, 2016, 05:44:33 pm
content: "Wer misst der misst Mist!" as we say in Germany. And if you are stupid like me....I had the opAmp connected to Vin on the arduino. Just ignoring the 5V pin just 2 pins in neighborhood... So the PWM was near 5V, but on the Vin we have only 4.1V or so. Yes. Stupid.Now I have the (near) full range for the PWM and under8mV15mV (dang, even with calculator...) resolution on 0-15V.Regulating the Voltage works. Now I have to test it on the Current pot.Just using the (filtered) PWM did not work, the impedance (?) seems to high and the voltage drops to 0V. Even a pot voltage divider (had only a 4.7k maybe not enough) is too much for the PWM. Or I did a stupid error again. Well I have that nice Rail2Rail opamp so I use it (voltage divided by a pot to get the right levels).Carsten

author: calli
author_rank: Regular Contributor
timestamp: April 06, 2016, 09:03:27 am
content: Current also works. Now preparing a strip board.Carsten

author: calli
author_rank: Regular Contributor
timestamp: April 07, 2016, 09:20:04 am
content: So.Made a stripboard. Made mistakes. Curses.But it still fits beside that much empty room. Also found that I bought accidentally OpAmps with just one Amp in it.... On the breadboard I used a SO8 on a adapter pcb.Made also contact to some main voltages with my thumbSome worker did not fit the shrinking tube correctly and tried to isolate it wirh some hot snod. Fail. Well you get what you pay for. I am aware of that! No comments please.Voltage regulation works well. However, Current is a bit weird and will not get back to 0mA. Nothing I found while on my breadboard. An I can't see a reason, I need to measure more.And I added some LEDs behind the buttons as indicators. I was thinking to use them a indicator maybe for showing if a knob is locked or there is output. Looks cool. However.... When I switch on LED on the voltage goes up a little 0.2V... Second LED even more... Today I found that I shorted the VREV on the arduino with the LED. BUT after fixing this... SAMENo idea so far.So I make a preliminary summary:- I learned much (also got "grounded" to be carefull always)- had fun- spend not too much money- will I keep it? Not sure, so far I don't need a PC controlled PSU and the usage with the pots is much easier even not that acurate...Cheers,Carsten

author: calli
author_rank: Regular Contributor
timestamp: April 07, 2016, 09:48:24 am
content: Seems even another 20mA for the LED is too much for the regulator on the original board, the voltage drops a bit and because I use the 5V there on my Arduino this also changesthe Voltage reference forthe PWM. Hmmm. What ways to go?Maybe I find a 5V reference on the display module and feed that to the arduino as AREF?Or use the unregulated 8V on the display board to feed it into VIN of the Arduino (add a big cap too).EDIT: Stupidness deleted.Carsten

author: calli
author_rank: Regular Contributor
timestamp: April 07, 2016, 09:52:30 pm
content: So. Using the unregulated 9V from the board to feed the VIN of the arduino. Makes a nice 5V. The Button-LEDs still changing the voltage a tad bit. That sucks. (I have a lock C/V on the encoder buttons as double click)I also found another flaw. Because the rotary encoders have no "left end" you never now what current is set until you turn the knob, beeing in CC mode and really changing the current. That needs a real set and measured currrent display. Not sure if this is a real bad thing. Maybe I use the single click on the encoder to set the current to zero.Until Í get the led problem solved is a lock maybe not needed anyway. Maybe I use one double click to switch the output (additional relais).Oh and with the powering the problem that the current get not to zero is goneCarstenStill someone with me? ;-)

author: calli
author_rank: Regular Contributor
timestamp: April 08, 2016, 09:55:53 am
content: Closed case. Found a bug in my Arduino SketchArduino is now saving the last voltage and current positions to EEPROM. Will only update when values have changed AND 60 seconds no change. So that will give me plenty years of EEPROM life.Also added some pull up (yes, inverted) resitors, so when "booting" it will output nothing (0V 0mA).Carsten

author: ElektroQuark
author_rank: Unknown
timestamp: April 08, 2016, 11:31:10 am
content: Just a post so you aren't feeling alone: I have read your posts with interest.

author: calli
author_rank: Regular Contributor
timestamp: April 08, 2016, 11:35:42 am
content: Saludos!🙋