Andy's Postbag and random ebay links

Tell us about the cool things you've recently got
User avatar
ahull
Posts: 1471
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: Andy's Postbag and random ebay links

Postby ahull » Thu May 11, 2017 1:08 pm

I had a play with Lineage and of course Cyanogenmod - both look pretty good, and seem to be stable on the phones I tried them on. The older Ace and Ace 2 phones don't have an official Lineage build, and are probably too old and memory starved to run it reliably any way.

While playing with the Android phone spectrum analyser I noticed that if I placed the phone next to the window I could actually watch the doppler shift of the oncoming and receding vehicles as they speed past my house.

I may have mentioned before that I live next to a main road which one or two (thousand) people think is a race track, it would be interesting to see how easy and accurate a doppler shift speed estimation device would be. Oddly enough, pretty much every vehicle seems to produce their most pronounced spike in the audio spectrum somewhere around the 1kHz mark, despite the fact that they all sound different to the human ear. I wonder if this is related to something inherent in their engine or tyre noise.

This spike moves up and down the spectrum graph on my Android phones a the vehicle passes by.

I think I might do a little more experimenting if I get the time.

http://www.phys.uconn.edu/~gibson/Notes ... Sec6_3.htm

https://en.wikipedia.org/wiki/Doppler_effect
- Andy Hull -

User avatar
RogerClark
Posts: 5601
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Andy's Postbag and random ebay links

Postby RogerClark » Thu May 11, 2017 10:28 pm

Re:1khz sound from cars

could be the tyres. I would also double check its not a bug in the spectrum analyser.

A while ago I looked to see if there were any radar modules on eBay what could determine speed, and it looked like there were some, which could potentially be used, but possibly only with modification.
It may be worth a look.

Re:Phones and lineage

I have been running a custom ROM on my Moto G2 since I bought it in 2014, and have rooted all our Android devices and installed the Xposed framework on them.
But it looks like Xposed is no longer being supported as the sole developer does not have time to rewrite it for Android 7

So the only way for me to have some of the customisations available via the Xposed plugin modules, is by building a complete custom ROM.

Actually Android 6 brought in the new App permissions system, which is mainly what I used the Xprivacy module for.

But the built in permissions dont include network access ( as Google dont want you to be able to block their adverts and tracking)
Also Xprivacy had some other neat tricks, like the ability to feed faux locations to apps which wont work without it.

User avatar
BennehBoy
Posts: 418
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Andy's Postbag and random ebay links

Postby BennehBoy » Fri May 12, 2017 10:43 am

Hmm, intresting problem....

Most cars will be be keeping revs between 2000 & 3000 at normal running speeds. 4 stroke engine means 2 of the 4 cylinders are firing per revolution, so that means anywhere between 80hz or 100hz when moving from rpm to fires per second.

Gearbox will probably be in 4th or 5th gear which is ~ 1:1 ratio.

Final drives are usually between a 3 or 4:1 reduction, so that puts wheel revolution at somewhere near 20 to 25hz

So, how many 'blocks' are there on the tyre tread circumference? perhaps 50?

20 * 50 = 1khz
25 * 50 =1.25khz

So perhaps it's plausible :D

Or it could just be a load of cobblers (banging on nails at 1khz!).
-------------------------------------
https://github.com/BennehBoy

User avatar
ahull
Posts: 1471
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: Andy's Postbag and random ebay links

Postby ahull » Fri May 12, 2017 11:26 am

BennehBoy wrote:Or it could just be a load of cobblers (banging on nails at 1khz!).


That sounds like a "post a vdeo or it didn't happen" challenge to me.. :D
I'll see what I can come up with. If it turns out to be cobblers, I'll post a picture of the nails. ;)
- Andy Hull -

User avatar
ahull
Posts: 1471
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: Andy's Postbag and random ebay links

Postby ahull » Fri May 12, 2017 1:09 pm

OK Not the best video I've ever produced, youtube seems to have broken the sync between the audio and the video and the phone in question was the only one to hand with a charged battery, but I hope you get an idea of what I'm talking about.

You can however see at least two major peaks in the audio spectrum, with the one at around 1kHz actually flagged by the software, and interestingly another lump around the 100Hz marker, which is consistent with BennehBoy's analysis of what he would expect from a typical vehicle's engine noise.



If you are still thinking "cobblers"... you might prefer this. https://www.youtube.com/watch?v=XYy7MUfWd6Y ;)
- Andy Hull -

User avatar
zoomx
Posts: 379
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: Andy's Postbag and random ebay links

Postby zoomx » Fri May 12, 2017 1:26 pm

Maybe it's better a spectrogram app that can do this
Image

User avatar
BennehBoy
Posts: 418
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Andy's Postbag and random ebay links

Postby BennehBoy » Fri May 12, 2017 2:06 pm

