converting ttl to analog voltage control

Hi Folks,

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.

(spindle PWM->resistor->laser control->capacitor->ground)
source: https://github.com/grbl/grbl/issues/682

Where can I go to get specifics on how to create this circuit for myself? (Looking for clues as to what parts I should get)

the PWM will come from an arduino, and the laser is a 150mW UV laser 6V. If anyone has the math at the tip of their heads, pls share :slight_smile:

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.

A [u]Low-Pass RC Filter[/u] can smooth-out PWM. That's for signals, NOT for power.

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.)

I thought most small semiconductor lasers could be modulated with PWM. Correct me if I'm wrong.

into an analog controller that will adjust the intensity of my laser.

You need to define your terms and provide more information. No where in your post does it say :

"I have a laser that has a 0 - 10V analog input control"

Therefore you need to specify the parameters of the aforementioned analog control signal. What is the range ?

What is the resolution ? (1.00 V input means exactly WHAT in terms of laser output intensity ?

Why a stepper motor signal ?

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.

convert step signals

What signals ? (the TTL control signals ?

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.

Do you understand ?

heyarn:
Hi Folks,

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.

(spindle PWM->resistor->laser control->capacitor->ground)
source: CO2 laser · Issue #682 · grbl/grbl · GitHub

Where can I go to get specifics on how to create this circuit for myself? (Looking for clues as to what parts I should get)

the PWM will come from an arduino, and the laser is a 150mW UV laser 6V. If anyone has the math at the tip of their heads, pls share :slight_smile:

datasheet for laser?

datasheet for analog controller you mention?

Analog Signal voltage range ? (non-inverting op amp amplifier may be necessary)
Analog controller specifications ?

Schematic ?