Universial Ac Dc converter circuit for small projects - Page 1
Forum section: electronics / general

author: Rutger
author_rank: Regular Contributor
timestamp: March 26, 2011, 03:58:07 pm
content: Hi all, first of all thank you Dave Jones for start this excellent blog, I love it!My background is very similar, but I ended up in the software side, but have always tinkered with electronics.After viewing many of the video blogs I thought of a project I that I would be interested in doing but have trouble getting started and then I thought maybe other people might be also interested in this?The project I would love to see a video blog is on is how to design a simple universal ac/dc power supply using switching technology for small projects or small applications, like input 85V to 260V ac & output in the 12 volt range and no more than 0.5 amps.Anyhow if any of you have already done this or knows of an excellent chip to use for this project feel free to blog me back.Thanks for reading my little message.Rutger

author: Simon
author_rank: Unknown
timestamp: March 26, 2011, 04:02:11 pm
content: hm for powers this low there are a good range of all in one solutions from most stockists like farnell and digikey.Their datasheets often give full details including PCB for the finished circuit.Dave did do a blog on using the MC34063 chip (or any of it's clones)

author: Rutger
author_rank: Regular Contributor
timestamp: March 26, 2011, 04:07:29 pm
content: Thanks Simon, but isn't that chip a DC to DC converter?

author: Simon
author_rank: Unknown
timestamp: March 26, 2011, 04:10:49 pm
content: well any switching regulator is a DC/DC conveter, you just put a rectifier and smoothing capacitor in front. Designing switchers that run straight off the mains can be tricky and more delicate so from a hobbiest perspective often a standard unregulated power pack followed by a low voltage SMPS is easier

author: Rutger
author_rank: Regular Contributor
timestamp: March 26, 2011, 04:17:34 pm
content: Hi Simon, I guess I am rusty in electronics design, I get the rectifier and capacitor part, but what about the voltage input range of 85V to 260V AC, are you suggesting a small traditional transformer to step this down to within the chip specs of 3 V ~ 40 V?

author: Simon
author_rank: Unknown
timestamp: March 26, 2011, 04:21:08 pm
content: yes, for hobbiest uses that is generally easier although if your really into things you may be able to design one that runs right off the mains DC voltage, basically the inductor is replaced by a small transformer, because of the higher frequency the transformer is much smaller and offers isolation like a normal 50Hz stepdown transformer would

author: Rutger
author_rank: Regular Contributor
timestamp: March 26, 2011, 04:31:48 pm
content: I have looked at the data sheet for the MC34063 but all the calculations are based on a fixed input voltage and I don't see any schematic examples were there is some kind of 'fly-back' or feedback of the possible changes in the input voltage, I really don't think you can use this chip for a universal power supply, but hey maybe I missed something? I was looking at the LNK302D chip of the following websitehttp://www.powerint.com/products/linkswitch-family/linkswitch-tnand thought this was more the route to go?

author: Simon
author_rank: Unknown
timestamp: March 26, 2011, 04:36:24 pm
content: I've not personally used the 34063 but it should cope with some input variation. I think the trick would be to increase the inductor as this is the part that is specs for a certain input and output. The formula's specify for the min input giving the min inductance and other minimal specsThe 34063 is an old one so there will be many more better ones. I'm just looking into this sort of thing myself too

author: Rutger
author_rank: Regular Contributor
timestamp: March 26, 2011, 04:40:53 pm
content: Thanks for your feedback Simon and let me know if you find a better solution!

author: Simon
author_rank: Unknown
timestamp: March 26, 2011, 04:51:20 pm
content: well if you post your requirements I'm sure someone will suggest a good IC for the job

author: Zero999
author_rank: Super Contributor
timestamp: March 26, 2011, 05:04:11 pm
content: Quote from: Rutger on March 26, 2011, 04:17:34 pmThat's not normally how it's done.The typical method involves rectifying 85V to 260VAC to give 120V to 368VDC and using an isolated DC-DC converter to convert it to a lower voltage. The DC-DC converter is an oscillator which converts the DC into a PWM AC waveform, passes it though a lightweight ferrite cored transformer and a rectifier to produce lower voltage DC. Feedback is taken from the low voltage DC side via an opto-coupler or another oscillator connected to a pulse transformer and the duty cycle of the PWM waveform is altered to compensate for and changes in voltage.Very few hobbyists bother making mains powered SMPSes because they're difficult to build, can be dangerous if designed or assembled incorrectly and cheap off the shelf units are readily available.

author: Rutger
author_rank: Regular Contributor
timestamp: March 26, 2011, 05:04:58 pm
content: I though I did, but here is my specific spec:Input: 85V - 260V ACOutput: 12V DC, 0.5 ARutger

author: Simon
author_rank: Unknown
timestamp: March 26, 2011, 05:13:06 pm
content: why do you have such a wide input voltage requirement ? if this is a basic power circuit for hobby needs can't you assume that the mains is 230 V +/-10% ? that way you use a transformer to get a reasonable input voltage and the use the DC/DC converter

author: Rutger
author_rank: Regular Contributor
timestamp: March 26, 2011, 05:13:17 pm
content: Thanks Hero999, I understand there are units available, but I am looking at a bigger project/possibly commercial were there are other components that I want to put on one board, I could possibly put 2 boards in one box, but I rather keep it all on one.What do you think about the LNK302D chip from powerint.com (see previous post for link).Rutger

author: Simon
author_rank: Unknown
timestamp: March 26, 2011, 05:20:21 pm
content: interesting looking chip, I'm unclear as to why there are so many source pins but only 1 drain pin. If they provide all the building information on the datasheet and it meets your requirements go for it. usually non isolated supplies are not liked due to the potential shock hazard. If your building something commercial it might pay off to buy premade units that meet your rerquirements and insert it alongside your own board avoiding some EMC issues and having your own board having to cope with mains voltages

author: Rutger
author_rank: Regular Contributor
timestamp: March 26, 2011, 05:22:18 pm
content: Hi Simon, sorry that I did not explain this from the start, but I am researching a possible application where this application can be used world-wide, but thought this could also be of interest to other users as well. I am based in the US right now but have a world wide customer base. I am actually in the coffee business and sell parts for commercial espresso machines. If people are interested I can expand on the project more.

author: Simon
author_rank: Unknown
timestamp: March 26, 2011, 05:26:51 pm
content: We are always interesting in what people are up to. Yes in your case you do need the wide input range and it looks like that is what chip was designed for. If it meets your needs go for it. The easiest way to use an IC is follow the manufacturers recomendations

author: Rutger
author_rank: Regular Contributor
timestamp: March 26, 2011, 05:36:14 pm
content: Ok, so the project I am thinking about is to make what is called a 'level control board'.It does a couple of small important things:1) Control the water level in the steam boiler of an espresso machine, by opening a fill valve and activating a water pump2) Protecting the heating element from being exposed to air via a low water level probe in some machines.The manufacturer right now of these control boards make a different flavor for each machine, not just a 110V version and 220V version, but I am talking about at least 2 dozen different versions, its crazy! So I want to make one that is universal! if it can be done without costing to much.Rutger

