Showing posts with label arduino uno. Show all posts
Showing posts with label arduino uno. Show all posts

Tuesday, 12 May 2026

GP2Y0D80Z0F Distance Sensor with Arduino UNO

GP2Y0D80Z0F Distance Sensor with Arduino UNO

If you’re looking for a simple and reliable way to detect nearby objects using an Arduino, the GP2Y0D80Z0F infrared proximity sensor is a great option. Unlike ultrasonic sensors that calculate exact distance, this sensor works differently. It simply tells you whether an object is within its detection range or not. That makes it perfect for obstacle detection, automation systems, smart bins, robots, and touchless interfaces.

In this GP2Y0D80Z0F Distance Sensor with Arduino Uno project, the GP2Y0D80Z0F distance sensor is connected to an Arduino Uno along with a 16x2 I2C LCD display. Whenever an object comes within roughly 10 cm of the sensor, the system instantly detects it and displays the result both on the LCD and in the Serial Monitor.

Understanding the GP2Y0D80Z0F Sensor

GP2Y0D810Z0F Pinout

The GP2Y0D80Z0F is a digital infrared proximity sensor. Instead of providing a varying analog voltage like some IR sensors, it gives a simple HIGH or LOW output signal.

Here’s how it works:

  • The sensor emits infrared light
  • Nearby objects reflect the light back
  • If enough reflected light is detected, the output goes LOW
  • If nothing is detected, the output remains HIGH

This makes the sensor very easy to use because the Arduino only needs to read a single digital pin.

One important thing to remember is that reflective surfaces affect performance. Light-colored or shiny objects are detected more easily, while dark surfaces may reduce detection reliability.

Components Required

Components used to Interface GP2Y0D810Z0F with Arduino

The hardware setup is minimal and beginner friendly.

You’ll need:

  • Arduino UNO
  • GP2Y0D80Z0F sensor
  • 16x2 I2C LCD display
  • Breadboard
  • Jumper wires
  • USB cable

The sensor uses only three connections:

  • VCC
  • GND
  • OUT

This keeps the wiring clean and simple.

Hardware Connections

Wiring Diagram GP2Y0D810Z0F with Arduino

The sensor’s OUT pin is connected to Arduino digital pin 2.
The LCD uses the I2C interface, so only SDA and SCL connections are required.

Basic Wiring

Sensor Connections

  • VIN → 5V
  • GND → GND
  • OUT → Pin 2

LCD Connections

  • SDA → A4
  • SCL → A5
  • VCC → 5V
  • GND → GND

Once powered on, the LCD immediately starts showing detection status.

How the System Works

The sensor continuously sends infrared light and checks for reflections.

When an object comes within approximately 10 cm:

  • Sensor output becomes LOW
  • Arduino detects the signal
  • LCD displays “Object Detected”
  • Same message appears in Serial Monitor

If no object is present:

  • Output stays HIGH
  • LCD shows “No Object”

Because the sensor already handles the detection internally, the Arduino code remains very simple.

Why This Sensor Is Useful

The GP2Y0D80Z0F is great for projects where you only need simple object detection instead of accurate distance measurement.

Some useful applications include:

  • Obstacle avoidance robots
  • Smart trash bins
  • Presence detection systems
  • Conveyor object sensing
  • Touchless switches
  • Automation projects

Its fast response time also makes it useful for real-time detection systems.

This GP2Y0D80Z0F Arduino project is a simple but practical way to learn digital sensor interfacing. Since the sensor handles all the proximity detection internally, the Arduino only needs to read a HIGH or LOW signal, making the code lightweight and easy to understand.

Whether you’re building robots, smart automation systems, or interactive electronics, this sensor provides a fast and reliable way to detect nearby objects without complicated processing.

 https://circuitdigest.com 

Robotics Projects |Arduino Projects | Raspberry Pi Projects|

Thursday, 7 May 2026

Automatic Waste Segregation System Using Arduino UNO Q

Automatic Waste Segregation System Using Arduino UNO Q

Waste segregation is important for recycling and environmental protection, but in daily life many people throw all waste into a single bin. To solve this problem, this project demonstrates an automatic waste segregation system using the Arduino UNO Q, Edge Impulse, and computer vision. The system can automatically identify different types of waste and sort them without manual effort.

