logo elektroda
logo elektroda
X
logo elektroda

ESP32 3.3V->5V: buzzer, FAN, diodes, 9 OE SN74AHCT125 and mushroom OK?

umbracoda 243 3
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 21876803
    umbracoda
    Level 3  
    Posts: 6
    1. Here, the idea is to control the passive buzzer (5 V) via the ESP32 (as you know, it has a logic state of 3.3 V). Is the connection correct?

    Schematic fragment: 5V buzzer driven by BS170 MOSFET with 10k pull-down and 330Ω gate resistor

    2. Same here, only it's about controlling the 5 V fan (speed). The FAN pin goes to the ESP, and on the left we have the plug that I plug the fan into.

    Schematic of 5V fan control using IRLZ44N MOSFET with 1N5819 diode and 10kΩ/1kΩ resistors

    3. Here it's all about diode control - the diodes are at 5 V, the ESP is again at 3.3 V, so I need to raise the logic state with SN74AHCT1G125DCKR. Please check that I have connected this correctly.

    Schematic fragment: SN74AHCT1G125 buffer and three WS2812B LEDs with capacitors on a 5 V supply

    ---------------------------------------------------------------------------------------------------------------------

    4. This is already giving me a headache because I don't know how to bite it - I need 9 logic states to convert from 3.3V to 5V. The SN74AHCT125N runs on LOW, so the idea was to wire all the OEs (i.e. 9 OEs) to one ESP32 pin and control HIGH or LOW with that. But I'm thinking this way, there could be different states on this pin during power-up or reset, so it needs to be protected somehow.

    Additionally:

    I want to do a "mushroom" protection. I have two independent lines on it. I would like hardware and software protection, ie:
    - one line to the ESP (e.g. GND -> pin) so that I know programmatically when the mushroom is pressed and can disable the OE,
    - the other line as hardware protection - in case ESP doesn't work for some reason, I want to physically disconnect the OE (i.e. force HIGH on the OE pin).

    Schematic with three SN74AHCT125N buffers, 100 nF capacitors, DRIVERS_OE net, and ESP signal lines
  • ADVERTISEMENT
  • #2 21876842
    jarekgol
    Level 40  
    Posts: 5144
    Help: 642
    Rate: 1135
    ad 1 add a pullup or build a push-pull.
    ad 2 it has a chance to work, but I would increase R1, in general at 3.3V it is nothing to shuffle and you don't want to lose too much voltage.
    ad 3. If you want to control diodes and not read from them, then logically the signal should go to IN
    ad 4. mushrooms are best made on relays (contactors), i.e. when you press it, you cut power to the devices, not some gate control signals.
  • ADVERTISEMENT
  • #4 21876862
    umbracoda
    Level 3  
    Posts: 6
    >>21876842 from cutting off the current completely I have a different mushroom, and here it must necessarily be as I have described>>21876842

    for completely disconnecting the power supply I have a different mushroom

    and this one has to be for what I have described
ADVERTISEMENT