Welcome! Log In Create A New Profile

Advanced

Melzi SD socket bricked?

Posted by neuport 
Melzi SD socket bricked?
January 30, 2014 03:02AM
I installed a Panelolu2 and a compatible version of Marlin. It worked briefly but then began to intermittently not recognize the SD card until it no longer would connect to the SD card. I removed the Panelolu2 and reverted to my original working version of Marlin but am unable to print via SD card. When I try I get "SD init fail". Printer otherwise works fine; i.e printing over USB works. Any suggestions on how to diagnose this?

Here is the history:
1. Mendel90 Dibond received last september; all works well. Print from SD every time but occasional USB disconnects are still irritating because I sometimes print in two colors and when it disconnects I lose ability to pause and change filament.
2. I purchased a Panelolu2 (P2) but did not install it because the disconnect problem had gone away for awhile.
3. This week I noticed disconnects on every print; i.e. at the end of the print Pronterface could not control the printer and had to power cycle printer before connection could be restored. I tried various suggestions in the forums like plugging printer into same outlet as computer. In this case the PC is plugged into a UPS so I tried plugging the printer into the UPS. I also tried connecting the Melzi USB socket housing to ground with a solder jumper to the ground plane. Neither had any noticeable effect on printer function.
4. I installed the P2 and it worked somewhat printing from the SD card installed in the P2 socket. The X and Y home positions were both shifted 30-50mm. I assume this was a problem with the config file but their are so many differences between my original Marlin config file and the one Alan posted on github that it was not possible for me to sort out the possible reasons for the shift. restore connection. During the first test print, the print failed about 90% through with the heaters on and the axes stopped. A second attempt failed earlier in the print. Also, the P2 intermittently recognized the SD card with the successful attempts quickly becoming less common until it would no longer read the card. This was with and without a PC connected to the printer. Likewise, with the PC connected to the printer it could no longer print from SD whether the SD card was in the P2 socket or the Melzi socket.
5. I decided to uninstall the P2 and revert to my earlier good firmware. After doing so, the printer still could not print from SD with Pronterface giving the SD init fail error when I tried. However, printer over USB works fine. I connected a laptop running on battery power to avoid the USB disconnect issues and printing with full control of pause, jog, resume in Pronterface worked perfectly but no SD card printing.
6. During firmware uploads the autoreset jumper was on and during all print testing it was off.
7. Even though the SD card still worked fine in the PC I thought there might be something corrupted on it so I tried reformatting it with Windows, a reformatting utility I downloaded from the SD industry association, my camera, and my tablet. In every case the card was recognizable when connected directly to the PC but not when in the Melzi. The formatting was FAT (FAT16) as far as I can determine.
8. I tried another new in the package micro SD card I had but got the exact same errors. However, it is an 8GB card and I doubted it would have worked anyway.

Suggestions?
SD socket failure on the Melzi?
Firmware issue?
Card somehow corrupted as far as Melzi is concerned but still perfectly functional on PC?

Thanks for any help you can offer.

Edited 1 time(s). Last edit at 01/30/2014 03:03AM by neuport.
Re: Melzi SD socket bricked?
January 30, 2014 03:08AM
The Panelolu2 and Melzi use different SD card select pins. It might be that in reverting to not using the Panelolu2 you have not informed the firmware that the card select has changed. This would cause the "SD Init fail" message if, for example, it was trying to read the Panelolu card slot when the card was in the Melzi.

Regards,
Neil Darlow


I try to write with consideration for all nationalities. Please let me know if something is unclear.
Printing with Mendel90 from fedora 25 using Cura, FreeCAD, MeshLab, OpenSCAD, Skeinforge and Slic3r tools.
Re: Melzi SD socket bricked?
January 30, 2014 03:28AM
Thanks Neil. However, I completely removed the Panelolu2 and uploaded my original Marlin firmware to the Melzi.
Re: Melzi SD socket bricked?
January 30, 2014 07:59AM
Your original problem of disconnects on every print sounds like the ground to the Melzi might have been failing. Is that definitely still a good connection and not getting hot?

If you formatted the SD card with something other than FAT then yes it would work on PC, but not on the Melzi but if it is definitely FAT16 I can't think how it could do that. It would be worth trying another Sandisk card 4GB or less. Not all makes of SDcard work because some don't support the SPI interface.