author: Simon
author_rank: Unknown
timestamp: March 26, 2011, 05:45:08 pm
content: well mass production is your key to cheaper production costs. But what current requirement do you have ? that part you found won't produce high currents.

author: Zero999
author_rank: Super Contributor
timestamp: March 26, 2011, 06:06:27 pm
content: Quote from: Rutger on March 26, 2011, 05:13:17 pmYou can buy open frame PSUs which are just a circuit board with mounting holes.For 12V at 500mA though, just buy a plug-top mains adaptor. You can even get them with different plugs so all the user needs to do is fit the one appropriate for their location.QuoteThe maximum output current is only 120mA, you need 500mA.The circuit on the datasheet doesn't have any galvanic isolation so you have to treat the 12V side with the same precautions as the AC side which means your circuit could electrocute someone, if not assembled correctly. It also means you can't connect it to any external circuits without using some form of galvanic isolation.http://bbs.dianyuan.com/bbs/u/24/1102589586.pdf

author: Rutger
author_rank: Regular Contributor
timestamp: March 26, 2011, 06:08:02 pm
content: yes, the power supply is there to supply the circuit to power the level sensors and to power either triacs or small relays in the range of 10A. What is your thoughts on relays versus triacs to switch on valve coils and turn on pump motors.

author: Rutger
author_rank: Regular Contributor
timestamp: March 26, 2011, 06:22:02 pm
content: Actually I am just guessing the power requirements, I think I need much less. All I have to power is to activate 2 relays at the same time at probably 50ma max each and the circuit to measure 2 level probes, I guess this won't me much more than 30 ma, so 120ma might work fine. If my design would use triacs the power consumption would be less. Do you have any suggestion on how to add the extra isolation from the high voltage? I don't want to shock anyone!RutgerPS: I have looked at the open frame PSU and they all are so big! I really need a very small board, probably no bigger than 5 x 5 cm (2"x2")

author: Simon
author_rank: Unknown
timestamp: March 26, 2011, 06:26:38 pm
content: you need to acertain exactly what your amperage requirement is as otherwise you won't be able to select appropriate parts. SRC's will use less power than relays but are DC devices, you could use a triac I think, I'm no expert in these two though

