# Help needed, DFROBOT Speaker Module v2, klipper raspberry pi

**URL:** <https://klipper.discourse.group/t/help-needed-dfrobot-speaker-module-v2-klipper-raspberry-pi/16027>\
**Category:** General Discussion\
**Created:** [April 25, 2024, 3:29pm UTC](https://klipper.discourse.group/t/help-needed-dfrobot-speaker-module-v2-klipper-raspberry-pi/16027 "2024-04-25T15:29:15Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![gaolst](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/gaolst/32/10026_2.png) [@gaolst](https://klipper.discourse.group/u/gaolst)\
**Post date:** [April 26, 2024, 12:42pm UTC](https://klipper.discourse.group/t/help-needed-dfrobot-speaker-module-v2-klipper-raspberry-pi/16027/20 "2024-04-26T12:42:20Z")

</div>

Ok, i went thru some official samples and found a sample for a buzzer  
/config/sample-macros.cfg  
it have section for a beeper and some explanation

> [pwm\_cycle\_time BEEPER\_pin]

Then i went to your klippy.log which have your configuration,  
your latest configuration have this section

> [pwm\_tool buzzer]  
> pin = PB0  
> value = 0  
> shutdown\_value = 0  
> cycle\_time = 0.001

And klipper did accept it without any issue - so your klipper is accepting `pwm` configurations.

What to do next:

1. If you have Arduino - launch it and try to test your Speaker module in arduino (you have some samples in device description link which you did post), this way you will be sure that your speaker module is working as intended and you are not trying to use faulty module.
2. read about klipper architecture here: [Klipper Architecture / Ecosystem](https://klipper.discourse.group/t/klipper-architecture-ecosystem/6313)
3. try to change your definition of a `buzzer` to this:

> [pwm\_cycle\_time buzzer]  
> pin = PB0  
> value = 0  
> shutdown\_value = 0  
> cycle\_time = 0.001

1. I see in your config that you already have defined gcode command `M300` which is very similar to `/config/sample-macros.cfg` for a `BEEPER_pin`, but for initial testing you should avoid it’s usage, use direct command

> SET\_PIN PIN=buzzer VALUE=2 CYCLE\_TIME=0.001

1. If you will get it working, then you can start using M300 command and other macros which uses M300 to play some sound sequences.
2. Report your results.

Why i’m sending you to read about klipper architecture:  
During this thread you was mentioning following

> [@SPYKE357](#):
>
> i have tried the pin out on the pi as well as through the pins on the lcd connector, PB0 being the original/default buzzer/beeper pin for the SE printer

> [@SPYKE357](#):
>
> ive moved the wiring to multiple gpio’s but still no luck.

> [@SPYKE357](#):
>
> or just keep it simple with the pi and not complicate things by adding other

By looking at your logs and your few configs which you did post i see that you always was using `pin = PB0` which is referencing some pin on your printer board (Main MCU) i did see usage of Rpi pins in logs but only for your `chamber` sensor, but nothing else, So you need to be clear what exact pin you are trying to use and where, how correctly reference it in config, because each MCU have different names for pins and you should use prefix if you referencing non main MCU.

---

_[View the full topic](https://klipper.discourse.group/t/help-needed-dfrobot-speaker-module-v2-klipper-raspberry-pi/16027)._
