AVS Forum | Home Theater Discussions And Reviews (https://www.avsforum.com/forum/)
-   DIY Speakers and Subs (https://www.avsforum.com/forum/155-diy-speakers-subs/)
-   -   An rpi based DIY Vibration meter (https://www.avsforum.com/forum/155-diy-speakers-subs/2681865-rpi-based-diy-vibration-meter.html)

coolrda 01-05-2017 04:28 PM

Quote:

Originally Posted by dominguez1 (Post 49576817)
My thought is that we will all need to start using this meter...and 3 could start a little side business to produce these for us, or we could make it ourselves with instructions.

I'm thinking that this will be the tool to use to graph TR and include as part of the ulf scorecard. It won't have the 50hz limit of VS and be more specific to measuring subwoofer TR.

@coolrda , thoughts?

I think it's great where 3 has taken this. My wish is for realtime display of multiple sensors and to have this run along side OM/REW. I don't have a problem buying a product like this. This could be Calman or Chromapure compared to VS being freeware giving one what HCFR does. Phenominal freeware to get your feet wet but then some move on and up to a more precise measurement platform.

awediophile 01-06-2017 12:54 AM

I just found this thread, and there's a lot to catch up on here. I'll just start with a few comments:

It deserves note what a such a device actually measures vs. what we actually feel. (Many of you are probably already aware of this.) While this device could measure vibration transmitted through floors, furniture, and other objects in contact with our bodies, this device cannot measure tactile sensation that arises from sound (in the air) acting directly on our bodies. The transmission of acoustic energy from air to solid matter depends on impedance matching, and the impedance of different parts of each listeners; bodies will respond quite differently compared to furniture and stuff like that. Of course in practice, plenty of tactile sensation is felt through solids in contact with our bodies, so there is plenty of utility in such a device.

As noted in another post here, the vibrotactile human response curve peaks in the "low mid" frequencies, so being able to measure well beyond 250 Hz is probably a plus. Such capability might be useful for designing speaker enclosures among other things, where vibration is usually undesired.

Python is my primary language, and I would say the technology choices look very sound, except for the ReactJS. Not that there's necessarily anything wrong with ReactJS. I have no opinion. I'm just not a UI guy either. :) However, one package that might be real nice to look at for data plotting via the web is bokeh. What I like is that it includes a few simple UI controls and can interact with a server.

About Python concurrency and multiprocessing: Yes, there is a global interpreter lock (GIL) that prevents multiple threads from executing Python code within the same memory/process space at the same time. However, whether this is a major issue or not depends on your code architecture. IMO, the GIL is overblown as a programming restriction, typically by people who come from a Java or C++ world where the solution to any concurrency problem is almost always to use threads. I am of the strong opinion that using threads for any and all concurrency problems almost always leads to poor performance and/or stability. It's not that threads generically suck but rather that pretty much all programmers suck at writing code that uses threads.

The question is where you need concurrency and where you specifically need parallelism. There are many ways to achieve concurrency in-process in Python despite lack of true parallelism. For example, using libraries/architecture, Python code on a single core can handle on the order of 10000s simultaneous network connections while keeping latencies reasonable. Those who need to scale to multiple cores often need to scale to multiple server instances, and by that point, you need a multi-process architecture anyway. Lastly, the GIL can be easily bypassed by code that's written in C or C++, as long as it doesn't need to touch Python data structures. And for those rare occasions where multi-threading is necessary and multi-process is not, writing the threaded code in C or C++ will almost always be the better choice anyway.

Feel free to ask for clarification on stuff.

3ll3d00d 01-06-2017 10:28 AM

I had narrowed down to bokeh or plot.ly for a graph lib and had been leaning towards bokeh as the thing to try first. I will press on with that given your rec.

The only bit that needs a handoff is handling the data from the device as the bus is slow, the mpu has a small FIFO onboard (and the whole measurement is useless if it overflows) and the pi has pretty slow storage too. Current plan is just to do an async request to post the data out to the recorder (and then can coalesce those events if that backs up for some reason).

I plan to make a start on the analysis service this weekend so will hopefully have something basically useable some time early next week, depends how much time I get this weekend though.

3ll3d00d 01-14-2017 03:47 PM

I now have a basically functional pair of services, one that runs on the pi and takes measurements and the other which runs on another machine and receives/logs the data and will have the UI sitting on top of it. It's written to support 1 accelerometer per pi atm but as many pi's as you want so if you really want to load up your seating area with an array of pi's then go for it :) I will grab another pi soon so I can be sure this works.

Next step is to get a basic UI going so that I can at least trigger measurements & dump graphs on screen. I will need to add a bunch of error handling too as it's pretty brittle atm but will add that as I go.

I also need to add some instrumentation to the recorder so I can work out what sort of sample rate it can actually support and perhaps suggest a maximum achievable sample rate. 500Hz is certainly doable with accelerometer and gyro data at the default bus speed, 1kHz is not. If we can get away without gyro data (depends on the algorithm I end up using to strip out gravity) then that should bring 1kHz into range anyway.

3ll3d00d 01-19-2017 03:06 PM

1 Attachment(s)
I've now tidied up the backend some more & I put a bit of time into linking the project up with the various services (ci, coverage, quality) that you can pick up for free on github, this means I now have some shiny badges to display (the coverage one seems rather optimistic mind you but whatever)

https://www.avsforum.com/forum/attach...1&d=1484867005

I've also made a start on installation/setup docs - https://github.com/3ll3d00d/vibe#buildinstallation

I think the backend piece is at least a v0.1 now, it seems fairly reliable anyway. Next I need to add some automatically generated graphs after a measurement succeeds so there is some analysed data available. After that, I can either sort out packaging of the app(s) so people can install it or I crack on with the webapp. If anyone pipes up saying they want to use this then I'll sort out the packaging, otherwise I'll continue on my merry way with the webapp.

dominguez1 01-22-2017 06:53 PM

Keep up the great work 3!

3ll3d00d 02-03-2017 01:48 AM

rather slower going than expected on the web ui front, haven't really had the time available to get going on this. I have managed to get the basic infrastructure in place though so I now have a UI running that talks to the analysis process, it's been beaten with an ugly stick atm but CSS is not my strong point :) hopefully faster progress now over the next few weeks to get something usable out there.

3ll3d00d 02-03-2017 03:02 PM

1 Attachment(s)
quick glimpse of 1st screen, not v exciting but it is at least a screen that works :)