This  Automatic Waste Segregation System project uses a USB camera and an AI-based object detection model to recognize waste materials such as:

  • Paper
  • Plastic
  • Cardboard
  • Battery

Once the object is detected, the system performs different actions using a servo motor and buzzer. Paper and cardboard are directed into the biodegradable section, plastic goes into the non-biodegradable section, and batteries trigger a buzzer alert because they are considered hazardous waste.

Why Arduino UNO Q?

The Arduino UNO Q is used as the main controller because it combines intelligent processing with reliable hardware control. Unlike traditional Arduino boards, it can handle both AI-based object detection and real-time hardware operations efficiently. This makes it ideal for smart automation projects like waste segregation.

Components Required

The project uses the following components:

  • Arduino UNO Q
  • USB Camera
  • Servo Motor
  • Buzzer
  • USB Hub
  • Jumper Wires
  • Cardboard Bin Structure
  • Laptop for programming
Components used in Smart Waste Segregation Project

Software Platforms Used

Edge Impulse

Edge Impulse is used to collect image data, label waste categories, and train the object detection model. The trained model is then optimized for embedded systems.

Arduino App Lab

Arduino App Lab is used to integrate the trained AI model with the hardware system. It manages communication between the Python application and the Arduino UNO Q.

How the System Works

Circuit  Diagram for Automatic Waste Segregation System

The USB camera continuously captures live video frames. The Edge Impulse object detection model analyzes each frame and identifies the waste type with a confidence score.

To avoid false detections, the system uses:

  • Confidence thresholds
  • Stability counters
  • Cooldown timers

When the same object is detected consistently, the system triggers the required action.

Waste Sorting Actions

Waste TypeAction
Paper/CardboardServo rotates to 0°
PlasticServo rotates to 180°
BatteryBuzzer activates

After sorting, the servo automatically returns to its default 90° position.

Python and Arduino Control

The project uses two interconnected programs:

Python Code

The Python application handles:

  • Camera input
  • Object detection
  • Stability checks
  • Sending commands to hardware

Arduino Code

The Arduino sketch controls:

  • Servo motor movement
  • Buzzer activation
  • Communication with the Python application

This combination enables smooth real-time waste detection and sorting.

Real-World Applications
Labelling Process of Different Items

This smart waste segregation system can be used in:

  • Homes
  • Schools and colleges
  • Offices
  • Shopping malls
  • Public waste collection systems
  • Smart city recycling solutions

It can also be used as an educational project for learning embedded AI, IoT, and automation.

Future Improvements

The system can be upgraded further by adding:

  • Detection for glass and metal waste
  • Mobile app monitoring
  • Solar-powered operation
  • Cloud-based waste analytics
  • LED indicators and voice feedback

These improvements can make the system more suitable for large-scale smart waste management applications.

This project presents a simple and practical automatic waste segregation system using Arduino UNO Q and Edge Impulse. By combining AI-based object detection with real-time hardware control, the system can automatically identify and sort waste materials efficiently.

The project demonstrates how embedded machine learning can be used to build low-cost smart recycling solutions that improve waste management and reduce environmental impact

https://circuitdigest.com 

Robotics Projects |Arduino Projects | Raspberry Pi Projects|

Friday, 10 April 2026

Smart Grid in IoT Using Arduino UNO R4 WiFi – Real-Time Energy Monitoring System

Smart Grid In IoT

Managing electrical energy efficiently is becoming more important than ever. Instead of relying on monthly electricity bills, modern systems focus on real-time monitoring and smart decision-making. This is where a smart grid comes into play. In this project, we build a simple yet powerful IoT-based smart grid monitoring system using the Arduino UNO R4 WiFi and a PZEM-004T Energy Meter.

The goal is straightforward - measure electrical parameters, display them locally, and send the data to the cloud for remote monitoring.

What is a Smart Grid in IoT?

A smart grid is essentially an intelligent energy monitoring system that continuously tracks parameters like voltage, current, power, and energy consumption. Unlike traditional meters, it provides real-time insights, helping users detect abnormal conditions, improve efficiency, and prevent equipment damage.

This makes it useful in homes, industries, and even renewable energy systems.

How the System Works

Circuit Diagram Smart Grid