If the socket on the Melzi had failed the one on the P2 should still work. Although, as I understand it, you can only use one or the other depending on the firmware pin configuration.

It seems like the P2 was somehow faulty and may have damaged the pins on the Melzi used for SD. The sample P2 I received from Think3DPrint3D does have a solder bridge on the adapter board so I would give the boards a close inspection. It's pretty simple, so there is not much else to go wrong. Check that the regulator on the P2 that provides 3.3V to the SD card is working. If that was giving say 5V then the card might be damaged. It is conceivable that a card with hardware damage such that its I/O was no longer to spec could work on the PC and not on the Melzi. To damage the Melzi I think you would have to drag the pins to more than 5V. There is 12V present on the adapter board if you have connected it for the extra MOSFET drives.

Edited 2 time(s). Last edit at 01/30/2014 08:02AM by nophead.


[www.hydraraptor.blogspot.com]
Re: Melzi SD socket bricked?
January 30, 2014 11:08AM
One of the first things I did was tighten the ground screws. Also, it seems to get no disconnects running from a laptop.

I found another noname 2gb microSD card at the house this morning that I have used in a small keychain camera but it does not work in the Melzi. I'll go to the store and look for a Sandisk 2GB. When I look at the properties of these SD cards in windows, the format displays as FAT.

When I had the P2 attached, the socket on the P2 worked briefly and then stopped. I then tried the one on the Melzi to no avail. At that point, I removed the P2 and reverted to my earlier known good Marlin. Everything seems to work as before except for the inability to use the SD print. I have also tried recompiling and uploading my previously working Marlin after removing the 3 lines of pin configuration code from hardware\Melzi\cores\arduino\pins_arduino.h that was added in response to Chris's suggestion to get Alan's Marlin to compile. No change.

I will take a look at the P2 board but at this point I don't intend to use it unless the SD problem is resolved and is unrelated to the P2. When I initially connected the P2 I ran 12V to it but I had removed the 12V before printing. When the P2 worked briefly (30 minutes of testing and a couple of partial prints) it had no 12V connection.

Assuming I find a 2GB Sandisk SD card and I still get no response, what are some diagnostic steps that I might take?

I assume that the SPI interface is directly between SPI pins on the ATmega and the card socket such that any hardware failure would have to be either a mechanical issue with the socket or a failure in the ATmega SPI pins. Is that right? Is there a way to diagnose which it might be? I have basic tools like multimeters and a two channel oscilloscope. I also have some SMD soldering skill and tools and am able to replace components on the Melzi if it comes to that.

Thanks.
Re: Melzi SD socket bricked?
January 30, 2014 11:41AM
The SPI lines go through a level changer because SD cards are 3.3V but the ATmega is running from 5V. The SD card's 3.3V power comes from the FTDI USB chip as that contains a 3.3V regulator.

The P2 must have another level changer and 3.3V regulator as only 5V signals are available on the Melzi expansion port. The fact that neither sockets work implies it is either the ATmega pins or the SD card that is faulty assuming you correctly restored the firmware. If you didn't the SDSS signal is likely to be wrong. You could check that with a scope.

Edited 1 time(s). Last edit at 01/30/2014 11:42AM by nophead.


[www.hydraraptor.blogspot.com]
Re: Melzi SD socket bricked?
January 30, 2014 12:59PM
I removed the solder jumper between the USB connector and the ground plane and the SD card started working again. I started an SD print but the print froze after the priming line but just as the printer started to extrude the first part of the skirt. The printer and the computer were still communicating because sending M105 returns the temperatures. However, the SD socket no longer responded. I was thinking it is a poor connection in the SD socket. I removed the SD socket, made sure all the contacts were clean, sprung them slightly more toward the board to get good contact and then resoldered it to the board. Started the printer and it worked for a few minutes until again the SD card stopped communicating and the print stopped. The USB connection to the notebook pc remains solid throughout. I can move the axes, etc. but the print won't go. I have tried power cycling the printer several more times and each time get the SD init fail error. Any ideas what could make an intermittent SD failure? Is it likely that the SD card itself is intermittently failing?
Re: Melzi SD socket bricked?
January 30, 2014 01:11PM
Sorry Chris, I just saw your last post. To check the firmware, I reinstalled the autoreset pin and then connected to the printer in Pronterface. I get the following in the terminal window.

