MechMate CNC Router Forum

Go Back   MechMate CNC Router Forum > Personal Build Histories > MechMates already cutting
Register Options Profile Last 1 | 3 | 7 Days Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #211  
Old Tue 19 February 2013, 17:07
darren salyer
Just call me: Darren #101
 
Wentzville mo
United States of America
I have a laser pointer that I want to use Mach3 to control on/off.
I've been reading a ton of info on the subject, and just can't wrap my feeble mind around it.

It is a laser rated for 3-6v.

I'm thinking I can hook it up to one of the 5v+ outputs on either the J5 or J6 connector on my PMDX-126 board, but I'm not sure enough to give it a go.

Anyone here with some advice for an electronically challenged idiot?
Reply With Quote
  #212  
Old Tue 19 February 2013, 17:10
pblackburn
Just call me: Pete #98
 
South-Central Pennsylvania
United States of America
What are you trying to do with the laser? The 5+ V outputs may not have enough mA to supply the laser.
Reply With Quote
  #213  
Old Tue 19 February 2013, 17:22
pblackburn
Just call me: Pete #98
 
South-Central Pennsylvania
United States of America
One caution with laser pointers. The power of 5mW is still a potential eye damaging device. There is a reason your commercial tools come with safety glasses for lasers. The scattered light especially on a reflective surface can lead to eye damage. Lasers are not really regulated here in the US but they are starting to classify them better. Just always respect what you are using. http://en.wikipedia.org/wiki/Laser_safety
Reply With Quote
  #214  
Old Tue 19 February 2013, 17:25
bradm
Just call me: Brad #10
 
Somerville(MA)
United States of America
If you hook it up to one of the 5v outputs and one of the grounds, it will be on all the time.

If you want to control it, you have to connect it to an output signal, one of the pins 2-5 on either J5 or J6, and then configure that port / pin in Mach3.

However, those pins are rated as "TTL/CMOS 5v logic", and aren't necessarily designed to provide a high current output for a long time. I don't see an amperage rating for them in the manual. You should check with PMDX to get a rating, and see if you can come up with an amperage rating for your laserpointer (should be in milliamps in both cases). Usually, you can "sink" more than you can "source", which means you would connect the positive side of the laser pointer to a +5v pin, and the negative side to one of the data pins. When the data pin is "on" at +5v, the laser is off, and vice-versa.

So, if I were doing this, I'd check the amperage ratings, then not trust them, and start off including a 1k resistor in series in the circuit to limit the current just in case. There's a pretty good chance the laser won't fire or will be too dim at that level, so I'd then step down the resistor through what ever values I had available (680 ohm, 470 ohm, ...) , expecting in the end to be happy with the output of the pointer, and still have a little protection with a 100 ohm resistor or so.
Reply With Quote
  #215  
Old Tue 19 February 2013, 17:32
pblackburn
Just call me: Pete #98
 
South-Central Pennsylvania
United States of America
I would switch it on and off with an ice cube relay and control the relay state with Mach
Reply With Quote
  #216  
Old Tue 19 February 2013, 17:39
pblackburn
Just call me: Pete #98
 
South-Central Pennsylvania
United States of America
Here is a copy of an email from pmdx when I was looking at adding a 4th Axis. It does contain some useful information.
*******************************************
Hello Pete,

The data pins of the second port are not utilized within
the PMDX-126, nor are they available on any connector
other than the J17 input connector itself.

We normally expect people to use the port 2 data pins for
non-stepping control signals by adding a PMDX-108-Input
or PMDX-108-Output. All eight data signals must be the
same style (input or output) because the PC definition
of the parallel port does not allow mixing them.

When people want more step and direction signal outputs
we usually recommend that they use pins 1, 14, 16, and 17
of the second parallel port which appear as A, B, C, and D
on connector J5 of the PMDX-126. If you are using these
as control signals, you may be able to move them to a
PMDX-108-Output board.

The PMDX-108 boards "daisy chain" in the middle of the
second parallel port signals on the way to the PMDX-126.

The J18 connector does expose some of the control signals
from the first parallel port, but it is intended for
support of the PMDX-107 spindle controller card.

Regards,
Steve Stallings
PMDX
*******************************************
Reply With Quote
  #217  
Old Tue 19 February 2013, 18:04
darren salyer
Just call me: Darren #101
 
