Discover the "Underground Method" Used by Successful Engineers to Leverage Robotics in Their Careers

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest

9 Sensors for Arduino You Must Learn

Disclosure: Some of the links below are affiliate links. This means that, at zero cost to you, I will earn an affiliate commission if you click through the link and finalize a purchase. Learn Robotics is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a way for websites to earn advertising revenues by advertising and linking to

Are you building an electronic prototype using Arduino? Maybe you need to measure a specific condition and you’re looking for the right sensor to use. Regardless of the project, you can use this growing list of popular Arduino sensors to retrofit your next project.

The goal of this article is to outline some of the most popular sensors and then expand on this list over time. If your favorite sensor isn’t on this list, be sure to add it to the comments below. I will revise this list to create a comprehensive reference guide.

Tip: Bookmark this page (Windows: CTRL-D or Mac: CMD-D) to save it for future reference.

Popular Arduino Sensors List

Here’s a growing list of popular sensors for Arduino. A lot of these sensors can also be used with Raspberry Pi. So, if you plan on building electronics prototypes, I highly recommend having these sensors in your collection.

What it’s used forWhere to Buy
Ultrasonic SensorCalculate distances between objectsBuy on Amazon
IR SensorDetect contrast and distances of objectsBuy on Amazon
IR ReceiverRead data from IR remotesBuy on Amazon
PhotoresistorDetermine brightnessBuy on Amazon
TemperatureMeasure the ambient temperatureBuy on Amazon
Numeric KeypadProvide numerical input dataBuy on Amazon
PotentiometerSend rotational position data to ArduinoBuy on Amazon
JoystickProvide (x,y) coordinate input dataBuy on Amazon
RFID ReaderRead data from RFID tagsBuy on Amazon

If you’re going to be working with Arduino and sensors for multiple projects, I recommend purchasing an Arduino sensor kit.

What’s the difference between Analog and Digital Sensors?

Analog sensors allow us to take readings over a range of values rather than just an ON/OFF condition. The digital pins on the Arduino provide a 1-bit signal (HIGH/LOW). The Arduino has a built-in 10-bit Analog-to-Digital Converter (ADC).

analog vs digital signals Arduino

Analog signals allow us to precisely measure Temperatures, Distances, across a range and then respond accordingly. Whereas digital signals only tell us if a signal is active or not.

1. Ultrasonic Sensor with Arduino

Ultrasonic Sensors are popular for measuring distances and object avoidance. The HC-SR04 and PING sensors are two common models. For less than $2 per sensor, you can calculate distances of 0.78 in-196 in (2cm-500cm). The HC-SR04 has four pins (Ground, Power, Trig, and Echo).

Rather than connecting the signal pins (Echo and Trig) into the analog pins on the Arduino, you’ll use two digital PWM pins. Here’s a wiring diagram that you can use to connect this sensor to the Arduino.

HC-SR04 ultrasonic sensor pin diagram

If you’re using the PING sensor, you can wire it to the Arduino using the diagram, below.

PING ultrasonic sensor pin diagram

Then, refer to this article to program your Ultrasonic Sensor.

Buy on Amazon


2. IR Sensor with Arduino

Another popular sensor is the IR sensor. This sensor can be used to detect objects or contrast. It’s a popular choice for line following or line avoidance in robotics.

The IR sensor has three pins (Ground, Power, and Signal). Connect the signal pin to any analog pin on the Arduino. Here’s how to wire an IR Sensor to an Arduino Uno.

IR Sensor pin diagram

Buy on Amazon


You can also use this sensor digitally by connecting the signal pin to any digital pin on the Arduino. Once you have this sensor connected to the Arduino, you can learn how to program it using this guide.

3. IR Receiver with Arduino

Another type of IR sensor is an IR receiver. Rather than using IR light to detect an object or read a line, we’ll use an IR receiver to decode the signal from a TV remote.

This is helpful if you have a device you want to control or if you want to use a remote to drive a robot around. The IR Receiver has three pins (Ground, Power, and Signal). Connect the signal to any digital pin on the Arduino. Here’s a fritzing diagram for an IR receiver connected to the Arduino Uno.

IR receiver wiring diagram to Arduino

Once you have this wired up, install the IR Remote Library and you’re ready to start making. Check out my tutorial on how to control a robot using a TV remote to see a guided walk-through on how to use this sensor.

Buy on Amazon


4. Photoresistor with Arduino

The fourth analog sensor for Arduino is a photoresistor (also known as a light-dependent resistor or LDR). Photoresistors can detect brightness. If you want to build a robot that follows a light or a prototype that triggers an action based on light or dark conditions, you’ll want to use a photoresistor. wire photoresistor to Arduino diagram

Photoresistors have two pins (Ground and signal). Because a photoresistor is a special type of resistor, you’ll create a voltage divider against the signal. You’ll also use a 10KΩ resistor to pull the signal up or down. This will determine whether dark is a high or low reading.

Connect the resistor to Ground if you want low values to represent darkness and high values to represent brightness. Connect the resistor to power if you want to flip this metric and have light values represent low reading. Refer to this tutorial to program a photoresistor.

