Introduction: PCB Ruler Level W/ BeagleBone Black
Step 1: Materials
Step 2: Circuit Setup
The PmodGYRO runs using I2C communication protocol. All you need is one column on the J2 pin out on the PmodGYRO - VCC, GND, SDA and SCL. The Pmod is powered with 3.3V, and I use two, 4.7Kohm pull-up resistors to pull the SDA and SCL lines to 3.3V.
Follow the Fritzing diagram above for a visualization of how this is done.
The Pmod VCC is wired into pin 49 (3.3V), GND into pin 47 (GND), SDA into pin 66, SCL into pin 65.
The LED VCC is wired into pin 7 (DIO 7) and GND into pin 2 (GND).
First, I soldered the LED and two resistors into place. Then, cut the wires that span just the PCB board to length, and soldered those in place. I cut the wires that reach from the ruler to the BeagleBone about an arms length in size (for ease of use, no other particular reason). Next, solder the wires into place according to the diagram, and then solder the Pmod in place.
I placed heat shrink in two separate places along the length of the excess wire just to ensure there wouldn't be a ton of tug on any one place.
Step 3: Software Setup
Using LabVIEW 2014 and LINX 3.0, I can target the BeagleBone Black. If you're unfamiliar with LINX 3.0 or need help doing the firmware installation on your BeagleBone, these tutorial videos walk you through the entire process.
After you have it all up and running, the PmodGYRO has its own vi library. I use a digital write to write to the LED and I use three separate filters to filter the gyro values for smoother x, y and z values.
If the gyro deviates from its zero by 50 increments in any direction, the LED will shut off. This number can be changed to anything larger or smaller - it just depends on how sensitive you want the level/LED signaling to be.
Step 4: Thank You!
Thanks for viewing my instructable. Please comment or message me if you have any questions, and if you need any of the hardware and software for this project, feel free to visit Digilent.com.
We have a be nice policy.
Please be positive and constructive.