https://www.avsforum.com/forum/attach...1&d=1486162911

3ll3d00d 02-05-2017 02:05 AM

1 Attachment(s)
config screen complete & I have made a start on the screen that allows you to make measurements.

https://www.avsforum.com/forum/attach...1&d=1486289025

3ll3d00d 02-05-2017 12:55 PM

1 Attachment(s)
and the basic layout of the measurement screen, some bugs to iron out in how this talks to the backend but that's a job for another day....

https://www.avsforum.com/forum/attach...1&d=1486328056

3ll3d00d 02-12-2017 05:01 AM

1 Attachment(s)
I think it's now pretty much working for configuring and measuring, it renders the updates properly as it goes so you can see measurements progress properly and get some info back if something goes wrong.

https://www.avsforum.com/forum/attach...1&d=1486904475

I can now start on the analysis side of things.

derrickdj1 02-12-2017 07:25 AM

That looks fairly simple. Can't wait til you're done.:)

dominguez1 02-12-2017 07:31 AM

Looks awesome d00d!

3ll3d00d 02-18-2017 04:42 AM

1 Attachment(s)
first graph with controls with setting the ranges on each axis

https://www.avsforum.com/forum/attach...1&d=1487421686

3ll3d00d 02-18-2017 12:25 PM

1 Attachment(s)
it's not really designed for mobile (small screens are not ideal for graphs) but it's not hard to come up with vaguely sensible mobile layout so ....

https://www.avsforum.com/forum/attach...1&d=1487449492

3ll3d00d 02-18-2017 04:50 PM

1 Attachment(s)
most of the controls now on screen for the basic graph view along with a basic breadcrumb style navigation view (so you can swap between measurements/devices/graphs from one place)

nearly made it to a 0.1 build :)

https://www.avsforum.com/forum/attach...1&d=1487465383

3ll3d00d 02-19-2017 08:17 AM

a short demo, there are a few glitches in the UI as you'll see but you get the impression


3ll3d00d 02-25-2017 11:09 AM

1 Attachment(s)
this took considerably more effort than I was expecting to get right but I have now added the ability to compare an arbitrary number of data sets on one graph.

To illustrate you can see the same data selector along the top has added the ability to add/remove an analysis of a selected measurement. This means you could compare a specific axis across n measurements and/or devices or compare peak spectrum to average spectrum (i.e. the speclab view of the world) or basically any combination you want.

https://www.avsforum.com/forum/attach...1&d=1488049752

3ll3d00d 02-28-2017 04:34 AM

the pi zero has been upgraded with wireless connectivity - https://shop.pimoroni.com/products/raspberry-pi-zero-w

less than half the price of the pi3 and smaller/lighter, looks like it should be a good choice for making a small integrated measurement system and the cheapness means you could setup an array of them across your seating area without spending too much cash. You could probably even just forget about a case :)

dominguez1 02-28-2017 05:58 AM

Quote:

Originally Posted by 3ll3d00d (Post 51051249)
this took considerably more effort than I was expecting to get right but I have now added the ability to compare an arbitrary number of data sets on one graph.

To illustrate you can see the same data selector along the top has added the ability to add/remove an analysis of a selected measurement. This means you could compare a specific axis across n measurements and/or devices or compare peak spectrum to average spectrum (i.e. the speclab view of the world) or basically any combination you want.

https://www.avsforum.com/forum/attach...1&d=1488049752

