Arduino Breaks When Using Piezo For Knock Sensor

Hi everyone, was trying to make the Arduino "knock" example today, following instructions on the website.

When I tried to upload the sketch, I got the following error: avrdude: stk500_getsync(): not in sync: resp=0x00 avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I should say that this is my second arduino, and my last arduino broke when I was trying to wire this exact same circuit. It has been working fine up until now, because I have been doing other projects, but as soon as I wired this up, it broke.

This is the exact same message I got last time, and I cannot upload any sketches, reburn the bootloader or anything. It just keeps running the last sketch I uploaded.

The board is an Arduino Duemillanove with an ATMEGA328 chip in it.

Since last time I replaced the whole board, not just the chip, so I know it is not a problem with that.

I have checked and re-checked my circuit, it is exactly as wired there except for one thing: I am using two 610k resistors end-end rather than a single 1megaohm resistor. As far as I know, 1.22megaohms shouldnt cause a problem, but I might be wrong.

Here is the piezo I used, brand new from maplin today:

It is unmodified, same bootloader it came with, and is running from USB to a Windows 7 machine (don't believe that to be an issue because the last time it was on XP)

I would send a link to the item itself but their website appears to be on the blink.

Please help me as I need my arduino working for my car; it was driving my alarm and electronic door locks.

Thank you!!

2 things come to mind.

1) Did you set the right COM port and choose the right arduino model in the arduino environment? Note: they can change... (tools->board [the one that says "w/atmega328"], and tools->serial port) (Look in Control Panel, System, Hardware, Com ports)

2) Did you install a NEW USB-RS232 DONGLE recently? In which case I would recommend you re-install the FTDI drivers or have you moved the Arduino to different USB port?

What you describe does not indicate you have a broken Arduino... infact... you can ALWAYS remove the PIEZO knock hardware and I bet it acts the same until you resolve what I asked about above.

Thank you for your answer pwillard!

Removing and installing the latest drivers worked. I was certain I'd done this last time, so I went back and tried my old arduino.

Turns out it was another error I had with that one:

avrdude: verification error, first mismatch at byte 0x0042 0x11 != 0xa4 avrdude: verification error; content mismatch

Sadly the drivers did not fix that one as well, but at least I have my main arduino working again.

Do you have any clue as to why this happened? It was working fine on this computer right before I wired that circuit, is there an issue with using 1.22 megaohms instead of 1 megaohm?

Thanks for your help!

Well, that's not right obviously. (And I have no idea what you might have done.)

You "could" try to re-install the bootloader... (you would need to make/buy an AVR programmer and program via the ISP pins.) there is a simple one described on the Arduino site.

Programming the boot-loader is a built in function in the Arduino software. If you do not succeed in burning the bootloader... you have a bad ATMEL chip... if you DO succeed... well, no harm done and you know the chip is likely good.

I tried reburning it with a Parrallel Programmer I'd made, but no use.

Thanks anyway, I'll just keep the working one I have and buy a new chip for the old one. I was planning on buying a few to play with anyway.

Thank you for your help again pwillard, maybe you could tell me what you think of my project when it is complete.

It is currently a car alarm, parking sensor, electronic door lock control, and is soon to be temperature sensor, time display and internet/radio control too. I'll post the full thing up here when its done.

Sounds neat. Good Luck.

Kind of makes my weather sensor interfaces seem dull.

Maybe I need to do something with LEDs... Nah. Just Kidding.