Search the Community

Showing results for tags 'gyro'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • New Users Introduction
    • Announcements
  • Digilent Technical Forums
    • FPGA
    • Digilent Microcontroller Boards
    • Non-Digilent Microcontrollers
    • Add-on Boards
    • Scopes & Instruments
    • LabVIEW
    • FRC
    • Other
  • General Discussion
    • Project Vault
    • Learn
    • Suggestions & Feedback
    • Buy, Sell, Trade
    • Sales Questions
    • Off Topic
    • Educators
    • Technical Based Off-Topic Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 2 results

  1. Hello everyone I am trying to interface the Pmod Gyroscope with myRio with the code provided in the myRio Project Essentials Guide. I have made connections as per the diagram in the guide and there is no problem with it. When I run the VI, when the sensor is stationary the value of x displacement should be zero and not change but it is incrementing with time even when I am not moving the sensor. You can check the problem in the YouTube link I have shared bellow. There is no problem with the hardware since I have tried the same program with other gyroscope of same IC. The program files are attached below. Please help it is very important for me to get the sensor working ASAP Video Link: https://youtu.be/dwFc86p1KlA Connection Diagram: Code: Main.vi Gyroscope demo.aliases Gyroscope demo.lvlps Gyroscope demo.lvproj
  2. Note To Staff There is no need for help here; I just wanted to share this with others, since it was useful to me. As far as I'm concerned (have power to say?), this code, text, graphics, and attachments are all public domain (preferably with attribution). If there is a specific area or protocol for these sorts of things, I haven't seen it. This post and contents could be stickied, moved, and otherwise used as the powers that be see fit. If there is something wrong, something that needs changed, or something the needs clarified, feel free. /Note To Staff Hello all. I have a small gift for anyone that wants it. The following is working javascript for GY-521 breakout boards, which holds the venerable InvenSense MPU-6050 6 axis IMU chips. // -UNOFFICIAL SCRIPT- -AS IS- -NOT ENDORSED BY DIGILENT- -USE AT OWN RISK- // Author: Charles Scoville // // GY-521 breakout board: InvenSense MPU-6050 i2C Gryo + accelerometer // Set clock = 400kHz: Rate up to 400Hz (more may work): Itterations ~1k const adr = 0x68; // 0x69 is an alternate address. function initialize(){ if(Clear()!=true) return "I2C bus error. Check the pull-ups."; if(Write(adr)!=true) return "Device NAK"; //if(Read(adr, 0x75, 1) != 0x68) return "Device ID mismatch"; *FIXME* Read() bug? Does NOT actually return 0x68 if(Write(adr, 0x6B, 0x03)!=0) return "Communication error"; // REG: PWR_MGMT_1 (Z gyro as clock source) if(Write(adr, 0x23, 0x78)!=0) return "Communication error"; // REG: FIFO_EN (FIFO only for Gyros and accelerometer) if(Write(adr, 0x6A, 0x45)!=0) return "Communication error"; // REG: USER_CTRL (Reset FIFO and signal paths for all sensors) if(!FileWriteLine("~/Desktop/default.csv", ["temp", "ACCEL_XOUT", "ACCEL_YOUT", "ACCEL_ZOUT", "GYRO_XOUT", "GYRO_YOUT", "GYRO_ZOUT"])) return "File write failed - init"; return true; } function loop(){ var rg = Read(adr, 0x3B, 14); // DATA var xa = ((rg[0]<<24) | (rg[1]<<16)) /256/256; var ya = ((rg[2]<<24) | (rg[3]<<16)) /256/256; var za = ((rg[4]<<24) | (rg[5]<<16)) /256/256; // NOTE: REG 0x23 must be written as 0xF8 for temp to be buffered var tmp = ((rg[6]<<24) | (rg[7]<<16)) /256/256/340 + 36.53; //temp (deg C) //tmp = tmp * 1.8 + 32; //temp (deg F) var xg = ((rg[8]<<24) | (rg[9]<<16)) /256/256; var yg = ((rg[10]<<24) | (rg[11]<<16)) /256/256; var zg = ((rg[12]<<24) | (rg[13]<<16)) /256/256; if(!FileAppendLine("~/Desktop/default.csv", [tmp, xa, ya, za, xg, yg, zg])) return "File write failed - loop"; return true; } function finish(){ return "done"; } This script is to be used in the "protocol>i2c>sensor" section of the WaveForms application. I have only run this on the Electronics Explorer, I have no idea if it even applies to anything else. The results when run (with a GY-521 attached, of course!) are a CSV file on your desktop, just as with the PMOD gyro or accelerator example code it was based on. For this data capture to make much sense, you will most likely want to graph the columns in the resulting file. I did so for the accelerometer and gyrometer as independent groups, as that provides the most informative and expected form for the data. The following are some graphs of a couple of my more interesting captures, as examples. They were made with LibreOffice 6.0 directly from the CSV files. The ods files are also attached. (Embedded malware is thoroughly unlikely, but you still open at your own risk.) This one was just me picking it up and turning it all around. It's a nice shot because it's pretty obvious when I picked it up, and what exactly I did. This one was of me lifting the board up onto one corner, rapidly twisting it back and forth, then just setting it down. This one clearly has more samples too. Anyway, thanks for reading. I hope this post has value to you. MPU-6050 readout1.ods MPU-6050 readout2.ods