Buy on Amazon


5. Temperature Sensor (TMP36) with Arduino

The next sensor on our list is the TMP36 Temperature sensor. You can also get a sensor module like the BME280, which reads the temperature, humidity, and also atmospheric pressure.

This sensor is great for IoT projects or if you want to make a weather station. (Try this kit.) Here’s the wiring diagram to connect the TMP36 to the Arduino Uno.

TMP36 Arduino wiring diagram

Buy on Amazon


Here’s another diagram if you want to connect the BME280 to an Arduino Uno.

BME280 Arduino fritzing diagram

Once you have your sensor wired up, you can learn to program the BME280 in this tutorial.

6. Numeric Keypad with Arduino

A numeric keypad is another awesome sensor to use with Arduino to provide user input. While this isn’t an analog sensor, it does provide many combinations of numbers, passcodes, and inputs for the Arduino.

Buy on Amazon


Numeric keypads use eight digital inputs to map out the rows and columns for each button. You can purchase a 4x3 Keypad or a 4x4 Keypad. Here’s a diagram to wire a 4×3 numeric keypad to the Arduino Uno.

keypad wiring fritzing diagram Arduino

You can access the free example code for the numeric keypad, below. Enter your email to access the Numeric Keypad Example code.

Subscribe to Unlock

Get the code and downloads for this project!


7. Potentiometer with Arduino

Another popular sensor for Arduino is a potentiometer. A potentiometer can be used for many different hobby projects with the Arduino Uno.

Buy on Amazon


Some examples include controlling the brightness of an LED or setting the speed of a motor controller. Rotate the knob and you’ll get a proportional reading from the built-in ADC on the Arduino. Potentiometers have three pins (Ground, Power, and Signal).

potentiometer arduino wiring diagram

First, Connect Ground to GND on the Arduino. Then attach the Power pin to 5V on the Arduino. Finally, connect the Signal pin to any available analog pin on the Arduino. Here’s a wiring diagram to connect a potentiometer to an Arduino Uno. You can learn more about potentiometers in this tutorial.

8. Joystick with Arduino

If you’re looking to control x-y positions or send coordinate data to the Arduino, then you’ll want to check out the joystick module. You can also pick up a Gamepad Shield to turn your Arduino Uno into a game controller.

Buy on Amazon


joystick arduino wiring

The joystick module has five wires: Ground, Power, two analog inputs (VRx and VRy) and one digital input (Selector Switch). Refer to the joystick wiring diagram, above.

Using the analogRead() method, you can read the horizontal (x) and vertical (y) positions of the joystick. Since we’re using a 10-bit ADC, the home position or origin ends up being in the center at (511,511). Then, you can map these positions to drive a robot or control an LED matrix. It’s an interesting sensor to use if you need access to (x,y) coordinates.

9. RFID Reader (RC522) with Arduino

The RFID RC522 Reader (and writer) is a popular choice for automating door locks and access systems. There are seven wires for the RFID-RC522 sensor: Ground, Power, and five digital signal wires. Check out the RC522 Wiring Diagram, below.

RFID Arduino diagram

Once you have the RFID reader wired up, you’ll want to download and import the RIFD-RC522 library. Open the Arduino IDE and go to Sketch > Include Library > Manage Libraries… Then search for RC522. You’re now ready to program the RFID reader.

Buy on Amazon Buy on Learn Robotics


Wrap Up & Additional Arduino Resources

In this article, we explored nine popular sensors for Arduino. Whether you want to build a robot or develop a Smart Home, you’ll want to learn how to use analog sensors. Next time you’re developing a prototype, consider these Arduino sensors for your application.

Which Arduino sensors have you used frequently? Comment below! I’ll be adding your favorite sensors to this list. The goal is to create a comprehensive list of popular sensors for Arduino that you can reference at any time.

Do you need help learning Arduino? Enroll in Arduino for Beginners. It’s the only Arduino course you’ll ever need.

Like this article? Help a fellow maker by sharing this guide!

Botly Learn Robotics

Get Exclusive Learn Robotics Projects Directly to Your Inbox!

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Did this content help you? 🤖
...say thanks and send us a coffee!

For self-starters & tech professionals

Discover the Underground Method Used by Successful Engineers to Leverage Robotics in Their Careers


Learn Robotics helps self-starters, hobbyists, and tech professionals get started in the robotics industry. 

We leverage a simple formula to make it easy to gain highly marketable robotics & automation skills. 

Our students work in top robotics careers, adding more meaning to their lives, all while increasing their income.

Learn Robotics was founded by Robotics Engineer, Liz Miller, and leverages the Robotics Success Equation, our unique methodology that helps people learn to build robots while enhancing their careers for the future.

You can watch the free robotics career training and to learn more about the Robotics Success Equation.

liz's featured robotics PROJECT ON YOUTUBE

Learn Robotics Botly Favicon


Get Liz's Exclusive Robotics Content Directly to Your Inbox

Liz Miller Learn Robotics