Page 1 of 1

ESP32 5Volt GPIO Outputs

Posted: Thu Feb 06, 2020 11:25 am
by RobinBlood
Hi,

I'm not even sure the Title of the Topic is correct.
Actually I'm searching for a schematic to interface a Keyes Laserpointer.

I have 5 Volts connected to my board, using an AMS1117 chip to give the ESP32 3.3 Volts.
The Laser is connected to 5V and GND and I want to switch it on and off connecting the Signal-Pin to GPIO.

Unfortunately 3.3 Volts on the signal-Pin of the Laser only creates a dim Point ...
If I breadboard the signal-PIN to the 5Volts on the board, the Laser is at it's maximum.

I found a lot of scematics using Optocouplers to Oputput a 2nd Voltage or StepUp Electronics or OpAmps ...
But actually I already have 5 Volts and they share a common GROUND on the AMS1117.
Wouldn't some simple NPN Configuration do the job?
I tried several configurations on my breadboard but I can't figure it out ...

Hope someone could point me to a simple solution using discrete parts.
Best Regards

Robin

Re: ESP32 5Volt GPIO Outputs

Posted: Thu Feb 06, 2020 11:10 pm
by mikemoy
Give this a shot. Pretty much any NPN & PNP transistor should work.

Annotation 2020-02-06 170926.jpg
Annotation 2020-02-06 170926.jpg (238.57 KiB) Viewed 8826 times

Re: ESP32 5Volt GPIO Outputs

Posted: Tue Feb 11, 2020 3:03 pm
by RobinBlood
Thanks mikemoy,
I used 2N3904 and 2N3906 for this and it works great.
I will definitely find more usages for this.

My little light barrier already works, but I cheated big time (see attachment)
For me this also eliminated the faint glow the Keyes Laser has when connected to 5V and GND.
But as soon as I would like to drive a 2nd one independently, I would have been back to the same problem.
Your schematic is a lot better.

awsome, thanks again.