The Smart Grid in IoT Using Arduino is built around three main parts: sensing, processing, and monitoring.

The PZEM-004T module measures electrical parameters directly from the AC supply. It uses an internal metering IC and a current transformer to calculate voltage, current, power, energy, frequency, and power factor.

The Arduino UNO R4 WiFi acts as the controller. It reads data from the PZEM module using UART communication (Modbus protocol), processes it, and displays the values on an OLED screen.

At the same time, the Arduino sends this data over Wi-Fi to a cloud platform like ThingSpeak. This allows you to monitor energy usage remotely and view historical data through graphs.

Why Use PZEM-004T?

PZEM004 T

The PZEM-004T simplifies energy monitoring significantly. Instead of dealing with complex analog circuits, it provides ready-to-use digital readings. It is factory-calibrated, accurate, and supports a wide measurement range.

This makes it ideal for both beginners and professionals working on IoT-based energy systems.

Key Features of This Project

  • Real-time monitoring of voltage, current, and power
  • Energy consumption tracking in kWh
  • OLED display for local readings
  • Wi-Fi-based cloud logging
  • Remote access and visualization
  • Modular and scalable design

The combination of local display and cloud monitoring makes the system both practical and powerful.

Real-World Applications

This project can be used in multiple real-life scenarios:

  • Home energy monitoring to reduce electricity bills
  • Industrial load analysis and preventive maintenance
  • Solar energy systems to balance generation and consumption
  • Smart metering for automated billing
  • EV charging station monitoring

Because the system is scalable, you can expand it to monitor multiple circuits or even three-phase systems.

What Makes It Powerful

The strength of this project lies in its simplicity and flexibility. The PZEM module handles complex calculations, the Arduino manages logic and communication, and the cloud platform takes care of storage and visualization.

This separation makes the system reliable and easy to upgrade.

This Smart Grid in IoT project is a practical introduction to real-time energy monitoring. It shows how embedded systems and cloud platforms can work together to create useful, real-world solutions.

If you’re interested in IoT or energy management systems, this project is a great starting point. It not only helps you understand electrical parameters but also gives you hands-on experience with data logging, cloud integration, and smart monitoring.

https://circuitdigest.com 

Robotics Projects |Arduino Projects | Raspberry Pi Projects|

Saturday, 28 March 2026

Arduino Send Email Notifications Using DHT11 and UNO R4 WiFi

Temperature Monitoring System and Email Alerts Using Arduino

Keeping track of temperature and humidity sounds simple… until you actually need to monitor it constantly. Whether it’s your room, a server setup, or even a greenhouse, conditions can change quickly without you noticing. That’s where automation really helps.

In this project, we build a simple Arduino Send Email Notifications system that keeps you updated in real time. Using an Arduino UNO R4 WiFi and a DHT11 sensor, the system continuously monitors environmental conditions and sends an email alert whenever the temperature crosses a set limit.

What This Project Does

At its core, this is a smart monitoring system. The DHT11 sensor keeps reading temperature and humidity, while the Arduino checks if the values stay within a safe range.

The moment the temperature exceeds a predefined threshold, the system automatically sends an email notification using a cloud API. No need to manually check anything - you get notified instantly.

It’s simple, practical, and surprisingly useful in real-world scenarios.

Components Required

Hardware Setup of Arduino Based Alert System

The best part about this project is how minimal the hardware is. You only need:

  • Arduino UNO R4 WiFi
  • DHT11
  • Breadboard
  • Jumper wires

That’s it. No GSM module, no extra hardware - WiFi does all the work here.

How the Setup Works

Temperature Alert System with Email Notification Using Arduino

The wiring is straightforward. The DHT11 sensor connects to the Arduino with just three main connections:

  • VCC - 5V
  • GND - GND
  • Data - Digital Pin 2

Once powered, the Arduino connects to your WiFi network using its built-in wireless capability. This is what allows it to communicate with the cloud and send email alerts.

How the System Works

Here’s what happens behind the scenes:

  • The sensor continuously reads temperature and humidity
  • Arduino compares the temperature with a preset threshold
  • If everything is normal - no action
  • If temperature crosses the limit - alert triggered

At that moment, the Arduino creates a JSON request and sends it securely to the CircuitDigest Cloud Email API. The cloud service then formats the message and delivers it straight to your inbox.