author: deephaven
author_rank: Frequent Contributor
timestamp: March 26, 2011, 06:33:23 pm
content: How about something like this:http://www.xppower.com/pdfs/SF_ECL05-30.pdfI would highly recommend using a module/circuit board like this as there is an enormous amount of saftey and EMC requirements to deal with, and these boards have already gone though those approval processes.

author: Zero999
author_rank: Super Contributor
timestamp: March 26, 2011, 06:39:46 pm
content: Quote from: Rutger on March 26, 2011, 06:22:02 pmPlease post a schematic.The kind of questions you're asking indicate a lack of experience required to build a safe mains powered project. I can see sparks flying and someone getting hurt/killed.

author: Rutger
author_rank: Regular Contributor
timestamp: March 26, 2011, 11:42:39 pm
content: Hi, it is true that I have no experience with switches power supplies, but I have experience with regular power supplies.I understand the safety concerns, but I am going by the design examples of the chip, nothing exotic here.The schematic are online at the following link:http://www.powerint.com/sites/default/files/product-docs/lnk302_304-306.pdfRutger

author: Simon
author_rank: Unknown
timestamp: March 27, 2011, 07:20:04 am
content: and are you sure that your circuit only needs 225mA ?

author: Psi
author_rank: Super Contributor
timestamp: March 27, 2011, 09:46:42 am
content: Quote from: Simon on March 26, 2011, 05:20:21 pmmy guess would be the source pins provide the best connection to the substrate, so for heatsinking to the pcb they've brought out extra source pins.

author: Simon
author_rank: Unknown
timestamp: March 27, 2011, 09:59:49 am
content: Yes that makes sense. I thought initialy this was a more powerful IC and that paralleled pins would be required to cope with the amperage but for a couple of hundred milliamps it's explained

author: ShiftPlusOne
author_rank: Regular Contributor
timestamp: March 27, 2011, 10:00:55 am
content: Why are those XP Power all-in-one power supplies so expensive when compared to AC adapters?

author: deephaven
author_rank: Frequent Contributor
timestamp: March 27, 2011, 02:06:58 pm
content: Quote from: ShiftPlusOne on March 27, 2011, 10:00:55 amProbably mostly due to the volume they are made in.

author: Rutger
author_rank: Regular Contributor
timestamp: March 27, 2011, 03:27:28 pm
content: I will build a prototype first of the actual level control circuit and measure the max current draw so that I can actually know which exact power supply I will need. Is there a rule of thumb to add an additional percentage to the outcome of the result, so lets say my max current is 150 mA, would you recommend at least 165mA (10%) for a supply?

author: Simon
author_rank: Unknown
timestamp: March 27, 2011, 03:31:48 pm
content: yes that's a good idea that way you know just how much power you need. um +10% ? at lower powers I'd be inclided to add a generous 100mA but that's just me if it was say 165mA I'd at least round it up to 200mA

author: ShiftPlusOne
author_rank: Regular Contributor
timestamp: March 27, 2011, 03:37:25 pm
content: Quote from: deephaven on March 27, 2011, 02:06:58 pmOk, thanks.

author: Rutger
author_rank: Regular Contributor
timestamp: March 27, 2011, 05:33:46 pm
content: This might be a silly suggestion but could I not just use a linear transformer that is rated from 220V to 20V 60hz, a rectifier etc and then use a MC7812 fixed voltage chip? In the 220V line voltage case it works with a higher voltage drop across the 7812 and in a 110V supply it should have enough input voltage. My application doesn't need very much power so I don't think a need a heat sink for the 7812.According the datasheet the 7812 can take up to 35V input.Rutger

author: Simon
author_rank: Unknown
timestamp: March 27, 2011, 05:37:09 pm
content: it's possible, I'm not sure of how a transformer copes with different voltage ranges. But I'm sure you can get similar power transformers of a similar size with different in/out voltages so all you need to do is change the transformer for different areas, maybe keep it in 2-3 main ranges

author: deephaven
author_rank: Frequent Contributor
timestamp: March 27, 2011, 07:51:48 pm
content: Quote from: Rutger on March 27, 2011, 05:33:46 pmUnless you did what Simon suggested, what you're suggesting isn't practical. If you are designing it for 0.5A, and you are using a linear regulator, you will nead a heatsink even if it's for a single supply voltage.If you want to do it yourself, I would suggest a mains transformer with a tapped 110/220 volt primary and use (for example) a National Semiconductor "Simple Switcher" IC which probably won't need a heat sink if your layout is carefully designed. Their website has a good interactive utility where it will design you a suitable circuit and give you heat analysis etc.

