logo elektroda
logo elektroda
X
logo elektroda

Powering ESP32 and electromagnetic latch via USB from PC - do you need a relay?

mathz 483 2
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 20355070
    mathz
    Level 2  
    Good afternoon


    I am currently working on a project to create a gym pass system. I am a programmer with zero knowledge of electronics as such, so I apologise for the possibly trivial question :)

    The project consists of opening the door in the case of a valid pass (QR scanning by the camera - I have already written the code for this). Generally I have everything ready and all that remains is to bundle it all together. The door will be secured with an electromagnetic latch, which will release on the basis of an impulse. In my solution, I plan to connect the ESP32 directly to my laptop via USB and control it using the python API.

    As to the core of my question. I have watched a lot of tutorials with similar ideas, where people used a 12v battery and a 5v relay to provide power for the ESP32 as well as for the hitch. In my case the ESP32 will be connected to the PC via USB. Does the relay then become a redundant component? Can I then successively send an impulse to the abutment from my PC via the ESP32?
  • ADVERTISEMENT
  • #2 20355089
    Krzysztof Kamienski
    Level 43  
    No, due to the current consumption of the abutment. You can use a 5 volt relay with a MOSFET and a separate 12 VDC /2 A power supply to control the striker.
  • #3 20355104
    mathz
    Level 2  
    That is, the ESP32 will be powered from the PC and the hitch from a separate source and everything will go through a relay. Thanks :) .
ADVERTISEMENT