Welcome! Log In Create A New Profile

Advanced

help with arduino X axies

Posted by nitros 
help with arduino X axies
October 21, 2019 06:29AM
Hi, All,
sorry i couldn't find the presentation section so i post it here,
I will briefly tell you my issue so perhaps you can tell me on which section should i post my tread,
I have an 3d printer, LittleRP, which is controlled by sparkfun RedBoard, the printer is second hand, i have not clue how is programming with arduino, now this printer never worked as it should, most probably some issue on the firmware, i was trying to install a firmware that i found online with the hope to fix my issue but i guess i made it worst, so that's why i'm here.
I would like to erase/format my board and install the new firmware, Can you please guide me how to do that?

Thanks and Sorry for the long Tread
Re: help with arduino X axies
October 21, 2019 07:56AM
LittleRP is resin printer, it doesn't have a X axis. It only has a Z axis

The firmware as a hex file seems to be here [github.com]
The source is here [github.com]

Whenever you upload new firmware it automatically erases the old
Re: help with arduino X axies
October 21, 2019 07:58AM
thank you for your help, i found those already the issue i don't know how to load them
Re: help with arduino X axies
October 21, 2019 08:28AM
to upload a hex file you will need to use avrdude on the command line

something along the lines of avrdude -B 1 -V -p m328p -c arduino -P {your com port} -U flash:w:{file.hex}:i -U

where you have replaced {} with your machine specifics
This makes the assumption there is a bootloader installed in the 328p

If there is no bootloader you need a second bit of hardware called an avrisp and you use that to either upload a bootloader or put the code directly on the 328p

Edited 2 time(s). Last edit at 10/21/2019 08:34AM by Dust.
Re: help with arduino X axies
October 21, 2019 08:42AM
Quote
Dust
to upload a hex file you will need to use avrdude on the command line

something along the lines of avrdude -B 1 -V -p m328p -c arduino -P {your com port} -U flash:w:{file.hex}:i -U

where you have replaced {} with your machine specifics
This makes the assumption there is a bootloader installed in the 328p

If there is no bootloader you need a second bit of hardware called an avrisp and you use that to either upload a bootloader or put the code directly on the 328p

I done as you suggested it seem it loaded but if i open the serial monitor nothing happen
Re: help with arduino X axies
October 21, 2019 08:44AM
Did you set the correct baud rate?
Re: help with arduino X axies
October 21, 2019 08:45AM
Quote
Dust
Did you set the correct baud rate?
I don't know which one is the correct one?
Re: help with arduino X axies
October 21, 2019 08:46AM
Its in the file name grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex

9600 baud

Edited 1 time(s). Last edit at 10/21/2019 08:47AM by Dust.
Re: help with arduino X axies
October 21, 2019 08:49AM
Quote
Dust
Its in the file name grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex

9600 baud

ok so yes i choose the right one but still nothing, i tried to install another one and it work but has move axis than only Z, but still i don't know why the monitor does not work, is there a way to check if i load it?
Re: help with arduino X axies
October 21, 2019 08:54AM
This is another one and it load fine as yuo can see
Attachments:
open | download - Cattura.PNG (93.1 KB)
Re: help with arduino X axies
October 21, 2019 09:10AM
Ok I just tred this on a standard UNO (this is on my linux machine)

avrdude -B 1 -V -p m328p -c arduino -P /dev/ttyACM0 -U flash:w:grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex:i  -C avrdude.conf

the results

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f (probably m328p)
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 "grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex"
avrdude: writing flash (21738 bytes):

Writing | ################################################## | 100% 3.48s

avrdude: 21738 bytes of flash written

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

avrdude done.  Thank you.


now I load up monitor and select the correct com port @ 9600 baud and I get

Grbl 0.8a
'$' to dump current settings
Re: help with arduino X axies
October 21, 2019 09:13AM
Your image shows that the upload failed and that the version currently running is 9j and that it is talking at 115200 baud...

