Show (pollution) measurements real time on video feed

AquaPlanning

New Member
For worker safety I would like to be able to record them at work, at the same time measure pollutants around them, and display these measurements on screen. Measurements to be shown in Graph form or in numbers.
Measurement input can be 0-5V analog, 0-20mA or whatever you prefer. Using the audio in-port on a pc would make it very versatile for others to use.

See this example : https://youtu.be/hpYxd1jMulA?si=5i_JqINB2YC4pEgh Scroll to 0:30. The system demonstrated in this video is unfortunately no longer available.
Screenshot:
pimex_lijm.jpg

The video above was made to show both workers and managers the importance of using proper protective measurements to benefit their health.

There is funding available, but I'm not the one making that decision. I would like this system to be open source.
 

Attachments

  • afbeelding_2024-12-23_074715305.png
    afbeelding_2024-12-23_074715305.png
    700.9 KB · Views: 3

AaronD

Active Member
OBS doesn't do that. Not directly anyway. If you already have a visual somewhere, then OBS could grab that. So then the question becomes, "What else (another app, or a camera watching a physical meter, etc.) to use to convert the measurement into a picture of some kind?"

Measurement input can be 0-5V analog, 0-20mA or whatever you prefer. Using the audio in-port on a pc would make it very versatile for others to use.
I'm an audio guy, self-taught for operation, formally trained in analog design. I don't think a standard audio jack will work for what you're doing. Yes, it would be awesome if it did, but you can't measure slow things with it. Below about 10Hz or so, it fades out to no response at all at DC (steady).

What you *could* do though, is use an Arduino or similar, with an analog input, and you might even use an audio library to make it appear as a USB sound card. Then the rest is as you think.

The problem of an audio input not responding to DC, is in the analog front end, before it even gets to the analog-to-digital converter (ADC). It's made that way on purpose, because speakers don't like DC, and a few other audio things work better too if it's always centered on zero. (*) But if *you* make the analog front end, then you can make it respond to whatever you like, and then shovel the samples into the library and have it "just work" from there.

(*) I just finished yesterday, about a week's worth of redrawing the detailed schematics in the official service manual for a professional analog mixing console that I inherited as part of some church sound upgrades. Converting from what feels like AutoCAD to an actual electronic design program, and untangling the poor organization in the process. It's entirely a collection of very small modules, each of which does its own little job, and every connection between those modules has yet another highpass filter / DC blocker.

---

Or, you could use the HID or CDC classes of USB instead of Audio. That might actually be easier still, to find an app to read it. Audio inputs tend to insist on audio functions, which your thing isn't.

HID (Human Interface Device) was originally for mice, keyboards, joysticks, etc., and is still used that way, but it can also be used generically. I've done that myself, with a custom app and a custom device.

CDC appears to the computer as a serial port. Kinda like the 9- and 25-pin connectors on the back of old computers. Lots and lots of things still use those, and their USB emulations. So if your thing is yet another USB emulation of it, just by using a USB CDC library, then you have all of those available. That's probably your best bet.
 

AaronD

Active Member
So in summary, I'd recommend using an Arduino or similar, with an analog input, to shovel samples between that and a "USB Serial Port". I imagine that's common enough that there might even be several complete projects already that do exactly that, so you can just buy what they used, put their code on it, and watch it work.

Then (mostly) separate from that, find an app that will display that stream of data from a serial port in a way that you like. Once you have that, you can set up OBS to capture the display from that app.
 

AquaPlanning

New Member
Hi AaronD, thanks for your clear responses. I didn't realize the DC filtering of audio jacks, so that helps in not wasting time.
I will check for other options. I understand the overlay option, but the persons doing the filming would very much appreciate a simple plug in solution.
Thanks again for your time.
 
Top