This is great 3! :D

So the green line represents the peak reading for all axes? Can you also sum the axes?

dominguez1 02-28-2017 06:30 AM

Is the parts list updated for Post 1? Are you planning on posting any more detailed instructions on how to build, download software, etc.?

I'm happy to be an early adopter. :cool:

3ll3d00d 02-28-2017 08:25 AM

Quote:

Originally Posted by dominguez1 (Post 51119177)
This is great 3! :D

So the green line represents the peak reading for all axes? Can you also sum the axes?

they are the 3 lines listed above so they're all PSD values but for different measurements and axes. This isn't really a comparison you'd do in reality, just an illustration of what you can do. I haven't added sum yet, will do so soon.


Quote:

Originally Posted by dominguez1 (Post 51119785)
Is the parts list updated for Post 1? Are you planning on posting any more detailed instructions on how to build, download software, etc.?

I'm happy to be an early adopter. :cool:

I am working on packaging atm & am writing some installation docs to go with it, should be done soon I hope

3ll3d00d 03-01-2017 03:26 PM

@dominguez1 first cut at the rpi setup docs are up at http://vibe.readthedocs.io/en/latest/install.html#

3ll3d00d 03-03-2017 03:22 PM

first release is now published to pypi so testing is welcome

https://pypi.python.org/pypi/vibe-recorder/0.1.2
https://pypi.python.org/pypi/vibe-analyser/0.1.2

install docs -> http://vibe.readthedocs.io/en/latest/install.html

I don't have any windows instructions atm, I need to see if I can package it as an exe to make it a bit easier for people (who aren't familiar with this sort of setup)

I need to add some scripts for auto startup, cleanup some of the logging and fix a couple of minor ui glitches....

3ll3d00d 03-05-2017 03:52 AM

1 Attachment(s)
I've uploaded an early version of a windows exe for the analyser piece - https://drive.google.com/file/d/0Bxd...ew?usp=sharing

You should just be able to run it and you'll see a console window open saying something like

Code:

Loading config from C:\Users\Matt\.vibe\analyser.yml
Reactor analyser is starting
2017-03-05 11:49:12,505 - analyser.twisted - ERROR - __init__ - Serving ui from
C:\Users\Matt\AppData\Local\Temp\_MEI86682\ui\index.html and C:\Users\Matt\AppData\Local\Temp\_MEI86682\ui\static

if so then open a browser and go to http://localhost:8080, you should see something like

https://www.avsforum.com/forum/attach...1&d=1488714680

To exit just press control+c in the cmd window.

This was built and tested on Win8.1 Pro using http://www.pyinstaller.org , I have no idea what compatibility is like across windows versions (my windows boxes are all Win 8.1).

This build also has a few UI glitches in it that I need to sort out before formally releasing it but would be good if someone tries it to see if it works ok on their machine.

3ll3d00d 03-05-2017 02:38 PM

I think this is the first proper release -> https://github.com/3ll3d00d/vibe/releases/tag/0.2.0

windows exe can be downloaded via the link
installation instructions for the recorder are at http://vibe.readthedocs.io/en/latest/install.html

I think the faffing around with packaging is done now so I can get back to actually writing the thing, next step is providing access to the summed view and target curves.

dominguez1 03-05-2017 07:36 PM

Thanks 3! Appreciate all your work on this sir.

I'm a windows guy, so the EXE helps. I'm definitely going to do this, but just haven't figured out just quite when yet. Anxious to try!

Make sure and post in the Vibsensor Thread...

3ll3d00d 03-07-2017 03:32 AM

1 Attachment(s)
I wonder this would work

get a pi zero w
put it in a slim line case
use foam tape to firmly secure the breakout board to the case as per

https://www.avsforum.com/forum/attach...1&d=1488885858

solder wires directly to the headers on the board

the pi zero is 9g, a breakout board is about 5g, the case surely can't be very heavy... I reckon you could do this for £25-30 (no idea what prices are like in the US) so seems a good approach for a small, light, cheap, relatively easy to assemble sensor

3ll3d00d 03-07-2017 06:54 AM

https://www.adafruit.com/product/2883 is probably a good option for the locals

notnyt 03-07-2017 08:19 AM

Quote:

Originally Posted by 3ll3d00d (Post 51302233)
I wonder this would work

get a pi zero w
put it in a slim line case
use foam tape to firmly secure the breakout board to the case as per

https://www.avsforum.com/forum/attach...1&d=1488885858

solder wires directly to the headers on the board

the pi zero is 9g, a breakout board is about 5g, the case surely can't be very heavy... I reckon you could do this for £25-30 (no idea what prices are like in the US) so seems a good approach for a small, light, cheap, relatively easy to assemble sensor

pi zero are $5, pi zero wireless are $10. I think most places like microcenter and fry's carry em. Adafruit is pretty good though, also.


All times are GMT -7. The time now is 09:28 PM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
vBulletin Security provided by vBSecurity (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.

vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.