Thread: Laser wiring issue.
22nd Mar 2011, 05:10 PM #1
Laser wiring issue.
This may be one for Greg - I have used Greg's script to turn a laser cross-hair on/off.
However - I am having some teething problems.
The laser runs beautifully from two 1.5v batteries, and from the 5v outlet of a computer power-supply - just somewhat brighter.
I concluded that the wiring is therefore OK.
However, when I try to run it from my B.O.B. (CNC10, - pin 17, - set for output5, Mist Control), as suggested by Greg, it either triggers a 'reset', just like a limit switch, or gives a message in Mach3 saying çompile error'. I am running two B.O.B's and get the same result from both.
I have double-checked the code from Greg and it is definitely correct.
I also tried running it direct from the 5v outlet on the power supply for my machine (an un-regulated toroid supply which has three outlets: 64vdc, 12vdc, and 5vdc).
When I hook the laser leads to the 5v outlet, the lights go out on both my B.O.B.;'s, there is a çlunk' noise from somewhere inside the works, and the laser does not work.
When I then try it again with either the batteries or the computer-supply, it works fine.
I have tried several different pins on both B.O.B's, and with the pins set to both áctive high', and áctive low', but still no joy.
I guess I could simply wire the laser into a battery box and run a manual swith for it, but would like to get it running áutomatically'if possible.
I have consulted a friend who is wise in the ways of electronics, but even he is baffled. - Any suggestions would be greatly appreciatted.
22nd Mar 2011 05:10 PM # ADSGoogle Adsense Advertisement
- Join Date
- Advertising world
22nd Mar 2011, 06:13 PM #2
OK Guys - looks like "problem solvered' (sic).
It appears that these small lasers are actually earthed to their case - this being the case (heh heh) then I only need one wire to the B.O.B. Connecting the second wire actually shorts out the circuit. apparently it works with the batteries and the computer supply because both of these are "floating"power supplies, but as the machine is earthed properly to start with, when I attached the second ëarth"wire from the laser, it actually caused a "short".
Well - thanks anyway guys - will try connecting oit with only one wire to the B.O.B. tomorrow and see what happens.
22nd Mar 2011, 08:03 PM #3
Yes, I use a laser mount that insulates the laser body from the machine.
22nd Mar 2011, 08:58 PM #4
I discovered the laser shorts to the case a while back and have done the same as Greg.
Here is an example on Tubot which is under construction. Nothing flash just a piece of plastic with a flange and a grub screw to hold it in place.Cheers,
23rd Mar 2011, 05:22 PM #5
Thanks Greg and Rod.
I know I am getting older - but must also be getting sillier. I built a laser holder from a teflon block and mounted that to the spindle mount.
Now can get the laser to light if I touch the wires to the 5vdc outlet - so far so good.
However - and this must be where the ólder/sillier'part kicks in, I have connected the wires in all possible combinations to outputs 14, 16, and 17, and with all combinations of active high/active low.
Still no success - all I get is a message in Mach3 saying 'scripter compile error'.
Could one of you kind gentleman tell me exactly how you have wired this blessed thing up - i.e. which wire goes to which terminal - is it active high or low, aaargh!!
I have set Mist control to Output 5, and as far as I can see, Greg's script for the button is spot on.
Under Output Signals I have enabled Output 5, assigned it to Port 2 (second B.O.B. - have also tried B.O.B. 1) assigned it to one of the Output pins (14, 16, or 17), and tried both active high and active low.
If I wasn't so 'bloody-minded', I would probably just cut my losses and use a battery, but being a stubborn Vietnam vet, I will grind on regardless.
(Also, what does it really mean when it says 'scripter compile error'?)
As usual - any and all help greatly appreciated - well - now I think it's time for a 'red' to soothe the nerves.
At least this new machine is keeping me on my toes and exercising the brain.
23rd Mar 2011, 06:11 PM #6
Frustrating this electrickery.
I don't know Greg's setup but I have trouble imagining a laser crosshair attached to mist control which is a spindle function. I'll leave that for Greg to clarify for you.
I suggest you stay with just one position on your BOB until you get it working. Trying diferent pins is only going to confuse you.
A simple thing is have you enabled Output #5? First column in the ports and pins. I ask silly questions as the simple things are usually overlooked.
Active high is the correct setting - you need the 5 volts to drive the laser.
Scripter Complie error is a Visual Basic error message telling you there is an error in the script.
I don't know what screen you are using but if it is the standard Mach3 screen set then try this. If not then perhaps load the standard screen set to troubleshoot this problem.
Top menu go "Operator" then "Edit button Script" then select the "Program Run" screen and the flashing button "Auto Tool Zero". This is an unused button so you can play with it without affecting anything in Mach3.
Copy and paste this script to the now popped up Mach3 VB script editor.
If IsOutputActive(OUTPUT5) Then
You paste this over or delete the existing line in that button which should say
Message( "Not Yet Implemented" )
Save the script and exit.
Go to top menu again and "Config" then "Ports and Pins" then "Output Signals"
Set up output #5
enabled, Port address, pin address and active high.
Go to "Program Run" screen and press the "Auto Tool Zero" button.
Laser should light up and if you go to the "Diagnostics" screen you will see a screen lamp light up bottom right beside the "Output 5" description.
This will serve to test your wiring and software switching logic. Once you have it toggling on the above you at least know it is working and can troubleshoot Greg's method of working the laser.Cheers,
23rd Mar 2011, 09:27 PM #7
Rod has given you some good guidance and I will leave yo with that at present.
The only thing I will say is,
"scripter compile error" sounds like VB error rather than electrical hookup.
25th Mar 2011, 02:04 PM #8
EDIT: You can check this by powering the laser. Put you -ve probe to the case and +ve probe to positive either on the battery or the RED wire. If you see a (-) minus on the multimeter, then you case is of course positive.
Now, having also said this and read the feedback Rod provided, I have found that I could not get the laser to work on my SYIL X4. I was experiencing the same problem. I came to the conclusion that the driver on my BoB was incapable of supplying the correct voltage to the unit and confirmed this by using a multimeter.
I measured 2.2 volts when I enabled the output (ON) and 0.7 volts (OFF) when the output was disabled. You may want to check this on your setup. I have bypassed the BoB now and am using a 5vdc plug pack which i put in or pull out to turn the unit on and off. I would like to change the BoB over that i have but they system also provides my spindle control and it's just to much work for the reward. I just use the script to move the spindle to be over the unit
best of luck
25th Mar 2011, 08:51 PM #9
I have found the same on ten of these units - positive to the case. Why would they do this?
Noel is using a CNC C10 board which requires 5 volt input and I have fitted the lasers to three of these board and have been able to power the laser on the C10 at 5 volts through the output pin.
Just to let you know I refer to your documentation on the VFD hookup everytime I need to do a new machine. Great work and thanks for taking the time to do it and share with the forum.Cheers,
By colmkarter in forum GENERAL & SMALL MACHINERYReplies: 3Last Post: 23rd Feb 2011, 07:13 PM
By HzSandman in forum CNC MachinesReplies: 11Last Post: 25th Jul 2010, 08:31 PM
By Reno RSS Feed in forum PLUMBING, ELECTRICAL, HEATING, COOLING, etcReplies: 0Last Post: 18th Jul 2009, 12:40 AM
By old_picker in forum MUSICAL INSTRUMENTSReplies: 3Last Post: 24th Dec 2006, 10:11 AM
By Iain in forum WOODWORK - GENERALReplies: 16Last Post: 29th Aug 2005, 11:17 AM