Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an RGB LED, several resistors, an octocoupler, and a Wemos D1 Mini microcontroller. The circuit is designed to control the RGB LED and interface with external connections through the octocoupler. The Wemos D1 Mini is programmed to manage the operations of the circuit.
Component List
RGB LED
- Description: A light-emitting diode that can emit red, green, and blue light.
- Pins: B, G, R, GND
Resistor (100k Ohms)
- Description: A resistor with a resistance of 100k Ohms.
- Pins: pin1, pin2
- Properties:
- Resistance: 100k Ohms
Resistor (470 Ohms)
- Description: A resistor with a resistance of 470 Ohms.
- Pins: pin1, pin2
- Properties:
- Resistance: 470 Ohms
Resistor (220 Ohms)
- Description: A resistor with a resistance of 220 Ohms.
- Pins: pin1, pin2
- Properties:
- Resistance: 220 Ohms
Wemos D1 Mini
- Description: A microcontroller based on the ESP8266.
- Pins: RST, A0, D0, D5, D6, D7, D8, 3V3, 5V, G, D4, D3, D2, D1, RX, TX
External Connection
- Description: A connection point for external components.
- Pins: External
Octocoupler
- Description: An optoelectronic device that transfers electrical signals between two isolated circuits by using light.
- Pins: Anode, Cathode, Collector, Emitter
Wiring Details
RGB LED
- Pin B is connected to pin1 of a 470 Ohms resistor.
- Pin G is connected to pin1 of a 470 Ohms resistor.
- Pin R is connected to pin1 of a 470 Ohms resistor.
- Pin GND is connected to the G pin of the Wemos D1 Mini and the Cathode pin of the octocoupler.
Resistor (100k Ohms)
- Pin1 is connected to the 3V3 pin of the Wemos D1 Mini.
- Pin2 is connected to the A0 pin of the Wemos D1 Mini.
Resistor (470 Ohms)
- Pin1 is connected to the B pin of the RGB LED.
- Pin2 is connected to the D5 pin of the Wemos D1 Mini.
Resistor (470 Ohms)
- Pin1 is connected to the G pin of the RGB LED.
- Pin2 is connected to the D6 pin of the Wemos D1 Mini.
Resistor (470 Ohms)
- Pin1 is connected to the R pin of the RGB LED.
- Pin2 is connected to the D7 pin of the Wemos D1 Mini.
Resistor (220 Ohms)
- Pin1 is connected to the D1 pin of the Wemos D1 Mini.
- Pin2 is connected to the Anode pin of the octocoupler.
Wemos D1 Mini
- 3V3 is connected to pin1 of the 100k Ohms resistor.
- G is connected to the GND pin of the RGB LED and the Cathode pin of the octocoupler.
- A0 is connected to pin2 of the 100k Ohms resistor.
- D5 is connected to pin2 of a 470 Ohms resistor.
- D6 is connected to pin2 of a 470 Ohms resistor.
- D7 is connected to pin2 of a 470 Ohms resistor.
- D1 is connected to pin1 of the 220 Ohms resistor.
Octocoupler
- Anode is connected to pin2 of the 220 Ohms resistor.
- Cathode is connected to the G pin of the Wemos D1 Mini and the GND pin of the RGB LED.
- Collector is connected to the External pin of an external connection.
- Emitter is connected to the External pin of another external connection.
External Connection
- External is connected to the Collector pin of the octocoupler.
- External is connected to the Emitter pin of the octocoupler.
Code Documentation
Wemos D1 Mini Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This code is a basic template for the Wemos D1 Mini. The setup function is called once when the microcontroller starts, and the loop function runs continuously. You can add your specific logic to control the RGB LED and other components in these functions.
