Pages: [1]   Go Down
Author Topic: biwildered noob in need of hand holding (angle finding).  (Read 1194 times)
0 Members and 1 Guest are viewing this topic.
Cork, Ireland
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have spent hours reading posts and following tutorials on this forum and this is my first post.

I had a bad experience earlier on in the year and ended up walking away from a project without getting it in any way finished, right now I am back with my box of bits and arduino, trying to find a solution to a problem that I thought would be straightforward.
I was wrong and I need help from anyone in the know.

Step one of my current project is to acquire inclination from a sensor, specifically on a mitre saw, where i would like the angle of the saw to as precise a reading as possible,+ or - 45 degrees.  Im after current angle, not what the saw moved. for instance iI would like a led to come on when the saw is at 30.1 degrees. I would like only one axis to begin with, but eventualy as the saw works on x and y plains, i too would like to be able to read 2 plains.

Having done a few hours on google it seemed an accelerometer was the way to go, now im not so sure. Perhaps the wii chip or an accelerometer with an added gyro?

Ive been using one of these    http://www.ebay.co.uk/itm/New-GY-61-ADXL335-Module-3-axis-Analog-Output-Accelerometer-angular-transducer-/130933785328?
Im getting serial readings of the xyz pins but have not found a good example or description of how to turn them to degrees.

I was able to follow this tutorial.
http://chionophilous.wordpress.com/2011/06/20/getting-started-with-accelerometers-and-micro-controllers-arduino-adxl335/

Is there any hardware components out there that will output its current inclination in degrees without needing to be calibrated or converted?

Thanks in advance for any replys.
Logged

Oregon, USA
Offline Offline
Edison Member
*
Karma: 68
Posts: 2257
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Did you get all the way through the calibration examples, so the output of the Arduino is 0.00 0.00  1.00   for the Z-axis straight down and 0.00 0.00 -1.00 for Z-axis straight up? If not, you will have to do that if you hope to have accurate angles.
Quote
Is there any hardware components out there that will output its current inclination in degrees without needing to be calibrated or converted?
Probably, but if you have successfully worked through calibrating  your accelerometer, it takes only one or two additional lines in a program to output the tilt angle. You do need basic trigonometry skills, but there is plenty of introductory material on line if you search for "tilt angle accelerometer".

In outline, the task is pretty simple. For example, if you have the accelerometer so that the (X,Y) plane is vertical, measure the X and Y accelerations x_acc and y_acc. Then, in one arbitrarily chosen coordinate system

angle_in_degrees = 57.3*atan2(y_acc,x_acc);

In any case, you can't expect accuracy better than 1-2 degrees and to get that, you will have to average several measurements as the accelerometer is a bit noisy.
Logged

"It seems to run on some form of electricity"

Cork, Ireland
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Im looking for 0.1 degree accuracy! So i guess I will have to look at more harware either way.
In the mean time I shall go over the tutorial again, I followed it step by step and had the 2 button circuit built and working, once it was running I started to think it was not what i needed.
(I do however like his concise style of step by step instructions and descriptions, also no other tutorial had used the AREF pin which seemed to make a difference)


This is what i would like to make http://www.ebay.co.uk/itm/GENUINE-GEMRED-BEVEL-BOX-DIGITAL-ANGLE-FINDER-with-SPIRIT-LEVEL-LEATHER-POUCH-/271203312244?pt=UK_Measuring_Tools_Levels&hash=item3f24fa2274
Logged

Offline Offline
Faraday Member
**
Karma: 62
Posts: 3030
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You will not get 0.1 degree accuracy using an accelerometer.   To get that sort of accuracy,   you would need some kind of high-resolution encode built into the bearing where the saw mechanism is pivoted,    to detect the position of the saw arm.   

This is not particularly easy to do.

Logged

Cork, Ireland
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What sort of accelerometer would give me the best accuracy for this application? 10 bit digital?
connecting to the saw axis does not seem easy at the moment, i was also thinking about using proximity sensors or some such, even to mask a point i know is the angle i want and be able to return to it would be a good start.
Logged

