An rpi based DIY Vibration meter - Page 3 - AVS Forum | Home Theater Discussions And Reviews
Forum Jump: 
 55Likes
Reply
 
Thread Tools
post #61 of 162 Old 01-05-2017, 04:28 PM
AVS Forum Special Member
 
coolrda's Avatar
 
Join Date: Nov 2002
Location: Bakersfield, Ca
Posts: 3,142
Mentioned: 150 Post(s)
Tagged: 0 Thread(s)
Quoted: 940 Post(s)
Liked: 667
Quote:
Originally Posted by dominguez1 View Post
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.
coolrda is online now  
Sponsored Links
Advertisement
 
post #62 of 162 Old 01-06-2017, 12:54 AM
Senior Member
 
awediophile's Avatar
 
Join Date: Oct 2013
Posts: 224
Mentioned: 5 Post(s)
Tagged: 0 Thread(s)
Quoted: 168 Post(s)
Liked: 57
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 likes this.
awediophile is online now  
post #63 of 162 Old 01-06-2017, 10:28 AM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
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 is online now  
 
post #64 of 162 Old 01-14-2017, 03:47 PM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
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.
dominguez1 likes this.
3ll3d00d is online now  
post #65 of 162 Old 01-19-2017, 03:06 PM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
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)



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.
Attached Thumbnails
Click image for larger version

Name:	badges.png
Views:	222
Size:	7.4 KB
ID:	1905929  
dominguez1 likes this.
3ll3d00d is online now  
post #66 of 162 Old 01-22-2017, 06:53 PM
AVS Forum Special Member
 
dominguez1's Avatar
 
Join Date: Dec 2008
Posts: 3,207
Mentioned: 130 Post(s)
Tagged: 0 Thread(s)
Quoted: 1065 Post(s)
Liked: 852
dominguez1 is offline  
post #67 of 162 Old 02-03-2017, 01:48 AM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
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 is online now  
post #68 of 162 Old 02-03-2017, 03:02 PM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
quick glimpse of 1st screen, not v exciting but it is at least a screen that works

Attached Thumbnails
Click image for larger version

Name:	configure.png
Views:	196
Size:	67.4 KB
ID:	1942409  
dominguez1 likes this.
3ll3d00d is online now  
post #69 of 162 Old 02-05-2017, 02:05 AM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
config screen complete & I have made a start on the screen that allows you to make measurements.

Attached Thumbnails
Click image for larger version

Name:	measurement.png
Views:	183
Size:	72.3 KB
ID:	1945017  
dominguez1 likes this.
3ll3d00d is online now  
post #70 of 162 Old 02-05-2017, 12:55 PM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
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....

Attached Thumbnails
Click image for larger version

Name:	measurement.png
Views:	188
Size:	134.5 KB
ID:	1946065  
dominguez1 likes this.
3ll3d00d is online now  
post #71 of 162 Old 02-12-2017, 05:01 AM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
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.



I can now start on the analysis side of things.
Attached Thumbnails
Click image for larger version

Name:	measurement.png
Views:	171
Size:	121.7 KB
ID:	1961057  
dominguez1, EarlK and derrickdj1 like this.
3ll3d00d is online now  
post #72 of 162 Old 02-12-2017, 07:25 AM
AVS Forum Special Member
 
derrickdj1's Avatar
 
Join Date: Sep 2011
Posts: 3,632
Mentioned: 94 Post(s)
Tagged: 0 Thread(s)
Quoted: 944 Post(s)
Liked: 660
That looks fairly simple. Can't wait til you're done.
derrickdj1 is offline  
post #73 of 162 Old 02-12-2017, 07:31 AM
AVS Forum Special Member
 
dominguez1's Avatar
 
Join Date: Dec 2008
Posts: 3,207
Mentioned: 130 Post(s)
Tagged: 0 Thread(s)
Quoted: 1065 Post(s)
Liked: 852
Looks awesome d00d!
dominguez1 is offline  
post #74 of 162 Old 02-18-2017, 04:42 AM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
first graph with controls with setting the ranges on each axis

Attached Thumbnails
Click image for larger version

Name:	chart.jpg
Views:	156
Size:	113.3 KB
ID:	1977361  
dominguez1 likes this.
3ll3d00d is online now  
post #75 of 162 Old 02-18-2017, 12:25 PM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
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 ....

Attached Thumbnails
Click image for larger version