To avoid spamming, the system includes a smart control mechanism. Once an email is sent, it won’t send another until the temperature returns to normal and crosses the threshold again.

Code Logic in Simple Terms

The program is divided into a few clear steps:

  • Connect to WiFi
  • Read sensor data
  • Check temperature condition
  • Send email if needed

It uses secure HTTPS communication, ensuring your data is safely transmitted to the cloud server before the email is generated.

Where You Can Use This

This project is more than just a demo. It has real-world applications:

  • Server room monitoring
  • Home temperature alerts
  • Cold storage systems
  • Industrial safety monitoring
  • Greenhouse automation

Basically, anywhere temperature matters - this system fits right in.

This Send Email Notifications using Arduino system is a perfect example of how a simple sensor project can become much more powerful with IoT integration. Instead of just displaying values on a screen, it actively notifies you when something goes wrong.

It’s beginner-friendly, practical, and easy to expand. You can later add features like SMS alerts, dashboards, or even multiple sensors.

If you're stepping into IoT projects, this is a great place to start - simple build, real-world value, and a solid learning experience.

https://circuitdigest.com 

Robotics Projects |Arduino Projects | Raspberry Pi Projects|

Thursday, 26 March 2026

DIY Arduino Handheld Game Console Using UNO R4 WiFi

Handheld Arduino Game Console

Tired of building the same old Arduino projects like blinking LEDs and basic sensors? Then it’s time to try something more exciting. This DIY handheld Arduino game console transforms your development skills into a fun, interactive experience where you can actually play games on hardware you built yourself.

This compact console is powered by the Arduino UNO R4 WiFi and features a small OLED display, tactile buttons, and a buzzer for sound effects. Despite its simple design, it packs multiple retro-style games, making it perfect for beginners and hobbyists who want to explore both hardware and software in a creative way.About

About This Arduino Game Console

This project is a portable Arduino game console. It includes a 0.96-inch OLED display, four control buttons, and a buzzer, all mounted on a custom HAT-style board. The console runs 10 classic-style games like Snake, Pong, and Tetris, each written separately in modular code files.

Console Highlights

Working of DIY-Handheld-Arduino-Game-Console

The console is designed to be compact and fully portable. Powered by a LiPo battery with a boost converter, it can be used anywhere without external power. The OLED display provides smooth graphics, while the buttons offer simple and responsive controls.

The games included are optimized for the hardware, giving a nostalgic retro gaming feel without heavy processing requirements.

Components Required

DIY-Handheld-Arduino-Game-Console-Hardware-Setup

To build this console, you only need a few essential components: Arduino UNO R4 WiFi, OLED display, push buttons, buzzer, LiPo battery, and a boost converter. These parts are assembled on a perfboard to create a compact and clean design.

Building the Console

All components are mounted on a perfboard designed like a HAT that sits directly on top of the Arduino. This approach keeps the design neat and portable compared to messy breadboard wiring.

Careful wiring and compact placement ensure stability and better usability during gameplay.

Code Structure

The software is written in a modular way where each game is stored in a separate header file. This makes it easy to add or modify games without affecting the entire system.

The main program handles menu navigation, input reading, and launching games based on user selection.

Challenges & Fixes

During development, two main challenges were faced. First, compatibility issues with display libraries were solved by switching to the U8g2 library. Second, button bouncing caused unwanted inputs, which was fixed using software debouncing logic.

Conclusion

This Arduino game console project is a great way to combine creativity with electronics. It goes beyond basic circuits and gives you a real, usable device that you can play with.

Whether you're a beginner or an experienced maker, this project helps you understand embedded systems, display handling, and user interaction in a fun and practical way.

https://circuitdigest.com 

Robotics Projects |Arduino Projects | Raspberry Pi Projects|

Thursday, 19 March 2026

Arduino Whatsapp Notification – Simple IoT Alert System

Send WhatsApp Messages from Arduino Uno R4

Sending real-time alerts from your electronics projects has become an essential part of modern IoT systems. Whether it’s monitoring distance, detecting motion, or tracking environmental data, getting instant updates on your phone makes projects far more useful.

