LTspice simulation of MC34063 regulator.  - Page 1
Forum section: electronics / beginners

author: humvivz
author_rank: Contributor
timestamp: August 07, 2013, 11:35:55 am
content: I fail to run the simulation.Diode data is not involved in lib and how can i solve this problem?Please do guide me. Thank you!

author: Psi
author_rank: Super Contributor
timestamp: August 07, 2013, 12:01:52 pm
content: Is your voltage source even grounded?I did have problems opening the file due to missing pot and IC components, so it may actually be correct.But for me the voltage source has no ground in your circuit.I'm also not sure about your switch/relay, can you use it like that without any of the control wires connected?

author: humvivz
author_rank: Contributor
timestamp: August 07, 2013, 12:36:32 pm
content: I did the mistakes. My voltage is not grounded but now i have corrected it.This is really my circuit. I am very sorry for the inconvenience.I get the MC34063 circuit from LTspice yahoo group. But k cant run the simulation though.Please guide me and i really need your advice

author: c4757p
author_rank: Super Contributor
timestamp: August 07, 2013, 12:37:13 pm
content: Please attach the MC34063 model file you have, I think it might have pins swapped (4 and 5).Here's how I got your file to work, with what you've given me:- Put in my own MC34063 model because yours is missing; swap pins 4 and 5.- Replace the potentiometer with two resistors (I don't have that model either)- Replace D2 with one I have a model for (1N4007)- Remove the TVS diode that you've named "K" for some reason...- Remove and bypass S1 which has not been connected or given a model.- Remove D3.- Remove V2.Now it works.Remember that the "value" field actually means something to SPICE. You can't just go sticking in things like "zener diode" and "A". Also, V2, a zero-volt voltage source, is a dead short on the output.It might make your schematic a bit cleaner, too, if you leave out things that don't affect the simulation. That TVS diode, D2, C1 and C2, D4...

author: humvivz
author_rank: Contributor
timestamp: August 07, 2013, 02:02:10 pm
content: Hello. Thanks for your advices. May you do a favor for me?I think i need your MC34063 model. Can you attach it to me? Thanks a lot.By the way, this is the link of the project.http://electronics-diy.com/schematics/ipod_charger.htmThose C1 or diodes have their own role in this project. And the voltage output should be 5V.Anyway,thanks a lot

author: humvivz
author_rank: Contributor
timestamp: August 07, 2013, 02:09:13 pm
content: This is MC34063 model.

author: c4757p
author_rank: Super Contributor
timestamp: August 07, 2013, 02:17:25 pm
content: That's just the symbol... You need the model file as well!! Here, I attached mine. Just take the .txt extension off.OK, the pins are fine, they just moved them graphically in the symbol.

author: humvivz
author_rank: Contributor
timestamp: August 07, 2013, 02:29:43 pm
content: I am very sorry that i have no idea to off the txt extension.Please attach the model with zip file. Really need your help. Thanks a lot.

author: humvivz
author_rank: Contributor
timestamp: August 07, 2013, 02:35:05 pm
content: Yahoo! I have removed the txt extension. Should i put the file into 'sub'?But when i pick out MC34063, it is not considered as SPICE???

author: c4757p
author_rank: Super Contributor
timestamp: August 07, 2013, 02:46:14 pm
content: Quote from: humvivz on August 07, 2013, 02:35:05 pmYes.QuoteI don't really know what that means.

author: humvivz
author_rank: Contributor
timestamp: August 07, 2013, 03:06:01 pm
content: ??

author: c4757p
author_rank: Super Contributor
timestamp: August 07, 2013, 03:09:32 pm
content: I can't help you unless you can explain yourself more clearly. Shitting out a pile of question marks doesn't help me. What do you mean by "not considered as SPICE"? I assure you it is...

author: humvivz
author_rank: Contributor
timestamp: August 07, 2013, 03:13:26 pm
content: I am sorry for the inconvenience.I think i need a sub file of MC34063.Do you mind to upload the sub file again by using zip?Thanks again and sorry again.

author: c4757p
author_rank: Super Contributor
timestamp: August 07, 2013, 03:20:32 pm
content: I just re-downloaded the file and did a byte-for-byte compare with the original file on my hard disk that I use all the time and it matches. Itisthe sub file. Just needs to be renamed!Here it is, though....

author: c4757p
author_rank: Super Contributor
timestamp: August 07, 2013, 03:35:00 pm
content: Make sure all the files are where LTspice can see them. Easiest place is where it keeps its own files. Then you should be able to just plunk down the schematic symbol and use it directly. Looks like there aren't any naming differences or anything between your symbol and my model, so it should work without modificationAnd you really need to brush up on computer skills like that...... Changing an extension is just basic renaming. If your system is set to hide extensions,fix that shit now, it's a recipe for virus problems anyway.Once you've done that, just grab the file, hit F2 (or right-click, Rename) and lop off the .txt!

author: humvivz
author_rank: Contributor
timestamp: August 07, 2013, 03:48:47 pm
content: Thanks you very much.yes. You are right. I really need to sharpen my computer skill ^^I am not purposely putting the question marks and emoticons. There are some mistakes and i feel shocked about it too. Sorry.By the way, I have uploaded screenshot. The problems that make me fail to run simulation.Please do guide me. Thank you and sorry

author: c4757p
author_rank: Super Contributor
timestamp: August 07, 2013, 03:58:44 pm
content: Hehe... sorry for being a bit grouchy there.... but maybe you should stop letting your cat walk on your keyboard!OK. Well, you're going to have to address all the problems I listed above. Right now it's bitching about the potentiometer, because you don't have the model for it installed (or loaded). Just replace it with a pair of resistors.After that, it'll pitch a fit about D2 (because it doesn't have a model for 1N5404), the TVS diode that you've labeled "K", S1 (because first, there's nothing connected to the control terminals, and second, it doesn't have a model specified), and D3 (because "zener diode" isn't a proper value). Just take those out and get the circuit working, you can add them back in later.Then, once it starts simulating, it won't workwell, because V2 is a short circuit across the output. (It's a 0V voltage source.) Remove it.When it first starts running, it might get stuck (giving the messages "Stepping Source" and "Damped Pseudo-Transient Analysis" in the status bar). You don't have to wait for those to complete, just bang on Esc a few times. (Three times IIRC)

author: humvivz
author_rank: Contributor
timestamp: August 07, 2013, 04:03:42 pm
content: Actually that's a dog. haha. Just kidding. The truth is i set chinese language as priority language and that's why it turns out like this. When i preview it, it looks normal but errr....it turns out in other way haha..By the way, really thanks for your patience.Wish you have a nice day !

author: c4757p
author_rank: Super Contributor
timestamp: August 07, 2013, 04:07:37 pm
content: Ah. I understand now. This forum has a problem with international characters. Worse, it shows them correctly in the previewHint: You might get more sympathy for language issues if you set your home country in your profile so we can see it.

author: humvivz
author_rank: Contributor
timestamp: August 07, 2013, 04:14:31 pm
content: I follow your advice and make some changes. But there are still some mistakes here.Regarding to the language issue, err...that's my mistake haha..I should be more careful. Anyway, thanks for advice.

author: c4757p
author_rank: Super Contributor
timestamp: August 07, 2013, 04:17:57 pm
content: Either MC34063.sub is installed into the wrong place, or you forgot to close and reopen LTspice after installing it.

author: humvivz
author_rank: Contributor
timestamp: August 07, 2013, 04:25:28 pm
content: I reopen LT-spice more than one time.And i have checked both files names either in sub or asy. They are the same.As i right click the MC34063, it turns out like this.(file 66)

author: c4757p
author_rank: Super Contributor
timestamp: August 07, 2013, 04:38:33 pm
content: Ah.... that asy file is missing its model file declaration.Here, I fixed it, install this.

author: humvivz
author_rank: Contributor
timestamp: August 07, 2013, 04:59:22 pm
content: Yahoo..finally the simulation can be run now!Unfortunately, the output voltage is only 2.1VThese are my sub and asy file of potentiometer. Can you help me to check? Thank you!The output voltage must be 5V. because generally mp3 charger only requires 5V.Then i think maybe potentiometer can help me to get 5V.

author: c4757p
author_rank: Super Contributor
timestamp: August 07, 2013, 05:04:04 pm
content: Tear out R8. Change R4 to 3k and R6 to 1k. If you don't have a 3k resistor, use 10k and 3.3k instead of 3k and 1k. Thendo some reading. MC34063 expects to see 1.25V on the feedback pin when the output voltage is correct.

author: humvivz
author_rank: Contributor
timestamp: August 07, 2013, 05:13:46 pm
content: Yeah!!!!! finally!Thank you so muchBy the way, what does it mean that MC34063 will give me feedback? Is it i have to put the probe on pin(gnd)?Really thank you!

author: c4757p
author_rank: Super Contributor
timestamp: August 07, 2013, 05:18:35 pm
content: The MC34063 will back off the output when the voltage at the Cinv pin hits 1.25V. You set the output voltage by using a voltage divider chosen so that when the output is what you want, the Cinv pin sees 1.25V and the MC34063 stops increasing the voltage.

author: humvivz
author_rank: Contributor
timestamp: August 07, 2013, 05:32:14 pm
content: i got it!it means Cinv pin acts as sensor,which instructs the MC34063 to continue increase the voltage or stop increase it until i gain the desired output voltage.Can i ask one more question?I have to design a 220uH inductor. I know i need datasheet of the iron core to determine how many turns of the coil? Anything else i should consider?By the way, thank you

author: c4757p
author_rank: Super Contributor
timestamp: August 07, 2013, 05:36:43 pm
content: I'm sure there is, but magnetics really isn't my thing, hopefully someone else can answer that! I usually just throw some wire on a core until the LCR meter reads 220uH...

author: humvivz
author_rank: Contributor
timestamp: August 07, 2013, 05:39:35 pm
content: Good idea!!Anyways, Thank you c4757p ^^I need to sleep now.Good bye. And wish you have a great day! Thanks again