Fill out above information andin all cases attach yourklippy.logfile (use zip to compress it, if too big). Pasting yourprinter.cfgis not needed Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there
Describe your issue:
Good day all
I have been gifted a few electronics that im looking to install on my enclosure. one of them being this speaker module, would it work with klipper? ive tried connecting it with the 3 wires ,let’s say gpio 15, declared it in printer.cfg but it’s not working. I am very new to this so any and all guidance on how to set it up, what to type in printer.cfg or elsewhere will be greatly appreciated.
was able to get the gifted bme680 sensor working but really struggling with the speaker module.
this is the product wiki for the module although i have the v2 version.
i’ve installed arduino ide(not sure if it’s needed or detrimental to the system/build
…
By documentation samples for Arduino it’s driven by “tone” function, if you read about that function you will find that it’s using PWM output, and most probably PWM signal frequency and duty cycle will define a tone.
So if you wish to hook it up - you need to setup your pin as PWM output
Possible klipper candidates: pwm_tool pwm_cycle_time
still not working though, 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
send your klippy.log file - it will have all versions.
Another way is to use Fluidd, go into Settings/Update
that page will display klipper, fluidd, moonraker versions.
yepp
it did look suspicions for me because usually klipper have this kind of versions
v0.12.0-125-gbfb71bc2
but your is just a number.
Ok Your log is showing that you are using not Vanilla klipper
it’s from here: GitHub - 0xD34D/klipper_ender3_v3_se: Klipper is a 3d-printer firmware
what kind of changes are there - i don’t know
and as i understand your version is approx. 50 updates behind from your master source.
I’m not advising to do upgrade (i don’t know what is happening in that branch)
and i don’t know why your config is not working, from official klipper documentation - it should work.
BTW your MCU firmware have higher version than klipper host !
as im sure you can tell im very new to this,
and as i understand your version is approx. 50 updates behind from your master source.: what do you mean? i keep the "software updates’’ section in the settings up to date and update whenever i see an update pending. is there a better way to do this? im confused as all of the software updates say up to date.
Ok, forget about my statement that your firmware is fresher than klipper - i misread it.
I don’t know how your updates are configured and what your “Update” is considering as latest version. You use some custom build of klipper.
I see that your Master sources are located here
you can walk thru all the changes in that sources here: Commits
Your klipper have version “25778772” it’s from Mar 16, 2024 - you can find it in commits - just scroll to March 16 - it will be aprox 50 changes down
Your klipper.log indicate that your MCU Firmware was build with version “de89acf1” which is dated Mar 1, 2024
Your master sources did have aprox 50 changes from 16 March to today.
From all this information I can conclude and state following:
Your Klipper host module is from 16 March
Your Klipper MCU Firmware is from 1 March
I see additional aprox 50 changes in your Master source which you don’t have yet.
Don’t worry, currently it seems your Master source is constantly pooling new changes from official klipper and maintaining some customizations - but you should be aware that it’s always lagging behind official klipper and they can introduce any changes they like. Some day they can stop/forget to maintain it and it will stop updating from official klipper.
I did touch this question about Version because you could have very old klipper version which didn’t have PWM tools - that could explain why configuration is not working.
Let me do some investigation in PWM tool area, I will try to build some config and will share my findings.
Thank you for the help with this issue. its much appreciated. thank you for explaining things to me, old dude here so the help is appreciated.
Ive spent some time going through the required updates, i tried to update as much as i can, reinstalled some packages and removed others like wiringpi(think i installed it in some attempt to get the speaker working)
updated the klipper version as much as i could FIRMWARE_NAME:Klipper FIRMWARE_VERSION:0512a7c0-dirty
I’ll upload the klippy log again now with this reply. ive moved the wiring to multiple gpio’s but still no luck. would it be easier to wire it up to a gifted arduino uno r3 and then connect that to the pi via usart/uart or whatever it’s called? or just keep it simple with the pi and not complicate things by adding other variables? klippy.log (1.1 MB)
And klipper did accept it without any issue - so your klipper is accepting pwm configurations.
What to do next:
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.
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
If you will get it working, then you can start using M300 command and other macros which uses M300 to play some sound sequences.
Report your results.
Why i’m sending you to read about klipper architecture:
During this thread you was mentioning following
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.