Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Raspberry Pi and ESP8266 Nodemcu Controlled Multi-Color LED Lighting with Ambient Light Sensing

Image of Raspberry Pi and ESP8266 Nodemcu Controlled Multi-Color LED Lighting with Ambient Light Sensing

Circuit Documentation

Summary

The circuit in question appears to be a multi-colored LED control system, utilizing a Raspberry Pi 5 as the main controller, interfaced with an ESP8266 NodeMCU microcontroller. The circuit includes a pushbutton for user input and a photocell (LDR) for light sensing. The LEDs are of four different colors: red, green, blue, and white. Each LED is connected in series with a resistor to limit the current. The pushbutton is used to presumably toggle or switch the state of the LEDs, and the photocell is likely used to adjust the LED behavior based on ambient light levels. The ESP8266 NodeMCU is interfaced with the photocell and may be used for additional processing or connectivity purposes.

Component List

Raspberry Pi 5

  • Description: A powerful microcomputer with multiple I/O options.
  • Pins: Type-C, Micro HDMI 1/2, Camera 1/2, PoE, Fan, PCIe, USB 3.0/2.0, Ethernet, 5V, GND, 3.3V, GPIO (various).

ESP8266 NodeMCU

  • Description: A Wi-Fi enabled microcontroller module.
  • Pins: D0-D8, RX, TX, A0, RSV, SD3, SD2, SD1, CMD, SD0, CLK, EN, RST, VIN, 3V3, GND.

LEDs (Red, Green, Blue, White)

  • Description: Light Emitting Diodes of various colors.
  • Pins: Anode, Cathode.

Resistors (330 Ohms and 1000 Ohms)

  • Description: Passive electrical components to create resistance in the circuit.
  • Resistance: 330 Ohms or 1000 Ohms.

Pushbutton

  • Description: A simple switch mechanism for control of a circuit.
  • Pins: Pin 1 (in), Pin 2 (in), Pin 3 (out), Pin 4 (out).

Photocell (LDR)

  • Description: A light-dependent resistor whose resistance changes with light intensity.
  • Pins: Pin 0, Pin 1.

Comments

  • Description: Textual annotations for additional information or instructions.

Wiring Details

Raspberry Pi 5

  • GPIO 25 connected to Pushbutton (Pin 3 out).
  • GPIO 23 connected to Resistor (White LED series).
  • GPIO 22 connected to Resistor (Blue LED series).
  • GPIO 27 connected to Resistor (Green LED series).
  • GPIO 17 connected to Resistor (Red LED series).
  • 3.3V connected to Pushbutton (Pin 2 in).
  • GND connected to common cathodes of all LEDs.

ESP8266 NodeMCU

  • A0 connected to Photocell (LDR) (Pin 1).
  • 3V3 connected to Photocell (LDR) (Pin 0).
  • GND connected to Resistor (1000 Ohms, LDR series).

LEDs (Red, Green, Blue, White)

  • Anode of each LED connected to respective 330 Ohms series resistor.
  • Cathode of each LED connected to common ground.

Resistors

  • 330 Ohms resistors in series with each LED.
  • 1000 Ohms resistor in series with the Photocell (LDR).

Pushbutton

  • Pin 3 (out) connected to Raspberry Pi 5 (GPIO 25).
  • Pin 2 (in) connected to Raspberry Pi 5 (3.3V).

Photocell (LDR)

  • Pin 1 connected to ESP8266 NodeMCU (A0).
  • Pin 0 connected to ESP8266 NodeMCU (3V3).

Documented Code

No code was provided for the microcontrollers in the circuit. The expected behavior and functionality would be implemented in the code, which would control the LEDs based on the input from the pushbutton and the photocell (LDR). The code would also handle communication between the Raspberry Pi 5 and the ESP8266 NodeMCU if needed.