Saturday, June 14, 2025

Traffic Light using Arduino - A Beginner Project

 

  • Traffic Light using Arduino - A Beginner Project


  • Introduction

    In this project I will Demonstrate you how to make a very simple and very cool traffic light Using Arduino.

    This project will involve using a little a bit of code and a very simple circuit that’s great for beginners.

    The video further down this page will go through all the steps to completing this cool traffic light project.

    This simple little project uses an Arduino and some LEDs to replicate a traffic light. It uses code as an internal timer and continues to run until you cut the Arduino's power supply.

Working on Basics

The LED have been powered by Arduino UNO (Board). It contains a code which uploaded to the board. And once it simulated LED Start's blinking like a traffic light. In this 15 Second will for Red Light 6 Second for Yellow Light (In my Project Blue) and 20 Second for Green Light.

Usage

There is multiple usage of the project:-

  1. If you are beginner so it is a intro to arduino
  1. You can Make a real but small Traffic Light using it
  1. You can also add more LED and Can change as per your usgae






code 

int red = 9;
int yellow = 8;
int green = 7;

void setup(){
  
  pinMode(red, OUTPUT);
  pinMode(yellow, OUTPUT);
  pinMode(green,  OUTPUT);
  
}
void loop(){
digitalWrite(red, HIGH);
 delay(15000);
digitalWrite(red,  LOW);
  
  digitalWrite(yellow, HIGH);
delay(1000);
  digitalWrite(yellow,  LOW);
delay(500);

  digitalWrite(yellow, HIGH);
delay(1000);
  digitalWrite(yellow,  LOW);
delay(500);

  digitalWrite(yellow, HIGH);
delay(1000);
  digitalWrite(yellow,  LOW);
delay(500);
  
  digitalWrite(yellow, HIGH);
delay(1000);
  digitalWrite(yellow, LOW);
delay(500);
  
  digitalWrite(yellow, HIGH);
delay(1000);
  digitalWrite(yellow, LOW);
delay(500);
  
digitalWrite(green, HIGH);
delay(20000);
digitalWrite(green,  LOW);
//  
digitalWrite(yellow, HIGH);
delay(1000);
  digitalWrite(yellow,  LOW);
delay(500);

  digitalWrite(yellow, HIGH);
delay(1000);
  digitalWrite(yellow,  LOW);
delay(500);

  digitalWrite(yellow, HIGH);
delay(1000);  
  digitalWrite(yellow, LOW);
delay(500);
  
  digitalWrite(yellow, HIGH);
delay(1000);
  digitalWrite(yellow, LOW);
delay(500);
  
  digitalWrite(yellow, HIGH);
delay(1000);
  digitalWrite(yellow, LOW);
delay(500);
  
  
}


  • "This Content Sponsored by Buymote Shopping app

    BuyMote E-Shopping Application is One of the Online Shopping App

    Now Available on Play Store & App Store (Buymote E-Shopping)

    Click Below Link and Install Application: https://buymote.shop/links/0f5993744a9213079a6b53e8

    Sponsor Content: #buymote #buymoteeshopping #buymoteonline #buymoteshopping #buymoteapplication" 

Sunday, May 11, 2025

stepper motor with Intel 8051 Microcontroller

 

Stepper Motor

Stepper motors are used to translate electrical pulses into mechanical movements. In some disk drives, dot matrix printers, and some other different places the stepper motors are used. The main advantage of using the stepper motor is the position control. Stepper motors generally have a permanent magnet shaft (rotor), and it is surrounded by a stator. 




  • Step Angle  − The step angle is the angle in which the rotor moves when one pulse is applied as an input of the stator. This parameter is used to determine the positioning of a stepper motor.

  • Steps per Revolution  − This is the number of step angles required for a complete revolution. So the formula is 360° /Step Angle.

  • Steps per Second  − This parameter is used to measure a number of steps covered in each second.

  • RPM  − The RPM is the Revolution Per Minute. It measures the frequency of rotation. By this parameter, we can measure the number of rotations in one minute.



