nemetila 12 Posted June 4, 2013 Share Posted June 4, 2013 Hi! I am developing a simple accelerometer with the MSP-EXP430FR5739. This board is populated with a 3-axis accelerometer: ADXL330. No additional HW is needed. The MCU program does: ADC:Samples data from CH_0 to CH_14 in Repeat-Sequence-of-Channels Mode Sample Rate: ~ 20 Hz/Channel DMA UART:HW UART (TX only) with 9600 baud. This 9600 baud is limited by the emulator circuit. UART TX data1 = ADC_CH_12 = ACC_X; sample "622-X" UART TX data2 = ADC_CH_13 = ACC_Y; sample "509-Y" UART TX data3 = ADC_CH_14 = ACC_Z; sample "511-Z" LEDs: LED_TX and LED_ADC The PC application does: Calculate the 3 acceleration components (g_x, g_y, g_z) from the ADC data and the CALIBRATION data Calculate the magnitude of G; |G| = sqrt(g_x^2 + g_y^2 + g_z^2); Displays data CALIBRATION data must be enter by the user once at the beginning. The user has to rotate slowly the board in every 3 direction (and opposite) to find the maximum (+1g) and the minimum (-1g) ADC values of the 3 axis. Enter this 3*2=6 ADC data to the 6 white textboxes. If the CALIBRATION data are correct then |G| must be 1.00 (static acceleration of gravity). . The TX data can be viewed with putty too: Requirements: MSP-EXP430FR5739 board Code Composer Studio 5.4 to compile the MCU source file:ACC Demo v03_main.c Windows OS with .Net framework 4 to run the PC app: ACC Demo v03_Release.zip (extract and run "ACC Demo v03.exe"). The CPU usage may be high when PC application receives data. I will try to reduce this in the next version. sgccarey and bluehash 2 Quote Link to post Share on other sites
sgccarey 0 Posted February 3, 2014 Share Posted February 3, 2014 Nice work, this has been a real help to me. Thanks! Quote Link to post Share on other sites
irharrier2 0 Posted November 3, 2014 Share Posted November 3, 2014 Wow. I have been searching for weeks on how to calibrate the accelerometer sensor. Now that I have found you application I am not able to run it. I really appreciate it if you could give me the source code or recompile the file for me. Many thanks. Quote Link to post Share on other sites
nemetila 12 Posted November 8, 2014 Author Share Posted November 8, 2014 It should run, I have just tested it a minute ago. I can share the source but I have very limited C# skills, so the code is ugly. Windows app project files: ACC Demo.zip CCS project files: CCS.ZIP Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.