I'd like to create a simple circuit that will convert step signals intended for a stepper motor into an analog controller that will adjust the intensity of my laser. Does anyone know how to do that? I read somewhere that someone was able to take ttl and convert it to analog using resistor and capacitor.
That is, if your LASER has a DC control-voltage input you can use a simple filter. You can't "dim" the power to the LASER using that method because the load impedance messes-up the R-C time constant and kills the filtering. (And, I'm pretty sure you don't dim a LASER by reducing the power supply voltage anyway.)
Voltage is not the way to go. The laser will fire as long as you supply it with sufficient forward voltage at a current at, or above, the threshold current and well below the absolute max ( if you want to use the laser more than once or maybe twice). You alter the laser optical power output by altering driver output current (with the same constraints listed above). The laser itself doesn't need 6V. it is most likely a 3 to 4 volt phosphide diode, with a driver designed to regulate current for that diode and requiring somewhere around/up to 6v input. To dim that circuit, you will need to alter the driver to provide less current (not likely, or advisable). If the driver has an analog modulation (also unlikely), you could use that; and you would need a schematic of the driver.
If I might ask, where did you get a '150mW UV laser', or is it a uv flashlight?
If you can come up with a datasheet for the diode, it may be a very simple issue to build a functioning driver and add analog modulation. Several designs are available on the web.
Go to laserpointerforum.com, use the search function.
I read somewhere that someone was able to take ttl and convert it to analog using resistor and capacitor.
Yes, as already mentioned, that's called a low pass RC filter (4.7k ohm/1 uF)
The question is : are they STEP and DIR signals ?
Where are these signals coming from ?
First of all, do you understand how a stepper motor moves ?
Do you know anything about the step sequence (full, half, 1/4 , 1/16th, micro ) ?
If you have a STEP/DIR control pair, the STEP pulse will vary with the speed, but all that gives you in frequency. You have to measure the frequency using the arduino and convert that to amplitude (analog) using software and then output the value as a PWM then convert it to analog with the RC LPF. So , in order to do that, we have to start with you telling us you know what I mean when I ask you if you have a STEP & DIR signals. First you have to understand the difference between frequency and amplitude.
If you don't have STEP & DIR and you are using 4 control signals A,B,C & D, then it is going to be more complicated. The process will be the same or similar but not as simple as if you had a STEP/DIR signal pair you could use to get the step speed.
I'd like to create a simple circuit that will convert step signals intended for a stepper motor into an analog controller that will adjust the intensity of my laser. Does anyone know how to do that? I read somewhere that someone was able to take ttl and convert it to analog using resistor and capacitor.