Name:	mobile.jpg
Views:	157
Size:	72.3 KB
ID:	1977993  
dominguez1 likes this.
3ll3d00d is online now  
post #76 of 162 Old 02-18-2017, 04:50 PM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
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

Attached Thumbnails
Click image for larger version

Name:	chart.png
Views:	157
Size:	160.4 KB
ID:	1978777  
dominguez1 likes this.
3ll3d00d is online now  
post #77 of 162 Old 02-19-2017, 08:17 AM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
a short demo, there are a few glitches in the UI as you'll see but you get the impression

dominguez1 likes this.
3ll3d00d is online now  
post #78 of 162 Old 02-25-2017, 11:09 AM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
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.

Attached Thumbnails
Click image for larger version

Name:	comparo.jpg
Views:	159
Size:	160.1 KB
ID:	1992377  
3ll3d00d is online now  
post #79 of 162 Old 02-28-2017, 04:34 AM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
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
3ll3d00d is online now  
post #80 of 162 Old 02-28-2017, 05:58 AM
AVS Forum Special Member
 
dominguez1's Avatar
 
Join Date: Dec 2008
Posts: 3,207
Mentioned: 130 Post(s)
Tagged: 0 Thread(s)
Quoted: 1065 Post(s)
Liked: 852
Quote:
Originally Posted by 3ll3d00d View Post
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.

This is great 3!

So the green line represents the peak reading for all axes? Can you also sum the axes?
dominguez1 is offline  
post #81 of 162 Old 02-28-2017, 06:30 AM
AVS Forum Special Member
 
dominguez1's Avatar
 
Join Date: Dec 2008
Posts: 3,207
Mentioned: 130 Post(s)
Tagged: 0 Thread(s)
Quoted: 1065 Post(s)
Liked: 852
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.
3ll3d00d likes this.
dominguez1 is offline  
post #82 of 162 Old 02-28-2017, 08:25 AM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
Quote:
Originally Posted by dominguez1 View Post
This is great 3!

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 View Post
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.
I am working on packaging atm & am writing some installation docs to go with it, should be done soon I hope
3ll3d00d is online now  
post #83 of 162 Old 03-01-2017, 03:26 PM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
@dominguez1 first cut at the rpi setup docs are up at http://vibe.readthedocs.io/en/latest/install.html#
dominguez1 and EarlK like this.

Last edited by 3ll3d00d; 03-02-2017 at 12:53 AM.
3ll3d00d is online now  
post #84 of 162 Old 03-03-2017, 03:22 PM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
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 is online now  
post #85 of 162 Old 03-05-2017, 03:52 AM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
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



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.
Attached Thumbnails
Click image for larger version

Name:	header.png
Views:	114
Size:	23.9 KB
ID:	2007857  
3ll3d00d is online now  
post #86 of 162 Old 03-05-2017, 02:38 PM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
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 likes this.
3ll3d00d is online now  
post #87 of 162 Old 03-05-2017, 07:36 PM
AVS Forum Special Member
 
dominguez1's Avatar
 
Join Date: Dec 2008
Posts: 3,207
Mentioned: 130 Post(s)
Tagged: 0 Thread(s)
Quoted: 1065 Post(s)
Liked: 852
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...
dominguez1 is offline  
post #88 of 162 Old 03-07-2017, 03:32 AM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
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



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
Attached Thumbnails
Click image for larger version

Name:	Clipboard01.png
Views:	106
Size:	211.3 KB
ID:	2011657  

Last edited by 3ll3d00d; 03-07-2017 at 04:05 AM.
3ll3d00d is online now  
post #89 of 162 Old 03-07-2017, 06:54 AM - Thread Starter
AVS Forum Special Member
 
3ll3d00d's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 2,866
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
Quoted: 1636 Post(s)
Liked: 607
https://www.adafruit.com/product/2883 is probably a good option for the locals
3ll3d00d is online now  
post #90 of 162 Old 03-07-2017, 08:19 AM
AVS Forum Special Member
 
notnyt's Avatar
 
Join Date: Dec 2008
Location: Long Island, NY
Posts: 8,348
Mentioned: 197 Post(s)
Tagged: 0 Thread(s)
Quoted: 2538 Post(s)
Liked: 2304
Quote:
Originally Posted by 3ll3d00d View Post
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



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.
notnyt is offline  
Sponsored Links
Advertisement
 
Reply DIY Speakers and Subs



Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off