Actually I messed up in my calc on the upper frequency, wheel rev frequency would be double what I said (wheels turn as ratio of engine RPM and not a multiple of cylinders firing per second).

I'll leave it up to the readers to carry out a statistical analysis of average tyre block count - 50 was a wild guess from me :D
-------------------------------------
https://github.com/BennehBoy

ag123
Posts: 541
Joined: Thu Jul 21, 2016 4:24 pm

Re: Andy's Postbag and random ebay links

Postby ag123 » Fri May 12, 2017 2:56 pm

wow, @ahull, it seem that the screen suffer quite a bit of violence, the vocals cracked the glass? :lol:
it seemed there are also peaks a little less than 1khz, the dropper shift seem quite apparent as well (the lower frequencies peaks after the car speed away, my thoughts are that the dropper shifts of the tyre noise pushes it around/above 1khz and it drops rapidly as the car zoom pass

using the equations found here
https://en.wikipedia.org/wiki/Doppler_effect
https://www.thermaxxjackets.com/doppler ... cy-change/
low f1 = c x f0 / (c - V)
high f2 = c x f0 / (c + V)
c = 340.29 m/s speed of sound
oops, earlier equations are wrong :P
re-arranging it seemed to be V = C / 2 x (f1 - f2)
based on the markings f2 = 1khz, that little less than 1khz, say f1 = 950 hz

V ~ 340.29 x (1000 - 950) / 2 ~ 8507 m/s
cars travelling at supersonic speeds?
the fft isn't precise enough to determine vehicle speeds, or maybe the race track comment is after all true

oh then google dug this up
http://www.informex.info/Multi-coincide ... se_ppr.pdf
^^ one of the fun part on one the graph is peak 1000 hz ~ car, 900 hz ~ truck, now there is a way to let stm32 or the phone count the cars & trucks passing by
:lol:

User avatar
ahull
Posts: 1471
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: Andy's Postbag and random ebay links

Postby ahull » Fri May 12, 2017 9:04 pm

@ag123 that paper is very interesting, and since I observer this phenomenon purely by accident, it is good to know that I am not the only one observing it. I would have been disappointed to find out that what I was seeing was an artefact of the recording method.

To get a meaning full speed, from our specra, I suspect we need to factor in the distance between the observer and the road to figure out the angular velocity of the vehicle relative to the observer, rather than using the situation where the sound source passed directly "through" the observer.

Sirens
....
Sirens on passing emergency vehicles.

The siren on a passing emergency vehicle will start out higher than its stationary pitch, slide down as it passes, and continue lower than its stationary pitch as it recedes from the observer. Astronomer John Dobson explained the effect thus:

"The reason the siren slides is because it doesn't hit you."

In other words, if the siren approached the observer directly, the pitch would remain constant until the vehicle hit him, and then immediately jump to a new lower pitch. Because the vehicle passes by the observer, the radial velocity does not remain constant, but instead varies as a function of the angle between his line of sight and the siren's velocity:

Image

v radial = v s ⋅ cos ⁡ θ

where θ (theta) is the angle between the object's forward velocity and the line of sight from the object to the observer.


So in our case, the radial velocity *may* be inferred by the rate of change of the peaks in our spectra, and thus, given that the vehicle travels tangentially to our position and passes at a fixed distance from it, we should also be able to estimate its linear velocity too.

Now the question becomes, can we track the rate of change of the peaks in our spectra with the required degree of accuracy, and if so, can we obtain a linear velocity measurement that is within acceptable limits of accuracy, such that it is worth measuring.

There is also, of course the "crowded room problem", in the sense that we can often hear more than one vehicle and would therefore need some method of separating our the different vehicles (assuming we don't simply discard all cases where he cannot be certain that we only have one vehicle).

Another method might be to observe our sound through various "drinking straws", i.e. two or more distinct, narrow gaps, possibly with several microphones, in the hope of removing the clutter of multiple sound sources.
- Andy Hull -

User avatar
ahull
Posts: 1471
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: Andy's Postbag and random ebay links

Postby ahull » Fri May 12, 2017 9:22 pm

ag123 wrote:wow, @ahull, it seem that the screen suffer quite a bit of violence, the vocals cracked the glass? :lol:

There is a reason why this one only cost £1 on ebay (plus postage) :P

The smashed digitizer is actually pretty easy to fix. if you can wield a small screwdriver and a hot air gun, it comes away clean without damaging the LCD below. Replacements only cost a couple of quid. In the case of this phone, (a Galaxy Ace 2), the digitizer is £3.49 shipped from the usual suspects. So for <£10 plus a little time spent rooting it and installing Cyanogenmod, you have a small wifi enabled Android/linux box with display that doubles up as an audio spectrum analyser and phone. :D Arguably more useful than a Raspberry Pi, and certainly cheaper.
- Andy Hull -


Return to “Postbag”

Who is online

Users browsing this forum: No registered users and 2 guests