I got a problem with a very simple circuit, supposed to beep on some
condition.
The circuit is built the following way:
A transitor's
emitter is connected to ground,
the collector is connected to the negative input of a Beep Buzzer
DC 3V 12V 24V, the other wire of the Buzzer to a battery,
which is independent of the PICO's power supply, but shares ground.
the base is connected via a 1k resistor to gpio 16.
The gpio-pin is initilized this way:
gpio_init(16);
gpio_set_dir(16,GPIO_OUT);
gpio_put(16,0);
When on some condition the program calls gpio_put(16,1), the buzzer is
supposed to beep.
This works fine with a 12 Volt battery.
However, with 24 Volt, the buzzer beeps right away.
The transistor is a BC 547, BJT, TO-92, 45V, 100mA, NPN, 0.5W, 150°C, so
24 Volt should be no problem.
Any idea what I am doing wrong? Is the 1 k resistor in front of the gpio
unneeded or too high?
Thanks for any hints, ulrich
condition.
The circuit is built the following way:
A transitor's
emitter is connected to ground,
the collector is connected to the negative input of a Beep Buzzer
DC 3V 12V 24V, the other wire of the Buzzer to a battery,
which is independent of the PICO's power supply, but shares ground.
the base is connected via a 1k resistor to gpio 16.
The gpio-pin is initilized this way:
gpio_init(16);
gpio_set_dir(16,GPIO_OUT);
gpio_put(16,0);
When on some condition the program calls gpio_put(16,1), the buzzer is
supposed to beep.
This works fine with a 12 Volt battery.
However, with 24 Volt, the buzzer beeps right away.
The transistor is a BC 547, BJT, TO-92, 45V, 100mA, NPN, 0.5W, 150°C, so
24 Volt should be no problem.
Any idea what I am doing wrong? Is the 1 k resistor in front of the gpio
unneeded or too high?
Thanks for any hints, ulrich
Statistics: Posted by ulrichmuc — Wed Apr 30, 2025 4:55 pm