ESP32 5Volt GPIO Outputs

RobinBlood
Posts: 6
Joined: Mon Jan 29, 2018 9:19 am

ESP32 5Volt GPIO Outputs

Postby RobinBlood » Thu Feb 06, 2020 11:25 am

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
Attachments
Screen Shot 2020-02-06 at 12.20.20.png
Screen Shot 2020-02-06 at 12.20.20.png (115.69 KiB) Viewed 8968 times

mikemoy
Posts: 627
Joined: Fri Jan 12, 2018 9:10 pm

Re: ESP32 5Volt GPIO Outputs

Postby mikemoy » Thu Feb 06, 2020 11:10 pm

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 8818 times

RobinBlood
Posts: 6
Joined: Mon Jan 29, 2018 9:19 am

Re: ESP32 5Volt GPIO Outputs

Postby RobinBlood » Tue Feb 11, 2020 3:03 pm

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.
Attachments
Screen Shot 2020-02-11 at 15.50.53.png
Screen Shot 2020-02-11 at 15.50.53.png (61.79 KiB) Viewed 8699 times

Who is online

Users browsing this forum: No registered users and 56 guests