author: Zero999
author_rank: Super Contributor
timestamp: March 27, 2011, 09:04:03 pm
content: Quote from: ShiftPlusOne on March 27, 2011, 10:00:55 amThey're better much better quality: lower ripple, higher efficiency, better power factor, hight MTBF, wider temperature range and how many cheap AC adaptors come with a three year warranty?

author: Rutger
author_rank: Regular Contributor
timestamp: March 28, 2011, 11:40:38 pm
content: QuoteThanks deephaven for the tip, the National Semiconductor IC & website is much more helpfull than the powerint website, the powerint have software you can download but the solution uses exotic part(s) that are hard or impossible to get. I like the National Semiconductor much better and their web interface to design a circuit is really cool.Rutger

author: saturation
author_rank: Super Contributor
timestamp: March 29, 2011, 11:06:55 am
content: Have you thought about just reclaiming a lot of discarded cellphone chargers and use those PSUs? Many are in the trash, I have buckets of them in reserve for miscellaneous projects, and most are free [ I use a lot of trash electronics as a parts source.]They are switchers, compact, small and can deliver your rated amperage. However, most are from 100Vac-240Vac. FYI, by power quality definitions, AC can only deviate +/- 10% before line power is defined as unreliable, in fact most AC power line regulators will shut down if AC drops below 100V or exceed 260V if your official line voltage is 110V to 240V.Quote from: Rutger on March 26, 2011, 05:04:58 pm

author: Rutger
author_rank: Regular Contributor
timestamp: March 29, 2011, 03:13:42 pm
content: Thanks saturation, no I didn't think of that, that is a great idea!I can live with the 100V-240V restriction, but I would like to get a lot of the same ones, do you know of a source for these units like a recycle place here in the US?Rutger

author: Zero999
author_rank: Super Contributor
timestamp: March 29, 2011, 05:30:45 pm
content: Here's the kind of thing I'm talking about.Phihong PSM11R-120-RInput 90V to 264VACOutput 12V 840mAComes with a selection of plugs.Link to RS:http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=0234193#headerYou can get similar mains adaptors for more (higher quality) or much cheaper (ebay or buying direct form China).

author: saturation
author_rank: Super Contributor
timestamp: March 29, 2011, 06:56:50 pm
content: I know a number of recycling locations for drop off, but I don't know if you can take some from their collection boxes. Often, your friends or family will have bunches of these, often ending in the trash. If you put a notice out in your school or work, you could have a lifetime's worth is a few days.One source I use are no-name Chinese adapters, I get them for $1-2, shippingincluded. You can cannibalize the electronics and embellish it, rather than building a small switcher from scratch. Many of these units are screwed together rather than glued, making it easier to gut. Here's just an example:http://cgi.ebay.com/New-AC-DC-Wall-Adapter-Charger-Plug-110-240V-t-12V-9989-/270583093649?pt=Other_MP3_Player_Accessories&hash=item3f00025991I often can find them still cheaper than this, just make sure the Vin and Vout and amps are what you need.Quote from: Rutger on March 29, 2011, 03:13:42 pm

author: ShiftPlusOne
author_rank: Regular Contributor
timestamp: March 29, 2011, 10:11:28 pm
content: Another noob question... what's wrong with just a simple transformer -> full wave rectifier -> capacitor-> voltage regulator circuit?

author: Zero999
author_rank: Super Contributor
timestamp: March 29, 2011, 10:22:04 pm
content: Quote from: ShiftPlusOne on March 29, 2011, 10:11:28 pmApart from being heavier and less efficient than an SMPS, the voltage needs to be manually set by flipping a switch or configuring jumpers. An SMPS can run from a wide range of voltages and give a constant output voltage.

author: ShiftPlusOne
author_rank: Regular Contributor
timestamp: March 29, 2011, 11:04:16 pm
content: Quote from: Hero999 on March 29, 2011, 10:22:04 pmOk, thanks. Looks like I have some learning to do.

author: saturation
author_rank: Super Contributor
timestamp: March 30, 2011, 12:50:48 pm
content: Linear supplies can be adjusted with external controls, e.g. using an adjustable linear regulator, they still make lab grade linear supplies because they do have cleaner output.But the real reason linear PSU are used less is because they are inefficient, and thus, waste power in many ways. This adds up, and there is a worldwide movement to reduce the quiescent drain of consumer PSUs. SMPS are noisy but efficient, and many devices are designed to suppress or can live with the noise. Linear supply losses occur from the small quiescent current leaked by the regulator, heating from various sense resistors and eddy currents in transformers etc., so even when not used, linear supplies draw a higher quiescent current when unused, but powered ON, so current flows in the primary coils.Quote from: Hero999 on March 29, 2011, 10:22:04 pm