Wentzville mo
United States of America
the current draw is <280mA.
However I do this, I'll probably change to the Mach3 2010 screenset.
Reply With Quote
  #218  
Old Tue 19 February 2013, 18:13
darren salyer
Just call me: Darren #101
 
Wentzville mo
United States of America
Maybe a better option would be a seperate 6v power supply switched through the K2 relay on the PMDX-126 board?
Reply With Quote
  #219  
Old Tue 19 February 2013, 18:40
pblackburn
Just call me: Pete #98
 
South-Central Pennsylvania
United States of America
That is a very viable option. I was assuming you were using the k2 relay already.
Reply With Quote
  #220  
Old Tue 19 February 2013, 18:47
bradm
Just call me: Brad #10
 
Somerville(MA)
United States of America
Yes, that would be a better option. 280mA is way out of range, it would have to be in the 10mA kind of range to drive directly. So, you'll need some kind of relay or switching transistor, or both - the transistor to drive the relay. However, since you're only switching 5v DC, a transistor will work just fine.

http://www.kpsec.freeuk.com/trancirc.htm in the "Connecting a transistor to the output from an IC" section gives a basic overview of the circuit type.

Again, if you're not using the K2 relay, that's a straightforward approach to solving the problem. And Section 13 of the PMDX manual actually makes it clear that you don't want to go much above 16ma on the output pins, and you can't draw more than 350ma total from the onboard 5v supply, which puts your 280 up in the marginal range.

Go with the separate supply and K2 relay
Reply With Quote
  #221  
Old Tue 19 February 2013, 19:16
darren salyer
Just call me: Darren #101
 
Wentzville mo
United States of America
Thanks guys,
One step closer to figured out.
Now, all I have left is switching on/off and offsetting to 0,0...

I envy you guys that have a solid understanding of this stuff.
Reply With Quote
  #222  
Old Tue 19 February 2013, 19:46
David Bryant
Just call me: David #99
 
Western Australia
Australia
Watch out for the maximum power. Is the laser using 5v at 280mA?
Power =Volt X Amps
5X0.28=1.4 Watts input power.
Much too much to mess with without safety issues or are you using it as a marker?
Reply With Quote
  #223  
Old Wed 20 February 2013, 08:23
danilom
Just call me: Danilo #64
 
Novi Sad
Serbia
You can use a relay like this
http://www.ebay.com/itm/5V-Two-2-Cha...item2a26055221

and make a button in mach screen one for on/off and another one with offset zeroing
if you need help with buttons I can send you the code, but if you want to learn about mach its better to try it yourself first
Reply With Quote
  #224  
Old Wed 20 February 2013, 16:05
darren salyer
Just call me: Darren #101
 
Wentzville mo
United States of America
Have the laser mounted, wired to the K2 relay. Relay controlled by pin 14.
Slick so far.
I guess i'll get the 2010 screenset, and start figuring that stuff out.
I'm thinking I may switch the router with the K1 relay while I'm at it.
Tired of reaching out to turn on the router if I don't have to.
Reply With Quote
  #225  
Old Wed 20 February 2013, 18:20
pblackburn
Just call me: Pete #98
 
South-Central Pennsylvania
United States of America
When I was using a router, I used the K1 relay but instead of arcing those contacts I used K1 to control an 40 amp resistive load relay that switched the router on and off. I know PMDX states it can handle 30 amps but it is a small relay. I change relays like that it all the time at work that switch a lot lower loads than a router. To maximize the life of that relay, I would recommend that you use K1 to control an NEMA contactor or definite purpose contactor with a snubber across the coil. This way your board will outlast your machine.
Reply With Quote
  #226  
Old Wed 20 February 2013, 19:22
KenC
Just call me: Ken
 
Klang
Malaysia
Quote:
Originally Posted by David Bryant View Post
Watch out for the maximum power. Is the laser using 5v at 280mA?
Power =Volt X Amps
5X0.28=1.4 Watts input power.
Much too much to mess with without safety issues or are you using it as a marker?
I too worry about eye damage by laser, just make sure it points away from any one's face.