Arduino Whatsapp Notification project is done without using a GSM module or complex APIs. Instead of dealing with SIM cards or expensive integrations, this method uses CircuitDigest Cloud WhatsApp API, allowing your Arduino to send messages over WiFi using a simple HTTPS request.

What This Project Does

The idea is simple. The Arduino reads data from a sensor, checks a condition, and sends that data to the cloud. The cloud then converts it into a proper WhatsApp message and delivers it instantly.

To demonstrate this, we use an HC-SR04 ultrasonic sensor. When an object comes closer than a defined distance (for example, 20 cm), the Arduino sends the distance value to the cloud, which then triggers a WhatsApp alert.

This setup creates a real-time proximity alert system that can be used for safety, automation, or monitoring applications.

Components Required

Whatsapp-API-Arduino-UNO-R4-Components-Used

The hardware setup is minimal and beginner-friendly:

  • Arduino UNO R4 WiFi
  • HC-SR04 Ultrasonic Sensor
  • Breadboard
  • Jumper Wires
  • USB Cable

The UNO R4 WiFi is important here because it has built-in WiFi capability, allowing direct internet communication.

How the System Works

The workflow is straightforward and happens in a loop.

First, the Arduino connects to your local WiFi network. Once connected, it continuously reads distance values from the ultrasonic sensor.

When the measured distance crosses a predefined limit, the Arduino prepares a small JSON payload. This payload includes details like your phone number, template ID, and sensor value.

The Arduino then sends this data securely to the cloud using an HTTPS POST request.

From there, CircuitDigest Cloud takes over. It verifies your API key, formats the message using a pre-approved WhatsApp template, and sends it to your registered phone number.

The key advantage here is that Arduino doesn’t directly talk to WhatsApp. The cloud handles all the complex parts like authentication, formatting, and delivery.

Circuit Connections

Whatsapp-API-Arduino-UNO-R4-Circuit-Diagram

The wiring is very simple and requires only four connections:

  • VCC → 5V
  • GND → GND
  • TRIG → Digital Pin 9
  • ECHO → Digital Pin 10

Once connected, the ultrasonic sensor can measure distances from about 2 cm up to 4 meters.

Arduino Code Overview

The code handles three main tasks: WiFi connection, sensor reading, and API communication.

First, the Arduino connects to WiFi using your network credentials. Then, it continuously triggers the ultrasonic sensor and calculates distance based on the echo time.

If the distance goes below the threshold, the code checks a cooldown timer to avoid sending too many messages. If allowed, it sends a request to the cloud API.

The payload includes dynamic values like the measured distance, which gets inserted into a WhatsApp message template automatically.

Testing the System

Once the code is uploaded, open the Serial Monitor to verify WiFi connection and sensor readings.

Place an object close to the sensor. When the distance drops below the set limit, a WhatsApp message will be sent instantly to your phone.

The message typically includes:

  • Device name
  • Event type (e.g., intrusion detected)
  • Measured distance
  • Location

The cooldown feature ensures that repeated alerts are not sent continuously.

Real-World Applications

This project can be extended into many practical use cases:

  • Intrusion detection systems
  • Smart parking alerts
  • Industrial safety monitoring
  • Home automation notifications
  • Distance-based automation triggers

Since it uses WiFi instead of GSM, it’s cost-effective and easy to scale.

Conclusion

This Arduino Whatsapp Notification project is a great example of how IoT projects can be made smarter with cloud integration. By offloading complex messaging tasks to the cloud, the Arduino only focuses on collecting and sending data.

The result is a simple, reliable, and efficient system that delivers real-time alerts directly to your phone. With just a few components and minimal setup, you can add instant WhatsApp notifications to almost any Arduino project.

https://circuitdigest.com 

Robotics Projects |Arduino Projects | Raspberry Pi Projects|

Wednesday, 11 March 2026

Arduino Automatic Toll Gate System Project with RFID Payment and Servo Control

Automatic Toll Gate System Project using Arduino

Toll collection is a common process on highways where vehicles stop to pay a fee before continuing their journey. Traditional toll booths often require manual payment, which can lead to traffic delays and long queues. Automation helps solve this problem by making the process faster and more efficient.

In this project, we build an Automatic Toll Gate System using Arduino that detects vehicles, reads RFID cards, verifies payment, and opens the gate automatically. This project is a great introduction to real-world automation using sensors, RFID technology, and microcontrollers.

