English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

if i have a gyro/accelorometer circiut, to measure the angle it's at, and when tilted, give out different voltages, how would i hook this up to a PIC16F876A micro controller, if you cant temm me that at least explain what microcontrollers do, how they work, what you have to do to set it up, and what i need to have to program one if i need to. please give me anything you know, im frustrated, and i cant find anything on the internet about microcontrollers.

2007-03-20 11:26:44 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

2 answers

I've done more recently with an AVR ATtiny44 recently but the concepts with teh Microchip part will be the same.

You will need to use an ADC (Analog to Digital Converter ) to process the signal voltage (gyro output). There may be one built in to the 16F876 if not you can either add an external ADC chip or change uC's to one which has one.

The voltage supplied to the input (Vin )of an ADC is compared to a reference voltage (Vref). The ADC will generate a number from zero to a max value say (1024 for a 10bit DAC) which corresponds to (Vin/Vref) * 1024 = count

Some pitfalls with ADC's are not having a stable Vref or not having an analog signal with a sufficient voltage swing. ( Say your ADC Vref is 5Vdc if Vin full scale deflection is between 2.5 to 5V you would only be using half of the ADC range) Opamp circuits can improve voltage swing.

Once you have taken an ADC reading of your input you must convert the reading (0 to 1024) into something meaningful. Basically you will have to perform a scale and offset calulation to convert it to 0 to 360 degrees.

Check out the attached datasheet on its ADC it will give you a good overview

2007-03-20 12:57:22 · answer #1 · answered by MarkG 7 · 0 0

Hi. That gyro-accelerometer can be used as a kinetic password for a laptop/notebook. A combination tilt and movement, such as 30 degrees or so rear-up followed by a move to the left, can be tied into your micro-controller to enable (or disable) your machine. The details of the hookup are beyond my knowledge. Sorry.

2007-03-20 18:34:32 · answer #2 · answered by Cirric 7 · 0 2

fedest.com, questions and answers