SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By Nelix
#195652
Hi

I'm a beginner in electronics, I know the basics but that's about it.

I'm thinking about a project that I could do with some help with and thought this would be a good place to ask.

Imagine a cube, each side has a different colour on it, I need to be able to tell which colour is facing upper most, a signal will then be sent from a transmitter inside the cube to a receiver that will activate a vibro motor to indicate the colour.

My question is:

Is there such a thing as a 6 axis sensor or would I need to use 2 x 3 Axis sensor?

Whats the best way to accomplish this.

I'm ok so far with the logic stuff that will tell the vibro how many times to vibrate, I just don't know the best way to identify which side is UP.
By Valen
#195690
Have you read this? https://learn.sparkfun.com/tutorials/ac ... ter-basics

A 3 degree of freedom (DOF) accelerometer can sense linear accelerations along 3 axis. Each contain both the positive and negative direction. So assuming the cube is at rest when the measurement is done, measuring the gravity vector along those 3 directions would suffice for you. If the cube is not at rest then the output values cannot be trusted to give the direction of gravity, or whatever you consider to be "up".

Usually 6-degrees of freedom devices would measure (linear) acceleration along the 3 directions and also rotation along the 3 directions also. This is called an accelerometer with gyro. A 9-degree of freedom Inertial measurement unit (IMU) would also measure the attitude of the chip, usually by sensing direction of the local magnetic field with magnetometers. The latter option would seem to be what you desire the most. But.. It is very dependant on magnetic distortions of the local magnetic field. Like nearby iron/steel objects or energized electric coils. And needs calibration to get sensible readings. The 3 degree accelerometer should suffice if your code can figure out when the cube stopped tumbling and is no longer in free-fall.