280mA=0.28A is tiny. won't even kill an ant at 5V, let alone arking Relay over 1A rating.
In fact, most BOB with isolated i/o can source enough current to lit the laser pointer directly.the laser will shine even with 2.4V. (which I use) if you are still paranoid, put a series resistor to limit the current to below 0.28A.
All this won't cost more than a dollar to set up (excluding the 50cent per feet wire)
Snubber diode conecct across the + & -ve i/o port is always a good safety measure when the load is inductive or capacitive. such as a relay coil & stepper motor. but if its another diode, (such as LED) its unnecessary, its like protecting a fuse with another fuse.
Reply With Quote
  #227  
Old Thu 21 February 2013, 17:33
darren salyer
Just call me: Darren #101
 
Wentzville mo
United States of America
Well, OK, making progress.

I have the 2010 screenset installed and have my touchplate for z-zero working, using the probe input.

The laser is being switched by opening ports and pins and enabling pin 14.

I know there has to be a way to get the laser to turn on from the screen, so that I can jog to position, before running the offset routine, but I can't figure it out.

I can see this being a huge benefit, once I get it all figured out.
Reply With Quote
  #228  
Old Thu 21 February 2013, 17:58
jessyjames
Just call me: James
 
Reno, Nevada
United States of America
Darren so like the one at my work the laser cross hairs are connected to an input line "N/C". I just hit a button that has laser on it which was created in my works software. 2010 screen set I believe has a way t make your own button and than tie it into a input line. Let me see my notes. I might have the answer.
Reply With Quote
  #229  
Old Thu 21 February 2013, 21:50
pblackburn
Just call me: Pete #98
 
South-Central Pennsylvania
United States of America
Should not be more than creating a button and writing the script to handle it. I don't know if you can use a softkey with brain. If you can that would be the quickest response but you can also use vb script.
Reply With Quote
  #230  
Old Thu 21 February 2013, 22:53
KenC
Just call me: Ken
 
Klang
Malaysia
Brain is fun & powerful, it can do logics which serve your purpose, such as pointer Off when spindle is fired, come back on when the machine is not in G-code... just a few example. but if it is just for switching on/off the pointer, I would suggest along the line of using HotKey assignment, eg. press "L" & toggle the "enable 1" pin, which it is meant for such applications. If you wish to have an on screen button, you just add an on screen soft button & link it to the HotKey. Learning curve is not too steep. Just follow the example/tutorial & its done before you realise it. Even an coding idiot like me can do it (after a few weeks of hair pulling frustrations in the dark because I ignore the manual & tutorials...) but that is my take, other may have their opinions.
Reply With Quote
  #231  
Old Fri 22 February 2013, 01:01
sailfl
Just call me: Nils #12
 
Winter Park, FL
United States of America
I tied mine to the mist to turn on and off and assigned a key on my Shuttle Pro. I also had a macro for the movement to with another key on the Shuttle Pro.
Reply With Quote
  #232  
Old Fri 22 February 2013, 02:49
Red_boards
Just call me: Red #91
 
