Repairing a Grids


#1

I’ve been asked by someone to have a go at repairing his Grids (it’s a real, factory-built grids, not a DIY job). Here is the back story:

Do you have anything to suggest on resurrecting a Grids that I suspect has had a high power spike down the 5volt rail? I’m not 100% sure that is what happened as I got it the way it is. But it’s doing my head in having such a good module sitting here which i suspect doesn’t need much done to get it up and running.

Olivier didn’t want to suggest too much to fix it and sent me another at wholesale price which was nice of him and I didn’t push him for suggestions etc as he’s already good enough to freely open source his stuff and provide schematics etc.

I’ve replaced D1 and P1 and have checked when powered things look good. I’m getting the -5 ref off the LM4040 and also the expected 5 volts elsewhere like the midi expansion and at R3 connected to pin 29 of the atmega.

Olivier suggested (and i think he’s right) that a high voltage down the 5 volt rail has killed the op amps, shift register and the processor. He coudln’t send me a new processor as he programs them all in circuit.

I was wondering would you consider having a look at it and replacing those chips if need be and pop a new processor on and flash it? I’d give it a go myself but as you know i’m a through-hole dinosaur and even though I do the odd bit of smd i’m not really tooled up for something like the processor swap or then flashing it.

I’ve had a crack at it, and have floated off the Atmega with hot air and put a new chip in its place. Applying power seems to result in 5V in the right places, as the owner suggests. However, all attempts to flash the chip fail - the AVR programmer doesn’t get a valid signature from the chip (It’s a genuine AVR ISP mk2 programmer, and it definitely works, and the cable was connected the right way round).

Any suggestions on how to proceed? Is it worth replacing the crystal or the crystal timing caps? Or proceed to replacing the op amps and 74HC595 switch? Or just set it aside? It’s owner doesn’t have any great expectations. Any advice appreciated.


#2

All connections to the ISP connector are OK? Which voltage on the reset pin?


#3

BTW, while compiling the Grids code, this caught my eye:

/usr/local/CrossPack-AVR/bin/avr-gcc -mmcu=atmega328p -lm -Os -Wl,–gc-sections -o build/grids/grids.elf build/grids/adc.o build/grids/random.o build/grids/serial.o build/grids/string.o build/grids/time.o build/grids/wii_nunchuk.o build/grids/clock.o build/grids/grids.o build/grids/pattern_generator.o build/grids/resources.o -lc
/usr/local/CrossPack-AVR/bin/avr-objcopy -O ihex -R .eeprom build/grids/grids.elf build/grids/grids.hex

No errors there, but wii_nunchuk.o? What’s that all about? Presumably related to this


#4

Thanks, shall check that tomorrow.


#5

This is not part of Grids’ code, but of avril/avrlib. It’s a driver for the wii nunchuk over I2S. In the end it’s not getting linked in Grids’ firmware since it’s not referenced anywhere.

I wrote it originally for this, and as an expansion board for Ambika to use the joystick as a controller for oscillator 1 / 2 balance or parameters.


#6

When the fuses are still at the defaults, I’ve found that I often can’t get avrdude even to recognize a chip without -B 4 (or higher, but that might be my ancient stk500 setup). The ‘fuses’ target in avril does that too IIRC.


#7

pichenettes> All connections to the ISP connector are OK? Which voltage on the reset pin?

Yes, all connections OK, and pin29 on the MPU is being pulled high to +5V.

pld> When the fuses are still at the defaults, I’ve found that I often can’t get avrdude even to recognize a chip without -B 4 (or higher, but that might be my ancient stk500 setup). The ‘fuses’ target in avril does that too IIRC.

Great suggestion, thanks! changing -B to 4 seemed to do the trick:


$ /usr/local/CrossPack-AVR/bin/avrdude -V -p m328p -c avrispmkII -P usb -B 4 -U flash:w:build/grids/grids.hex:i -U lock:w:0x2f:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

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 "build/grids/grids.hex"
avrdude: writing flash (12576 bytes):

Writing | ################################################## | 100% 2.22s

avrdude: 12576 bytes of flash written
avrdude: reading input file "0x2f"
avrdude: writing lock (1 bytes):

Writing | | 0% 0.00s *****failed;
Writing | ################################################## | 100% 0.04s

avrdude: 1 bytes of lock written

avrdude: safemode: Fuses OK

avrdude done. Thank you.

I think that means it all worked, even though it had to try to write the fuses twice.

Still no blinking lights, though. Hmmm.


#8

OK, I replaced the 74HC595 switch and the three op amps, and gosh, we have blinking lights! In fact, everything seems to be working, except that it is very, very slow - with the clock pot at maximum, it seems to be running at a fraction of the correct speed - and to get into settings mode requires a very long (maybe 8 second) push on the button.

Wrong fuses settings? Or fuses not properly set, meaning the clock speed too low?


#9

Um, right, it helps if one specifies the correct target for the makefile… Replacing upload with bake, which writes all three fuses, not just the lock fuse, and thus sets the correct clock speed, works wonders - it now appears to be functioning correctly, at the right speed. A bit more testing required but seems like a successful repair. Thanks for your help, pichenettes andpld.


#10

Congrats on the repair! :slight_smile:


#11

100% successful repair. And testing it reminded me what a fab module is Grids.


#12

Nice work!


#13

@BennelongBicyclist Did the code have to be re-compiled or was it as simple as adding “-B 4” during the upload/programming command?


#14

Just adding the extra -B 4 switch to the avrdude command should do.


#15

Another reason why open source and open schematics are good. It’s almost a green policy as you can reduce waste.


#16

I’m not sure what Olivier does with broken modules which are sent back to him and which he then replaces, but I’d be willing to buy such modules, at a suitable price, to have a crack at bringing them back to life, for personal use (that’s one of the benefits of SMD construction on high quality PCBs - reworking of built boards is so much easier than with through-hole). Perhaps sans panel, so they can’t be readily resold as genuine non-failed modules.


#17

Well the EU regulations are pretty strict now. Repairs and diagnosis are pretty manual, so it makes little sense for them to be refurbished in the factory unless it’s a dead simple fix.


#18

I replaced all the dead Grids instead of repairing them because there was no reason to believe the thing that fried them in first place wouldn’t reappear. I considered for a while making a little board with a “sane” regulator that I would snap on the back - but I don’t think people who have paid for a module deserve a hack-ish repair like that.

I reused everything I could (nuts, washers, knobs) to build prototypes; while the rest is collected quarterly by an e-waste recycling company.


#19

After properly setting fuses, unit would not run. After poking around with a cotton swab with alcohol on it (cleaning up the flux), I discovered it would run when touching a certain area. So i changed the crystal and the unit was much more stable. However it would stop running if touched the crystal osc circuit at all, with anything (fingers, scope probe etc).

After looking around on the internet, I found a clue inside a Microchip white paper.

The crystal listed in google BOM has a C (load) of 18pf. The formula for calculating C2 and C7 is: (C2 x C7)/(C2+C7) then add Cstray. After doing the math and bugging people smarter than me, it turns out C2 and C7 should be 33pf. I implemented this, and bingo! The unit now is very stable!

The maths are explained on page 4 of this PDF!

http://ww1.microchip.com/downloads/en/AppNotes/00001798a.pdf

I’m posting this in case anyone finds themselves in the same pickle I was in!

Good luck!


#20

Hm, if it comes to crystals you can go ahead and do something much easier than maths: read the data sheet, as most crystal advice which buffer caps are up their specification.