Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Bx3mE on September 27, 2015, 04:42:32 AM

Title: Configure ttl output for laser diode driver.
Post by: Bx3mE on September 27, 2015, 04:42:32 AM
I have à 3 axis router controlled with à pmdx-126 Bob and a Ethernet smoothstepper.and match 3. The spindle is à technomotor controlled fr.o.m. the Bob with a pmdx-107 isolated spindle control.

Now to the problem. I have a diode laser powered by a simpledrive. The simple drive accepts isolated ttl input but also analog/ttl which is not isolated. I would prefer to use the isolated input. Hos do i set this up without changing my spindle config?
I will need to run the spindle and the laser in the same program.

I rally need help and appreciate any help!
Title: Re: Configure ttl output for laser diode driver.
Post by: Bx3mE on September 27, 2015, 05:15:41 AM
I have come to understand that TTL Logic is logic 1 or 0 and that i need to have someting toggeling the TTL output to be able to have the laser output 65% power. My guess so far is that i need to implement a costom M-code which accepts an output variable, say M104P65 would mean laser on at 65%. How do i achieve the toggeling? Is there something built into mach3 i can use or do i need to reinvent the wheel? Any suggestions?
Title: Re: Configure ttl output for laser diode driver.
Post by: Picengraver on September 27, 2015, 07:31:44 AM
I'm not sure what you mean by "isolated," but you might look at this: http://jtechphotonics.com/?s=DAC
It is a new offering, and will work with your Simpledrive driver.  Analog control is far better than using TTL, IMHO.

I use the C axis to drive an early version of this DAC from my ESS.

John
Title: Re: Configure ttl output for laser diode driver.
Post by: Bx3mE on September 27, 2015, 10:35:21 AM
Almost exactly what i was looking for :) I guess this is the route i will have to go... Thank you very much!

BUT

is it not possible to have MACH3 do this?
It already does this for the spindle ao adding additional hardware only seems like adding unnecessary additional points of failure? I do not have the need to run the spindle and the laser at the same time but in the same program. Since i can turn the output on and of shouldnt mach3 be able to do this a a frequency? The simple drive also accepts analogue input...
Title: Re: Configure ttl output for laser diode driver.
Post by: Picengraver on September 27, 2015, 08:16:17 PM
I am unaware of any who have managed to get Mach3 spindle command to work with lasers smoothly.   That's why some of us are using other methods.

You might try searching this thread for more insight (sorry, but it is a big thread): http://www.machsupport.com/forum/index.php/topic,12444.0.html

John
Title: Re: Configure ttl output for laser diode driver.
Post by: Bx3mE on September 30, 2015, 06:19:39 PM
OK - I have done some reading and it is in deed possible to do this.

1) Go with two separate machine configurations and have one configured to send spindle pwm to the laser pin and the other config send the spindle pwm to the spindle

2) Have a "Brain" do the work

3) as suggested translate step + dir on external HW

There are naturally several issues with having mach create the pwm signal as this is directly dependent on the kernel configuration. This way creates a lot of for mach unnatural state swithcing which the kernel was not built for. on the other hand mach is tuned and trimmed to really kick ass when it comes ti sending step and direction signals. Both options 1 and 2 are a no go for me so I am left with alternative 3. I did some testing on an arduino i hav laying around and it works as expected but my hw design just is not good enough and the arduino was not fast enough to handle my (really bad) code.

Being guided by my inner voice i do what i am good at and let others do what they are good at. I will try the DAC_PWM suggested by JTech and see how it goes mainly for this purpose but i will also have other uses for it.
 
Title: Re: Configure ttl output for laser diode driver.
Post by: dude1 on October 01, 2015, 05:31:51 AM
you can do it with M4 http://gearotic.com/ESW/FavIcons/index.php?board=16.0 and it works