The motor is rotated by applying a certain sequence of control signals. The speed of rotation can be changed by changing the rate at which the control signals are applied.

Various stepper motors with different step angles and torque ratings are available in the market.

A microcontroller can be used to apply different control signals to the motor to make it rotate according to the need of the application.

For more information about Stepper Motor and how to use it, refer to the topic Stepper Motor in the sensors and modules section.

  • Here we are going to interface 6 wires Unipolar Stepper Motor with an 8051 controller.
  • Only four wires are required to control the stepper motor.
  • Two common wires of the stepper motor are connected to the 5V supply.
  • ULN2003 driver is used to driving the stepper motor.
  • Note that to know the winding coil and their center tap leads measure resistance in between leads. From center leads, we will get half the resistance value of that winding.

 The following table is showing the sequence of input states in different windings.

Steps
Winding A
Winding B
Winding C
Winding D
1
1
0
0
0
2
1
1
0
0
3
0
1
0
0
4
0
1
1
0
5
0
0
1
0
6
0
0
1
1
7
0
0
0
1
8
1
0
0
1
  • "This Content Sponsored by Buymote Shopping app

    BuyMote E-Shopping Application is One of the Online Shopping App

    Now Available on Play Store & App Store (Buymote E-Shopping)

    Click Below Link and Install Application: https://buymote.shop/links/0f5993744a9213079a6b53e8

    Sponsor Content: #buymote #buymoteeshopping #buymoteonline #buymoteshopping #buymoteapplication" 

Sunday, April 27, 2025

PERIPHERAL INTERFACING

 Microprocessor based system design involves interfacing of the processor with one or more peripheral devices for the purpose of communication with various input and output devices connected to it. 

During the early days of the microprocessor revolution, these techniques required complex hardware consisting of Medium scale integration devices making the design highly complex and time consuming. So, the manufacturers (INTEL) have developed a large number of general and special purpose peripheral devices most of them being single chip circuits. 

They are also programmable devices. Hence these peripheral devices are found to be of tremendous use to a system designer.


Peripheral devices can broadly be classified into two categories.

(a) General purpose peripherals and

(b) Special purpose peripherals (Dedicated function peripherals)

General purpose peripheral devices that perform a task but may be used for interfacing a variety of I/O devices to microprocessor. The general purpose devices are given below:


Simple I/O -- (Non-programmable)

 Programmable peripheral Interface (PPI) – (8255)

 Programmable Interrupt Controller – (8259)

 Programmable DMA Controller – (8237/8257)

 Programmable Communication Interface – (8251)

 Programmable Interval Timer – (8253/8254)



Special function peripherals are devices that may be used for interfacing a microprocessor to a specific type of I/O device. These peripherals are more complex and therefore, relatively more expensive than general purpose peripherals. The special function peripherals (Dedicated function peripherals) are

Programmable CRT Controller

 Programmable Floppy Disc Controller

 Programmable Hard Disc Controller

 Programmable Keyboard and display interface.

The functioning of these devices varies depending on the type of I/O device they are controlling.



  • "This Content Sponsored by Buymote Shopping app

    BuyMote E-Shopping Application is One of the Online Shopping App

    Now Available on Play Store & App Store (Buymote E-Shopping)

    Click Below Link and Install Application: https://buymote.shop/links/0f5993744a9213079a6b53e8

    Sponsor Content: #buymote #buymoteeshopping #buymoteonline #buymoteshopping #buymoteapplication" 

Monday, April 14, 2025

Microprocessor - I/O Interfacing Overview

 In microprocessors and microcontrollers, the Input-Output (I/O) Interfacing is a very important concept which acts as a communication medium between the processor, memory unit, and other peripheral devices. I/O interfacing is crucial for ensuring effective transfer of data and information between internal and external components of a computing system.


What is I/O Interfacing?