author: ShiftPlusOne
author_rank: Regular Contributor
timestamp: March 30, 2011, 12:56:25 pm
content: But for a uni project or diy bench equipment that's not really a problem though, right?Also, I have a question about safety when working with 240V. At which point does it become 'safe' on the circuit. Simply going through a transformer will still leave a potentially high current source, right? So is it only after the regulator that it's safe? In general, what sort of precautions should I follow in terms of design? I've been staying away from 240V, but I'd like to start work on something that doesn't require a wall wort.I hope I am not hijacking the thread >.>

author: saturation
author_rank: Super Contributor
timestamp: March 30, 2011, 03:21:18 pm
content: Yes, a small linear is easier to build for uni use and that its still sold to labs because its reduced noise, relative to SMPS, is hard to beat.If you design power supplies, you'll be exposed to both high and low voltage, at the primary and secondary side of the transformer.To simplify things, you need to pay a great deal of precaution when voltage exceed 30Vdc or AC peak. The definition varies, but the low end is debatable, some feel its as low as 6Vrms in humid conditions. Some DMM will flash a warning sign when the voltage being measured exceeds the 'low voltage' area.http://en.wikipedia.org/wiki/Low_voltagehttp://en.wikipedia.org/wiki/Electrical_shockQuote from: ShiftPlusOne on March 30, 2011, 12:56:25 pm

author: ShiftPlusOne
author_rank: Regular Contributor
timestamp: March 30, 2011, 04:32:21 pm
content: Quote from: saturation on March 30, 2011, 03:21:18 pmCorrect me if I am wrong here...Based on the Wikipedia article, if you have a 240V source attached to a 1/20 transformer, the LV side of the transformer is actually safe to touch since the current would be about 6-12mA which is enough to feel, but not enough to kill. So, what you really have to worry about is just the live mains wires and the possibility of shorting them to something you might touch, but anything after the voltage has been stepped down is actually safe?

author: Zero999
author_rank: Super Contributor
timestamp: March 30, 2011, 06:10:25 pm
content: Quote from: saturation on March 30, 2011, 12:50:48 pmThat's possible with both switch mode and linear power supplies.QuoteMains powered SMPSes leak more current from the mains side to the DC side or earth than linear supplies because of the Y capacitors.Switched mode lab quality power supplies use a linear regulator after the SMPS to clean up the ripple.Quote from: ShiftPlusOne on March 30, 2011, 04:32:21 pmI doubt you'll get as much as 6 to 12mA through you from a 12V transformer, you'll probably get less than 1mA which you won't feel. The article gives the internal resistance of the human body, once the impedance of dry skin is added into the equation the resistance can be over 1M.There's no definite safe voltage. It's current which kills not voltage but due to Ohm's law current can't flow without voltage. The lethal current will depend on its path through the body, the age, gender, size and health of the person and whether it's AC or DC. Mains frequency AC is more dangerous than DC but the risk of shock diminishes as the frequency increases as the nerves don't respond to higher frequencies so well. Above around 20kHz the shock risk diminishes altogether but high currents can still cause death and severe injuries through deep burns caused by heating (Ohm's law P = I2R). The lethal voltage is also determined on the resistance of the human body and skin which dependant on the thickness of the skin and the moisture.Standards vary from jurisdiction to jurisdiction. Here in the UK, appliances run from an isolated supply (isolating transformer, battery, or SMPS with the secondary not connected to the mains or earth) with a voltage under 120VDC or 50VAC don't need to be earthed, this is known as class 3 protection by SELV (Separated (i.e. not directly connected to earth or the mains), Extra, Low, Voltage). In dry conditions voltages below 60VDC or 25VAC don't need to be insulated from the user. In other conditions (i.e. outdoors) the voltages are halved to 30VDC and 12VAC. As you can see, the safe AC voltages are lower because mains frequency AC presents a greater shock hazard than steady DC.Another thing which protects you from shock is the fact that the secondary side of the transformer is not connected to earth so you need to touch both wires in order for current to flow through your body. It wouldn't matter if the secondary voltage of the transformer was 230V (i.e. an isolation transformer) you still wouldn't receive a shock unless you touch both wires, assuming of course the insulation between the primary and secondary is good enough (it will be) and one of the wires hasn't become connected to earth (which won't happen if you build it in a plastic enclosure and don't have an earth wire).

author: ShiftPlusOne
author_rank: Regular Contributor
timestamp: March 30, 2011, 06:22:15 pm
content: Awesome, thanks.