Driving a +3.3V load with a +5V logic high.

Thread Starter

Mike_Nelsen

Joined Jan 15, 2018
13
I have to drive a 3.3v laser diode with a 5v logic out. A logic LO will turn the laser ON, where a logic HI will turn the laser OFF. Below is the schematic. Did I design this circuit correctly, or is there something wrong? If so, is the correction simple, or is it totally messed up and there's a better way to do this? Thanks.Driving 3.3 with 5.png
 

crutschow

Joined Mar 14, 2008
34,440
The laser is a current-operated device (like an LED) so you don't have to regulate the voltage, just the current.
This can be done with the proper value for R2.
You don't need (or want) R3 in the circuit, as it just will waste current and power.
 

Thread Starter

Mike_Nelsen

Joined Jan 15, 2018
13
I'm under the impression that R2 and R3 are acting as a voltage divider. If I remove R3, how will I determine what to make R2? Again, I see the 2N3906 problem. I'm not sure how to reupload the image with the correction.
 

GopherT

Joined Nov 23, 2012
8,009
Is the laser diode a module with its own power supply and your microcontroller is only toggling an enable pin or are you driving (powering) the laser diode with the current from the microcontroller?

If it is a bare laser diode, tell us what the current rating is (20mA)?
 

sghioto

Joined Dec 31, 2017
5,390
Subtract 3.3 volts from 5 volts for the laser voltage and maybe another .05 volts for the transistor and that's what you have left to work with, 1.65 volts. Decide how much current you need for the diode. Use Ohm's law, 1.65/R = I. With R2 at 1K and removing R3 will net 1.65ma.

Steve G
 

Thread Starter

Mike_Nelsen

Joined Jan 15, 2018
13
My goal is to power the laser diode, which does not have its own supply, from the 5V power supply operating the microcontroller. As I'm writing this I'm starting to see why you're asking. Yeah, my goal was to power the laser with the 5 volt power supply that runs the microcontroller, have the microcontroller (PIC18, btw) turn the laser on and off, and divide the voltage from there. Someone earlier mentioned that R3 was bad and this could be solved with R2 alone. Would it be smarter to just run if off the logic high directly? What aspect of the laser diode would I use to determine the value of the resistor between the logic output of the PIC and the laser diode? To be clear, the datasheet of the laser says not to exceed 3.3 volts.
 

GopherT

Joined Nov 23, 2012
8,009
My goal is to power the laser diode, which does not have its own supply, from the 5V power supply operating the microcontroller. As I'm writing this I'm starting to see why you're asking. Yeah, my goal was to power the laser with the 5 volt power supply that runs the microcontroller, have the microcontroller (PIC18, btw) turn the laser on and off, and divide the voltage from there. Someone earlier mentioned that R3 was bad and this could be solved with R2 alone. Would it be smarter to just run if off the logic high directly? What aspect of the laser diode would I use to determine the value of the resistor between the logic output of the PIC and the laser diode? To be clear, the datasheet of the laser says not to exceed 3.3 volts.
As mentioned above, a diode (like LEDs and Laser Diodes) pick their own voltage (about 3.3) once the correct amount of current is fed into them. What is needed for a proper design is the current (usually milliamperes) needed to drive the laser. Are there any markings on the diode?
 

GopherT

Joined Nov 23, 2012
8,009
No, but the data sheet says it's 1mW.
1 mW is the photon output so I put is likely in the range of 20mA (my experience) because efficiency is quite low.

You can do something simple like this...

I drew a switch showing 0 or 5 v to drive the PNP Transistor. Just use your microcontroller pin at that node instead.
Other (better) constant current power supply designs exist but this will do (use a 1N4148 or similar diode) with your PNP.

F83489C4-1177-435C-85BC-0DCC9E26EF96.jpeg
 
Last edited:

sghioto

Joined Dec 31, 2017
5,390
Green or red laser? I have a 5mw green laser diode that operates best at around 300ma. 1mw green maybe under 100ma. Red diodes much less.
Steve G
 

Thread Starter

Mike_Nelsen

Joined Jan 15, 2018
13
Followup:

If I wanted to drive multiple lasers with the setup presented by GopherT, would it be smarter to wire all of them in parallel where the existing LED is, or would I want this circuit for each individual LED?
 
Top