Webcam - with audio?


#1

I am using Octoprint intensiveley - daily. Sometimes the printer malfunction could be detected by simply listening. Strange, unusial noises could indicate easier malfunction of a component that you can not see on the webcam. Could be by nature of the given component. Example could be the a failing fan, or knocking extruder. Adding audio might not need a bigger developlement I belive but could enhance the service very vell.

Béla


#2

I've thought the same, but this borders on the machine learning that @foosel mentioned in the latest Octoprint on the air, so it wouldn't be trivial. When I thought of it I did some rudimentary research and immediately discovered it was waaaay past my programming abilities. Would be very, very cool to have, though!


#3

It could be a good idea, audio recognition is a hot topic of research today, but I have to suggest a possible main issue: the noise of the surrounding ambient and so the isolation of your (I hope the 3d printer is inside it) case.
Imagine for example if your print stops if you close the door and this sounds like a bar that comes out from the holder.
Maybe a deep learning approach could help, but I don't think that a raspberry has enough RAM space to run both the print and the sound classifier.
The only solution could be: record a big dataset and.... try to implement your idea, if it works, it could be a good improvement! :wink:


#4

If I might be so bold, machine learning and the ability for Octoprint to detect errors just by sound would be cool, but that doesn't sound like what Mucs_Bela was asking about at all.

I've had odd issues in the past that I would have detected and corrected much sooner had I been able to hear the webcam audio when my print started. Issues like (embarrassingly) disconnecting my X endstop switch instead of my Z endstop switch to use as a filament runout sensor after installing an auto bed-leveling sensor.

Just having access to the audio would be a huge help in cases like that.


#5

A friend has written a octoprint plugin for personal use which uses a kinect to detect print errors / and what is really cool the colorchange if a filament was changed during print, the printer wipes the noozle on a brass brush and resume print when the new filament color is stable. So no purge tower is needed / but he doesn't release it because he was sued for developing open source software (a Linux distribution, drivers) m). (he created a distro and didn't released the build script (which was totally fine) / all other parts are open source)

Color change detecting + nozzle wiping is something which would be really great.
Good the tool changer wipes the nozzles with a brush -> but a single hotend setup would be nice :smiley:


#6

I started wondering about this too, I am building an enclosure for my Prusa and want to stick a smoke detector in there. Having a plugin that simply listens to the webcam microphone, graphs an average sound pressure and can alert when it goes above a set threshold would enable me to run actions if the smoke alarm ever starts sounding, like automatically cutting power to the printer.

It seems like these two projects could be interesting to experiment with and extend upon:


I've tested with my widecam F100 and the microphone works fine with arecord even while mjpg-streamer is using the camera.

the syntax is like this:

arecord -D plughw:1,0 -d 5 -f S16_LE -t wav test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono

#7

Rather than a smoke detector, why not a Firetrace extinguisher?

(low melting-point plastic tube with internal pressure that holds an
extinguisher valve closed. If the tube melts the extinguisher goes off.)

https://www.firetrace.co.uk/applications/cnc-edm-machinery

I am not sure how much the cheapest one is, they sell them for cookers
(Fryertrace) and tumble dryers too.


#8

Another idea, with a camera and OpenCV or similar it should be possible to
make a flame detector plug-in...


#10

I found this because I want what I think the OP wanted. I don't want Octoprint to detect the malfunctions via audio (actually, that would be really cool), rather I want to be able to hear the audio through the webcam stream, so that I can detect a malfunction.

I'm only using the raspberry pi camera at the moment, so forgive me if using a real webcam already does this.


#11

Audio? Sure? Some have them printers in the bedroom.... :blush:


#12

Actually, I've worked on a project which involved using a Raspberry Pi 3B to record from a microphone and then to broadcast it over short-range FM. It worked great. You could listen to your printer using any standard FM radio if you wanted.

I'll have to chase the code, though. I can't find it on this laptop. <_<