Maker Pro
Maker Pro

DAC controlled voltage regulator

Hi everyone,
I am new to this forum so please spare me if I say anything wrong.
I have one green aiming laser. The power supply that I got with it is giving out pretty bright light. I wanted to minimize its intensity by controlling the voltage using the DAC of arduino due.
I know that the LM317 voltage regulator has the adjustable output voltage and that it can be controlled with the potentiometer.
I also read some stuff online and understood that LM317's output voltage can be controlled using DAC and so I built the following circuit and observed that I was actually able to control the the output circuit using DAC. However the DAC voltage to Output voltage relationship is not linear and the brightness of aiming LASER is not linealy increased or decreased.

Do you have any suggestion on improving the circuit. Or is there any other way for controlling the voltage using DAC?

I found that digital potentiometer is one way to get the desired variable voltage, however I fear that putting resistance in series with my aiming laser will increase the input current to it and thus it might harm my LASER!!

Please help!! Thanks!!
 

Attachments

  • IMG-20170719-WA0012.jpg
    IMG-20170719-WA0012.jpg
    30.4 KB · Views: 213
Last edited:

Harald Kapp

Moderator
Moderator
The attachment is missing.

However the DAC voltage to Output voltage relationship is not linear
Why not? The LM317 maintains a voltage of 1.25 V between output and adjust pin (datasheet, figure 9). If you replace teh usual resistor feedback by a DAC output connected to the adjust pin, the output voltage should be Vout = Vdac+1.25 V which is perfectly linear.

Another option is to use the arduino's pwm output as in this circuit.

I found that digital potentiometer is one way to get the desired variable voltage, however I fear that putting resistance in series with my aiming laser will increase the input current to it and thus it might harm my LASER!!
You shouldn't put teh potentiometer (analog or digital) in series with the power supply of the laser. No ordinary potentiometer will survive such a mistretment. You'd use the digital potentiometer as a variable resistor as shwon in the same figure 9 I quoted above instead of R2. Then only a very small current will flow and the standard equations for calculating the output voltage are valid.
 
The attachment is missing.


Why not? The LM317 maintains a voltage of 1.25 V between output and adjust pin (datasheet, figure 9). If you replace teh usual resistor feedback by a DAC output connected to the adjust pin, the output voltage should be Vout = Vdac+1.25 V which is perfectly linear.

Another option is to use the arduino's pwm output as in this circuit.


You shouldn't put teh potentiometer (analog or digital) in series with the power supply of the laser. No ordinary potentiometer will survive such a mistretment. You'd use the digital potentiometer as a variable resistor as shwon in the same figure 9 I quoted above instead of R2. Then only a very small current will flow and the standard equations for calculating the output voltage are valid.

Thanks for the reply!!
I've edited the thread. You can see the attachment now.

Also I thought that instead of using PWM using DAC would me less troublesome from designing perspective. Does using PWM over DAC have any significant advantages?

Regarding the linearity, I also thought that based on the equation of Vout, it should be linear, however I am not getting linear relationship!! Do i need to make any more changes in the attached design?
 
Probably easier to adjust brightness by modulating the laser beam using a PWM signal.

<edit> - seems like you beat me to the punch!
 
Isn't a laser an LED that has its brightness controlled by its current, not by its voltage?
10mA= fairly dim. 20mA= brighter. 50mA= very bright.
3.0V= fairly dim. 3.1V= brighter. 3.2V= very bright.
 
Disagree. I think it makes an average fixed current regulator. Since 100% of the output current goes through the adjustment pot, that can put severe restrictions on the type and size of pot used for a adjustable output current.

ak
 

Harald Kapp

Moderator
Moderator
however I am not getting linear relationship!
Because of R2. Remove R2 (replace by a short circuit).

Isn't a laser an LED that has its brightness controlled by its current, not by its voltage?
Depends on the type of laser. Originally lasers were crystals, later gas filed tubes, too. Semiconductor based lasers are a comparatively recent evolution.
Anyway, the intensity of a laser is current controlled. What we don't know how the laser module of the op is constructed. It may have an internal current source which in turn is controlled by the input voltage.

@Yash : let us in into a few more details of your laser.
 
Top