Quantcast
Channel: Reprap Forum - Sanguino(lolu)
Viewing all 1033 articles
Browse latest View live

Re: Sanguinololu Rev 1.3a - how to load firmware

$
0
0
an avrisp is additional hardware, commonly another ardunio running isp firmware


since you don't have this your limited to option 1


Yes baudrate is a possibility

you need to find the boards.txt file it contains a section

###### ATmega1284x

## Sanguino W/ ATmega1284 or ATmega1284P 16MHz
sanguino.menu.cpu.atmega1284p=ATmega1284 or ATmega1284P (16 MHz)

sanguino.menu.cpu.atmega1284p.upload.maximum_size=130048
sanguino.menu.cpu.atmega1284p.upload.maximum_data_size=16384
sanguino.menu.cpu.atmega1284p.upload.speed=115200

sanguino.menu.cpu.atmega1284p.bootloader.file=optiboot/optiboot_atmega1284p.hex

sanguino.menu.cpu.atmega1284p.build.mcu=atmega1284p
sanguino.menu.cpu.atmega1284p.build.f_cpu=16000000L

you can try changing
sanguino.menu.cpu.atmega1284p.upload.speed=115200
to other speeds, I've see bootloaders use 38400 and 57600
NB you need to restart the ardunio IDE program after you change this file. It only reads it on start up.

Sadly there is no way to know what baud rate it expects, no one seems to document their boot loader.
Also some cheap suppliers dont bother installing a bootloader, so there is no way to make it work with avrisp hardware

NB this baud rate is not related to the baud rate you set in marlin configuration.h that is for marlin only.

Re: Sanguinololu Rev 1.3a - how to load firmware

$
0
0
That section is not in the boards.txt file

Can I just cut/paste it in?

Re: Sanguinololu Rev 1.3a - how to load firmware

$
0
0
ok, getting way too late here. One thing tho. I have an AVRISP!!!

I forgot all about it, all I ever used it for was flashing F/W into speed controllers for a quadcopter project...

[www.fasttech.com]

can I maybe do something with that?

Re: Sanguinololu Rev 1.3a - how to load firmware

$
0
0
there will be multiple boards.txt files

If its in the boards menu it in a boards.txt file somewhere...

yes you can use that device.
It has a 10 pin connector, you need a 6 pin so wire it like


Re: Sanguinololu Rev 1.3a - how to load firmware

$
0
0
OI !!! just days and days of headaches here.

Ok, I had the 10pin to 6 pin cable that came with it still in my drawer so all good there. Plugged in the power supply to the Sanguinololu board and the ISP header into the USBISP set the Arduino IDE to use USBISP and selected upload by programer (CTRL+SHIFT+U)- no luck, here is the error.


Arduino: 1.6.13 (Windows 10), Board: "Sanguino, ATmega1284 or ATmega1284P (16 MHz)"

Sketch uses 51,132 bytes (39%) of program storage space. Maximum is 130,048 bytes.
Global variables use 2,694 bytes (16%) of dynamic memory, leaving 13,690 bytes for local variables. Maximum is 16,384 bytes.
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

the selected serial port
does not exist or your board is not connected

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Re: Sanguinololu Rev 1.3a - how to load firmware

$
0
0
how have you wired it? pictures?

as it saying that it can't talk talk to the 1284p

Cable upside down? or non standard 6 pin connector... on your board I would guess

Re: Sanguinololu Rev 1.3a - how to load firmware

$
0
0
turned out the cable was wired weird, I made a new one but still issues with that unit. So I got out some old kit and got buzy with an Arduino Nano and made an ISP out of it.
Still had to mess with that for hours and just before the hammer started hitting the Sangunololu I got it to flash.

Ok, I got a lot of learning in :) Thank you. I still cant flash anything direct via the built in USB port tho.

Question, now that I can flash tho in a clumbsey way, should I flash a new bootloader? Would that maybe fix the flash directly over USB problem?

Caliberation and all the fiddly stuff that goes with a fresh flash is going to take me down a road of many many flashes and haveing to do it via the Nano soulution is going to be a path I can see hateing.

Especially since the ISP header on the Sanguinololu is where the LCD plugs in....

Still I am finally seeing a flicker at the end of this tunnel.

Btw the reason I had to flash in the first place was chageing out the threaded rod on my GeeeTech ME Creator 1 for a proper 8mm feed screw. Different pitch and direction made it necasary so I had to start over.