It is especially suitable for students, beginners, and Arduino enthusiasts who want to understand how simple electronics can automate everyday systems.

What is an Automatic Toll Gate System?

Circuit Diagram Automatic Toll Gate System using Arduino

An automatic toll gate system allows vehicles to pass through a toll booth without manual payment handling. Instead of cash transactions, the system uses RFID cards that store user information and balance.

When a vehicle approaches the toll gate, an IR sensor detects its presence. The driver then places an RFID card near the reader. The system scans the card and checks if it is valid and has enough balance to pay the toll.

If the card is valid and the balance is sufficient, the toll amount is deducted automatically. The gate then opens using a servo motor, allowing the vehicle to pass. After the vehicle crosses the gate, another sensor detects its exit and the gate closes again.

This process makes toll collection quick, automatic, and contactless.

Components Required

Components Automated Toll Gate RFID

The project uses simple and easily available components, including:

  • Arduino Uno
  • RFID RC522 Reader Module
  • RFID Cards or Tags
  • Two IR Sensor Modules
  • SG90 Servo Motor
  • Red LED and Green LED
  • Breadboard and Jumper Wires
  • 5V Power Supply or USB Power

The Arduino acts as the central controller, while the RFID module verifies the card. IR sensors detect vehicles, and the servo motor controls the gate.

Working of the Automatic Toll Gate System

Block Diagram

The system works in a sequence of simple steps.

First, the toll gate remains closed while the system waits for a vehicle to arrive. When a vehicle approaches, the entry IR sensor detects it and signals the Arduino to begin the authentication process.

Next, the driver scans the RFID card. The RFID reader reads the card’s unique ID and sends it to the Arduino. The program compares this ID with stored card IDs and checks the available balance.

If the card is valid and has enough balance, the toll amount is deducted. The green LED turns on, and the servo motor rotates to open the gate.

The vehicle then passes through the gate. When the vehicle crosses the exit IR sensor, the Arduino receives a signal indicating that the vehicle has left the toll area. The servo motor then moves back to close the gate, and the system resets for the next vehicle.

If the card is invalid or the balance is insufficient, the red LED lights up and the gate remains closed.

Arduino Code Overview

The Arduino code controls the entire toll system. It starts by including libraries required for SPI communication, RFID reading, and servo motor control.

In the setup section, the Arduino initializes all connected hardware components, including the RFID reader, sensors, LEDs, and the servo motor.

The loop function continuously checks whether a vehicle is detected by the entry IR sensor. When a vehicle is detected, the system waits for an RFID card scan.

If the scanned card matches a stored card and has sufficient balance, the Arduino opens the gate. Otherwise, access is denied.

Real-World Applications

Although this is a learning project, the concept is widely used in real life. Automatic toll collection systems are used on highways to reduce congestion and speed up vehicle movement.

Similar RFID-based systems are also used in parking lots, office buildings, gated communities, and industrial facilities to control vehicle access.

Conclusion

The Automatic Toll Gate System using Arduino is a simple and practical project that demonstrates how automation works in real-world applications.

By combining RFID technology, sensors, and motor control, the system can detect vehicles, verify payments, and operate a toll gate automatically. This project helps beginners learn important concepts such as Arduino programming, sensor integration, and RFID communication.

With further improvements like IoT connectivity or LCD displays, this project can easily be expanded into a more advanced smart toll management system.

https://circuitdigest.com 

Robotics Projects |Arduino Projects | Raspberry Pi Projects|

Thursday, 26 February 2026

DIY Arduino Game Controller using Arduino Uno R4

 

Arduino Game Controller

Gaming is one of the best ways to relax and refresh the mind. Classic joystick-based games gave us simple and direct control using physical buttons and sticks. In this project, we recreate that experience by building a DIY Game Controller using Arduino Uno R4, combining retro-style control with modern electronics.

This Arduino Game Controller project is a great way to learn USB HID communication, input proce uses a joystick module and push buttons to control games on a computer. When connected through USB, the Arduino Uno R4 acts like a keyboard device, allowing games to detect inputs instantly without installing drivers.

