Melzi Board issues.. need advise

Hi All,

first time poster here. I'm seeking advice on how to fix my melzi boards. I have 2 melzi 2.0_v5 boards from a 3d printer that I'm trying to fix. I'll try to give as much info as i could.

Melzi 1 -- can upload bootloader but cant upload sketches. I can upload the repetier firmware directly via usbasp clone and it runs standalone. Firmware hangs when PC connects to it. It also hangs when I press the reset button it becomes unresponsive. Need to power cycle to get it to work again. I can print via sd card though. Used to work with the same firmware but after some time the LCD becomes all white. Reflashing the same firmware restores it back to working condition until this happens.

Melzi 2 -- comes in with firmware for a different printer, cant upload sketch so I figured I flash a bootloader. failed during bootloader flash. cannot upload anymore
avrdude: set SCK frequency to 93750 Hz
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.

Any advise on what to do to fix board #1?

Can I use the ISP with external clock method to fix board #2? Do I need to desolder the chip from the board or can I just connect to xtal1 and use the icsp?

I only have a multimeter, Uno, mega2560, usbasp and hot air soldering station to use. No oscilloscope :frowning:

Any wiring diagrams I should follow is greatly appreciated.
I attached the picture of the board. Both boards are identical

It would be nice to get these boards running normally again.. Thank you in advance.

Thanks for clearly pointing out what MCU is that – that really helps to help You....

I will assume it's 328p...

Melzi 1 – it looks like 328p is fine in this one, I think it's problem with FTDI circuit. If You use external FTDI it will probably work fine.

Melzi 2 – specify Your method of flashing bootloader.

Please go where there is more light and take close up pictures of connectors and MCU, write all silkscreen next to connectors pins, link those board manufacturer page – do some work damit...

Thanks for the reply.

The MCU is 1284p for both boards. Both uses CH340G instead of FTDI.

Method of flashing, I flashed using arduino ide with a usbasp clone.

board is identical to this one.
https://www.aliexpress.com/item/Free-shipping-Melzi-2-0-1284P-Reprap-Control-Mainboard-for-tronxy-3d-Printer-Controller-PCB-Board/32833092841.html

closest schematic I can find is in this site Melzi - RepRap

This is where I got the bootloader

board setting I used is

menu.cpu=Processor

##############################################################

sanguino.name=Sanguino

sanguino.upload.tool=arduino:avrdude
#sanguino.upload.protocol=arduino
sanguino.upload.protocol=stk500v1

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

sanguino.build.board=AVR_SANGUINO
sanguino.build.core=arduino:arduino
sanguino.build.variant=sanguino

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=57600

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

I want to try to use a mega2560 as ISP with a clock signal to supply to xtal1. Can I use the boards ICSP and just connect the clock signal to xtal1?

Your first 2 links doesn't wok.
You did not write out silkscreen.

Leave those poor MCUs alone, they're fine.

sampinon:
The MCU is 1284p for both boards. Both uses CH340G instead of FTDI.

  • they do same task.

If it works with SD card (SPI) that means MCU is fine, it's problem with serial to USB communication – CH340G chip purpose. Find TX and RX pins, connect external CH340G "FTDI" to them and try to communicate thru it with board via PC as usual. If it works – my theory confirmed.