Thanx again :)

Re: Sanguinololu Rev 1.3a - how to load firmware

$
0
0
hate to tell you thing all you needed was new steps/mm so M92 Z### in the start.gcode or save in eeprom... and direction just needs you to turn the stepper plug around 180 degrees or swap two wires in the plug

if you enable eeprom then you can update most things via gcode and then save with m500 you only need to get your thermisters and endstops working in firmware,
even if eeprom is disabled you can just add gcode to your slicer start file to set almost everything.


With the avrisp you now have full control over the chip. This is good and bad. (the bad being fuses)
Installing a new boot loader should fix your uploading over serial issue. NB Installing bootloader in ardunio ide will also change the fuses (setting) of the chip. You probably want to back these up first (google avrdude command line) Its just 3 or 4 bytes that set configuration data.

in that boards.txt file is
sanguino.bootloader.tool=arduino:avrdude
sanguino.bootloader.low_fuses=0xFF
sanguino.bootloader.high_fuses=0xDE
sanguino.bootloader.extended_fuses=0xFD
sanguino.bootloader.unlock_bits=0x3F
sanguino.bootloader.lock_bits=0x0F

but this is for a generic board not specific to your controller.
In particular you need to ensure that jtag is off, as these pins a redefined and reused as endstops..

NB if you get the fuses totaly wrong, you can stuff accessing the chip, by setting wrong clock divisor etc, so it gets the baud rates wrong.

what would do is, display the current fuses with avrdude
plug the values into [www.engbedded.com] (select atmega1284p)
see what is set, perhaps post it here...
now find out what the above boards.txt sets
make sure JTAG Interface Enabled is off. and the oscillator setting as the same (boot size will change)

Re: Sanguinololu Rev 1.3a - how to load firmware

$
0
0
Ok, after some fuddling this is what I got for an output:
Does this look right?
--------------------------------------------------------------------------------

avrdude -P com5 -b 19200 -c arduino -p m1284p -v

avrdude: Version 6.3, compiled on Feb 17 2016 at 09:25:53
Copyright (c) 2000-2005 Brian Dean, [www.bdmicro.com]
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Users\dale\Desktop\wtf\avrdude.conf"

Using Port : com5
Using Programmer : arduino
Overriding Baud Rate : 19200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x15
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x15
AVR Part : ATmega1284P
Chip Erase delay : 55000 us
PAGEL : PD7
BS2 : PA0
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 10 128 0 no 4096 8 0 9000 9000 0xff 0xff
flash 65 10 256 0 yes 131072 256 512 4500 4500 0xff 0xff
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00

Programmer Type : Arduino
Description : Arduino

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
Hardware Version: 4669920
Firmware Version: 0.4520867
Topcard : STK502
Vtarget : 1.8 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us

avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x10

avrdude done. Thank you.

Re: Sanguinololu Rev 1.3a - how to load firmware

$
0
0
Just wanted to say thanx Dust, I have things going well enough to work with it all at this point. I found some indications online that an aruidno board can in some situations work without a bootloader. I am starting to think that either the bootloader on it is missing the USB components OR is just not there at all...

So I am going to do as you suggested in one of your posts and use the M92 commands and save to EEPROM for now to do all the calibration and then take all those settings and put them in configuration.h to do a final flash over the ISP header to finalize it all.

Then having chocked all this up to a great bit of learning I am going to get a Ramps4 board in a few weeks and put the Sanguinololu in the drawer.......


:) Thank you very much for your help :)

[solved] Max current on melzi v2.0

$
0
0
Hi all,
I'm trying to find out what's the max output current for the cooling fan on the melzi v2.0.
google didn't help...
does anybody have the answer ?
thanks

Re: Max current on melzi v2.0

$
0
0
If your board maker has used the standard components, all outputs use the same mosfet

So 11amps ish.. considering most fans are 0.35amp... your not going to have an issue..

Re: Max current on melzi v2.0

$
0
0
Thank you Dust !
It's an official melzi 2.0 by reprappro and indeed I want to use 0.35 amps fan.

Melzi - Heated bed is being powered via the USB cable

