Mini Laser Engraver

Da wiki.piffa.net.

Informazioni generali[modifica]

Realizzato sulla base di questo progetto: http://www.instructables.com/id/MicroSlice-A-tiny-Arduino-laser-cutter/?ALLSTEPS



Informazioni utili[modifica]



Schemi, sorgenti e materiali[modifica]

Schema dello stepper presente su banggood v4.4 di EasyDriver

https://cdn.sparkfun.com/datasheets/Robotics/EasyDriver_v44.pdf

Codice da caricare su Arduino

https://github.com/grbl/grbl/downloads

https://github.com/grbl/grbl

NOTA: Dal firmware 0.9 la velocità di dialogo tra il pc ed Arduino per gestire l'upload del G-Code è 115200 bps

Come realizzare il progetto[modifica]

La guida per caricare il firmware

https://github.com/grbl/grbl/wiki/Flashing-Grbl-to-an-Arduino

Per fare tale operazione sotto linux usare lo script

https://dl.dropboxusercontent.com/u/54312401/grbl/grblflash

avviare dalla stessa cartella in cui si è scaricato il firmware file .hex

Quando si esegue lo script esso chiede dove sono il file avrdude.conf , la cartella di avrdude

e su quale interfaccia seriale è collegata la scheda Arduino quindi conviene prima di eseguirlo

controllare i percorsi e la porta seriale.


Note e avvertenze finali[modifica]

  • Dal firmware 0.9 la velocità di dialogo tra il pc ed Arduino per gestire l'upload del G-Code è 115200 bps

Prima versione, premere per ingrandire. Dimensionamento resistenza: http://goo.gl/ceNLUs

Laser bb.jpg

Duplicare il contenuto di una scheda Arduino[modifica]

Puo' tornare utile essere in grado di duplicare il software pre-installato su una scheda Arduino utilizzata per controller dei driver dei motori STEP, la seguente procedure ha funzionato per duplicare una Uno:

Copia della RAM

copy:# avrdude -c arduino -P /dev/ttyUSB0 -p atmega328p -Uflash:r:/tmp/copy.hex:i

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f avrdude: reading flash memory:

Reading | ################################################## | 100% 4.36s

avrdude: writing output file "/tmp/copy.hex"

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done. Thank you


Riscrittura su un'altra scheda:

copy:# avrdude -c arduino -P /dev/ttyACM0 -p atmega328p -Uflash:w:/tmp/copy.hex:i

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed

        To disable this feature, specify the -D option.

avrdude: erasing chip avrdude: reading input file "/tmp/copy.hex" avrdude: writing flash (32768 bytes):

Writing | ################################################## | 100% 6.05s

avrdude: 32768 bytes of flash written avrdude: verifying flash memory against /tmp/copy.hex: avrdude: load data flash data from input file /tmp/copy.hex: avrdude: input file /tmp/copy.hex contains 32768 bytes avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 4.56s

avrdude: verifying ... avrdude: 32768 bytes of flash verified

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done. Thank you Assicurarsi di usare le corrette porte USB, nell'esempio precedente /dev/ttyUSB0 per l'originale e /dev/ttyACM0 per la destinazione. Su un sistema Windows potrebbe essere qualcosa come (non testato): avrdude -c arduino -P com20 -p atmega328p -Uflash:r:c:\hexfiles\test.hex:i A seguire le istruzioni per copiare / scrivere una Arduino Nano: avrdude -c arduino -b 57600 -P /dev/ttyUSB0 -p atmega328p -vv -U flash:r:/tmp/nano_copy.hex

avrdude: Version 6.1, compiled on May 1 2015 at 03:24:01

        Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
        Copyright (c) 2007-2014 Joerg Wunsch
        System wide configuration file is "/etc/avrdude.conf"
        User configuration file is "/root/.avrduderc"
        User configuration file does not exist or is not a regular file, skipping
        Using Port                    : /dev/ttyUSB0
        Using Programmer              : arduino
        Overriding Baud Rate          : 57600
        AVR Part                      : ATmega328P
        Chip Erase delay              : 9000 us
        PAGEL                         : PD7
        BS2                           : PC2
        RESET disposition             : dedicated
        RETRY pulse                   : SCK
        serial program mode           : yes
        parallel program mode         : yes
        Timeout                       : 200
        StabDelay                     : 100
        CmdexeDelay                   : 25
        SyncLoops                     : 32
        ByteDelay                     : 0
        PollIndex                     : 3
        PollValue                     : 0x53
        Memory Detail                 :
                                 Block Poll               Page                       Polled
          Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
          flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
          lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
          hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
          efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
          lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
          calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
          signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
        Programmer Type : Arduino
        Description     : Arduino
        Hardware Version: 2
        Firmware Version: 1.16
        Vtarget         : 0.0 V
        Varef           : 0.0 V
        Oscillator      : Off
        SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f avrdude: safemode: lfuse reads as 0 avrdude: safemode: hfuse reads as 0 avrdude: safemode: efuse reads as 0 avrdude: reading flash memory:

Reading | ################################################## | 100% 7.67s

avrdude: writing output file "/tmp/nano_copy.hex" avrdude: output file /tmp/nano_copy.hex auto detected as invalid format avrdude: invalid output file format: -1 avrdude: write to file '/tmp/nano_copy.hex' failed

avrdude: safemode: lfuse reads as 0 avrdude: safemode: hfuse reads as 0 avrdude: safemode: efuse reads as 0 avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done. Thank you.


Scrittura

avrdude -c arduino -b 57600 -P /dev/ttyUSB0 -p atmega328p -vv -U flash:w:/tmp/nano_copy.hex

avrdude: Version 6.1, compiled on May 1 2015 at 03:24:01

        Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
        Copyright (c) 2007-2014 Joerg Wunsch
        System wide configuration file is "/etc/avrdude.conf"
        User configuration file is "/root/.avrduderc"
        User configuration file does not exist or is not a regular file, skipping
        Using Port                    : /dev/ttyUSB0
        Using Programmer              : arduino
        Overriding Baud Rate          : 57600
        AVR Part                      : ATmega328P
        Chip Erase delay              : 9000 us
        PAGEL                         : PD7
        BS2                           : PC2
        RESET disposition             : dedicated
        RETRY pulse                   : SCK
        serial program mode           : yes
        parallel program mode         : yes
        Timeout                       : 200
        StabDelay                     : 100
        CmdexeDelay                   : 25
        SyncLoops                     : 32
        ByteDelay                     : 0
        PollIndex                     : 3
        PollValue                     : 0x53
        Memory Detail                 :
                                 Block Poll               Page                       Polled
          Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
          flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
          lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
          hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
          efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
          lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
          calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
          signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
        Programmer Type : Arduino
        Description     : Arduino
        Hardware Version: 2
        Firmware Version: 1.16
        Vtarget         : 0.0 V
        Varef           : 0.0 V
        Oscillator      : Off
        SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f avrdude: safemode: lfuse reads as 0 avrdude: safemode: hfuse reads as 0 avrdude: safemode: efuse reads as 0 avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed

        To disable this feature, specify the -D option.

avrdude: erasing chip avrdude: reading input file "/tmp/nano_copy.hex" avrdude: input file /tmp/nano_copy.hex auto detected as invalid format avrdude: invalid input file format: -1 avrdude: read from file '/tmp/nano_copy.hex' failed

avrdude: safemode: lfuse reads as 0 avrdude: safemode: hfuse reads as 0 avrdude: safemode: efuse reads as 0 avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done. Thank you. <copy>