Connecting TinyG to Laser (L-Cheapo)

Home Forums TinyG TinyG Support Connecting TinyG to Laser (L-Cheapo)

Tagged: ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #6654
    fponticelli
    Member

    I got my hands on one of these: https://www.indiegogo.com/projects/l-cheapo-laser-cutter-attachment
    It is 24v and I plan on mounting it on my OX (http://www.openbuilds.com/builds/openbuilds-ox-cnc-machine.341/) this weekend.
    Any suggestion on how to connect it and control it from a tinyg?

    Thanks in advance,

    Franco

    #6655
    cmcgrath5035
    Moderator

    Others stop by this forum with similar questions, but not much meat on the discussions yet.

    Suggestions where you might find hints:
    1. At the top level of this Forum, do a search on ‘laser’

    2. Have a look here

    If you succeed, stop back here and describe what works for you

    • This reply was modified 10 years, 3 months ago by cmcgrath5035.
    #7789
    enhering
    Member

    Hi.

    I’m bringing some insights to this discussion:

    0 – I have a ShapeOko2 fitted with a few upgrades;

    1 – My controller is a TinyG. It was bought in December 2014;

    2 – I bought the following items from eBay to build 2 diode lasers:

    Personal protection:
    111416683541 Protective Goggles for Violet/Blue 200-450/800-2000nm

    Laser diode mount (very good):
    181095664813 3 pack 12x30mm Copper 5.6mm LD Mount Module & Press Tool

    Support for laser mount that fits easily to ShapeOko2:
    161259035015 12mm SK12 Linear Rail Shaft Guide

    Heatsink to prevent overheating:
    231319696413 Heatsink/ Heat Sink for 12mm Laser Diode Module

    405nm laser:
    120894912588 New 405nm-410nm 120mW TO18 5.6mm Sony Laser Diode
    400520360369 405nm 50mw-400mw Violet/Blue Laser Driver 12V with TTL
    261553641530 Power Supply AC 100-240V To DC 12V 2A
    180715232691 445nm 405nm Three Element Glass Lens for Aixiz Module

    808nm laser:
    260834691532 808nm 500mW 5.6mm TO-18 Infrared IR Laser Diode No PD
    330875517474 Laser Diode Driver for 808nm&532nm +660nm with TTL
    221572050124 AC Converter Adapter DC 5V 3A
    261230108802 808nm 3 layer Glass Laser Collimation Lens

    3 – Both laser diode (LD) drivers support TTL, on/off, control with switching frequency up to 20kHz;

    4 – Only one of the lasers will be installed at a time on the machine;

    5 – The LD driver can be connected to TinyG via, for example, the coolant control;

    6 – I’d like to use the setup to burn the ink over black painted PCBs, or just to impress a photoresist coated PCB, whichever works better. After drawing an insulation path over the PCB, I will use the ShapeOko2 Spindle to drill the holes and to cut out the PCB;

    7 – I have mounted the laser on one side of the ShapeOko2 part that holds the spindle, while the spindle is mounted on the opposite side, as a regular ShapeOko2 is built;

    8 – GCode needs to be generated from the product of a PCB design program such as Eagle. Usually Eagle output is in the gerber format and gerber can be translated to GCode. One way of doing it is by using the Cirqoid open source solution. I believe it is called cirQWizard;

    9 – BUT, whatever is the format of the GCode produced, the laser on/laser off commands needs to be translated to the commands that effectively control the laser module TTL switch. In this example, every time the TinyG control program sees a LASER ON/LASER OFF command, it should substitute that command for a COOLANT ON/COOLANT OFF command.

    These are my contributions to the topic at this moment. If you find them useful or you can contribute to them, please comment. Thanks.

    #7790
    enhering
    Member

    Please let me add some more information:

    10 – If the LD driver is controlled by a digital TTL signal, the laser can be either ON or OFF;

    11 – If you plan to engrave a picture into a piece of wood, for example, the picture should be transformed into a dithered picture;

    12 – I’m not sure about this: In dithered picture we have big and small dots. If so, bigger dots should be translated into more laser power, but we do not have power control in digital TTL LD drivers so it would be useful to find a way to emulate more power using constant power;

    13 – I’d like to believe that the higher power needed can be translated into a higher integrated laser intensity, i.e., instead of modulating the laser power we leave the laser on, over the same spot, for a longer time;

    14 – But this would rely on a good timing control on the TinyG, and the TinyG was not built to count the time between events. I believe it has not. So what else can I do? Maybe the bigger dots can be translated into deepness. In this way, if the dot is bigger, the CNC machine would act as if it should move the spindle into the material. By setting the plug rate to a small value, if a dot is big the z-axis would be moved slowly down and this would give us the time control we need to illuminate that spot for a longer time and make a darker print in the material;

    15 – The solution proposed on the last item may be employed through a CAM software such as MeshCAM, but there are others, many free. But not all others run, well or not, on a Mac.

    For now, that is all I got.

    #7791
    jlauer
    Member

    I would try out the Laser Solder widget inside ChiliPeppr. It just watches the Z axis and turns the laser on when below a certain threshold. What it’s doing to turn the laser on though is sending the word “laser-on” or “laser-off” to an Arduino. The Arduino app is at https://github.com/chilipeppr/LaserSolder/tree/master/arduino and I would just use the toggling.

    The reason for the Arduino approach is that if you did need to send really fast toggling of the laser, you’ll need more than a TTL from the TinyG. I keep envisioning that the Arduino gets pre-loaded with say 1,000 on/off values ready to go. Then you have the Arduino watch for a trigger voltage from TinyG from the coolant switch. So, it’s sort of a triangle of ChiliPeppr as the orchestrator, then TinyG doing it’s thing, with Arduino getting uploads of data from CP and getting a trigger from TinyG at the right moment.

    Now, since you are just doing PCB lasering, you really could just toggle the laser on from an Arduino using the Laser Solder widget, or you could just do coolant on/off. Since most PCB code generators, including ChiliPeppr’s Eagle BRD Import, generate z-height clearances, that is your easiest way to decide to toggle a laser.

    You could of course also just use the coolant on/off command in your Gcode which means you don’t need anything special inside ChiliPeppr.

    #7792
    enhering
    Member

    Thanks, jlauer.

    I have just found this:

    Shapeoko 1 and 2 CNC Upgrade

    #7809
    enhering
    Member

    jlauer,

    Thank you for your suggestion. I implemented it using boost::regex and now I can activate a LASER MODE on the program. If activated it translates the Z movements as coolant ON/OFF.

    Wed-03.06.2015-20:19 (001.008086 s): (GCodeSender)  LASER MODE: GCode is G1Z-0.6943F50.0
    Wed-03.06.2015-20:19 (000.003339 s): (GCodeSender)  LASER MODE: Z instruction found.
    Wed-03.06.2015-20:19 (000.003266 s): (GCodeSender)  LASER MODE: Substituted GCode is G1F50.0
    Wed-03.06.2015-20:19 (000.003265 s): (GCodeSender)  Sent: {rx:n}
    Wed-03.06.2015-20:19 (000.053243 s): (GCodeSender)  Received: {"r":{"rx":254},"f":[1,0,7,2570]}
    Wed-03.06.2015-20:19 (000.003262 s): (GCodeSender)  Sent: {"gc":"G1F50.0"}
    Wed-03.06.2015-20:19 (000.003434 s): (GCodeSender)  Sent: {rx:n}
    Wed-03.06.2015-20:19 (000.053341 s): (GCodeSender)  Received: "r":{},"f":[1,0,17,76]}
    Wed-03.06.2015-20:19 (000.004451 s): (GCodeSender)  Sent: {rx:n}
    Wed-03.06.2015-20:19 (000.053482 s): (GCodeSender)  Received: {"r":{"rx":254},"f":[1,0,7,2570]}
    Wed-03.06.2015-20:19 (000.003367 s): (GCodeSender)  Sent: {"gc":"M07"}
    

    Instead of using a specify program for generating GCode from GERBER files, I decided to follow the following workflow:

    1 – Draw your board, export the layers to GERBER format;
    2 – Open gerbv, installed on a Mac through MacPorts, load the GERBER layer and export it to PNG;
    3 – Open MeshCAM, load the PNG layer, set the Z thickness to 0.1mm and set black to +Z. Follow the normal procedure and generate a tollpath only with the pencil pass. Save the G-Code to a file;
    4 – Send the GCode file to your CNC machine.

    In this way I get a GCode sequence that does the insulation milling around the circuit paths.

    Everything seems ready to test, but I still have to wire the laser to the driver and the driver to TinyG. When I have the first results I can post them here if you wish.

    Thanks again for your kind attention.

    Best regards,

    Eduardo

    #7833
    enhering
    Member

    I have posted the latest laser results here:

    http://gabuleu.blogspot.fr

    The 0.5W is producing nice results against a black ink covered PCB.

    #7834
    enhering
    Member

    One question: Does TinyG have a second PWM output, or only the spindle one?
    I’d like to use a second one to control laser power.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.