Materials Required:
WeMos D1 Mini: This is the heart of your project, providing Wi-Fi and processing capabilities.
MPU6050 (Accelerometer and Gyroscope): Measures the tilt of the device to determine the angle.
0.96-inch OLED or ST7735 LCD Screen: Displays the angle and other information to the .
Lithium Battery (300mAh): Provides power for your portable device.
Charging Module: Allows you to charge the lithium battery via a USB port.
Brass Inserts (M3, 5mm outer diameter): Used in 3D printed parts to create durable mounting points for screws.
Screws (10mm): Used to attach parts together securely.
Push Button: For calibration and resetting the angle.
3D Printer: To create the custom housing and enclosure for the project.
Resistors, Capacitors, and Wires: For electrical connections and power regulation.
Step-by-Step Process:
Set up the Wemos D1 Mini:
Flash the WeMos D1 Mini with your preferred code. In this case, it's the code that reads tilt data from the MPU6050 and displays it on the screen.
Connect the MPU6050 and Screen:
Wire the MPU6050 to the WeMos D1 Mini using the I2C protocol (SCL to D1, SDA to D2).
Connect the LCD screen to the WeMos D1 Mini using the appropriate pins (e.g., SCL, SDA for I2C).
Create the Housing and Mounting Points:
Use a 3D printer to create the housing for the WeMos D1 Mini, MPU6050, and the LCD screen.
Integrate brass inserts into the 3D printed parts for added durability and secure attachment of the components using screws.
Install the Lithium Battery and Charging Module:
Solder the charging module to the WeMos D1 Mini and the battery to the charging module.
Ensure that the battery can be charged via USB.
Button for Calibration:
Wire the calibration button to the WeMos D1 Mini for angle resetting and calibration functions.
Code:
the code to the WeMos D1 Mini. The code will handle reading the tilt angles from the MPU6050, apply calibration logic, and display the results on the LCD screen.
Power Supply:
Power the system using the lithium battery. Ensure proper power regulation and battery management.
Test and Calibrate:
Once everything is set up, test the system and calibrate the angles by pressing the button. Ensure the angles are displayed correctly and that the system behaves as expected.
WIRING:
MPU6050 --> WeMos D1 Mini
SDA --> D2 (GPIO4)
SCL --> D1 (GPIO5)
VCC --> 3.3V
GND --> GND
LCD (I2C) --> WeMos D1 Mini
VCC --> 3.3V
GND --> GND
SDA --> D2 (GPIO4)
SCL --> D1 (GPIO5)
RESET --> D6 (GPIO12)
DC --> D3 (GPIO0)
CS --> D0 (GPIO16)
Button --> WeMos D1 Mini
Pin --> D4 (GPIO2)
Battery --> WeMos D1 Mini
B+ --> 3.3V
B- --> GND