Edited 1 time(s). Last edit at 10/21/2019 09:15AM by Dust.
Re: help with arduino X axies
October 21, 2019 09:16AM
Sketch uses 444 bytes (1%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
E:\documenti\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CE:\documenti\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM5 -b115200 -D -Uflash:w:C:\Users\Adriano\AppData\Local\Temp\arduino_build_899097/sketch_oct21a.ino.hex:i 

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, [www.bdmicro.com]
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "E:\documenti\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM5
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         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: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\Adriano\AppData\Local\Temp\arduino_build_899097/sketch_oct21a.ino.hex"
avrdude: writing flash (444 bytes):

Writing | ################################################## | 100% 0.19s

avrdude: 444 bytes of flash written
avrdude: verifying flash memory against C:\Users\Adriano\AppData\Local\Temp\arduino_build_899097/sketch_oct21a.ino.hex:
avrdude: load data flash data from input file C:\Users\Adriano\AppData\Local\Temp\arduino_build_899097/sketch_oct21a.ino.hex:
avrdude: input file C:\Users\Adriano\AppData\Local\Temp\arduino_build_899097/sketch_oct21a.ino.hex contains 444 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.17s

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

avrdude done.  Thank you.
Quote
Dust
Ok I just tred this on a standard UNO (this is on my linux machine)

avrdude -B 1 -V -p m328p -c arduino -P /dev/ttyACM0 -U flash:w:grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex:i  -C avrdude.conf

the results

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f (probably m328p)
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 "grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex"
avrdude: writing flash (21738 bytes):

Writing | ################################################## | 100% 3.48s

avrdude: 21738 bytes of flash written

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

avrdude done.  Thank you.


now I load up monitor and select the correct com port @ 9600 baud and I get

Grbl 0.8a
'$' to dump current settings

I must be doing something wrong where do i need to write the avrdude command the you suggested ?
Re: help with arduino X axies
October 21, 2019 09:30AM
Your not uploading the hex file..

Your compiling a random version of grbl you found somewhere which generates its own hex file that is then uploaded.


Open the command prompt [www.howtogeek.com]

from what you have provided you need the command
E:\documenti\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -B 1 -V -p m328p -c arduino -P COM5 -U flash:w:grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex:i  -C E:\documenti\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf


This presumed the file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex is in the directory you run this command from.

Edited 2 time(s). Last edit at 10/21/2019 09:33AM by Dust.
Re: help with arduino X axies
October 21, 2019 09:40AM
Quote
Dust
Your not uploading the hex file..

Your compiling a random version of grbl you found somewhere which generates its own hex file that is then uploaded.


Open the command prompt [www.howtogeek.com]

from what you have provided you need the command
E:\documenti\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -B 1 -V -p m328p -c arduino -P COM5 -U flash:w:grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex:i  -C E:\documenti\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf


This presumed the file grbl_v0_8a_edge_328p_16mhz_9600_build20120310.hex is in the directory you run this command from.

thank you for your help i tried your command prompt but it does not work i guess as you presumed the hex file need to be in the correct directory at the moment the hex file is in the desktop, do i need to past it somewhere specific to make it work.


I'm so sorry but i'm in something bigger than me and i really appreciate your patience smileys with beer
Re: help with arduino X axies
October 21, 2019 09:44AM
do a "cd Desktop" first then you are in the same directory as the hex file
Re: help with arduino X axies
October 21, 2019 10:27AM
ok thank you all worked, i will change the values accordly and should work if i launch Creationtion workshops?
Re: help with arduino X axies
October 21, 2019 10:29AM
Should do...
Re: help with arduino X axies
October 21, 2019 10:36AM
Quote
Dust
Should do...

Thank you all working Dust you are a Star, now should i open a new tread regarding the printing issue that i have? and because of that i messed with arduino?
Sorry, only registered users may post in this forum.

Click here to login