PicoMite: driving a passive buzzer


Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4388
Posted: 01:32pm 29 Nov 2022      

Hi Bill.

  Turbo46 said  It works with Volhouts simple inverter. That suggests to me that the speaker is effectively filtering out the frequencies that it cannot respond to as I said before.


What frequencies it cannot respond to ? Unless I am fundamentally misunderstanding then if I am using PWM 1, 256 then (assuming an "ideal" that does not exist) I am sending a 256 Hz square-wave oscillation and the speaker plays some moderately nasty approximation of Middle-C. There is no carrier wave in this mode and the 'duty' seems to control the volume.

By the way with the PWM command are dutyA and dutyB percentages, fractions, or something else, the manual doesn't appear to say.

  Turbo46 said  So why doesn't it work with OPTION AUDIO, and PLAY TONE or PLAY SOUND? I don't know but if they both use the 44100Hz carrier then it must be something simple. Software is your thing. Sort that out first.


At the moment I'm not seeing a software problem, I'm seeing a "I am still working under some misapprehension" problem. If as @matherp says the 44100Hz carrier "locking up" these buzzers is "a thing" then that would explain it ... though my gut tells me there would have been at least an initial click, pop or hiss.

  Quote  Mixing the channels is the next problem. It may be that Volhut's circuit could be used to sum the digital signals with two extra 2K2 input resistors but don't hold your breath.


That's by-the-by until the basic problem of getting PLAY TONE/SOUND to do something is resolved, or it is at least understood why they do not. And my understanding is that once that is resolved PLAY SOUND can handle up to 4 channels on a single PWMA/B pair ... some sort of audio Voodoo outside the scope of my current problems.

I know I'm repeating myself but my understanding is that electronics engineering courses and historic electronics hobbying include a whole bunch of messing about with analog, audio, hifi, filters, etc. I've got none of that background which I suspect is the major contributor to this thread.

Best wishes,

Tom
Edited 2022-11-29 23:36 by thwill