Author Topic: I think my K1 relay is dead (laser diode control question)  (Read 14872 times)

Steve Stallings

  • Administrator
  • Posts: 527
  • www.PMDX.com/Images/Avatar120.jpg
    • View Profile
Re: I think my K1 relay is dead (laser diode control question)
« Reply #15 on: March 21, 2015, 01:14:44 AM »
Hi Jason,

OK after looking things over, the only real improvement will
be that you can have independent control of the dust collector.

You would connect the Negative (-) input of the solid state relay
for the dust collector to the PCgnd of J5 on the PMDX-126, and
connect the Positive (+) input of the solid state relay to one
of the outputs such as "A" on J5. You would assign an M code
to an output such as Output4 and then set Output4 to use
Port 2 Pin 1.

You would still have to share the PWM signal between the
SuperPID and the Laser Diode because Mach3 only understands
one PWM output.

K1 would still control the +12 VDC to the laser.

K2 would still control the switched PCgnd acting as the RUN signal
to the SuperPID.

You will, as a result of using the SmoothStepper to control Port2,
have the ability to control three more outputs on J5 and have
the ability to read 4 more inputs from J11.

Steve Stallings
www.PMDX.com

daregone

  • Posts: 14
    • View Profile
Re: I think my K1 relay is dead (laser diode control question)
« Reply #16 on: March 21, 2015, 11:09:13 PM »
I have updated the diagram to reflect what I think will work.  I added a 4 channel relay board that will operate off of J5.  This will give me (I hope) the ability to turn a laser pointer cross hair unit off and on to align to my work.  Also, I was thinking of using a wireless remote to activate the dust collector. It has a momentary on and a momentary off switch to toggle the remote outlet for the dust collector.  I would like use a simple cap circuit that would take a continuous on/off signal from the board and change it to a momentary burst to trigger a relay tied to the remote On button or the remote OFF button.

So, I set up Mach to trigger my collector by activating "A" on j5.  "A" goes high, sending a +5 to the electrolytic capacitor and charging it to +5V via the relay winding resistance. The pulse charge current through the capacitor and one relay will switch momentarily. When "A" is deactivated back to ground, the capacitor will discharge, activating the other relay switch momentarily (I think....)


Steve Stallings

  • Administrator
  • Posts: 527
  • www.PMDX.com/Images/Avatar120.jpg
    • View Profile
Re: I think my K1 relay is dead (laser diode control question)
« Reply #17 on: March 24, 2015, 03:15:19 PM »
I cannot make out exactly what you have done in your wiring for the relay board. Your scheme
should work provided that the capacitor is large enough to provide current through the opto-
isolator for as long as needed to trigger the remote.

If that does not work out, you could use separate outputs for the two relays and write
macros for Mach3 to pulse them. These macros are scripts saved in files that correspond
to M codes and other functions. For example you could have a file named "m7.m1s" in
the folder C:Mach3macros~your-profile-name-here~  and it would execute when an
M7 is encountered in the G code.

The scripting language will allow you to turn on the output, pause, and then turn it off.
Steve Stallings
www.PMDX.com

daregone

  • Posts: 14
    • View Profile
Re: I think my K1 relay is dead (laser diode control question)
« Reply #18 on: May 20, 2015, 12:38:56 AM »
Been a while since I last posted, but I have not been idle!

I set up the 126 as I indicated on the previous diagram - except I set two of the relays on the separate relay board to control the remote for dust collector (as Steve suggested).

I have been able get the dust collector and the other relays on the board to be controlled from J5, but I am having a lot of trouble getting the router and the laser to work. I can't seem to figure out the mach3 settings.

Steve Stallings

  • Administrator
  • Posts: 527
  • www.PMDX.com/Images/Avatar120.jpg
    • View Profile
Re: I think my K1 relay is dead (laser diode control question)
« Reply #19 on: May 22, 2015, 01:47:40 AM »
Please describe your problem in more detail.

Are you trying to use macros now? Are you still using M3 to
control your router?
Steve Stallings
www.PMDX.com

daregone

  • Posts: 14
    • View Profile
Re: I think my K1 relay is dead (laser diode control question)
« Reply #20 on: May 22, 2015, 03:33:21 AM »
I went through everything and found that I had a bad cable (it was grounding out my pwm signal).  I fixed that and have the router working now.

I currently have full speed control of the router.  It is controlled with M3.  PWM is set for pin 16 and is split to go to both the laser and the router.  The mach3 setting are:

Motor outputs:
   spindle Step pin 16, Direction 0

Output Signals,
   Output 1 port 1, pin 14  (K2 router Relay)
   Output 2 port 1, pin 1    (K1 Laser Relay)

Spindle Setup:
    Relay Control (on - unchecked) M3 and M4 both set to output 1
    Motor Control - use spindle Motor output (check) ,PWM Control (check) Step/Dir Motor (unchecked)

SmoothStepper Config:
     PWM Checked
     Base Hz 5000

Currently M3 works great and I can control the speed.

What I am uncertain of is how disable the router, keep the pwm signal and enable the laser.  I was thinking of modifying M6 to turn off the router, but leave pin 16 active when a tool change was called for with a specific tool number that would represent the laser.  Lets use 150 as the laser tool number.

So the scenario would look like this:

load a g-gode file.  It has a header that has the dust collector start (m7).  Then a m3 with a tool number (say 4) that represents a .25 endmill.  A speed (15krpm)- etc...  G-code..Then, ToolChange! M6 with a call for tool 150 (Laser).

M6 would have a script that starts when it see if it is tool number 150.  If it is, then It turns off the spindle, leaves pin 16 active and turns on the laser (k1).