Skip to content
Create an account

Common Sensor Pinout

These connections are copied from our published sensor projects. They cover the boards and modules used in our own lessons rather than a general component catalogue.

At a glance

Sensor connection table

Each row lists the terminals and the pin assignments that appear in our circuit guides.

Sensor or moduleTerminals / pinsDocumented connection
DHT11Power, data, groundPower leg to 5 V, ground leg to common ground, data leg to a digital pin
DHT11 pin order in our guidePin 0 power, pin 1 data, pin 2 groundData leg connects to Arduino pin 2 in the example
DHT11 / DHT22Single digital data lineRead digitally with a library; no extra resistor on the data line
HC-SR04Trigger, echoTrigger pin set OUTPUT, echo pin set INPUT
HC-SR04 trigger pulse10 microseconds HIGHSent from the board, then the echo pulse is timed
HC-SR04 example pinsTrig = 7, Echo = 8Used in the distance sketch in our workshop
Sound speed used343 m/s, 0.0343 cm per microsecondDistance = pulse time x 0.0343 / 2
I2C OLED (SSD1306)VCC, GND, SDA, SCLOn Uno: SDA = A4, SCL = A5; GND to common ground
PIR motion sensorOutput pin, sensitivity and delay screwsOutput goes HIGH when motion is detected

How to use this reference

Join the grounds first. Every sensor project in our library repeats the same rule: the sensor ground and the controller GND must share one reference.

For the DHT11, use a single digital pin for data. Our guide notes that the sensor has a response time, so querying it too often gives empty or delayed data.

For the HC-SR04, keep the trigger pulse at the documented 10 microseconds and divide the timed echo by two because the sound travels out and back.

For an I2C display, connect the two shared lines to A4 and A5 on an Uno and keep the module supply within the voltage the module accepts. Never feed 5 V to a 3.3 V module.

If a reading never arrives, our troubleshooting lists check the data pin, the supply and the common ground before changing the sketch.

Pin positions are given for the modules used in our guides. Always confirm the pin order printed on your own module before wiring it.
DHT11 temperature and humidityThe full DHT11 project with wiring steps.HC-SR04 distance guideBuild the ultrasonic distance circuit from our guide.Sensor projects hubMore sensor builds with breadboard layouts.

Keep the reference close. Create a free account to save your place, open the simulators and follow the full electronics guides.

Free panel

Frequently asked questions

How many legs does the DHT11 have?

Three: power, data and ground. Our guide lists pin 0 as power, pin 1 as data and pin 2 as ground.

How long is the HC-SR04 trigger pulse?

Ten microseconds HIGH. The board then measures how long the echo pin stays HIGH.

How is distance calculated?

The pulse time is multiplied by 0.0343 cm per microsecond and divided by two, because the sound travels to the object and back.

Which pins carry I2C on an Uno?

SDA is A4 and SCL is A5. The two lines are shared by all devices on the bus.

Interactive circuit guide

Run the simulation, follow the build steps one by one and try it in our real app.

Real screenshot of our circuit simulator Stopped
Open in our app →

Step-by-step build