Go Down

Topic: Help to chose sensor! (Read 103 times) previous topic - next topic

ketoi12345678

Hi guys, I plan to do project use accelerometer sensor + arduino uno to control 6 servos. My plan is when my head tilt forward/backward, the sensor + arduino will move 2 servos at the same time. Then they will move 2 other servos . And when my head looks to the left/right, the sensor + arduino will move 1 servo.

The problems are:

1. I don't know which accelerometer/sensor I should use. I should use 1 sensor for all or 1 sensor for backward/forward and 1 for left/right?
2. Are the sensor+arduino capable to control to 2 servos at the same time? If not, can I use 1 sensor and send info to 2 separate arduino then each arduino control 1 servo at one time?

Waiting for answers or any suggestion. Thanks you guys,  ;)

StefL

Hello ketoil,

Question 1:
You should be looking for a 3 axis accelerometer. Since you are only using one to measure tilt. You dont need to get a more expensive, high precision/high load accelerometer. A small simple accelerometer should suffice.
(eg. this simple one is 5 bucks http://www.dfrobot.com/index.php?route=product/product&product_id=1085, tho you could spend as much money as you want on a higher precision sensor, its up to you.)


Question 2:
You are in luck, because arduino Uno's have 6PWM pins, which means they cant directly control up to 6 servos independently without any modifications, at the same time. These pins are denoted by the ~ sign next to the output pin numbers. If the sensor you use sends information via I2C, then the arduino will read the sensor using the A4 and A5 analogue pins.

If you ever need to power more than 6 servos independently at a time, you could look into multi-channel servo drivers. (eg. http://www.adafruit.com/product/815).

The accelerometer measures acceleration, and gravity will be measured as an acceleration towards the ground.
A 3 axis accelerometer will measure acceleration in 3 dimensions (imagine an x,y,z plane) and when the accelerometer is not moving, the measured (x,y,z) values will always give you to a vector pointing towards the ground. (if your accelerometer is upright, you will measure a vector pointing straight down. If it is upside down, you will measure a vector pointing straight up.)
Using mathematics, you will be able to use this information to calculate orientation and measure tilt.

Hope that helps,
StefL

ketoi12345678

Hello ketoil,

Question 1:
You should be looking for a 3 axis accelerometer. Since you are only using one to measure tilt. You dont need to get a more expensive, high precision/high load accelerometer. A small simple accelerometer should suffice.
(eg. this simple one is 5 bucks http://www.dfrobot.com/index.php?route=product/product&product_id=1085, tho you could spend as much money as you want on a higher precision sensor, its up to you.)


Question 2:
You are in luck, because arduino Uno's have 6PWM pins, which means they cant directly control up to 6 servos independently without any modifications, at the same time. These pins are denoted by the ~ sign next to the output pin numbers. If the sensor you use sends information via I2C, then the arduino will read the sensor using the A4 and A5 analogue pins.

If you ever need to power more than 6 servos independently at a time, you could look into multi-channel servo drivers. (eg. http://www.adafruit.com/product/815).

The accelerometer measures acceleration, and gravity will be measured as an acceleration towards the ground.
A 3 axis accelerometer will measure acceleration in 3 dimensions (imagine an x,y,z plane) and when the accelerometer is not moving, the measured (x,y,z) values will always give you to a vector pointing towards the ground. (if your accelerometer is upright, you will measure a vector pointing straight down. If it is upside down, you will measure a vector pointing straight up.)
Using mathematics, you will be able to use this information to calculate orientation and measure tilt.

Hope that helps,
StefL
Thanks you very much  :D

theinlinaung2010

#3
Nov 14, 2014, 01:31 pm Last Edit: Nov 14, 2014, 01:32 pm by theinlinaung2010
Hello ketoil,

Question 1:
You should be looking for a 3 axis accelerometer. Since you are only using one to measure tilt. You dont need to get a more expensive, high precision/high load accelerometer. A small simple accelerometer should suffice.

StefL
From what I learned, accelerometer + gryo sensors may be better for orientation sensing. I recently purchased a MPU9150 device which has 3-axis accelerometer, 3-axis gyro and 3-axis compass and has adjustable sensitivity range. I still haven't figure out how to use it properly yet. The maths for calculating tilt is more complex than I expected.
Thein Lin Aung

ketoi12345678

From what I learned, accelerometer + gryo sensors may be better for orientation sensing. I recently purchased a MPU9150 device which has 3-axis accelerometer, 3-axis gyro and 3-axis compass and has adjustable sensitivity range. I still haven't figure out how to use it properly yet. The maths for calculating tilt is more complex than I expected.
I order this http://www.amazon.com/Kootek-Arduino-MPU-6050-gyroscope-accelerometer/dp/B008BOPN40/ref=sr_1_1?ie=UTF8&qid=1416156050&sr=8-1&keywords=gy+521
Still waiting on. When i get it, i will let you know. It mays fit ur project

Go Up