I/O interfacing, also referred to as input-output interfacing, is nothing but a way of enabling effective communication between the processor and the peripheral devices like memory, keyboard, mouse, etc.

I/O interfacing ensures smooth exchange of data and information among different components of the system. It optimizes the system operation by reducing the differences between data transfer speeds, formats, and operations between the processor and other devices.

Functions of I/O Interfaces

I/O interfacing in a microprocessor- or microcontroller-based system performs the following key functions −

  • It provides synchronization between the operational speeds of the processing unit and the peripheral devices.
  • It allows for selecting an appropriate device for processing input or output signals.
  • It also generates control and timing signals.
  • It makes use of the data bus to enable data buffering.
  • It also identifies errors during exchange of data.
  • It also allows for converting serial data into parallel and vice-versa, or digital data into analog signals and vice-versa.

This structure comprises several components which are explained below in detail −

  • Data Bus Buffer − This component of the I/O interfacing unit allows bidirectional communication between the processor and the internal system bus. It enables exchange of data, control words, and status information.
  • RD/WR Control Logic − It is the Read/Write Control Logic block that generates control signals for operation of various system components. It is responsible for directing the flow of data between the processor and the I/O devices. This block determines the direction of data transfer as follows −
    • In read mode, it directs the data flow from input-output devices to the processor.
    • In write mode, it directs the data flow from the processor to the input-output devices.
  • Port A and B − These ports are interfacing points for connecting input-output devices with the internal system bus. Each of these two ports has a bidirectional buffer for smooth exchange of data.
  • Control and Status Register − These components hold control signals from the processor and use them to determine the status of the port, data transfer, and errors.


Addressing in I/O Interfacing

The processor uses the address bus for selecting the interfacing unit. For this purpose, two least significant lines of the address bus namely, A0 and A1 are used as the select lines S0 and S1 respectively. These two select lines are used for selecting any of the four interfacing registers namely, port A, port B, control register, or status register.

The selection of a specific interfacing unit is done as per the following criteria −

Read State

Chip SelectOperationSelect LinesSelected I/O Interface
CSRead (RD)Write (WR)S0S1
00100Port A
00101Port B
00110Control Register
00111Status Register

Write State

Chip SelectOperationSelect LinesSelected I/O Interface
CSRead (RD)Write (WR)S0S1
01000Port A
01001Port B
01010Control Register
01011Status Register

Lets understand this selection of interfacing unit with the help of an example.

  • For S0 S1 = 0 1, the Port B data register is selected for exchange of data between the processor and the I/O devices.
  • For S0 S1 = 1 0, the control register is selected to store the control information produced by the processor.

Applications of I/O Interfacing

The following are some key applications of input-output interfacing –

  • I/O interfacing allows different peripheral devices to connect to a microprocessor or a microcontroller or a computing system.
  • It also allows for efficient file access without any information related to structure of the files.
  • I/O interfacing also plays an important role in data acquisition and processing.
  • I/O interfacing is used in industrial control system to connect processors with sensors and control devices.
  • I/O interfacing is employed in multimedia systems to handle input and output audio and video signals.
  • In network communication systems, I/O interfacing is used to manage data packets, routing, processing, encryption, and decryption.
  • I/O interfacing also allows peripheral devices to connect or disconnect to a microprocessor or a microcontroller without affecting the operation of other components.
  • "This Content Sponsored by Buymote Shopping app

    BuyMote E-Shopping Application is One of the Online Shopping App

    Now Available on Play Store & App Store (Buymote E-Shopping)

    Click Below Link and Install Application: https://buymote.shop/links/0f5993744a9213079a6b53e8

    Sponsor Content: #buymote #buymoteeshopping #buymoteonline #buymoteshopping #buymoteapplication" 

Traffic Light using Arduino - A Beginner Project

  Traffic Light using Arduino - A Beginner Project Introduction In this project I will Demonstrate you how to make a very simple and very co...