Assistance with power circuit

I have the following circuit that for now appears to work. I put it together by copying bits off of other circuits and so I am not too confident that it is correct. Could someone please take a look at it for me and comment on any changes that I might need to make or to point me in the correct direction? Thanks.

What exactly do you want the circuit to do?

Paul

Your schematic is not in a good format. Normal practice for signal flow is top left in to bottom right out. What I can guess is the ESP-015 takes a WiFi signal and when it gets the correct data it operates the buzzer. The USB connector is for power. I assume the button sends a WiFi signal out via the ESP-015. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

Check that the current needed by the buzzer matches the ESP-01S pins (12mA).
If not, add a transistor with base resistor to power it.
A fly back diode for the buzzer may also be a good idea.

As I point out in this thread, you must not connect anything to IO0 or IO2 which will pull them down when booting.

This means that if you can ensure your switch will never be closed when power is applied, it will be OK, but the buzzer - if it draws less than 12 mA - should be connected between the IO pin and 3.3 V, not ground.

If it draws more than 12 mA, then you must use a PNP transistor, not an NPN, to control it as the base resistor of a NPN would be pulling the IO to near ground.

Thanks All for your patient input. As you will have realised I am pretty new as this level of schematics (and electronics). I used to use the Frizting breadboard diagram but it was pointed out that that also was not great so I tried the schematic above. Looks like I may need to find a course somewhere to show me how to do this correctly.

The pointers on the buzzer are really helpful.

Thanks again.

Paul__B:
This means that if you can ensure your switch will never be closed when power is applied, it will be OK, but the buzzer - if it draws less than 12 mA - should be connected between the IO pin and 3.3 V, not ground.

Just checking that I am understanding correctly. I can connect to IOO or IO2 as long as the buzzer is connected across 3.3V and if drawing more than 12mA (in this case the buzzer draws 15mA) I must use a NPN transistor?

Zululander:
Just checking that I am understanding correctly. I can connect to IOO or IO2 as long as the buzzer is connected across 3.3V and if drawing more than 12mA (in this case the buzzer draws 15mA) I must use a NPN transistor?

Not sure if you are at all!

15 mA is more than 12 mA so you need a transistor, but just about any general-purpose transistor will do.

A NPN transistor has its emitter connected to ground, so the base resistor would be pulling the IO to ground, exactly the wrong thing to do. You need a PNP transistor.
HighSide01.png
The resistor now pulls the IO pin up to at least 2.8 V.

HighSide01.png

Paul__B:
Not sure if you are at all!

Aagh I meant PNP transistor but the updated diagram that I had drawn for myself was wrong; thanks for the schematic.