Components Required

  • Arduino Uno R4
  • Joystick Module
  • 4 Push Buttons
  • Veroboard
  • Jumper Wires
Components Required


Working Principle

The joystick provides X and Y axis analog signals, which Arduino converts into arrow key movements.
Push buttons are mapped to keys like W, A, S, and D for game actions.

Using the Keyboard.h library, the Arduino sends real-time key press signals to the PC, making the setup function like a real game controller.

Circuit Diagram of game Controller


Hardware Connection

  • Joystick X → A0
  • Joystick Y → A1
  • Buttons → Digital Pins 2–5
  • Power → 5V & GND

Buttons use internal pull-up resistors, so no extra components are needed.

This Arduino Game Controller project is a great way to learn USB HID communication, input processing, and human–computer interaction. It transforms basic hardware into a functional gaming device while offering a fun hands-on electronics experience.

https://circuitdigest.com 

Robotics Projects |Arduino Projects | Raspberry Pi Projects|

Monday, 2 February 2026

PCA9306 Module with Arduino Uno: Bidirectional I2C Level Shifting Guide

Interfacing PCA9306 Logic Level Shifter with Arduino Uno

The PCA9306 Module with Arduino Uno is a bidirectional logic level translator designed specifically for I²C bus communication. It allows devices operating at different voltage levels - such as 5V microcontrollers and 3.3V sensors - to communicate safely and reliably. Instead of using discrete MOSFET-based level-shifting circuits, the PCA9306 integrates this functionality into a single IC, ensuring consistent signal integrity and a simpler, more reliable hardware design.

This module automatically handles voltage translation in both directions and preserves standard I²C features such as clock stretching, arbitration, and timing accuracy. Since it uses an open-drain architecture, it remains compatible with most I2C devices. Once powered and enabled, the PCA9306 starts working immediately without any software configuration.

What You’ll Learn from This Project

  • Understanding the PCA9306 pinout and working principle
  • How to interface the PCA9306 with Arduino Uno
  • Reading data from a 3.3V I²C sensor using a 5V Arduino
  • Correct wiring practices for reliable I²C communication
  • Common issues and troubleshooting tips for I²C level shifting

Understanding the PCA9306 Level Shifter Module

The PCA9306 manages two separate I2C voltage domains:

  • VREF1 defines the low-voltage side (typically 3.3V)
  • VREF2 defines the high-voltage side (typically 5V)

Each side has its own SDA and SCL pins, allowing seamless bidirectional signal translation. A common ground between both devices is mandatory, as it provides a shared reference point for voltage levels. The EN (Enable) pin must be driven HIGH (usually tied to VREF2) to activate the module.

Most PCA9306 breakout boards include pull-up resistors on the low-voltage side, while the high-voltage side typically relies on the host controller’s pull-ups.

PCA9306 Pin Description

  • VREF1 – Low-voltage reference (3.3V)
  • VREF2 – High-voltage reference (5V)
  • SCL1 / SDA1 – I²C lines for 3.3V devices
  • SCL2 / SDA2 – I²C lines for 5V devices (Arduino A5/A4)
  • GND – Common ground
  • EN – Enable pin (must be HIGH)
PCA9306-Module-Pinout

Components Required

Wiring the PCA9306 with Arduino Uno

PCA9306 Wiring Diagram

To interface a 3.3V BMP180 sensor with a 5V Arduino:

  • Connect VREF1 → 3.3V
  • Connect VREF2 → 5V
  • Connect SDA2 → A4, SCL2 → A5
  • Connect SDA1 / SCL1 → BMP180
  • Tie all GND pins together
  • Pull EN HIGH

Once wired, no special configuration is required for the PCA9306.

Real-World Applications of PCA9306

  • Connecting 3.3V sensors to 5V microcontrollers
  • Interfacing EEPROMs across voltage domains
  • Multi-board embedded systems
  • Backplane or modular I²C designs
  • Legacy hardware integration

In this project, we successfully interfaced the PCA9306 logic level shifter with an Arduino Uno to communicate with a 3.3V BMP180 pressure sensor. By using proper voltage references, correct wiring, and a shared ground, we achieved stable I2C communication without modifying the software.

The PCA9306 proves to be a reliable and efficient solution for bidirectional I²C voltage translation, especially in mixed-voltage embedded systems.