Offline Offline
Faraday Member
**
Karma: 62
Posts: 3030
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I doubt that Gemred gadget is actually "accurate" to 0.1 degrees.   A lot of people are vague about the difference between device resolution,  display resolution,   and actual accuracy.

Logged

Cork, Ireland
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ive got it mounted on the saw at the moment, moving to the left or the right of the saw changes the reading! Ive checked cuts with another digital protractor and they are close enough, Impossible to actually measure to that extent with imperfections in the wood, hand shake etc.
What manner of accelerometer or combo with gyro, compass etc would give me the most accurate readings? I figure the more devices generating readings, the closer ill get to what I want.
(eventually the plan was to have motors move the saw into the desired positions).
Logged

Offline Offline
Faraday Member
**
Karma: 62
Posts: 3030
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The accelerometer method is always going to be limited by noise,   and the stability of the actual MEMS device,   and the resolution of the A/D converter.    I don't know what the best resolution is,   but to manufacture such a device you would have to address all of those issues simultaneously.     And it would still be limited by the levelness of your workbench and the floor in your shed.  It's not practical. 

If I was going to manufacture a very accurate saw,  I'd be incorporating a very accurate rotary encoder into the pivot bearing of the saw arm
Logged

Cork, Ireland
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could I attach a encoder to the saw and hang a weight from the shaft, so when the saw turned,the weight would be always be dragged downward, or would they need to be too sensitive. a bit like the principle this works on  http://www.google.ie/imgres?imgurl=http://www.sadoun.com/Sat/Products/Accessories/Meters/Johnson.jpg&imgrefurl=http://www.sadoun.com/Sat/Products/Accessories/Meters/Johnson-Level.htm&h=490&w=500&sz=149&tbnid=5F3vMdJt4P44_M:&tbnh=90&tbnw=92&zoom=1&usg=__oGcglnftNUupJUXhcHi3YZgyLfg=&docid=fOeGLVfcpDoILM&sa=X&ei=Sx5oUpHyJdPH7AaHYg&ved=0CD8Q9QEwBA
Logged

Cork, Ireland
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Did you get all the way through the calibration examples, so the output of the Arduino is 0.00 0.00  1.00   for the Z-axis straight down and 0.00 0.00 -1.00 for Z-axis straight up? If not, you will have to do that if you hope to have accurate angles.


Ive just tried this program again and i cant get the last calibration stage to work...ive swapped out cables and buttons so the circit seems sound, but for whatever reason it wont do the calibration..when i press and hold button 1, it pauses and collects the settings, then goes back to scrolling:
"
nan  nan  nan  nan  nan  nan 
Calibrate
"

im using a leonardo, could there be a pull up issue etc?
Logged

0
Offline Offline
Shannon Member
****
Karma: 207
Posts: 12191
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you mean inclination, ie angle to the vertical?  To me a mitre saw is something that
pivots about a vertical axis, not a horizontal one.
Logged

[ I won't respond to messages, use the forum please ]

Oregon, USA
Offline Offline
Edison Member
*
Karma: 68
Posts: 2257
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The OP says he wants to make the equivalent of this "spirit level" http://www.ebay.co.uk/itm/GENUINE-GEMRED-BEVEL-BOX-DIGITAL-ANGLE-FINDER-with-SPIRIT-LEVEL-LEATHER-POUCH-/271203312244?pt=UK_Measuring_Tools_Levels&hash=item3f24fa2274
Logged

"It seems to run on some form of electricity"

USA Washington state coast
Offline Offline
Full Member
***
Karma: 6
Posts: 183
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You said you eventually wanted to use motors. Have you looked into using stepper or servo motors? With a proper gear ratio you could get extreme accuracy without having to worry about reading the position at all. Your Leonardo would tell the motor how far to rotate it and you can rest assured it will be spot on.
Logged

I'm not a complete idiot. Some parts are missing.

Pages: [1]   Go Up
Jump to: