I would like to have a variable voltage output +0v+5v 200ma or higher. (Sorry wasn't thinking straight! it will be a fixed +5v but I want "variable current" to basically control the power to a small laser doide.)
I have looked at some DAC's but they are all lower power unless I'm not seeing them. Anyone help?
Still not thinking straight That would be breaking the laws of physics.
If you provide a fixed voltage like 5V, the laser will draw whatever current it wants. Potentially so much that it burns itself out.
If you want to provide a fixed current like 200mA, you have to vary the voltage, adjusting it to maintain that level of current. That's what a constant-current circuit does. I doubt you could use a DAC to vary the voltage, that would need a sensor for the arduino to measure the current and code to adjust the DAC output and it wouldn't react fast enough. It would also be way more complex than a typical constant current circuit.
The point is, you can't force both a fixed voltage and a fixed current on any component. The relationship between voltage and current is determined by that component. For an Ohmic conductor, that relationship is pretty simple. For a semiconductor like a led or laser diode (which is also a led), not so simple.
There are two ways to control the power of the laser.
One is PWM. That doesn't actually change the instantaneous output power of the laser, only its average power over time. You can use a PWM-controlled constant current circuit as suggested by @DrDiettrich . Not all constant current circuits can be PWM controlled, many cannot.
The other way is to use a programmable constant current circuit. Those are complex circuits!
There are many examples of laser diode control circuits posted on line.
Many, if not most laser diodes have a built in photodiode that can be used to measure the output intensity, and to control the current source that in turn maintains a preset output intensity.
I was describing what would happen if you connected the laser/led directly to a constant voltage supply.
Ah, a voltage controlled constant current source circuit? That does sound simpler. I was thinking of the kind of circuit where an N-bit digital digital signal would switch/off separate 1mA, 2mA, 4mA, 8mA... constant current circuits wired to the load in parallel.
I doubt it. You're implying it limits the current itself somehow. I imagine the driving circuit needs to limit the current to no more than 200mA to avoid damaging it.
It's amazing how an idiot (me) can confuse things I think it's becuase I know all the parts and what I want and forgot you guys are simply going of what I type.
So, I have a 70mw laser pointer, this laser pointrer has a USB lead to power it, I want to be able to vary the brightness using an arduino as as little companents as possible using IC's where possible.
So the diode itself has a driver.
I'm hoping now I have described everything this will help someone help me. Cheers, and sorry for not being clear at the start.
The laser pointers I know of have a resistor built in according to the operating voltage (USB: 5V) and laser power. I checked that these pointers can be dimmed by simply reducing the voltage or adding a series resistor. An increase up to 8V was found possible at least for a short time.