Circuit Design

The AC in would be just some sort of connector in KiCad.

For the transformer, you can combine a generic symbol for a transformer, with a suitable footprint for an existing transformer. There are some 50+ transformer footprints in KiCad, and the footprint has to match with the actual transformer you want to use. The procedure is very similar to generic parts such as capacitors and resistors. KiCad only has a few schematic symbols for resistors, but there are many sizes of real world resistors. From small SMT resistors to big power resistors.

Also, is this a circuit for which you really want to make a PCB, or is it mostly for practicing with KiCad? Making such a power supply is a bit unusual these days. You can buy a ready made 5V USB power supply for less then the parts cost to make one yourself.

You can buy a wall wart for around $5US and probably not electrocute yourself in the process. I personally don’t see how you could do it better or cheaper yourself. If you want to learn electronics, this is not the place to start.

I’m not gonna close the thread, yet, but 230V mains and you have no idea even how to source the parts?

1 Like

Sounds much like a school spice assignment so we can do the homework. Seen these come up before.

And that pcb has two transformers, additional parts, and might even be a switcher.

Inexperienced folks messing with mains voltage, is, well, really just part of the natural selection process :slight_smile:

Yeah that looks like a switcher, probably puts out more current than the 7805, and it doesn’t look like it came from a phone charger. Anyway out of scope for KiCad forum.

My thoughts exactly, and I design switchers. Mains frequency (50/60 Hz) transformer-based power supplies are 98% obsolete. There may be some for cordless phone chargers for example.

My understanding is that wireless chargers don’t operate at 50/60 Hz but at 100 kHz and above.

But wireless chargers, if implemented incorrectly, are likely to behave as chargeless wirers. Those are most likely to operate at 0 Hz.

I hope the factory workers who sloppily sloshed all that hot glue around the board are not the same ones doing PCB assembly. :rofl:

I am EE intern, and I am attempting to design a circuit capable of converting a 120V AC input to a 3.3V DC output. The main challenge I’m encountering in KiCad is selecting the appropriate transformer for stepping down the voltage, after that I will implement a bridge rectifier to convert AC to DC, and integrating a voltage regulator to ensure the output does not exceed 3.3V.

So your story has changed? First it was 230VAC to 5VDC and for a mobile phone. Now it’s 120VAC to 3.3VDC? In any case it’s electronic design and very little to do with KiCad. This forum is about designing PCBs using KiCad.

You have a problems with it because KiCad is not the tool to select elements (including transformers). You should check the distributors offer of transformers and select one. Then in KiCad you can make/select appropriate symbol for it and make/select appropriate footprint for it.

Today supplies are made differently. You first rectify AC to DC (1000V diodes are one of the cheapest) and then you do DC/DC converter with little (cheap) transformer. Recently I have bought 3 LED lamp supplies (AC230V → DC12V, 24W) for $3 each.

1 Like

I think you are referring to Darwinian selection principles. Like the kid I saw years ago riding his bicycle, with two hands + 2 eyes on his phone and 0 hands on the handlebars.

SERIOUSLY: I have designed AC/DC switchers. Handling mains voltage is not for people who do not know what they are doing.

Well ok, if you really want to play with a circuit like this, here’s what I would do:

Get an ac-to-ac (not ac-to-dc) wall wart, like perhaps this one:
A 9VAC wall wart
This isolates and steps down the mains so you don’t get electrocuted, and this one puts out about 9VAC which I presume is rms (have not used a power transformer for decades). 9VACrms times square-root-of-two is a peak voltage of about 12.7 VDC – the bridge will full-wave rectify this and
you lose two diode voltage drops, then the first bulk filter cap after the bridge will smooth out the unregulated voltage to about 12.7-1.4 – let’s say about 11-ish VDC (unloaded).

So now you have about 11VDC to regulate down. The ancient lm7805 will get you down to 5V but there is a lot of loss as heat so you can’t draw too much current before the regulator get hot. Let’s say you load the 5V output with 50-ohms for 100mA of load current. The regulator has a drop of 11-5 = 6V across it, times 100mA is 0.6 watts of waste heat. This is not too bad for a TO-220 package, and a little clip-on heatsink helps, but you won’t want to draw 1 amp out of the regulator or it will dissipate 6 watts!

A better way to drop down to 5V is a buck switching regulator which is quite efficient (not much waste heat), and if you want to spend time learning electronics it is an interesting little circuit. You can design them with separate parts, or simply get one in a tidy little package like this:
buck reg in a box

Then add a little 3.3V low-drop-out (LDO) linear regulator like a TC1015-3.3 to get down to 3.3V

Don’t forget input and output caps on the regulators – read the data sheet.

Look guys, I come on this forum looking for help on how to use kicad. I dont care about how dangerous this is. I am just asking how to build this circuit in kicad and run some simulation to see how the circuit behaves when I change values. I just want to learn how to use the tool .

If you guys really don’t wanna help and just roast me, fine :frowning: but atleast point me in the right direction for some documentation on how to change the parameters in the components so i can run simulations.

I am not asking for help on selecting the parts from distributors or how to engineer this pcb. I just want to recreate in Kidcad. Jeez

You first post didn’t give that impression at all. It set the tone for the rest of the conversation.

This is the first time you have mentioned simulation . . . look here for some good information:

1 Like

And this should help you with most of the rest of the information you need: https://docs.kicad.org/ :slightly_smiling_face:

1 Like

Well when you start out without describing things better, it sounds a lot like spam bot posts which are getting more prevalent here lately. It’s not that we want to roast you.

As Hermit pointed out, ac mains are not to be toyed with, and we discourage putting mains on a pcb (unless that is your job and you know what you are doing and following regulations for creepage/clearance and all that). I have been an EE for four decades and mains voltage is something I avoid unless I am wiring a circuit breaker panel.

However, if you want to simulate it that is pretty safe :slight_smile: You didn’t mention that up front. So the transformer in spice just needs the proper turns ratio. If you want 120VACrms in, and 12VACrms out, it is a 10:1 ratio, or for 9VACrms out a 13:1 ratio. Spice models for diodes and caps are standard. There are likely regulator models, I don’t know the details. Simulate varying load current and bulk cap affects the peaks and valleys of the Vunreg. You need a 60Hz 120VACrms (not peak or pp) sinusoidal source, transient simulation for a few hundred milliseconds (at 60 Hz each half cycle of the full-wave-rectified signal is 8.3ms). Then add a regulator. Maybe start with a resistor/zener as a reg. Then add an emitter-follower to buffer the zener…

Oh, and kinda late but welcome to the kicad forum!

1 Like

At first you have written:

Design for all of us means draw schematic and then design PCB. (KiCad is PCB design software).
Run circuit means have it done and power it. Simulation is not running circuit. It is only simulating circuit.

You clearly say here that goal is PCB. Designed and then etched (or ordered) PCB.
No doubts at this point about what you are planning to do.

So you are searching for transformer. Not simulation model but real transformer.

KiCad is a tool to design PCBs. So using KiCad is understood as designing PCB.
Simulation is only additional feature.
If you don’t care how dangerous it is it is your business. But every responsible person seeing that someone is trying to harm themselves tries to prevent it. And it looks like you suddenly have a grudge for people trying to protect you.

Here you mentioned simulation for the first time. But still you don’t say of drawing schematic and simulating it, but about building circuit and then simulating it.
You have to draw schematic. It is obvious. But then you want to build circuit as you write or only simulate it.
Should we trust what you write or assume that you are imprecise?
It sounds like you’re offended that people trust what you write.

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.