Melbourne
Australia
Is the laser button in Mach10 not connected to anything? (It's the red +, 4th from right end, from memory)
Reply With Quote
  #233  
Old Fri 22 February 2013, 06:09
darren salyer
Just call me: Darren #101
 
Wentzville mo
United States of America
LOL.
All you guys telling me how easy it is and how you did it.....its all greek to me. I'll be doing some more researching, looking for the tutorials mentioned, etc.

My understanding of the laser button, is it starts the macro to do the offset move as soon as its pressed.
I need to turn the laser on and have time to jog it into position on the workpiece before I start the offset macro.
All the directions I'm finding are like roadmaps that assume you know the area.
They start me off in the middle of the journey.
This old carpenter has to find the start point and work from there.
Reply With Quote
  #234  
Old Fri 22 February 2013, 06:40
jessyjames
Just call me: James
 
Reno, Nevada
United States of America
Darren have you installed your macro files into your profile correctly? I remember reading this about someone.

Copy Macros
Once the instalation is finished, several macros need to be manually installed. The 2010 Screenset macros are installed by default into \Mach3\macros\2010. They need to be copied into \Mach3\macros\Your_Profile. If you don't know the profile name you're using, it can be found in Mach3 when running the default 1024 Screenset, in the lower right corner. Before copying the 2010 macros, you should backup the existing M6Start.m1s and M6End.m1s macro's, in case you decide to remove the 2010 screenset. Then copy the following macros from \Mach3\macros\2010
Reply With Quote
  #235  
Old Fri 22 February 2013, 06:51
darren salyer
Just call me: Darren #101
 
Wentzville mo
United States of America
Yes I did.
This is such a slippery slope I'm on.....lol.
Opened the control box for the first time to add the laser crosshair.
THEN "while I'm at it" hit.
Mach3 2010 screenset,
Auto zero touchplates,
laser control from screen,
and now, I'm looking at the K1 relay to power a contactor coil to control the router.
This will require post processor work.

And now, I'm almost done with a black box vac source... to keep it simple, I'll control it with a handheld wireless remote.

Everyday is a learning experience, and I love it.
Reply With Quote
  #236  
Old Fri 22 February 2013, 07:02
Surfcnc
Just call me: Ross #74
 
Queensland
Australia
ML890.m1s is copied to the mach3/macros/mach3mill directory.
ML890.m1s can be opened and edited in notepad... it looks like this.

XOffset = 3.43 'X offset from laser crosshair to spindle
YOffset = 4.322 'Y offset from laser crosshair to spindle


SetOEMDRO(800,XOffset)
SetOEMDRO(801,YOffset)

Sleep(125)


Subsitute your offsets for the x and Y axis for your laser, then save the file.

1. To use the macro move your laser (that is jog your machine with the laser on) to the corner or whatever you are lining up to.
2. Press the laser button and the machine will now move the cutter bit to the exact position the laser was just pointing to.

Old has nothing to do with it, if it did then I would be in a whole heap of trouble

Regards
Ross
Reply With Quote
  #237  
Old Fri 22 February 2013, 07:43
darren salyer
Just call me: Darren #101
 
Wentzville mo
United States of America
Hi Ross,
I get that part perfectly ( I think)
What I want to do, is add a button to turn the laser on before I run the offset.
Ideally, the macro would turn the laser off after the bit is zero'd.
I'm having to go into ports and pins and enable/disable pin 14 to switch the laser on/off currently.
Reply With Quote
  #238  
Old Fri 22 February 2013, 19:15
pblackburn
Just call me: Pete #98
 
South-Central Pennsylvania
United States of America
Macro or Brain. Sorry not more than that but there is plenty of information available. You can watch many tutorials on Brain. It would be easier than trying to explain vb script. If you create a button on your screen, you can edit the button script with the editor if you stay with script.
Reply With Quote
  #239  
Old Fri 22 February 2013, 23:12
Surfcnc
Just call me: Ross #74
 
Queensland
Australia
What about using the M7 or M8 buttons that are already there on the screenset to switch an external relay that operates the laser.

You have to enable the mist / flood option in Mach3 in config, spindle setup.
Set an output number that relates to the ports and pins, output signals (1- 6), you have set up for the pin you are using to switch the relay.

This will not turn off automatically but will turn on and off from Mach3 by just clicking the button.

Brads comments are spot on and if you can establish the board is ok to provide the voltage you need it gets even simpler as the relay can be excluded.

Ross

Last edited by Surfcnc; Fri 22 February 2013 at 23:17..
Reply With Quote
  #240  
Old Sat 23 February 2013, 00:20
KenC
Just call me: Ken
 
Klang
Malaysia
Don't be intimidated by the laser pointer, its electrical requirement is no difference from a torchlight.
Dump all the relays & go sirect connection to BOB. Connect it's +V to one of your output pin & 0V to the BOB's COM pin. than assign the pin to a HotKey & make that a toggle key. After this, you just press the key sctroke & you will get it working.
If you wish to persue further into crating a soft botton on-screen, you can then proceed... My point is to get the laser running 1st. K.I.S.S. is my motto.

If you are not sure of your output pin current rateing, you can add a current limiting resistor (10~22 ohm, the value isn't critical anything around this value will work, connect one end to the +V of the laser & pluct the other end of the resistor into the Output pin) to limit the current to 100mA, or 0.1A

Last edited by KenC; Sat 23 February 2013 at 00:32.. Reason: add points
Reply With Quote
Reply

Register Options Profile Last 1 | 3 | 7 Days Search Today's Posts Mark Forums Read

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
University Of Missouri Saint Louis Theater ganderson Introduce yourself and start planning 8 Fri 31 October 2014 17:53
Starting my MM Build - St Louis MO USA inventek2000 Construction started, but not cutting yet 38 Sun 25 September 2011 17:51
my machine cnc marcoscnc29 Archives 1 Sat 24 April 2010 17:58


All times are GMT -6. The time now is 15:41.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.