Hi everyone!

I’m trying to control a “dumb” led light strip segment with an ESP-01S. This is fairly low current, the strip will pull 150mA-200mA max (depends on… artistic? needs).

I have two NPN transistors (2N2222), one to control the 12V supply to the white “channel” and the other the red+blue (don’t need the green).

I had to pull-down the gates as I had some flickering, and it works perfectly if I manually connect the GPIOs after the ESP-01S boots.

The ESP will boot if I have the RX pin (GPIO03) pulled down on boot, but not if I pull down any of the others.

I’m not smart enough to come up with a way to have that extra pin I need to be high only during boot, while the gate it’s attached to needs to be pulled down…

Any thought, other than getting something with more IO pins?

    • ByteJunk@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      Im sorry, noob here. I don’t know what the voltage at the reset pin would be when the capacitor is discharged, my first guess would be 0v but the answers there say it’s the reverse - VCC at power on, then goes to gnd as it charges.

      If that’s the case, I think it’s exactly what I need.

      I’ll test it out later today (and I’ll go read more about how this capacitor+resistance circuit works…).

      • hardware26
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        As you said before power on capacitor is discharged. Right after power on capacitor is still discharged, so voltage on capacitor is zero, so reset pin has Vcc. With time capacitor gets charges and voltage across capacitor increases and reset voltage becomes closer and closer to ground, until it is ground. But it is important to consider what happens at power down too. At power down capacitor is charged. If power source becomes high impedance at power down, then reset pin will probably go down to zero in time but may take a bit time depending on what source exactly does. But if power source is connected to zero at power down reset pin will observe minus vcc and slowly go up to 0. If reset pin is sensitive it may be a good idea to protect it with a diode.

      • HewlettHackard@lemmy.ca
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        1 year ago

        I’m not entirely clear on the problem, but yes - the circuit as drawn makes the microcontroller pin start high, then fall after some time. Do you need the microcontroller pin to have a different voltage than the transistor base (I assume when you said gate you mean base…gates are for FETs), or is this good enough?

        • ByteJunk@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          1 year ago

          Uh yes, pin to base.

          I still couldn’t come up with a way to make it work using a resistor-capacitor circuit, but I did learn a lot (that particular rabbit hole led to me an article discussing capacitance in potato tubers…!).

          There is probably a better way of solving it, but at least I got it working with another transistor to “decouple” that sensitive pin from the base. I’m not exactly sure why there’s a negative voltage across base and emitter, but it was preventing boot.

          I’d be very interested in hearing any criticism you would be willing to share. I have hopes of moving this from my breadboard and solder it to a PCB so I can put it into a paper-cut lightbox that will be controllable from HomeAssistant, but I wouldn’t want to risk setting anything on fire…

          One thing that concerns me is that 7333A. I only have it in a TO-92 package, and while it’s only powering the ESP-01S, which doesn’t really draw that much current, it still gets uncomfortably hot to touch (I can hold it for a few seconds, but not much longer). Is there a better alternative, or is it supposed to get hot?

          Thank you!

          [edit: updated the circuit, I had misplace a resistor]

          • HewlettHackard@lemmy.ca
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 year ago

            The 7333A is a linear regulator, which means it drops voltage by converting power to heat. Typically those make sense when the input voltage is close to the output voltage or the load is very small. If it’s getting too hot, the load is high enough that the efficiency will be very bad…whether or not this is a problem depends on your application.

            Some random site claims 170mA and another claims up to 400mA. 170mA * 8.7V (12V in minus 3.3V out) = about 1.5 watts, which is too much for a TO-92 package.

            Can you use a tiny buck converter instead? Or a larger package for the linear regulator that can add a small heat sink?

            As for your actual circuit, the second transistor is an interesting idea (you’re using it to invert the state so you can have the GPIO pulled in the non-problematic direction?) and I don’t have enough experience to give further suggestions.