Digital Spirit Level
![Untitled.png](/proxy/?url=https://content.instructables.com/FYF/W74Y/J1PLAXZG/FYFW74YJ1PLAXZG.png&filename=Untitled.png)
The project consists of an MPU6050 IMU reading values for pitch and roll, and an Arduino Uno communicating the modified values over serial to the µLCD-32PTUPicaso Display. The 4D Display updates the values using LED digits showing angles in each axis for degrees, and gauges to represent the magnitude of offset. The MPU6050 IMU communicates its reading to the Arduino using I2C.
How It Works
![Capture-4-768x345.png](/proxy/?url=https://content.instructables.com/FWO/CS92/J1PLAXTN/FWOCS92J1PLAXTN.png&filename=Capture-4-768x345.png)
Build
![schem-600x394.png](/proxy/?url=https://content.instructables.com/F6J/XZZ9/J1PLAXUH/F6JXZZ9J1PLAXUH.png&filename=schem-600x394.png)
![gen4_1-300x138.png](/proxy/?url=https://content.instructables.com/FWK/DD1C/J1PLAXTR/FWKDD1CJ1PLAXTR.png&filename=gen4_1-300x138.png)
![gen4_2-300x149.png](/proxy/?url=https://content.instructables.com/FEM/IWQH/J1PLAXTS/FEMIWQHJ1PLAXTS.png&filename=gen4_2-300x149.png)
Components
- Arduino UNO
- MPU6050 IMU
- gen4-uLCD-28DT
- uSD card
- gen4 Interface board
- small breadboard
- jumper wires
Clarification for the component
- If you are using gen4-IB and μUSB PA-5, connect the display to your computer as shown in the second image above
- If you are using gen4-PA board,connect the display to your computer as shown in the third image above.
Connect the components as in the Fritzing Diagram. (first image)
Program
- Download the project code here.
- Open the code using 4D workshop.
- Click on the Compile button.
- Connect the display to the PC using μUSB-PA5 and a mini USB cable. Make sure that you are connected to the right port. Red Button indicates that the device is not connected, Blue Button indicates that the device is connected to the right port.
- Now click on the “Comp’nLoad” button.
- Workshop 4 will prompt you to select a drive to copy the image files to a μSD Card. After selecting the correct drive, click OK.
- The module will prompt you to insert the μSD card.
- Click the Verify button to compile the sketch and check if there are no errors.
- Then, click the Upload button to load the sketch into your Arduino board. Make sure that you selected the corresponding board and you are connected to the right port.
- After this, you can now test and use your Digital Spirit Level
Demonstration
![12-600x450.jpg](/proxy/?url=https://content.instructables.com/FUK/20J8/J1PLAXTE/FUK20J8J1PLAXTE.jpg&filename=12-600x450.jpg)
![13-600x450.jpg](/proxy/?url=https://content.instructables.com/F7O/6FMO/J1PLAXTG/F7O6FMOJ1PLAXTG.jpg&filename=13-600x450.jpg)
![14-600x408.jpg](/proxy/?url=https://content.instructables.com/F46/72T1/J1PLAXTH/F4672T1J1PLAXTH.jpg&filename=14-600x408.jpg)
![15-600x450.jpg](/proxy/?url=https://content.instructables.com/F3W/KU60/J1PLAXTL/F3WKU60J1PLAXTL.jpg&filename=15-600x450.jpg)
On a Flat Surface, image 1
Roll to the Right, image 2
Pitch Up, image 3
Pitch Down, image 4,