$
0
0
I've been using a Melzi (v1 I believe, with an Atmega644A) on my Mendel90 for several years now with Jumper 15 set to USB. It has suddenly dawned on me that I should be powering the Melzi from the PSU so I set the Jumper to VREG (the pins closest to the screw terminals) and tried heating the bed. It seemed to take a while so I checked the voltage at the terminal and it read 6.53V. It was at this point that I touched the USB cable and found it was very hot. Why is the heated bed being powered via the USB cable?

The extruder heats up using the PSU power regardless of whether JP15 is set to USB or VREG.

Could it be that my Melzi is a clone? I'd be pretty disappointed if it is because it came with a Prusa i2 kit from a reputable seller (RepRapKitStore) many years ago.

Re: Melzi - Heated bed is being powered via the USB cable

$
0
0
The USB cable getting hot is a sign that you have a poor connection between the PSU negative terminal and the electronics, or a ground loop that is carrying a lot of current. See [duet3d.com]. It's written for Duet electronics but it applies to all electronics except Rambo and Archim.

Re: Melzi - Heated bed is being powered via the USB cable

$
0
0
Thanks for that useful information.

I narrowed the problem down to the power terminal on the Melzi and while desoldering the terminal to replace with a new one, the solder pad came off. It must have been making a poor connection due to the pad being damaged. The terminal twisted a bit when I tightened the screws so that could have caused it.

Thanks to nophead for suggesting I scrape the solder resist off next to the hole and solder a wire between the new pad and the ground pin. Everything is working again.

Re: backup installed firmware?

$
0
0
Just went through a couple of days trying to get my cheap chinese made GT2560, which came with a Prusa i3 Clone (CTC D5983), to communicate with arduino.

I was getting repeated stk500v2_ReceiveMessage(): timeout errors from avrdude through both the arduino IDE upload function, and running it off the command line.
Turns out my GT2560 had an ancient bootloader and needed a different protocol, I used the following command to successfully read the bytecode out;

.\avrdude -p atmega2560 -C ..\etc\avrdude.conf -c wiring -P com3 -b 57600 -F -U flash:r:i3_bak -v

This command reads code out of the device flash ROM, writing it to a file.
I ran this from the \Arduino\hardware\tools\avr\bin directory.


Here's a youtube video with the same fix: stk500v2 timeout fix

Sorry for reviving an old thread, but it's the first hit on google for this.


Ps. The above post by Dust is incorrect, avrdudes commands specify that r reads the device memory and writes to a file, while w writes the contents of the file into the device memory. Docs:
avrdude option descriptions

Re: Sanguinololu Rev 1.3a - how to load firmware

$
0
0
Ok, after some fuddling this is what I got for an output:
Does this look right?
--------------------------------------------------------------------------------

avrdude -P com5 -b 19200 -c arduino -p m1284p -v

avrdude: Version 6.3, compiled on Feb 17 2016 at 09:25:53
Copyright (c) 2000-2005 Brian Dean, [www.bdmicro.com]
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Users\dale\Desktop\wtf\avrdude.conf"

Using Port : com5
Using Programmer : arduino
Overriding Baud Rate : 19200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x15
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x15
AVR Part : ATmega1284P
Chip Erase delay : 55000 us
PAGEL : PD7
BS2 : PA0
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 10 128 0 no 4096 8 0 9000 9000 0xff 0xff
flash 65 10 256 0 yes 131072 256 512 4500 4500 0xff 0xff
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00

Programmer Type : Arduino
Description : Arduino

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
Hardware Version: 4669920
Firmware Version: 0.4520867
Topcard : STK502
Vtarget : 1.8 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us

avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x10

avrdude done. Thank you.

Re: Sanguinololu Rev 1.3a - how to load firmware

$
0
0
Just wanted to say thanx Dust, I have things going well enough to work with it all at this point. I found some indications online that an aruidno board can in some situations work without a bootloader. I am starting to think that either the bootloader on it is missing the USB components OR is just not there at all...

So I am going to do as you suggested in one of your posts and use the M92 commands and save to EEPROM for now to do all the calibration and then take all those settings and put them in configuration.h to do a final flash over the ISP header to finalize it all.

Then having chocked all this up to a great bit of learning I am going to get a Ramps4 board in a few weeks and put the Sanguinololu in the drawer.......


:) Thank you very much for your help :)

[solved] Max current on melzi v2.0

$
0
0
Hi all,
I'm trying to find out what's the max output current for the cooling fan on the melzi v2.0.
google didn't help...
does anybody have the answer ?
thanks
Viewing all 1033 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>