Wi-Fi Enabled Arduino UNO and ESP8266 Weather Station with LCD Display and Servo Control
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary of the Circuit
This circuit integrates a variety of components including an Arduino UNO, an ESP8266 NodeMCU, an LCD I2C display, a temperature sensor, a servo motor (MG996R), a resistor, a 12V power supply, a terminal block, and a SparkFun 9DoF Sensor Stick. The Arduino UNO serves as the primary microcontroller, interfacing with the temperature sensor, LCD display, and servo motor. It also communicates with the ESP8266 NodeMCU for potential IoT capabilities. The circuit is powered by a 12V power supply, which is regulated down to 5V and 3.3V for different components. The temperature sensor is connected with a pull-up resistor to the Arduino. The LCD display uses I2C communication, and the servo motor is controlled via one of the Arduino's PWM outputs.
Component List
Arduino UNO
- Microcontroller board based on the ATmega328P
- Provides digital and analog I/O pins
- Features USB connection for programming and serial communication
ESP8266 NodeMCU
- Wi-Fi enabled microcontroller module based on the ESP8266
- Offers GPIO, I2C, and serial communication
LCD I2C Display
- Alphanumeric liquid crystal display with an I2C interface
- Used for displaying data and messages
Temperature Sensor
- Measures ambient temperature
- Typically outputs a digital signal corresponding to the temperature
MG996R (Servo Motor)
- High-torque digital servo motor
- Controlled by PWM signal
Resistor
- Passive two-terminal electrical component
- Resistance: 200 Ohms
12V Power Supply
- Provides a 12V DC output
- Powers the Arduino UNO and other components
Terminal Block
- Electrical connector with several terminals
- Used for securing and/or terminating wires
SparkFun 9DoF Sensor Stick
- Inertial measurement unit (IMU) with sensors for acceleration, rotation, and magnetic fields
- Communicates via I2C
Wiring Details
Arduino UNO
5Vconnected to the VCC of MG996R, Temperature Sensor, and LCD I2C DisplayGNDconnected to the GND of MG996R, Temperature Sensor, and LCD I2C DisplayD2connected to the data pin of the Temperature Sensor through a 200 Ohm resistor3.3Vconnected to the VIN of ESP8266 NodeMCUGNDconnected to the GND of ESP8266 NodeMCUVinconnected to the + of the 12V power supplyA4 (SDA)connected to the SDA of the LCD I2C DisplayA5 (SCL)connected to the SCL of the LCD I2C DisplayGNDconnected to the - of the 12V power supplyD9connected to the SIG of MG996RD1 (TX)connected to the RX of ESP8266 NodeMCUD0 (RX)connected to the TX of ESP8266 NodeMCU
ESP8266 NodeMCU
VINconnected to the 3.3V of Arduino UNOGNDconnected to the GND of Arduino UNORXconnected to the TX (D1) of Arduino UNOTXconnected to the RX (D0) of Arduino UNO
LCD I2C Display
VCCconnected to the 5V of Arduino UNOGNDconnected to the GND of Arduino UNOSDAconnected to the A4 (SDA) of Arduino UNOSCLconnected to the A5 (SCL) of Arduino UNO
Temperature Sensor
Temp VDD Redconnected to the 5V of Arduino UNOTemp GND Blackconnected to the GND of Arduino UNOTemp DQ Data Yellowconnected to the D2 of Arduino UNO through a 200 Ohm resistor
MG996R (Servo Motor)
VCCconnected to the 5V of Arduino UNOGNDconnected to the GND of Arduino UNOSIGconnected to the D9 of Arduino UNO
Resistor
pin1connected to the D2 of Arduino UNOpin2connected to the data pin of the Temperature Sensor
12V Power Supply
+connected to the Vin of Arduino UNO-connected to the GND of Arduino UNO
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Note: The provided code for the Arduino UNO is a template with empty setup and loop functions. This code should be expanded with the specific logic required for the circuit's operation, such as reading the temperature sensor, controlling the LCD display, and sending commands to the servo motor.
ESP8266 NodeMCU Code
No code was provided for the ESP8266 NodeMCU. It is assumed that the ESP8266 NodeMCU will be programmed separately to handle Wi-Fi communication and other tasks as required by the circuit's design.