4DVolt

Electronic components: pinout and wiring

Pinout, wiring guides and code examples for the parts most used in Arduino and ESP32 projects, with a simulator so you can test without building anything.

DHT22 (AM2302): pinout and wiring

The DHT22 measures temperature and humidity and sends both values over a single wire. See the pinout, how to wire it to an Arduino or ESP32, and test the data format in the simulator.

View component →

HC-SR04: pinout and how to wire the ultrasonic sensor

The HC-SR04 measures distances from 2 cm to 4 m by sending an ultrasonic pulse and timing the echo. See the pinout, how to wire it to an Arduino or ESP32 and test the pulse in the simulator.

View component →

Analog joystick: pinout and how to wire it to Arduino

The joystick module has two potentiometers (X and Y axes) and a push button on the stick. See the pinout, how to read the axes on Arduino and test the values in the simulator.

View component →

18650 battery: wiring, voltage and runtime

The 18650 is the most used lithium cell in portable projects. See the voltage for each configuration, how to wire it into a circuit and work out the runtime in the simulator.

View component →

HC-SR501 PIR sensor: pinout and wiring

The PIR sensor detects the movement of people and animals through changes in infrared heat. See the pinout, the two module adjustments, how to wire it to an Arduino and test the output behavior in the simulator.

View component →

MQ-2 gas sensor: pinout and wiring

The MQ-2 detects LPG, smoke, methane and other combustible gases. See the pinout of the analog and digital outputs, how to wire it to an Arduino and test the reading and threshold in the simulator.

View component →

MPU6050: pinout and wiring of the accelerometer and gyroscope

The MPU6050 packs a 3-axis accelerometer and a 3-axis gyroscope into a cheap I2C chip. See the pinout, how to wire it to an Arduino and ESP32, and learn in the simulator how tilt becomes the values you read.

View component →

BMP180: pinout and wiring of the pressure sensor

The BMP180 measures atmospheric pressure and temperature over I2C, which lets you calculate altitude. See the pinout, how to wire it and test the pressure-to-altitude conversion in the simulator.

View component →

IR receiver (VS1838B / KY-022): pinout and wiring

The IR receiver picks up the 38 kHz modulated signal from remote controls and hands the demodulated pulses to the microcontroller. See the pinout, wiring, the code to read keys and the NEC frame format in the simulator.

View component →

KY-040 rotary encoder: pinout and wiring

The KY-040 rotary encoder turns endlessly and reports direction through the phase shift of two signals, CLK and DT. See the pinout, how to wire it to an Arduino, the code to count clicks and test the quadrature in the simulator.

View component →

L298N driver: pinout and wiring DC motors

The L298N module is a dual H-bridge: it controls the direction and speed of up to two DC motors, or one bipolar stepper motor. See the pinout, the jumpers, how to wire it to an Arduino, the code and test the drive in the simulator.

View component →

5 V relay module: pinout and wiring

A relay module lets an Arduino or ESP32 switch larger loads such as lamps, pumps and fans. See the pinout, when it activates on a low or high level, how to wire the load and try it in the simulator.

View component →

SG90 servo motor: pinout and wiring

The SG90 servo turns its shaft to an angle between 0° and 180° according to the width of a pulse. See the wire colors, how to connect it to Arduino, the Servo library code and try the angle in the simulator.

View component →

LDR light sensor: how to connect to Arduino

The LDR is a resistor whose value changes with light: the more light, the lower the resistance. See how to wire it in a voltage divider, which resistor to use, the ready-made module with a digital output and try it in the simulator.

View component →

Potentiometer: pinout and wiring

The potentiometer is a resistor with a movable wiper. Wired as a voltage divider, it becomes a volume, brightness or speed control. See the pinout, the A and B tapers, how to connect it to Arduino and try it in the simulator.

View component →

555 timer IC: pinout and wiring

The 555 is an 8-pin timer that generates pulses with resistors and a capacitor. See the pinout, how to build the astable (blinker) and monostable (one pulse per trigger) circuits, the formulas, and try values in the simulator.

View component →

Arduino Uno: complete pinout

The Arduino Uno R3 has 14 digital pins, 6 analog inputs and several pins with special functions. See the complete pinout, which pins do PWM, I2C, SPI and UART, the electrical limits, and filter the map by function.

View component →

ESP32 DevKit: complete pinout

The ESP32 has Wi-Fi, Bluetooth and dozens of GPIOs, but not all of them suit every job. See the DevKit pinout, which pins to avoid, the ADC, touch, I2C and SPI functions, and filter the map by function.

View component →

LM35 and TMP36: pinout and wiring

The LM35 and TMP36 are three-pin analog temperature sensors: the output is a voltage proportional to heat. See the pinout, the formulas, how to improve resolution with the 1.1 V reference and try it in the simulator.

View component →

DS18B20: pinout and wiring

The DS18B20 is a high-accuracy digital temperature sensor that uses a single data wire (1-Wire). See the pinout, why it needs the 4.7 kΩ resistor, the 9 to 12-bit resolution, the code, and try it in the simulator.

View component →

7-segment display: pinout and wiring

The 7-segment display shows numbers by lighting seven LEDs in a figure-8 shape, plus the decimal point. See the pinout, the difference between common cathode and common anode, the table for each digit, the code and try it in the simulator.

View component →

16x2 I2C LCD: pinout and wiring

The 16x2 LCD with an I2C adapter shows 2 lines of 16 characters using only 4 wires. See the pinout, how to find the address (0x27 or 0x3F), the contrast adjustment, the code and try it in the simulator.

View component →

No results for this search.

Make your first project today

Start on the Spark plan, without paying anything.

Create free account