From a beeper to a speaker?

Has anyone attempted wiring in a speaker to their 3d printer? I can understand the gist i guess for a beeper, would a speaker just take the same wireing and likley more power?

Ive tried googling this but have only come up with how to 3d print a speaker. Which although cool, dosent answer my question of how to implement one onto a control board.

What would you drive the speaker with, are there sound circuits in it?

Tbh i have no idea. My cr10s pro has a speaker, which lead me to this line of questioning. I figured it worked off a signal source identified as a pin.

Anything is possible … but I suspect it would be a significant amount of work. As pointed out you would have to have something to properly drive it (if it was beyond just outputting a simple tone). You would probably also need an Op amp or something similar to properly push it and not tax the arduino and you would probably have to add Marlin (or similar) support for actual audio instead of just a “beep”. Depending on your use case (like having it louder) you might just want to take a different approach and figure out a line level beep that can plug into an external amp/speaker setup.

1 Like

What would you use it for?

Well with my Cr10-s Pro i have it do custom sound bites for when it starts up (windows95 sound). It’s just little amuseing things really Since I like to tinker with my 3d printers this was something ive seen very little info on, though its an option in marlin, so I wanted to see how feasable it is to try.

long story short, it seems to be a bit mroe of a project than I’m able to take on at this time, but ive been directed in a direction should I take it on at a later time.

What about the computer voice from 2001. “Good morning Dave” or “I can’t let you do that Dave”.

1 Like

I believe it is a matter of modifying your firmware.
Marlin is programmed in C++, for example, and videos exist showing you how to get in there and muck around.
It should be a fairly simply matter of subbing one sound file for another.

1 Like

I’ve been watching this thread wondering if I should step in and comment.

What I think Dr.Marvin is asking to do is play .wav files on his 3D printer. The answer is you can’t.

You could run the buzzer line to a speaker (with a simple amplifier like the LM380) but that will give you louder beeps. This may be what you’re looking for, but it doesn’t sound like from the comments.

I have implemented playing .wav files on Freescale Cortex ARM4 processors and it’s not a trivial operation and even if the processor had the capability, you also need a fair amount of Flash memory directly available to the processor (and its DMA subsystem) for storing the .wav files. You cannot play .wav files directly from an SD card or USB thumb drive. I have never seen a 3D printer controller with the resources to be able to play .wav files - there may be one out there, but there needs to be a few 100k of internal Flash available as well as the DMA driving the sound out, either as an analog voltage or an I2S signal.

Probably the best solution would be triggering something like this module Talking Products, MP3 Recordable Sound Chip Module, 4MB Memory, with AAA Battery Box. Ideal for Models and Crafts. from the beeper line.

Just looking around and I found this One-chip sound player and this seems to be in conflict with what I was saying about the .wav file needing to be in local Flash of the processor - this solution involves stopping everything going on in the processor and waiting a set number of processor clocks.

Sorry, I wish I had a better answer for you.

1 Like

Just did a big Google dive, and it seems you are correct.
You can muck with the m300 for custom beeping, and make your steppers work in harmony, but that’s it.
…unless you have octoprint and a pi, then you can snag the moonshine plug in, and make it go up to 11.

1 Like

Thats what i was aware of regarding the marlin beeper hertz being adjustable.

I saw this a few years ago and didnt think much of it untill i got my creality cr10-s pro and it had a speaker accepting sound files. Which brought me to come back to this and wonder the feasability of either doing something like the m300 commands into a string to make a song. Like indicating the printer is done or something.

@mykepredko thats for chipping in. My idea is kind of both the .wav file and or beeper frequency modulation. 1 being able to say spooky things like Darth Vader quotes, or something funny. Or playing a simple song like the mario intro by useing different beeps.

I understand that memory would be a premium for option 1, but im still in the preliminary research/question asking. I should look a bit closer at the creality setup and understand how they’re accommodating for memory and processing. I know when i messed with the files theyre only a few secconds long each. With the stock intro opening sound being 3 sound files long.

Interesting video - that’s like what we did back in the '80s to get music out of Commodore 64s.

One point on wave sound files that you should be aware of; short files are deceptively large. The minimum sampling speed you can have is 11,025 samples per second and that’s at 16 bits (two bytes) per sample. So a three second monaural .wav file will be 66+k in size. The STM32F407VET which has 512kB Flash which means you can store 23 seconds of music (and nothing else) at minimums (if you want to use a typical wav file that is in stereo and sampled at 44,100 samples per second, you’re looking at 176kBytes per second).

This is not to say you can’t greatly enhance the user experience with wav files, just that they should be on the order of a second long or less.

We can take this off line if you really want to pursue it.

1 Like