Analog 5V pulse

19 Mar 2011

I am trying to control a semiconductor laser which is triggered by a square pulse, with the height of the pulse between 0-5V indicating the power.

The mbed only has one AnalogOutput, and I would like the option to individually control more than one of these lasers, additionally the required 5V is above the 3.3V provided by the mbed.

Currently I am planning to use an SPI controlled DAC such as this one to provide the desired voltage and then switch it on and off with a relay controlled by a MOSFET.

Does anyone have any ideas on a more elegant solution or is this a good course of action? I think it might be possible to do something with smoothed PWM and an opamp, but I'm worried about the ripple and want to have pretty good square pulses. Should I be doing something with buffers instead? How do people usually go about supplying this kind of signal?

19 Mar 2011

I feel like a single non-inverting amplifier will do the trick :] http://en.wikipedia.org/wiki/Operational_amplifier_applications#Non-inverting_amplifier

19 Mar 2011

Jimmy Hack wrote:

Currently I am planning to use an SPI controlled DAC such as this one to provide the desired voltage and then switch it on and off with a relay controlled by a MOSFET.

The MCP48x2 will get you part way there. But when operated at 3.3V, its output is limited to 2.047 volts, so you will need a buffer with a gain of 2.5x to get you to 5 volts of output. Be sure the buffer is strong enough to deliver all the juice the laser input needs.

The DAC takes a few uS to slew from rail to rail, which should be OK if your pulse widths are above several 10s of uS. (Assuming the buffer doesn't add appreciable delay of its own.) If this is indeed fast enough, then you won't need an external switch - just load the DAC with 0 to turn it off, and with the desired output level to turn it on.

(Using a relay to control the output probably isn't the best choice. It will add mechanical delays on the order of many milliseconds, not to mention possible problems with contact bounce.)

A nice feature of this DAC is its LDAC strobe. This lets you load pipelined data into the DAC, then have it sit there until the LDAC strobe says it's time to go. This has the potential to remove the SPI data transfer delay from the edges of the pulses.

I'd stay away from the PWM outputs. You'll be fighting ripple versus risetime: the more you reduce the ripple with a low pass filter, the slower the risetime will become.