travisgoodspeed / goodwatch

Replacement board for Casio Calculator Watches using the CC430F6147

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Buzzer Support

travisgoodspeed opened this issue · comments

Use this issue to track buzzer support on P2.7.

Looks like driving the piezo directly from an IO pin wasn't such a great idea. We won't have functional buzzer hardware until the GW21.

What's the issue? Not enough drive current?

Too much current, or too much reflected current, I think. Whenever I set P2.7 both OUT and high, it glitches into a reboot.

The Casio board uses a transistor to drive the piezo, but I'll try a series resistor in the morning to keep the BOM small. You can still get a bit of noise by flipping 2.7 between IN and OUT with the output low, but it doesn't sound very nice or loud.

If you'd care to repeat my crash, just uncomment the initialization of the buzz module in main.c.

I'll give this a shot over the weekend. I imagine the reason that the piezo on the original board has a drive transistor and the fairly large inductor in parallel is that the oscillation of the piezo has enough of an effect on the power rails that it can glitch the clock and the chip.

I don't have the equipment to measure the inductor on the original board, but I wonder if a SMD equivalent can be sourced.

So this is what the Chronos watch uses, where Q1 is a BC846 NPN transistor, R4 is 47k, and L1 is 32mH (Johanson L-07C12NJV4). Sorry for the image quality; the Chronos schematics are only included as a blurry JPEG in the app notes.

image

Still hoping that a simple series resistor will suffice, but we'll see how it goes.

I just got my test watch's buzzer wired up (the case is not assembled, and the buzzer has short wires running to it), and it seems to be working just fine. Once I have the alarm functionality in a good place I'll program my other watch and see if the buzzer works inside the case, and update this issue accordingly.

Weird, but excellent news. Perhaps I shorted a wire somewhere?

I'll try to confirm your results before finalizing the GW21 gerbers.

I've confirmed the buzzer working on a second watch. It can do most tones, but some end up sounding a bit funky, maybe due to timing.

I'll be sending a pull request of my alarm functionality shortly, with some extra buzzer code included.

I've confirmed a second watch which bootloops around the buzzer initialization when the buzzer spring is attached. What could we be doing differently, to see such wildly different results? Have any of the rest of you fine folks replicated either @etbusch's success or my failure?

I will be assembling a third watch for a friend tomorrow and will see what that one does.

The third watch I've put together has a working buzzer. All three of these are the CA-53W model, maybe the other cases have different buzzer elements?

I've only been using the 506 case lately. Will try a 53 early next week.