Connecting...
start
Printer is now online.
echo:Marlin: 1.0.0 RC2
echo: Last Updated: Jan 30 2014 00:51:55 | Author: nophead
echo: Free Memory: 12982 PlannerBufferBytes: 1232
echo:Using Default settings:
echoconfused smileyD init fail

Without the pin in place, I get this.

Connecting...
ok T:33.7 /0.0 B:27.6 /0.0 @:0%
Printer is now online.

Sorry about the emoticon. I can't find away to turn them off and the forum software automatically converts SD to one.

Edited 4 time(s). Last edit at 01/30/2014 01:14PM by neuport.
Re: Melzi SD socket bricked?
January 30, 2014 09:16PM
I don't know what is going on with the SD socket / card. Could be a bad connection affected by vibration or could be a faulty card failing when it gets warm perhaps.

With the reset jumper on a USB connection resets the firmware, which attempts to init the SD card. When the jumper is not fitted it doesn't reset on connection so you don't get to see whether the SD is working or not.


[www.hydraraptor.blogspot.com]
Re: Melzi SD socket bricked? [SOLVED]
January 31, 2014 06:24PM
I have my fingers crossed that my problem is resolved.

I found a 2GB Sandisk card locally when I was out today. Six office supply and electronics stores did not have them but the drug store had an entire wall display with much more inventory and a wider selection. Go figure.

So far with the new card I have run 2 consecutive prints from the SD card without a glitch and without Pronterface loosing the connection. I didn't even know that Pronterface displayed a completion message at the end of a print since I had almost always lost the USB connection during the print.

The USB disconnect issue was solved by switching to a laptop and using a short USB cable. I was confused about the SD card being bad because the problem was intermittent and appeared with two different cards before I purchased the new one today. The bigger question is what corrupted the cards. It appears that just the SPI interface on the card was affected since they still work fine with the PC. Possibly I made a mistake with the P2 installation that created an overvoltage on the card. That would explain the first one that was bad. I don't know about the second which was not used with the printer when the P2 was installed.

Thanks for your help.

P.S. I bought a 2GB card because it was the same as what shipped with the printer. I have seen some posts that the 4GB cards also work with the Melzi board. Is that true? If so I will buy them since they are less expensive at my local store than the 2GB.
Re: Melzi SD socket bricked? [SOLVED]
February 01, 2014 05:12AM
The SPI interface uses a subset of the same pins as the four bit interface so hard to imagine it being damaged but the parallel interface still working, but it is possible to get I/O damaged such that it fails to meet the standard logic levels which means it can work or not depending on what it is connected to.

I don't know what the size limit is. Above 4GB they switch to SDHC and FAT32, which may be the point they stop working. Some 4GB are SDSC and some SDHC. See [github.com]

Edited 1 time(s). Last edit at 02/01/2014 06:19AM by nophead.


[www.hydraraptor.blogspot.com]
Re: Melzi SD socket bricked?
February 01, 2014 10:09AM
Whatever the problem now that I am using the laptop (plugged in or not) and the new SD card the printer is working better than it ever has. It is rock solid. By the end of my testing yesterday I had made 4 consecutive SD card prints with multiple Pronterface pauses, jogs, filament changes, and resumes without a single glitch and without ever needing to power cycle the printer. I am very happy with the outcome.
Re: Melzi SD socket bricked?
February 23, 2014 10:54PM
I can confirm that the 4GB Sandisk microSDHC cards work fine. Since they are several dollars cheaper than the 2GB ones, they have been on sale for over a month at my local Walgreens drug store, I decided to buy a couple and try them.

Also, I have had no more hiccups with my printer USB or SD related since my previous post. I may try the Panelolu2 again some day but for now I am happy with just using a laptop and Pronterface.
Re: Melzi SD socket bricked?
May 05, 2016 12:47AM
Hi all,

Did you ever discover the root cause of this problem?


I've been facing exactly the same symptoms.

Melzi 2 (ZoneStar Melzi_V3B - chinese origin)
Repetier 0.91
8GB SDHC FAT32

Worked out of the flatpack, started to notice a few failures to mount the SD card a few weeks ago and over the weekend - long print - it lost the SD card and now won't mount it at all.

tried an old 4GB SD card with FAT16 - no luck.

works just fine for online printing, but the whole point is to load to SD card and come back when it's done - most of my prints I'm planning will take 10's of hours.
Sorry, only registered users may post in this forum.

Click here to login