Custom 3d printing
3d Printing 3d Products Cart Checkout 3d Printing 3d Products Cart Checkout Buy Token
3d Printing 3d Products Cart Checkout 3d Printing 3d Products Cart Checkout Buy Token
Voice recognition based wireless home automation system Smart homes have become popular due to their convenience and energy efficiency. An implemented project uses voice commands to wirelessly control home appliances and lights. An Android app performs the speech-to-text conversion and Bluetooth communicates with the microcontroller to execute commands. This eliminates the need for physical interaction with devices. Smart homes can save energy and reduce their carbon footprint by automating tasks and tracking energy usage. Smart technology in homes is an efficient way to make daily tasks easier. Smart home devices can also track energy usage and provide insights for improved efficiency. Materials • Arduino Uno R3: The main microcontroller that will process sensor data and control the motors. • Bluetooth module (HC-05): This module enables wireless communication between the users’ smartphones. • Lights or Other Appliances: These are the devices you want to control. In this project, the relay module will turn them on or off based on the commands received from the mobile app. • 2-Channel 5V Relay Module: A relay is an electromagnetic switch that allows a low-voltage microcontroller (like the Arduino) to control a high-voltage device (like a light or appliance). The 2-channel relay module in this project allows control of two separate devices. • 18659 Battery and battery holder: Here battery is used as the main power supply to the system. • Jumper wires: These are the cables that are used to make the connections. • Breadboard: A breadboard is a prototyping tool that allows you to build and test circuits without soldering. It has rows and columns of holes where you can insert components and connect them using jumper wires. Hardware Requirement • Bluetooth Communication: The HC-05 Bluetooth module receives wireless signals from a paired mobile phone. The Bluetooth module is connected to the Arduino, allowing the Arduino to receive data wirelessly. • Arduino Code: The Arduino runs a simple code that listens to the Bluetooth module for incoming characters. The code interprets these characters and controls the relay module accordingly. • Relay Control: The 2-channel 5V relay module acts as a switch to control electrical devices. In this case, the relays are connected to lights or appliances. When the Arduino receives specific characters (‘1’, ‘2’, ‘3’, ‘4’) from the Bluetooth module, it triggers the corresponding relay to either turn on or off. • Lights or Appliances: The lights or appliances are connected to the relay module. When the relay is activated by the Arduino, it completes the electrical circuit, allowing the power to flow and turning on the connected device. When the relay is deactivated, the circuit is broken, turning off the device. • Mobile App Interaction: The user interacts with a mobile app that sends voice commands. The app converts these commands into specific characters (‘1’, ‘2’, ‘3’, ‘4’) and sends them to the Arduino via Bluetooth. The Arduino then executes the corresponding actions based on the received commands. Working • Power up the Arduino and make sure the Bluetooth module is paired with your mobile phone. • Open the mobile app and use voice commands. • The mobile app sends specific characters to the Arduino via Bluetooth. • The Arduino receives the characters and executes the corresponding actions on the relay module. • The relay module controls the lights or appliances based on the commands. Circuit Diagram Pin Connection • Arduino Uno VCC-GND-RX (Pin 0) TX(Pin 1) to 5V-GND-TXD -RXD of HC-05 Bluetooth • Arduino Uno VCC-GND-Digital Pin 2-Digital Pin 3 to 5V-GND-IN1 -IN2 of Relay module Software Programming • Set Up Arduino IDE • Download and install the Arduino IDE (Integrated Development Environment) from the official Arduino website: Arduino Software. • Open the Arduino IDE and make sure your Arduino board is selected under the “Tools” menu. Choose the appropriate board type (e.g., Arduino Uno) and the port your board is connected to laptop. • Install the Arduino IDE and libraries: Bluetooth library, Speech Recognition library (e.g., Julius, Sphinx) • Upload the Arduino code to the board. • Install the Android app on your smartphone. • Pair the Bluetooth module with your smartphone.• Open the app and configure the controls. App Set-up: Download the BT Voice Control for Arduino from Google Play store. Conclusion • Test the wheelchair in a safe environment and adjust as necessary for optimal performance and user comfort. • Choose high-quality components for reliable and safe operation. • Follow proper circuit diagrams and safety guidelines during construction. • Test the wheelchair thoroughly in a controlled environment before using it in public. Regularly maintain the wheelchair for optimal performance and safety
Automated Toll Collection System using RFID Automated toll collection system using RFID introduces the Automatic Smart Toll Tax Collection System, employing an RFID Module and Arduino. With the increasing congestion at toll plazas, the system aims to streamline the toll tax payment process. The objective is to automatically recognize the RFID tag associated with a vehicle, display the corresponding toll amount, and allow passage upon payment. Failure to pay will result in the gate remaining blocked, optimizing traffic flow, and saving time for commuters. This guide provides a comprehensive, step-by-step approach to help you navigate the construction, programming, and fine- tuning phases of your voice-controlled wheelchair. Here’s a step-by-step guide to get you started. Materials required for Automated toll collection system using RFID • Arduino Uno: The Arduino Uno is a microcontroller board based on the ATmega328P. It serves as the brain of the project, executing the programmed code and controlling the connected hardware components. • RFID Module (e.g., MFRC522): The RFID module is used for reading RFID tags. In this case, the MFRC522 module is a common RFID reader/writer module that communicates using SPI (Serial Peripheral Interface) protocol. It can read RFID tags within its proximity. • SG90 Servo Motors: Servo motors are used for controlling the movement of physical objects. The SG90 servo motors are commonly used in small-scale projects. In this case, they are employed to simulate the opening and closing of the toll gate. • Red and Green LEDs: Light-emitting diodes (LEDs) are used as visual indicators. A red LED is used to indicate that the gate is closed or an invalid RFID tag, while a green LED indicates that the gate is open, or a valid RFID tag is detected. • Resistors: Resistors are used to limit the current flowing through the LEDs, preventing them from burning out. The specific resistor values depend on the LED specifications and the desired brightness.• Breadboard and Jumper Wires: The breadboard provides a platform for easily connecting and prototyping electronic circuits without soldering. Jumper wires are used to establish connections between different components on the breadboard. • Power Supply: The Arduino Uno can be powered through USB or an external power supply. Make sure that the power supply can provide sufficient power for both the Arduino and the connected components. Hardware Assembly • Initialization: The Arduino Uno initializes and sets up the RFID module, servo motors, and LEDs. • RFID Tag Detection: The system constantly checks if a new RFID card is presented to the RFID module. • RFID Card Reading: When an RFID card is detected, the system reads the unique identifier (UID) of the card using the RFID module. • RFID Tag Validation: The Arduino compares the read RFID tag’s UID with a predefined value in the code (in this case, “YOUR_RFID_TAG”). • If the RFID tag is valid, the system proceeds to open the toll gate; otherwise, it indicates an invalid card. • Gate Operation: If the RFID tag is valid, the Arduino commands the servo motor to open the gate by moving to a specified angle (e.g., 0 degrees). The green LED is turned on to indicate that the gate is open. • Delay: After a specified delay (e.g., 5 seconds), the Arduino commands the servo motor to close the gate by moving to another angle (e.g., 90 degrees). • Gate Closing: The red LED is turned on to indicate that the gate is closed. • Repeat: The system returns to monitoring for a new RFID card, and the process repeats Working • The servo motors simulate the physical opening and closing of the toll gate. You may need to adjust the servo angles in the code to match your specific gate mechanism. • The delay after opening the gate is included to simulate a vehicle passing through. You can adjust this delay based on your desired system behavior. • The code provided is a basic example, and depending on your specific requirements, you might want to add more features such as logging transactions, connecting to a database, or integrating with a display for user feedback.• Ensure that the RFID tag specified in the code matches the actual RFID tag you intend to use for testing. Replace “YOUR_RFID_TAG” with the correct value. • Carefully handle electronic components, and ensure that the power supply is appropriate for the components used. • Test the system in a controlled environment, and troubleshoot if necessary by checking connections, code, and component functionality. Adjust parameters in the code as needed. Circuit Diagram of Automated Toll Collection System using RFID Pin Connection • Connect the MFRC522 RFID module SDA-SCK-MOSI-MISO-GND-RST-3.3V to Digital pins 10-13-11-12-GND-9-5V of Arduino Uno R3: • Connect the SG90 servo motors 5V-GND-Servo signal to 5V-GND-Digital 5 of Arduino Uno R3: • Connect the Red and Green LEDs Connect the anode (longer leg) of the Red LED to Digital Pin 7 through a resistor. Connect the cathode (shorter leg) of the Red LED to GND.Connect the anode (longer leg) of the Green LED to Digital Pin 6 through a resistor.Connect the cathode (shorter leg) of the Green LED to GND.• Power Supply: Connect the Arduino Uno to a power source using the USB cable connected to your computer or an external power supply. • Ensure that the external power supply provides enough power for the Arduino Uno and the connected components. Software Programming • Set Up Arduino IDE • Download and install the Arduino IDE (Integrated Development Environment) from the official Arduino website: Arduino Software. • Open the Arduino IDE and make sure your Arduino board is selected under the “Tools” menu. Choose the appropriate board type (e.g., Arduino Uno) and the port your board is connected to laptop. • Install the necessary libraries (MFRC522 and Servo) in the Arduino IDE. • Connect the components based on the circuit diagram. • Upload the code to your Arduino Uno. • Make sure to replace “YOUR_RFID_TAG” with the actual RFID tag you want to use for testing. Adjust the servo angles
Smart Door Lock using Arduino Bluetooth-enabled Smart Door Lock using Arduino is to create a secure and convenient method for remotely controlling access to a physical space or object using an Arduino , Bluetooth communication, and a solenoid valve. The project leverages the capabilities of Arduino and wireless communication to enable a mobile app to send commands to lock and unlock the solenoid valve. This guide provides a comprehensive, step-by-step approach to help you navigate the construction, programming, and fine-tuning phases of your voice-controlled wheelchair. Here’s a step-by-step guide to get you started: Components required for Smart Door Lock using Arduino • Arduino Uno R3: The main microcontroller that will process sensor data and control the motors. • Bluetooth module (HC-05): This module enables wireless communication between the users’ smartphones. • Electric lock (solenoid lock): This locking system is used for the locking mechanism as per the user’s requirements. • Relay module: The relay module is an electrical switch that is operated by an electromagnet to either open or close an electric circuit. • 18659 Battery and battery holder: Here battery is used as the main power supply to the system. • Jumper wires: These are the cables that are used to make the connections. • Base: Use a wooden base or foam board. Hardware Assembly • Gather Components: Make sure you have all the necessary components listed earlier. • Electric locking system: Take the base as your requirement and place the solenoid lock on the base. • Microcontroller: Place Arduino uno to the base the same way as the solenoid lock.• Bluetooth module (HC-05): Same way place the Bluetooth module on the base and connect Bluetooth module RX, TX to Arduino uno TX, RX and connect Bluetooth ground to Arduino ground. Then Bluetooth VCC to Arduino 5V. • Relay module: Place the relay module to the base then connect the relay module pin(IN) to Arduino digital pin 3, same way relay VCC to Arduino 5V, relay ground to Arduino ground. Connect one of the relay output pins to the solenoid and another to the power supply. • Power supply: Same way place the battery holder to the base and provide the required power supply (18659 Battery). Working of Smart Door Lock using Arduino • User interface: The application is developed to build communication between users and Bluetooth module. • Bluetooth module: Here Bluetooth receives the command from the application and sends it to the microcontroller (Arduino UNO). • Microcontroller: Here Arduino processes the command received through Bluetooth from the application and sends signals to the relay module. • Relay module: The relay module receives the signal from Arduino and acts as an electric switch between the power supply and solenoid. • Power supply: 18659 Battery supply power to entire system Circuit Diagram of Smart Door Lock using Arduino Pin Connection Following are the pin connections needed to be done for Smart Door Lock using Arduino. • Connect the Bluetooth module VCC-GND-TX-RX to 5V-GND-RX (Pin 10)-TX (Pin 11) of Arduino uno R3. • Connect Relay IN-GND-VCC to D3-GND-VCC of Arduino Uno R3 • Connect to Relay out COM-NC to Power terminal positive (+) in-out to Solenoid valve Positive. • Connect 7805, Mosfet respect to circuit diagram input-GND-Output to Solenoid valve • Connect Arduino uno R3 Vin to Positive (+) bread board. • Connect Arduino uno R3 GND to negative (-) bread board. Software Programming To implement smart lock system using arduino, the following software part has to be done. • Set Up Arduino IDE • Download and install the Arduino IDE (Integrated Development Environment) from the official Arduino website: Arduino Software. • Open the Arduino IDE and make sure your Arduino board is selected under the “Tools” menu. Choose the appropriate board type (e.g., Arduino Uno) and the port your board is connected to laptop. • Install the Arduino IDE and libraries: Bluetooth library, Speech Recognition library (e.g., Julius, Sphinx) • Upload the Arduino code to the board. • Install the Android app on your smartphone. • Pair the Bluetooth module with your smartphone. • Open the app and configure the controls. App Setup App Set-up: Download the BT Voice Control for Arduino from Google Play store. Turn on your device Bluetooth then select Bluetooth name HC-05 after that use Button and slider use it. Code for Smart Door Lock using Arduino Conclusion • Test the wheelchair in a safe environment and adjust as necessary for optimal performance and user comfort. • Choose high-quality components for reliable and safe operation. • Follow proper circuit diagrams and safety guidelines during construction. • Test the wheelchair thoroughly in a controlled environment before using it in public.• Regularly maintain the wheelchair for optimal performance and safety.
Human following robot using Arduino The human following robot using arduino project utilizes Arduino Uno, an ultrasonic sensor, and an L298N motor driver for obstacle detection and navigation. The robot, driven by code, halts and turns when obstacles are sensed, showcasing a basic form of autonomous behavior. This project encompasses hardware integration, software programming, and iterative testing to optimize performance. The goal is to create a versatile robot capable of dynamically navigating its environment, Let’s get started. Components Required These are the components required to build a Circuit diagram of Human following robot using Arduino. • Arduino Uno R3: The main microcontroller that will process sensor data and control the motors. • Ultrasonic sensor: This module enables wireless communication between the users’ smartphones. • Motor driver L298N: To control the speed and direction of the motors. Popular choices include the L298N motor driver. • DC motors (4-wheel movement): These drive the wheels and are controlled by the motor controller. • Castor Wheel: A castor wheel is a small wheel placed at the front or back of the robot for stability. It helps the robot maintain balance and makes it easier to turn. • Battery pack: To power up the entire controller and motor driver. • Jumper wires: These flexible wires connect various components on the breadboard or directly on the circuit board. • Breadboard (optional): This provides a convenient platform for prototyping and testing the circuit before final assembly. • Construction materials (plywood, acrylic, aluminum) Hardware Assembly for Human following robot using Arduino • Gather Components: Make sure you have all the necessary components listed earlier. • Mount Motors on the chassis: Attach the motors to the chassis or frame of the robot. Most motors come with brackets that can be screwed onto the chassis. Attach wheels to the motor shafts. • Connect Motors to L298N Motor driver: Connect the motor terminals to the OUT1, OUT2, OUT3, and OUT4 of the L298N motor driver. Typically, motors have two wires each – connect one wire from each motor to OUT1 and OUT2, and the other two wires to OUT3 and OUT4. • Connect L298N to Arduino: Connect the IN1, IN2, IN3, and IN4 pins of the L298N motor driver to digital pins on the Arduino (e.g., D4, D5, D6, D7). Also, connect the VCC and GND of the motor driver to a suitable power source. • Connect Ultrasonic sensor: Connect the ultrasonic sensor to the Arduino. Connect VCC to 5V, GND to GND, Trig to a digital pin (e.g., D2), and Echo to another digital pin (e.g., D3). • Power supply: Connect a power source (battery or power bank) to the Arduino and the motor driver. Ensure that the voltage is appropriate for both the Arduino and the motors. • Jumper wires: Use jumper wires to make the necessary connections between components on the breadboard or directly if you are not using a breadboard. • Mount Arduino and breadboard: Attach the Arduino and the breadboard to the robot chassis. You can use adhesive materials, brackets, or any suitable method to secure them in place. • Final check: Double-check all connections to ensure that they are correct and secure. Make sure there are no loose wires that could cause a short circuit. Working of Circuit diagram of Human following robot using Arduino • Ultrasonic Sensor (HC-SR04): The ultrasonic sensor is used to measure the distance between the robot and an obstacle in front of it. The sensor sends out ultrasonic waves and calculates the time it takes for the waves to bounce back. This information is used to determine the distance to the obstacle. • Arduino Code: The Arduino code continuously reads the distance from the ultrasonic sensor. If the measured distance is within a specified range (in this case, less than 30 cm), the code triggers the robot to stop moving. After a brief delay, the robot is programmed to turn left, the robot then resumes moving forward. • Motor Control (L298N Motor Driver): The L298N motor driver is responsible for controlling the motors connected to the robot’s wheels. The move Forward, stop Motors, and turn Left functions in the Arduino code control the motor driver to achieve the desired movements. • Power Supply: The power supply, typically a battery or power bank, provides the necessary power to the Arduino, motors, and motor driver. • Behavior: In summary, the robot moves forward until it detects an obstacle. Upon detection, it tops, turns left, and then continues moving forward. This cycle repeats as the robot navigates its environment. Circuit Diagram for Circuit diagram of Human following robot using Arduino Pin Connection • Connect the ultrasonic sensor VCC-Trig-Echo-GND to 5v-Digital 2-3-GND of Arduino Uno: • Connect the L298N ENA- IN1-IN2-IN3-IN4 motor driver to Digital 8-4-5-6-7 of Arduino Uno • Connect Motor Driver Out 1 out 2 to Gear motor 1 Gear motor 2. • Connect Arduino uno R3 Vin to Positive (+) bread board. • Connect Arduino uno R3 GND to negative (-) bread board. • Connect motor driver 12v – GND to Bread board positive (+) – Negative (-). • Connect 9v or 5v Battery to Bread board positive (+) and Negative (-) terminal. Software Programming • Set Up Arduino IDE, this is main software for coding the Human following robot using Arduino • Download and install the Arduino IDE (Integrated Development Environment) from the official Arduino website: Arduino Software. • Open the Arduino IDE and make sure your Arduino board is selected under the “Tools” menu. Choose the appropriate board type (e.g., Arduino Uno) and the port your board is connected to laptop. • Library Inclusion: The code includes the NewPing library for working with the ultrasonic sensor.• Upload the Arduino code to the board. Code for Circuit diagram of Human following robot using Arduino Conclusion • Power On and Obstacle Detection: Turn on the Human following robot using Arduino, test obstacle detection by placing objects in its path, and observe its stopping and turning behavior. • Behavior Observation: Evaluate
Voice controlled wheel chair using Arduino Voice controlled wheel chair using arduino is a revolutionary invention that empowers individuals with mobility challenges to control their movement using spoken commands. This project combines the power of Arduino, Bluetooth communication, and voice recognition software to create a user-friendly and accessible wheelchair experience. This guide provides a comprehensive, step-by-step approach to help you navigate the construction, programming, and fine-tuning phases of your voice-controlled wheelchair. Here’s a step-by-step guide to get you started: Components Required • Arduino Uno R3: The main microcontroller that will process sensor data and control the motors. • Bluetooth module HC-05: This module enables wireless communication between the users’ smartphones. • Motor driver L298D: To control the speed and direction of the motors. Popular choices include the L298D motor driver. • DC motors (2 for wheelchair movement): These drive the wheels and are controlled by the motorcontroller. • Battery pack: To power up the entire controller and motor driver. • Wheelchair frame: This provides structural support for the entire system, including electronics and motors. • Jumper wires: These flexible wires connect various components on the breadboard or directly on the circuit board. • Breadboard (optional): This provides a convenient platform for prototyping and testing the circuit before final assembly. Hardware Assembly • Assemble the electronics: Connect the Arduino, Bluetooth module, motor driver, and DC motors according to the circuit diagram. • Program the Arduino: Use the Arduino IDE to write code that receives Bluetooth commands, interprets them, and controls the motors accordingly. • Install the Android App – BT Voice Control for Arduino (Google Playstore) • Connect the battery pack: This provides power to the entire system. • Mount the electronics: Secure the electronics on the wheelchair frame for safe and efficient operation. Working of Voice controlled wheel chair using Arduino • Voice Recognition: The user speaks a command into the microphone, which is converted into text by the speech recognition module. • Bluetooth Communication: The microphone sends the audio signal to the Arduino, the text command is transmitted wirelessly via Bluetooth to the Arduino board. • Command Processing: The Arduino uses the speech recognition library to convert the audio to text. The Arduino interprets the received command and determines the appropriate action. • Motor Control: The Arduino translates the text to a specific motor control command based on pre-programmed commands (e.g., forward, backward, left, right, stop). The motor driver controls the DC motors to move the wheelchair according to the command. • Adjust the speed of the wheelchair through voice commands like “faster,” “slower,” or specific speed values. • Control the sharpness of turns by specifying the turning radius through voice commands. Circuit Diagram of Voice controlled wheel chair using Arduino Pin Connection • Connect the Bluetooth module VCC-GND-TX-RX to 5V-GND-RX (Pin 10)-TX (Pin 11) of Arduino uno R3. • Connect the motor driver VCC-GND-ENA-IN1-IN2-IN3-IN4 to Digital pins 6- 2-3-4-5 of the Arduino. • Connect Motor Driver Out 1 out 2 to Gear motor 1 Gear motor 2. • Connect Arduino uno R3 Vin to Positive (+) bread board. • Connect Arduino uno R3 GND to negative (-) bread board. • Connect motor driver 12v – GND to Bread board positive (+) – Negative (-). • Connect 9v or 5v Battery to Bread board positive (+) and Negative (-) terminal. Software Programming • Set Up Arduino IDE • Download and install the Arduino IDE (Integrated Development Environment) from the official Arduino website: Arduino Software. • Open the Arduino IDE and make sure your Arduino board is selected under the “Tools” menu. Choose the appropriate board type (e.g., Arduino Uno) and the port your board is connected to laptop.• Install the Arduino IDE and libraries: Bluetooth library, Speech Recognition library (e.g., Julius, Sphinx) • Upload the Arduino code to the board. • Install the Android app on your smartphone. • Pair the Bluetooth module with your smartphone. • Open the app and configure the controls. App Set-up: Download the BT Voice Control for Arduino from Google Play store. Turn on your device Bluetooth then select Bluetooth name HC-05 after that use Voice control. Code for Voice controlled wheel chair using Arduino Testing and Calibration • Test the wheelchair in a safe environment and adjust as necessary for optimal performance and user comfort. • Choose high-quality components for reliable and safe operation. • Follow proper circuit diagrams and safety guidelines during construction. • Test the wheelchair thoroughly in a controlled environment before using it in public. • Regularly maintain the wheelchair for optimal performance and safety.
Self Balancing Robot using Arduino Creating a two-wheeled self-balancing robot using Arduino is an exciting and challenging project that can teach you a lot about electronics, programming, and robotics. The essence of this project lies in the synergy between hardware and software. Mechanical components, including motors, wheels, and a sturdy chassis, form the physical foundation, while the Arduino serves as the brain, orchestrating the delicate dance of motor control to keep the robot upright, this guide provides a comprehensive, step-by- step approach to help you navigate the construction, programming, and fine-tuning phases of your self- balancing robot. Here’s a step-by-step guide to get you started: Components Required for Self Balancing Robot using Arduino • Arduino Uno R3: The main microcontroller that will process sensor data and control the motors. • MPU6050 6-axis accelerometer/gyroscope sensor: An accelerometer and gyroscope combo sensor to measure the robot’s tilt and angular velocity. • Two DC Gear motors: These drive the wheels and are controlled by the motor controller. • Motor driver L298D: To control the speed and direction of the motors. Popular choices include the L298D motor driver. • Battery pack 9v or 5v: To power up the entire controller and motor driver. • Jumper wires: connection purpose • Construction materials (plywood, acrylic, aluminum) Hardware Assembly Build the robot frame: Construct a sturdy frame using plywood, acrylic, or aluminum. The frame should have two upright supports and a platform for mounting the electronics and motors. Attach the motors: Mount the motors on the frame, ensuring they are aligned properly and have sufficient clearance for the wheels. Connect the motors to the motor driver board: Use jumper wires to connect the motors to the motor driver board according to the manufacturer’s instructions. Connect the sensor to the Arduino: Connect the MPU6050 sensor to the Arduino using jumper wires according to the sensor’s datasheet. Power the system: Connect the battery pack to the Arduino and motor driver board, ensuring proper polarity. Working of Self Balancing Robot using Arduino • Sensors: The robot uses an accelerometer and gyroscope to measure its tilt angle and angular velocity. The accelerometer measures the robot’s tilt in the three dimensions (X, Y, Z), while the gyroscope measures the rate of rotation around each axis. • Microcontroller: The microcontroller, typically an Arduino board, receives data from the sensors and processes it to determine the robot’s current position and orientation. It also calculates the necessary adjustments to maintain balance. • Motor Control: The microcontroller sends control signals to the motor driver board, which controls the speed and direction of the two motors. The motor driver receives the control signals and adjusts the motor speeds accordingly to execute the desired movement. • PID Control: The microcontroller employs a PID (Proportional-Integral-Derivative) control algorithm to adjust the motor speeds in real-time. The PID algorithm considers the current angle, the rate of change of the angle, and the error between the target angle and the current angle. • Balancing Mechanism: When the robot begins to tilt, the sensors detect the change in angle. The microcontroller calculates the necessary adjustments using the PID algorithm and sends control signals to the motor driver. The motor driver adjusts the motor speeds to counteract the tilt and maintain balance. • Continuous Correction: The PID control algorithm continuously monitors the sensor data and adjusts the motor speeds, accordingly, ensuring that the robot remains upright despite external disturbances or uneven surfaces. • Feedback Loop: The balance system operates in a feedback loop, constantly receiving sensor data, processing it, and adjusting maintain the desired position. This feedback loop ensures that the robot remains stable and upright. Circuit Diagram for Self Balancing Robot using Arduino Connections required for Self Balancing Robot using Arduino • Connect MPU-6050 SCL – SDA – Int to A5 – A4 – D2 Arduino uno R3. • Connect Motor Driver L298N I1 – I2 – I3 – I4 to Digital pin 2 – 3 – 4 – 7 Arduino uno R3. • Connect Motor Driver ENB – ENA -to digital pin 5 – 6 Arduino uno R3. • Connect Motor Driver Out 1 out 2 to Gear motor 1 Gear motor 2. • Connect Arduino uno R3 Vin to Positive (+) bread board. • Connect Arduino uno R3 GND to negative (-) bread board. • Connect motor driver 12v – GND to Bread board positive (+) – Negative (-). • Connect 9v or 5v Battery to Bread board positive (+) and Negative (-) terminal. Software Part for Self Balancing Robot using Arduino : • Set Up Arduino IDE • Download and install the Arduino IDE (Integrated Development Environment) from the official Arduino website: Arduino Software. • Open the Arduino IDE and make sure your Arduino board is selected under the “Tools” menu. Choose the appropriate board type (e.g., Arduino Uno) and the port your board is connected to. • Step 2: Install MPU6050 Library • In the Arduino IDE, go to “Sketch” > “Include Library” > “Manage Libraries.”• In the Library Manager, type “MPU6050” into the search bar. • Look for the “MPU6050” library by Jeff Rowberg and click “Install.” • Step 3: Write the Control Code • Open a new sketch in the Arduino IDE and start writing your control code. Use the following pseudocode as a starting point. • Write the control algorithm: The control algorithm is the heart of the robot’s balancing system. It will continuously read sensor data and adjust the motor speeds to maintain balance. Code for Self Balancing Robot using Arduino Testing and Calibration • Place the robot on a flat surface: Start by testing the robot on a flat, level surface to ensure it can maintain balance without any external disturbances. • Introduce gradual disturbances: Once the robot is balancing consistently, introduce gradual disturbances to test its responsiveness and ability to recover from imbalances. • Verify the proper connection of sensors (accelerometer and gyroscope) to the Arduino. • Confirm the correct wiring of motors and actuators. Check power sources and voltage levels.
7 Segment display interfacing with PIC Microcontroller A seven segment display can be used to generate a number from 0 to 9, it consists of 7 bar like LEDs arranged in the shape of the number 8, and another dot shaped LED at the bottom right. These LEDs are identified clockwise from the top as letters from a to g. These displays have 9 pins, the first 8 for the LEDs and the 9th pin is the common pin. There are two types of 7 segment displays: 1. Common cathode display: The cathodes of the LEDs are connected to the ground. To do this we connect the common pin to the ground and the LED pins to the microcontroller. 2. Common anode display: The anodes of the LEDs are connected to the ground. To accomplish this, the common pin is given a positive voltage and the LED pins are connected to the ground. In our project, we will be using the common cathode type configuration. The truth table for displaying each number is shown below. The arrangement of the binary values for each of the numbers can be written in hexadecimal format and fed to the microcontroller. Aim: To interface 7 segment display with PIC16F877A Procedure: 1. Open MPLAB and make a new project.2. Make a new “main.c” file.3. Write down the code for 7 segment display.4. Click on build.5. Now go to Proteus and set up the components as seen in the video.6. Double click on the microcontroller and set processor clock frequency as 20 mHz and open the. hex file of the program you just wrote in program file field.7. On the bottom left corner, click on run. Code:
DMA full form is Direct Memory Access. This is basically accessing memory directly with less to no involvement of the processor. DMA BASED I/O Direct Memory Access refers to data movement between memory and I/O. Due to two factors, DMA transfers are significantly faster than processor-based transfers. 1.Since they are hardware based, fetching and decoding instructions don’t take up any time. 2. Data is transferred straight from memory to I/O without passing through the processor. We require a DMA Controller like the 8237 or 8257 in order to do a DMA transfer. It has the ability to usurp the Processor’s authority over the buses. This is how the procedure is carried out. 1) The bus master is by default the processor. 2) The CPU initialises the DMA transfer parameters first. 3) The processor sets the starting address and the amount of bytes to be transferred in two registers called CAR and CWCR inside the DMAC. 4) DMAC now checks the DREQ signal to see if the I/O device is prepared for the transfer. 5) If DREQ=1, DMAC sends a HOLD signal to the processor asking for system bus management. 6) Following the completion of the current machine (bus) cycle, the processor releases control of the bus. 7) The processor notifies DMAC that it is now the bus master by sending HLDA. 8) When the transfer is about to start, DMAC sends the I/O device a DACK# signal, which is by default active low but can be altered. 9) DMAC now sends one byte per cycle. 10) The Address register and Count register are both decremented by 1 following each byte transfer. 11) The Terminal Count or “0” is reached by repeating this until it reaches the desired number. 12) The transfer is now finished. 13) DMAC makes HOLD = 0 and hands back the system bus to the processor. 14) The processor regains control of the bus. Advantage of DMA The speed of DMA transfers is an advantage. Drawback of DMA DMAC takes over as the bus master. The bus is already being occupied for DMA, hence the processor is unable to conduct any operations during DMA cycles. Processor is still in the HOLD state. Difference between Interrupt Request and DMA request When an interrupt happens, the processor must pause the running programme, run the interrupt handler, and then move on to the next main programme instruction. As a result, the CPU must finish the current instruction before responding to an interrupt request. The CPU only needs to enter hold state and give up control of the system bus in response to a DMA request. When the bus arrives again, it can pick up where it left off. Because of this, the processor is not required to complete the current instruction before handling a DMA request. It only needs to complete the ongoing machine cycle. Therefore, machine cycles are DMA breakpoints while instruction cycles are interrupt breakpoints. TYPES / METHODS / TECHNIQUES OF DMA TRANSFERS 8237 has four modes of data transfer: 1) BLOCK TRANSFER MODE / BURST MODE. The DMAC is configured to transfer ALL THE BYTES in this mode in a single DMA transaction. The CAR and CWCR are modified once a byte has been transmitted. ONLY when all of the bytes have been sent is the system bus brought back to the processor. Although it is the quickest type of DMA, it uses the processor for extended periods of time. 2) SINGLE BYTE TRANSFER MODE/ CYCLE STEALING. Once the DMAC assumes control of the bus, it will only transfer ONE BYTE before giving the bus back to the processor. DMAC will once more take the bus from the CPU when one bus cycle has been completed by it. As a result, the processor and DMAC are constantly stealing bus cycles from one another. Because it keeps the CPU running in the background, it is the most often used DMA technique. The CAR and CWCR are modified once a byte has been transmitted. 3) DEMAND TRANSFER MODE. The only difference between it and Block Transfer is that the DREQ must be engaged throughout the entire DMA process. Please refer to Bharat Sir’s lecture notes for more information on this if the DREQ signal drops while the procedure is being performed. The CPU can carry on with its own tasks in the interim. The DMA procedure resumes where it left off once DREQ is high once more. This indicates that the transfer occurs when requested by the I/O device, thus the name. 4) HIDDEN MODE / TRANSPARENT MODE. In this mode, the DMAC does not ask the processor for bus control after the CPU has programmed all settings inside the DMAC. It instead keeps an eye on the processor. It watches for the processor to go into standby mode. ThelDMAC will take control of the bus and complete the Transfer as soon as the CPU is unoccupied. Therefore, the Transfer is completely invisible to or hidden from the processor. Thus, the name. To read wikipedia of DMA Click Here Also Read RISC vs CISC. RISC CISC directions with a set size instructions with different sizes Most instructions fetch in the same amount of time. There are varied fetching times for instructions. Instructions are brief and easy. Complex and extensive instruction set. Simple is the compiler design. Complexity of compiler design The total size of the programme is vast since simple instructions need many to complete a task. Fewer instructions are needed to complete a task than would otherwise be necessary due to instructions’ increased complexity and power. A set amount of operands is used by instructions. Operands in instructions might vary in number. Perfect for processors running a specific operation. Perfect for processors carrying out a variety of tasks. Because they are straightforward, instructions can be interpreted by a hardwired control unit. Micro-programmed A Control Unit is necessary for instructions because they are complicated. Since most operations are register-based, execution speed is faster. Because most operations are memory-based,
Here in this blog, four important topics are listed: Programmed I/O , Interrupt driven I/O , Maskable Interrupt and Non Maskable Interrupt. PROGRAMMED I/O 1) In this case, the processor completely controls the data transfer between the processor and the I/O Devices. 2) Because the transfer is carried out by a special programme, the technique is also known as programmed I/O. 3) The CPU examines the state of each I/O device on a regular basis to see if any of them needs to execute any data transfers. 4) Since polling is another name for checking a device’s status, the technique is also known as polled I/O. 5) The processor will complete the transfer with any device that is prepared for it before moving on to the next. Advantage It is the most straightforward and hardware-free of the four data transport techniques. Drawback Its primary flaw is that it consumes a significant amount of processor time to continuously verify the condition of all the devices. INTERRUPT DRIVEN I/O 1) The transfer is not started by the processor in interrupt-driven I/O. 2) As an alternative, an I/O device must interrupt the processor in order to perform a data transfer with it. 3) An interrupt is a circumstance that forces the execution of an ISR (Interrupt Service Routine) by the processor. 4) The processor will transfer data to the I/O device during the ISR. 5) This frees the processor from having to check the status of every I/O device on a regular basis, which helps the processor save time. 6) The processor is allowed to do its own business. 7) A device will interrupt the processor whenever it needs to transfer data. This many I/O devices are present 8) The number of I/O devices that the processor can communicate with. 9)For instance: Keyboard. The keyboard interrupts the processor when a key is pushed, rather than the CPU constantly checking to see if a key is pressed. The CPU will read the data from the keyboard’s ISR, which is a component of the keyboard driver software. 10)Consequently, interrupt-driven I/O is superior to polled (or programmed) I/O. INTERRUPT HANDLING MECHANISM 1) The CPU completes the current instruction when an interrupt happens. 2) After then, the running programme is suspended and an ISR is run. In order to do this, it Pushes the value of PC (the address of the subsequent instruction) into the stack. 4) The ISR is now loaded into the PC and is being executed. 5) It POPs the return address off the stack and loads it back into the PC at the conclusion of the ISR. 6) This is how the processor navigates to the program’s very next instruction. INTERRUPT DRIVEN I/O POLLING (PROGRAMMED I/O) Every time an I/O device has to transfer data, it interrupts the processor. Each I/O device’s state is frequently checked (called a “poll”) by the processor to determine whether it needs to conduct a data transfer. Processor saves system time since it is free to conduct its own processes. System time is lost since the processor is constantly scanning all I/O devices. To manage interruptions, more hardware is needed. E.g.:: 8259 controller for programmable interrupts. No additional hardware is necessary. increases the system’s cost and complexity. System is simpler and less expensive. Either software or hardware must be used to manage interrupt priority. No such problem. IVT, or an interrupt vector table, must be used to hold interrupt vector addresses (ISR Addresses). No such problem. Types of interrupts : 1. VECTORED AND NON VECTORED INTERRUPTS: 2. MASKABLE INTERRUPTS AND NON MASKABLE INTERRUPTS An interrupt that has a masking feature can be turned off. If this interrupt is disabled, the processor will simply ignore it and carry on with the main programme whenever it occurs. These interrupts are typically used to handle non-critical, low priority events like keyboard pushes that can be readily deactivated (the keypad can be locked). Such interrupts belong to this maskable interrupt and non maskable interrupts. For instance, the 8086’s INTR interrupt is deactivated when the interrupt flag is set to 0. An interrupt that cannot be turned off is referred to as non-maskable. The CPU will need to respond to this interrupt each time it happens. These interruptions are typically utilised to manage urgent, life-or-death situations, including the mother board overheating or a power outage. For instance, the 8086’s NMI interrupt (which is never disabled) 3. SOFTWARE AND HARDWARE INTERRUPTS Based on how the interruption happens, this. A software interrupt is one that results from the writing of an instruction. Software interruptions are predictable occurrences that the programmer causes. E.g.:: The 8086’s INT n instruction (n can range from 0 to 255) A hardware interrupt is one that is brought on by a signal on an external pin. Unpredictable occurrences called hardware interrupts are produced by external devices. For instance: 8086’s NMI and INTR pins Also read about DMA, where processor is not involved in between memory and I/O communication.