Page 1 of 1

Beeper Question (for Phil)

Posted: 22 Jun 2018, 16:23
by Scott Todd
Why is the transistor on the buzzer for the Arduino encoders.

I can't tell the difference when I wire it direct. I have seen Arduino examples with them wired straight, with a 100 ohm resistor, and a transistor with the E/C reversed from your diagram.

My transistor theory is pretty old. Can you shed come light :)

Re: Beeper Question (for Phil)

Posted: 22 Jun 2018, 17:20
by Phil_G
The buzzer is a highly inductive device, if you scope an arduino pin when its driving a buzzer,
theres loads of hash and noise which is easily avoidable by isolating it with a transistor.
Its made worse because the buzzer needs almost all the current capacity of the output pin,
so its almost pulling it out of saturation anyway. With the PICs theres no choice, they dont
have enough drive to operate the buzzer directly. Supply noise can have indeterminate effects
on a processor & memory, its a Bad Thing really but we mostly get away with it.
Cheers
Phil