Skip to main content

Posts

Showing posts from July, 2020

LED BLINKING WITH ATMEGA328P USING ATMEL STUDIO

AVR is a popular microcontroller been used on arduino board but do you know using arduino syntax can delay your work and reduce efficiency so we rather use avr syntax and register directly on arduino microcontroller but for a project that time is not of paramount important arduino syntax can be used directly for the sake of the led blinking tutorial we shall be using atmel studio code directly which will also work on arduino ide by just changing the int main() to void setup() and then do { }while() loop to void loop(); //**  * \file  *programmer:AKINGUNSOLA CALEB  COMPILIER:ATMEL STUDIO 6.0 FOR AVR   * \brief Empty user application template  *  */ /*  * Include header files for all drivers that have been imported from  * Atmel Software Framework (ASF).  */ #include <asf.h> #define F_CPU 16000000UL    //16mhz crystal #include <avr/io.h> //allow input output function #include <avr/interrupt.h> //allow interrupt even though not used in code #include <util/dela

FOR ABSOLUTE BEGINNERS - LED CHASER USING PIC16F876A

The project below is for absolute beginners for people that are just starting microcontroller programming it is a led chaser that follow as regular pattern by which a led is chasing another led but the project is design to blink each bit in portB at 1 seconds interval and each bit in portc is shifted at 125ms. the project is simulated with proteus 8.0 //LED CHASER WITH BITWISE OPERATOR //PROGRAMMER:AKINGUNSOLA CALEB //FREE TO USE BY ALL //compiler mikroc pro for pic int lednumber[4]; int a; void main() { CMCON|=0x07; //disable comparator TRISB=0x00;    //set as output TRISC=0x00;    //set as output PORTB=0x00;    //set all pin low PORTC=0x00;     //set all pin low do {     PORTC=1<<lednumber[0];  //start from  bit 0      lednumber[0]++;        //increment bit     delay_ms(125);          //wait 1 seceonds     if(lednumber[0]>7)        //if shifting is on rc7     {     lednumber[0]=0;         //reset lednumber[0]     PORTB=1<<lednumber[1];    //start from bit o     lednumb

Automatic School Bell using PIC Microcontroller

Automatic School / College Bell using PIC Here we are sharing a fully automatic and configurable bell which can be used in schools and colleges. It is made using commonly available  microcontroller  and other components. Components Required PIC 18F4550 16×2  LCD  Display DS1307  or  DS3232  or  DS3231 32.768 kHz Crystal 16 MHz Crystal 4.7K Resistor – 7 10K Resistor 10K Preset 22pF Capacitor – 2 100nF Capacitor 4×4 Keypad 680R Resistor LED – 1 3V CMOS Battery BC548 1N4148 Relay (5V/12V) Circuit Diagram Automatic College Bell using Microcontroller – Circuit Diagram How to connect the Bell ? Program The microcontroller program is written using MikroC Pro compiler. #define MENU_KEY 'D' #define SAVE_EXIT '*' #define BELL_TIME 60 // LCD module connections sbit LCD_RS at RB7_bit; sbit LCD_EN at RB6_bit; sbit LCD_D4 at RB5_bit; sbit LCD_D5 at RB4_bit; sbit LCD_D6 at RB3_bit; sbit LCD_D7 at RB2_bit; sbit LCD_RS_Direction at TRISB7_bit; sbit LCD_EN_Direction at TRISB6_bit; sbit

Interfacing L298N Motor Driver with Arduino Uno

1 May Interfacing L298N Motor Driver with Arduino Uno In this tutorial we will learn how to interface  L298N  motror driver with  Arduino Uno . You might be thinking why we need L298N for controlling a motor. The answer is very simple,  Arduino  board or a  microcontroller  IO pins don’t have enough current/voltage driving capability to drive a motor. For driving the motor in both directions (clockwise and anti-clockwise) we need to use an  H-Bridge . Please read our article  H-Bridge – DC Motor Driving  for more information. L298N is an integrated monolithic circuit with dual H-Bridge. It can be used to rotate the motor in both directions and to control the speed of the motor using  PWM  technique. Components Required Arduino Uno L298N Motor Driver 12V battery 2x DC Motors Jumper wires L298N Motor Driver Module L298N Motor Driver Connections Explained Specifications Output A, Output B – To connect two motors. Driver Power Input – Board can accept 5V to 35V which will act as the power

Home Automation using Arduino and ESP8266 Module

Home Automation using Arduino and ESP8266 Module In this project we are going to make a home automation system using  ESP8266  WiFi module and  Arduino Uno . Using this we will be able to control lights, electric fan and other home appliances through a web browser using your PC or mobile. These AC mains appliances will be connected to relays which are controlled by the  Arduino . ESP8266 and Arduino together acts as a Web Server and we will send control commands through a Web Browser like Google Chrome or Mozilla Firefox. ESP8266 is the one of the most popular and low cost wifi module available in the market today. You can ready more about it here,  ESP8266 – WiFi SoC . ESP-01 ESP8266 Module                                                        ESP-01 is the one of the most popular ESP8266 module available in the market. ESP8266 is a self contained SoC with integrated TCP/IP stack which helps any  microcontroller  having UART to access a wifi network. It can act as both WiFi access po

Controlling LED using ESP8266 and Telegram Bot – IoT Project

Controlling LED using ESP8266 and Telegram Bot – IoT Project In this project we will control an LED which is connected to  ESP8266  with a Telegram bot. Hope you know about  Telegram , it is a messenger app similar to Whatsapp. This enables users to control their ESP8266 via simply typing and sending commands in Telegram. By adding some relays or TRIAC you can make this a home automation project. Components Required ESP8266 LED 470Ω Resistor Breadboard USB Cable Connecting Wires Hardware Circuit Diagram Home Automation using ESP8266 and Telegram Bot – Circuit Diagram Software Telegram Bot Bots are third-party applications that run inside Telegram. Users can interact with bots by sending messages, commands and inline requests. We can control our bots through HTTP APIs provided by Telegram. A Telegram bot is an application hosted on a server (here it is ESP8266) that uses  Telegram bot API  to connect to Telegram Messenger clients. A great advantage of Telegram bots is that they have zer