0
\$\begingroup\$

As a continuation of my previous question about what type of part I'd need to control a circuit with a higher voltage, I put together schematics for what I hope would achieve what I am looking for without blowing things up, making use of a voltage regulator and a MOSFET now. However, as I am a beginner, I have questions (and my electrical English isn't the best, so I'm having a hard time understanding parts of the spec sheets):

EDIT

Updated version further down

Separate grounds

  • Is the step down converter hooked up correctly? No, and I could have seen that from the examples in the spec sheet

  • Did I understand the MOSFET right? Right now I assume that the drain (lamp) will be connected to the source (USB plug) once the gate gets "triggered"/the GPIO is set to high

  • The ESP's documentation says to pull down GPIO0 if you want to flash it and otherwise up; Did I implement that right? I am not sure if it is correct to pull it down without a resistor (I was using a resistor that was connected to either Vcc or GND in my tests, so I didn't have this problem) as this would technically be a short, right? But I would assume that if I added one there it had to be smaller than the R3/10k one to make the current "flow" into the right direction, correct? How would I determine that resistance?

  • And if I should use one, does that mean I should add one to the RST pin as well? And would it make a difference if it was before or behind the reset switch?

Furthermore, in my first approach I had a shared GND for the 3.3v and 5v lines like this:

enter image description here

I assume that would be wrong, but why? In my mind, where I'm still picturing current like water in a pipe (thanks to a friend who never gave up trying to explain electronics to me), the issue basically looks the same to me as using 5v for the input: The problem is too much current, it doesn't matter if it's "coming in" as 5v or "leaving" via the common GND (which, in my water analogy, would be overflowing a 3.3 liters drain by trying to flush through 5 liters --> overflowing water = heat/component's death). Is that (in a nutshell) more or less correct? Seems as if my guts told me to do it right the first time, but why do I need to have a common GND?

Small question to finish everything up: In my schematics, I've used red for Vcc, black for GND, orange for 5v and blue for "logic" related connections. Is that OK? Also, how do you correctly draw the crossed wires for the serial port? Anything else about the drawing in general? I want to get used to the correct conventions as early as possible.

EDIT

OK, thanks Peter Bennett, I could have spotted the issue with the capacitors if I paid more attention to the examples in the sheet:-/ I've incorporated that into the version with the common ground, so it looks like this now: enter image description here

Can anyone explain why the grounds have to be connected or maybe link one of the probably countless great answers that have very likely been posted here before? It feels wrong to me and would like to understand why it is necessary:-/

\$\endgroup\$
6
  • 1
    \$\begingroup\$ The two capacitors near U2 must be connected between the input pin of U2 and Ground, and between the output pin of U2 and Ground, not in series with the input and output as you have them as you have them. The 5 V and 3.3 V grounds MUST be connected together. \$\endgroup\$ Commented Feb 9, 2023 at 4:41
  • \$\begingroup\$ The source of Q1 needs to be connected to GND. \$\endgroup\$
    – PStechPaul
    Commented Feb 9, 2023 at 6:28
  • \$\begingroup\$ How would the lamp get 5v then? It is the only line carrying it \$\endgroup\$
    – klaasbob
    Commented Feb 9, 2023 at 6:42
  • \$\begingroup\$ Hi Klaasbob, some hopefully helpful advice. 1. Don't edit your question in response to comments unless you're adding clarifications. Right now it reads like you've answered some of your questions, added strike through to cross them off, and added additional questions. You should only edit the question insofar as adding detail that comments may have asked for. If you arrive at an answer on your own, you should post it as an answer below rather than editing the question. \$\endgroup\$
    – JYelton
    Commented Feb 9, 2023 at 17:20
  • \$\begingroup\$ 2. Your question is very difficult to read because you have so many questions in a single post. I understand that they are all related to the same project, but this format is not a good fit for the site. Questions here should ask a single answerable question that is as concise as possible. You're encouraged to post multiple questions all related to the same project, as long as they are about distinct aspects (not duplicates). This will help get you better answers, and faster. \$\endgroup\$
    – JYelton
    Commented Feb 9, 2023 at 17:22

1 Answer 1

0
\$\begingroup\$

OK, after thinking about all the feedback and receiving new information, coupled with some clarifications and helpful links from a coworker who is specialized in these things, i was able to realize the following things:

  1. I've made wrong assumptions about how this (the N channel variant, the P channel variant would have apparently done what i've expected) mosfet works; This link clarified it (and explained PStechPaul's answer) and also made me aware of the necessity of a gate transistor, this one made the difference super clear
  2. I've learned that just because a pin is not HIGH, it doesn't automatically imply that it's LOW (and the other way around); Do it like when coding Python: Be explicit, use a pullup/-down resistor

So with that new knowledge, I came up with the following schematic, which should incorporate everything=)

enter image description here

Also, thank you for your advice on the correct way on how to update/react the topics, I was afraid to open too many topics at once, but if it's encouraged to keep it clean (my preferred approach), i'll happily adhere in the future. Thanks to everyone who spend time thinking about this topic

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.