1. Goal:
I want to measure the relative orientation between the motorcycle’s chassis shaft and the steering shaft in 3D space, so I can check if the steering geometry is still perpendicular after a crash. I work on fixing bikes and sometimes they are crashed a bit more severely but still fixable with proper methods. (scheibner motorcycle frame measurement) Hydraulic pumps etc. I have done it before and gotten a scooter to drive in a straight line. Which is not what happens if things are slightly bent. Motorcycle will try to pull in one direction even with forks and steering shaft that are straight not bent (replaced) the steering head is bent...
2. Concept / Approach:
Use two sensors: one on the chassis shaft (reference) and one on the steering shaft.
Each sensor should capture the shaft’s orientation in 3D.
The Arduino will read data from both sensors and compute the angle between the shaft axes.
Ideally, the measurement should be accurate to around 0.3° or better.
Motorcycle is of course stationary.
Considering fixing a sensor on the handlebars and rotating to reconstruct the steering axis position in 3D space. In this case front wheel would of course need to be off the ground so that the motorcycle does not move while rotating handle bars.
If using the handlebars themselves is not possible i could always get two cones machined with a threaded shaft and bolt them together so they align in the bikes head pipe. (where the steering shaft is in normal conditions) Use that as a shaft. For this case the bike has its front forks and steering shafts removed.
3. Sensor Ideas:
IMU (BNO055 / BNO08x / MPU-9250): Can give orientation in 3D; can be rotated around the shaft to average out mounting errors.
4. Challenges / Questions:
Can an Arduino and sensors do something like that. I have not ever done another arduino project so i figured id ask people that have experience.
How to best mount sensors to shafts for accurate 3D measurement.
How to calibrate and minimize errors from mounting misalignment, vibration, or magnetic interference. (rotating sensor on shaft and taking multiple measurements to cancel errors)
5. What I’m hoping to learn from the forum:
Feasibility of this project with Arduino hardware.
Recommended sensor setup and wiring.
Advice on sensor fusion, quaternion math, or PCA to compute shaft axes.
Practical tips for mounting and measurement routines.
Open to talking with you all about your ideas and input with your experience.
Havent posted before so hi all.
Didn't you suggest the list of sensors you posted can?
Double sided tape
The datasheet is your friend.
As for point 5, the datasheets for the sensors will answer that question, and will also tell you the wiring. I don;t understand some of the words in bullet 2.
Generally speaking we are not a free design house or coding shop. If you take a stab at the project and have specific questions someone may be able to help.
I think your biggest problem will be magnetic andor electrical interference. My gut feel is this job is normally done with a digital reading angle gauge but that is just my hunch.
The best way to know is eyeball and ride. Your internal gyro will tell you if a problem exists. Not measuable, but helps direct you.
A mechanical method:
Support the vehicle on wheels, PLUMB.
Place front and rear tire on a parallel line.
Place a straight wall on both sides of vehicle equidistant from centerline
Drop plumbs from center of fork
Measure perpendicular distance from wall to each side of frame, forks
An electronic method:
Many LASER levels in X, Y and Z
For bicycles, to show a similarity...
Determining bent forks or a twisted headtube on a bicycle can be done by hanging plumb bobs off horizontal handlebars very close to the steer tube. The string distance from the frame will indicate offset.
Determining frame alignment uses a couple methods.
A straightedge (or purpose buit Frame Aligmnet Gage) is placed against one side of the headtube and the rear dropout, and a measurement is taken from the seat tube to the straight edge. The direction of "offset" is determined by that distance and the I.D. of the dropouts if re-centered.
An alternative to this is to string a cord from one rear dropout around headtube to the other rear dropout. Distance from string to seat tube shows the offset. Direction is determined by re-centering rear dropouts.
Hey thanks for giving your view.
I asked chatgpt before I asked anybody else for the feasibility of this project. It recommended some sensors to me too... I was also wondering if this was even possible to do and wether I could get accuracy down to 0.3 degrees. I never meant to get something done for me. I was only hoping people had some experience in something related to this and such sensors and might have some good ideas. Wether they knew how accurate I might be able to get and with what sensor and so on.
In a perfect world this is what I want to achieve. I have a motorcycle on stands completely stationary. Use an appropriate size shaft and place it the motorcycles center chassis shaft and have a sensor on it. Use another sensor and place it on the handlebars. When pressing a button I turn handle bars from left to right not too fast. While it takes measurements
Depending on how I've mounted the sensor on the chassis shaft I'll have to rotate it as well, on its bushing to get more measurements and cancel error of sensor-shaft alignment. Finally I get a number e.g. 0.2 degrees out of square. Theres a professional tool from scheibner which has a maximum allowable 0.3 degrees out of square. Anything more is considered problematic for driving.
Hi thanks for your input.
In have tried multiple times eyeballing things. And my eyes are very capable and I rely on then plenty. However I can't get that accurate with them as I need. If the twisting is not too much then it's not too visible by eye. It is however very apparent when driving and letting go of hands. I can tell you with certainty how perfect the alignment is. Mounting the motorcycle on the frame alignment jig is so much work and requires partial disassembly. If I could get the motorcycle on and off with a flick of the fingers that's would be great...
Anyways I have tried things similar you what you have described. I have tried strings parallel to wheels. But rear wheel is not always in alignment with chassis perfectly so ideally I want to measure from the chassis to the front system or to the front wheel. On scooters plastic covers are in the way too...
I have built a laser jig with three lasers on a shaft. A center last and two more equidistant from it. I align the shaft perpendicular to the scooter using the center laser and use the outside ones aimed at the forks. All lasers are parallel so I should get the same distance if I have no frame damage. I can't remember the number but it can be calculated easily with simple trigonometry. A maximum 0.3 degree error at the head pipe would give me maybe 0.5 or 1 cm sideways deviation down at the forks. The further away the bigger this number becomes of course... This laser jig I could not get to run the lasers perfectly parallel... It was a diy. I have not lost all hope form it though. Maybe I'll tackle it again.
Basically what this apparatus does https://youtu.be/w6Cn4Y-2hgs?si=lMTlWse7ITfHP4QY
Was just trying to see what people might know and be able to help me with. In this forum
This is an industrious first project. I am not trying to discourage you. But you may end up pulling out some hair! It isn’t just hook up a module to an arduino and call it done. Unless you are going to use your serial monitor in the IDE you will also need some sort of display screen wired in to the circuit so you know your angles. And you will also need to construct some kind of box to house all of the components, plus some batteries, and not let them move. And also figure out how to mount the box on the motorcycle. Maybe a magnet built into the box will work, but what about an aluminum frame? No magnet will stick to that.
I fabricate gates for a living. I use tons of jigs and fixturing. I use one these levels quite a bit because my shop floor is not even. I can zero it out to my table or fixture and then use it on my gate frame to make sure everything is flat and straight. The best thing is that you can zero it at any angle, so if the sawhorse is sloped due to the floor, it is still “zeroed” and everything else can be “zeroed” from that angle.
It’s just a thought. You do you. I think it is a cool project. I know from experience that straightening frames can be a chore!
ALSO! Don’t rely on chatGPT for your coding. AI just regurgitates what it reads on the internet. It does it WAY faster than we can but what it reads could be wrong. Just like what we read could be wrong.
Learn how to code it yourself. If you do not know how to write it yourself and it does not work, you won’t even know where to start diagnosing the problem. I use AI to find syntax issues, typos, forgotten semicolons and parenthesis, misspelled words, things like that. But even then it doesn’t always get them right. Start with the blink example sketch and move on from there.
Any libraries you use (if you use them) should have good examples for what you want to do as well.
Hey thanks for the reply.
Yes I have ve never done another arduino project. I was always quite good at programming, it came quite naturally to me. I know its not the same of course. I have a masters in mech eng, so im also not the most random person to want to make an arduino project. But i do know its not even close to that simple.
I have one of these levels, angle sensors, The problem i encounter when using it is such:
Given i have the scooter quite level. I find an area on the chassis which can give me a good flat reading. that would be my zero. Maybe its a really flat bar placed on two chassis pipes and on top of it the level which gives me a good x reading. Maybe its a shaft that goes through the main chassis shaft ,as i did on my yamaha mt 03, and on the stick out i place me sensor (z is up or vertical, y is driving direction and x is perpendicular to driving direction and to "up" vertical). so now i have a reading on x. And then another angle level on the head pipe for another reading and that would theoretically let me see the difference between the two. Problem is when reading the head pipe with an angle sensor. Most motorcycles have a 20 to 40 rake angle. And i cant read the angle in z direction withc such an angle sensor. Placed on the head pipe it is in lize with z direction but is also rotated in the x direction the amount or rake the scooter has. And this rotation gets things messed up. And i cant see i can make it work. Im not measuring the rake with my angle sensor im measuring perpendicularity to x or how in line, parallel, it is with z.
As a side note, a 0.3 degree is a maximum allowed twist in the head pipe, and that is really small. So small that these angle sensors wont really help me much as far as i have seen. Thats why as in the video of the link i posted in my last reply, they extend the head pipe line with a t shaped tupe and make a measurement with the lasers further down. A bend in the head pipe angle leads to a larger error the further away you take the measurement. Does that make sense?
Think of it as a triangle with 0.3 angle and sides to that corner of 20 cm, if you only measure the head pipe itself it would have short sides. That makes the last side of the triangle 0.10472 cm... 1 mm. Hardly measurable.
But if you extend the triangle to lets say a meter with that tube centered with cones in the headpipe, 100cm, now with the same 0.3 angle, that would make the the remaining side 0.5236 cm. Actually sort of measurable with accurate lasers... which is the theory behind that measuring device in the video.
Anyways, getting off track here. Still wondering whether there are accurate enough sensors that would help me measure the difference between x and y direction. Could also be the difference of x and z direction. Depends on which plane you project the head pipe angle onto. Preferably in the z direction given the smaller rake angles which are always less than 45 degrees.
It looks like you are probably quite capable of pulling this project off.
I am not quite sure I am following this but…I think I understand you are saying that the digital level you put on the head pipe might be rotated around the center axis of the head pipe, thus throwing off the rake angle measurement because the level may not be truly in line with your Y axis. Is my understanding correct?
If I am understanding correctly would it be possible to put a jig on your fixture that is offset a certain distance from the Y axis centerline, allowing the level to be snugged up to the jig exactly where it needs to be? And then IF the wheels are the same diameter so the frame is truly horizontal when assembled, and IF the suspension allows the bike to sit horizontal, then the Z axis level can be zeroed on the Y axis and then attached to the jig/headstock to measure the appropriate head angle.
OR…Maybe you are saying the headstock is twisted in your X direction, not the Y direction? In that case, the jig could still work as long as it is perfectly 90 degrees to the table the frame is sitting on. Then simply measure (possibly with calipers) from the upper and lower end of the headstock to the jig.
Maybe I am way off…I am a hands on and see it in person type.
Mine measures to .1 of a degree. And tells you on which side of zero it is so you know which way to go.
Certainly. A small angle here leads to being WAY OFF over there. The longer the forks are, the more pronounced it is.
I guess what I was trying to say is that when I measure the head pipe with the angle sensor. I have to place it on there with the magnet. Which isn't the problem. The problem is that in regards to the ground or the xy plane, z is up, the angle sensor is leaning and that messes with the Reading. Its been a while since I tried this but I didn't really get a nice reading. Also yes mine is down to 0.01 degrees. But I seemed to have troubled getting a nice reading. Anyways might try to see what I can do with it again. Will focus more on making something with lasers, do have an idea. And look forward to seeing people opinion on an Arduino project feasibility if it can do this.
This is interesting. I need to look further into it. Would really like to mount a sensor on handlebars. Need to think if I can figure out head pipe angle this way. Will check out tomorrow morning. What kind of accuracy might I get with this 0.1 degrees?
Will mounting it on the handlebars tell you if the handlebars are bent or the headstock? If you zero it on your X axis and then place it on the handlebars you could only tell if the headstock is twisted if the handlebars are not bent.
My experience has been mostly with dirt bikes but also a couple of street bikes. Trust me…If the headstock is bent the handlebars are most likely definitely bent and would not be a good place to gauge from until they are replaced. Of course other frame parts may be bent as well.
I might not have straightened as many frames as you, I don’t know. I have only done a handful. But almost every time I had to straighten a frame it was best to strip it way down. Remove the plastic, wheels, maybe the forks and triple tree, the engine, etc… Get it down to a frame clamped to a table or in a jig and then start the measuring.
I am curious if you could build the sensor into a tube that would fit (possibly with bushings to accommodate different sizes) inside the headstock. If the sensor is to large to fit in the headstock, and probably most prebuilt modules would be, it could be mounted on the end of the tube. If you could index it to either your x or y axis (maybe using the lasers) you could measure all angles at once.
Just my 2 cents…This is a fun one for me to think about.
If the sensor works in the way of figuring out the head pipe axis location in 3d space and comparing that to my chassis axis, then it wont matter where its placed on the handlebars (preferably further away from the center though) not if they are bent. It will use the rotation of the handlebars to figure out the axis. Thats the idea anyways and i dont know if its actualy possible and to what accuracy. But a bent handlebars isnt a problem whatsoever.
Yes usually striping a frame down to less components is easier but not necessary. I have straightened framed while only removing plastics and no forks to steering stems and so on. Also depends on the bike...
I looked at the scheibner website. I did not watch the videos. I just read the descriptions. The closest thing I saw to what you are describing uses cameras and infrared beams. But I am still not tracking… Hopefully someone else is.
For perpendicularity, it sounds like you are looking for a target "Cosine similarity" of 90°
You'd turn your 3d angles into unit vectors, and then do the inverse cosine of the dot product.
But to get it to track in a straight line, there's more than just the orientations of the two shafts involved. You'd also need some measurements of the offsets to make sure they are on track.
Stop by one of your collision repair shops and ask if they would describe their procedures, which is probably mechanical, using the hypotenuse of right triangles. Translate that into the devices you want to use.