Freesteel Blog » 2015 » February
Tuesday, February 17th, 2015 at 11:15 am - Machining
The green is the raw plot of the accelerometer vector which was aligned with the crossbar of my bike on the ride. The red is the altitude, the yellow is my speed — clearly slower going up hill than going down as time advances from left to right. We stopped for a bit at the top of the hill.
This is smoothed with an exponential decay factor of 50/51 on a time sample rate of 0.1seconds, so a sort of 5 second time window.
This is applying the exponential smoothing filter backwards as well, which is a trick I heard about a few days ago. I haven’t worked out of the maths of it yet, but it looks good.
Here are some vertical lines showing periods of ascent and descent with the second white horizontal line denoting the overall average accelerometer reading that you can think of is approximating how much the bike cross bar is pointing up or pointing down from the horizontal. I can convince myself that it is negative on the uphills and positive on the downhills where it is tending to point more in the direction of gravity.
Here’s a zoomed-in section of where we peddled down the hill and then heaved our way back up the other side. Because the rates of descent and ascent are about the same it means the slope down must have been shallower as I don’t peddle up hills very fast.
Unfortunately I’m not competent enough to overlay this on a map to see these places on the contour lines, and I don’t have a bike wheel trip magnet to measure distance travelled properly.
Anyway, it’s not really for my bike; it’s for putting on my hang-glider. The bike is just a good way to test things till I can get out flying again.
Monday, February 16th, 2015 at 8:49 pm - Machining
Quick report on the misery of trying to get any good data out of these fancy good-for-nothing data sensors.
I did a bike ride on Sunday around Yorkshire, from Barbon to Dent, up the valley, down to the very fine Cafe Nova in Sedburg and then back to Kirby Lonsdale via a bridge over the river Lune where Becka and I went kayaking in January and got scared (it looked a bit tame in these water levels). This was the day after the day before where I broke my caving famine and did a nine hour Easegill traverse from Pippikin to Top Sink while the hard people (incl Becka) did the reverse route and went out Bye George to celebrate Tom’s birthday. (This was the same Tom who drove out to Austria with me last May so I could go hang-gliding when Becka stood me up to go on a caving holiday.) Hint: for my birthday I will not be going caving.
So, anyway, you’d think something as simple as the GPS-altitude and barometric readings would be somewhat related.
This is what the plot looks like of barometric pressure along the X-axis (zeroed at 990Mb) vs altitude, which ranges from 102m to 305m. Yellow is the first hour, where we went over the hill, and blue is the second hour peddling up the valley from Dent.
Not a great correlation. Here’s the same picture zoomed in. The squiggles are predominantly left and right accounting for the noise of the barometer readings.
Suppose I take a rolling average of sequences of 7m and plot the same here without all the noise, getting the yellow line.
Still pretty wobbly. The cyan is the plot of the barometric forumla which is:
101325*(1 – 2.25577e-5 * altitude)5.25588
This is near as damnit a straight line of slope -0.08488715682448557. Applying simple linear regression to the slope gives -0.08992119168062143, which is not a great match.
Maybe I ought to work out a way to do this calculation in run-time on the device itself to give a measure of how rubbish the altitude-barometer agreement is during operation so I don’t have to bring it back here and run these complicated python programs on the data.
Then I could see if it’s responsive to the mode of travel, eg bike vs walking up and down the hill.
The next correlation to look at from this data is tilt of the bike frame registered from the accelerometer vs the slope climb according to the GPS. I’ve got very little hope this will work, so have put it off. I’m already sure that the temperature vs altitude signal is completely lost in the noise, probably due to the proximity to the ground on which the sun was shining.
I hope to see something better if I ever get this thing in the air. Right now I’m 3D printing enclosures to grip on to the base bar and am gathering a desk full of lots of bits of useless bits of plastic. Got to push on and not be distracted.
Wednesday, February 4th, 2015 at 11:14 pm - Machining
So I had to bodge the wind sensor interrupt readings and filter out the glitches. Beyond that, there’s a heck of a lot of variation in the readings when in front of the fan (getting 12mph wind, according to the proper device), and even at the nozzle of the vacuum cleaner (where the wind speed was 42mph). Either there’s still turbulance or the sensor is wobbly. Not impressed.
Next up, there’s the sudden-air-temperature-from-flying-into-a-thermal detector based on the analog TMP36 connected to a large capacitor to bring the voltage changes down to zero, and so they can be put through two op-amps (one for positive and one for negative changes).
I turned on and off the hair drier behind the fan that points at the dangling circuitry and got this trace.