Hooking up speaker to duet 2 wifi to "beep"
-
Is there a way to hookup a small internal 2 wire speaker to the Duet 2 wifi board directly? Trying to get the mobo to "beep" when prints or autobed leveling finishes WITHOUT installing the PanelDue monitors.
If this is possible, how can I make this happen? Will this speaker work and where can I connect the black and red wires to the motherboard?
Thanks in advance
https://www.amazon.com/PC-Internal-Mini-Onboard-Speaker/dp/B002W4M0DW
-
There was a routine for adding a sounder - rather than speaker - to the duet v0.6/v0.8.5. That maybe your best answer. I'll look for a link.
-
Check out activate output on the following page:
https://reprap.org/wiki/RepRap_Firmware_macros#Activate_output.2Fbuzzer
Be aware this would only work with devices designed to emit a tone when supplied with a smooth DC voltage. A PC speaker would require an oscilating signal.
Be careful to respect current limits and use flyback/flywheel diodes on inductive loads.
-
It may seem like a complicated solution, but to me the "simple" solution is an arduino connected to the PanelDue port with a piezeo busser attached. Code waiting for M300 commands and playing the tone and duration requested. Its simple to use as it supports the common g-code for making the sound.
With the assumption that Duet sends M300 to PandelDue ofcourse. The most compact, plug and play set of parts seems to be a wemos d1 mini with buzzer shield. Should work with wifi disabled, but the code will need to be written. I may post back in a few weeks as I have something similar on the drawing board.
edit: preliminary testing shows the PanelDue port sends out a short JSON message when a
M300
command is encountered, but it does not do so if a 12864 panel is configures (possible bug reported).M300 S7000 P2000
results in{"beep_freq":7000,"beep_length":2000}
being sent even if no PanelDue is connected to continuously poll withM408
. Will add code when done testing, but buzzer and rgb shield for the D1 Mini works well, parsing the JSON works, just need to clean up code and release.BOM:
https://www.aliexpress.com/item/Buzzer-Shield/32831919149.html
https://www.aliexpress.com/item/RGB-Shield/32773824978.html
https://www.aliexpress.com/item/Wemos-D1-mini/32659152063.html
About $3.25 and it only requires soldering the headers, and bridging a solder jumper on the buzzer, all three boards can be stacked and soldered with the stackable or regular male header into a relatively compact part.
-
How about just setting a fan output to a PWM frequency of about 1600hz then just turning it on for a second then off.
-
Lots of great ideas. I've been spending too much time tinkering with this thing, I went ahead and bought a PanelDue 5i hoping the trial-and-error learning curve will be minimal to get the speaker to beep. Would be nice to have a display anyways for those moments when I'm not near my phone or laptop and need to adjust print settings as the printer is going...
Thanks for all the feedback and options.
-
The panel is pretty sweet!
And it beeps without issues when using M300 g-code (with the parameters for frequency/tone and duration).
-
Uploaded some code that works with the Wemos D1 and buzzer shield to beep according to the serial output from the PandelDue port. It has the WifiManager to create an accesspoint to let you configure Wifi and pins, plus over the air firmware updates from Arduino IDE once flashed. Will probably add a serial to TCP bridge and some RGB status LED functions as time goes by, serial bridge should allow me to place a real PanelDue anywhere and talk to the Duet through two of these ESP boards.
Don't connect the ESP Tx pin as its quite chatty in this early version, but for now it works.
https://github.com/beikeland/BeeperDue
This thread may also be of interest for a more involved solution https://forum.duet3d.com/topic/10720/duet3d-monitor-adding-a-big-status-light-to-your-printer