Author Topic: Simple MOSFET load switch design  (Read 397 times)

0 Members and 1 Guest are viewing this topic.

Offline FBMinis

  • Contributor
  • Posts: 9
  • Country: pt
Simple MOSFET load switch design
« on: April 21, 2021, 09:17:15 pm »
I would like your help designing a circuit that would use a PIR sensor to turn ON an ESP32 CAM.



The PIRoutputs 3.3V when it detects motion and remains HIGH for up to 5min ( 1sec min, user defined). This signal would pull the P-Channel Mosfet LOW, powering the ESP32 CAM, which would send me a notification to Telegram with the option to take a photo. I would then either turn the camera off by pulling the N-Mosfet gate LOW again (assuming no motion detected by the PIR), or I could just set the output of the PIR to remain high for only couple of minutes to give the camera time to send a notification and expect for my instruction to take a photo or not.



I read this document: https://www.onsemi.com/pub/Collateral/AND9093-D.PDF



Not sure if I got it right and which resistor values to use. The camera momentarily pulls up to 300mA when doing WIFI operations.



Please take a look at the circuit diagram in attachment.
 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 1556
  • Country: us
Re: Simple MOSFET load switch design
« Reply #1 on: April 21, 2021, 11:53:42 pm »
Quote
This signal would pull the P-Channel Mosfet LOW, powering the ESP32 CAM ...

Just connect the PIR to a GPIO pin and put the ESP32CAM in sleep mode waking up when the GPIO pin changes.

Have a look at this project:

https://randomnerdtutorials.com/esp32-cam-pir-motion-detector-photo-capture/
 

Offline FBMinis

  • Contributor
  • Posts: 9
  • Country: pt
Re: Simple MOSFET load switch design
« Reply #2 on: April 22, 2021, 10:01:07 am »

Just connect the PIR to a GPIO pin and put the ESP32CAM in sleep mode waking up when the GPIO pin changes.

Have a look at this project:

https://randomnerdtutorials.com/esp32-cam-pir-motion-detector-photo-capture/
The ESP32 CAM consumes 6mAh during deep sleep, which isn't adequate to a battery powered project.
« Last Edit: April 22, 2021, 10:03:01 am by FBMinis »
 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 1556
  • Country: us
Re: Simple MOSFET load switch design
« Reply #3 on: April 22, 2021, 03:23:17 pm »
The ESP32 CAM consumes 6mAh during deep sleep, which isn't adequate to a battery powered project.

Ok, I see.

Here is some more info I found related to the "deep-sleep strategy":

This article investigates the source(s) of this current consumption:

https://time4ee.com/articles.php?article_id=126

It suggests performing some surgery on the board which allows the existing P-MOSFET to control power to the SD card and camera.

And this github discussion shows how someone did this for the camera power:

https://github.com/espressif/esp32-camera/issues/247#issuecomment-801109299

 

Offline FBMinis

  • Contributor
  • Posts: 9
  • Country: pt
Re: Simple MOSFET load switch design
« Reply #4 on: April 22, 2021, 10:02:58 pm »
I am aware of that, thank you. However, my project does not rely on deep sleep.

I'd still appreciate some criticism regarding the circuit in my first post.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf