Accelerometer

Hi,

I am controlling a single axis DC motor to follow the elevation of the Sun using two light sensors. The motor moves 180 degrees in a day.

The control circuitry of the motor ( solar tracker) will be mounted on the moving solar panel mechanical assembly. I want to know the changing tilt / position.

I choose the following accelerometer to calculate the tilt from dimension engineering

formatting link

The accelerometer part number is ADXL335B. The accelerometer is 3 axis. It operates at 3.3V with sensitivity of 333mV/g. Its data sheet is as follows

formatting link

My questions are

  1. How to choose the accelerometer for such an application?
  2. Did I choose the right accelerometer? Can it follow 180 degrees? How should I proceed with the software?

jess

Reply to
jsscshaw88
Loading thread data ...

it seems ok.

I would have chosen with with built-in DAC

180 degrees is no probelem

atan2()

--
  \_(?)_
Reply to
Jasen Betts

Hi,

The thing is that I measured single x axis tilt with respect to earth. The accelerometer was sitting flat on the table. I used arc sin to calculate t he tilt. I used protractor to confirm the calculated tilt. It was ok.

Then I measured single y axis tilt and used arc sin and the result was good .

I get confused when I tried to measure the tilt with x and y axes. Someone advised me to measure the tilt using "arc tan" and with respect to z axis. How does this work?

I will mount the accelerometer on the box and the box will move with the pa nel from its resting position. There will be some values of x, y and z. I w ill subtract these values from the future values of the x, y and z and cal culate the tilt or current position using arc tan.

I sound confused and horrible. Please help what direction should I take. jess

Reply to
jsscshaw88

You haven't defined your axes.

Each axis should respond to the acceleration due to gravity as cos (theta), where theta is the angle of _that axis_ from vertical (so you really have theta_x, theta_y, theta_z).

You ought to be able to work backwards from there, after coiling yourself in much trigonometry. It's best to do the math yourself -- that way you know that it applies to your situation, and you're not depending on someone else's competence or assumptions.

--
www.wescottdesign.com
Reply to
Tim Wescott

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.