Accelerometer for beginners

Hi,

I want to measure how the front wheel lifts when I play on my motorcycle. I have just learnt about Arduino and got help here to send HCSR04 data to my phone via HC06. I only run it on a breadboard at home, so far.

I believe an accelerometer is a better solution.

The accelerometer will rotate slighly while it moves up and down if placed in the front of the bike. It maybe takes 0.5 sec to move 50 cm as a very crude estimate with big variation. But very slow components like riding uphill 5 cm per second should be filtered out, as would very fast engine vibrations.

I just want to get positional data up/down and the rotation should be disregarded.

I am a beginner with Arduino.

Could you please direct me to a suitable accelerometer/gyroscope that is simple to connect to Arduino and what libraries I would need to make the simplest possible pass band filtering of data. Then I can gradually read up on this while I connect the ultrasound. Any related comments appreciated.

Thank you.

...

I had an Electronic Tilt Switch (only static angular data) connected but it was too sensitive to bike acceleration and mistook acceleration for rotation. Forward acceleration is strong when the wheel lifts but that must be disregarded. The accelerometer must be able to detect a smaller Z-component when the X-component is strong.

The normal process is you build the project and write the code and when it has an issue the volunteers here will give you some pointers.
I would start with Google, then maybe research who produces excellent libraries then look at the library examples.
TBH, if you are an Arduino beginner, you should really get the Arduino Cookbook and work through all the examples there first.
Good luck.

Suspensions usually have a floating gasket that will display sag and travel. If you do not have this gasket, you can use very strong magnets.

If you need electronic measurement, a LASER TOF module might be able to monitor real-time sag and travel. Power and vibration will be another difficult part of this project.

might want to give the Arduino Nesso a try..
I used the IMU when I coded mazes..
Navigate the maze by tilting the device..
It is quite sensitive..
Nice thing about the Nesso is it's already complete..
Got a small touchscreen, IMU and battery all in a nice case so you should be able to quickly run some remote tests and log some values not really sure what you are after though..
good luck.. ~q

@qubits-us
Thank you. Exactly the kind of pointers I need. So I will place the Nesso N1 in the bike and let the IMU record. What would be the easiest way to see the data? Should I send the data via Bluetooth to my Android phone? Or connect it by cable to the phone after running? When I am on the bike, the computer is not available.

I think the crux of the project is the accelerometer. The front wheel of the bike lifts in the range about 50 cm but this happens during strong acceleration. The IMU must not confuse these accelerations that occur in different dimensions ("z"/up and "x"/forward) during vibration from the engine. The IMU will also rotate moderately at the same time.

@wheelie
You're welcome..
It's a really nice unit and it does have a screen, so maybe display the peaks..
But yes, mount it securely to the bike, on the handle bars so you can view it maybe..
No idea what the IMU is going to do with all the noise, testing would be needed..
I'm hoping you would be able to measure the tilt or max tilt thereof..
Has some ram so you could swing a pretty big array of peaks..
It does also have BT, WIFI and LORA..
fun stuff.. ~q

Interesting. The Nesso is sold out in some countries! They don't ship worldwide. But I'll keep looking.


Phone is a computer that has an accelerometer. I have seen video of a phone used to fly an RC model by tilting.

What would stop me is I dunno Android.

I have some 3D gyroscope modules, you could mount one on the forks with a led strip feedback display across the handlebars.

I miss my old Virago.

Looks like a nice bike!
I had a gyroscope mounted. It was an ETS tilt switch. It was made for fork lifts not to tip over. The wiring worked but the gyroscope misinterpreted strong acceleration for tilting.

So now I will try an accelerometer. Too bad the Nesso is sold out in Thailand. I will look for an accelerometer that can separate well acceleration along the three axes.

sqrt( x^2 + y^2 + z^2 ) - 1 for gravity says how much scalar since when you’re just sitting there the result will be zero.