Saturday, June 20, 2020

wireless energy meter using RF communication | wireless energy meter| Embedded systems

wireless energy meter using RF communication | wireless energy meter| Embedded systems

Transmitter Circuit:


wireless energy meter using RF communication | wireless energy meter
Receiver Circuit:


schematic diagram with description

The above circuit diagram shows the various connections used in this project, now let us see a brief working of this circuit,

                        The microcontroller used here is PIC16F72 which operates at 16MHz speed generated by the crystal oscillator, the ADC has an 8-bit resolution, the function of the controller here is to digitalize the analog signal, to refresh the LCD, where the results are shown.

    The current sensors are used in our project, to monitor the power consumed by the circuit at a particular time and it is connected to the ADC channel of the microcontroller. All the parameter values are described here are monitored in LCD Display.

                The LCD is connected to the port D of the microcontroller, a 4bit data type connection is used here, 2 controls lines of the LCD is also interfaced to this port. The display used here is 16x2 one. This can display 32 characters at a time.

The RMS sensor is connected to the ADC channel of the microcontroller. This sensor calculates the energy meter reading. The RF Transmitter transmits the amount of power consumed. In the receiving section, the RF receiver receives the value and it is displayed in the LCD.

             The relay is an electromechanical device. It operated on +12V DC supply When a current flows through the coil, the resulting magnetic field attracts an armature that is mechanically linked to a moving contact. This condition performed by normal BC 547 transistors. When the transistor is ON the relay will be ON otherwise it will be always OFF.

MICROCONTROLLER PROGRAM



#include<16f72..h>
#use delay(clock=16000000)
#fuses put,hs,nowdt,nobrownout
#define reset PIN_b0
#define read_write PIN_b1
#define enable PIN_b2
#define relay PIN_c0
#define key1 PIN_c2
#include<lcd.h>
void get_data();
void conversion(int dat,int add);
void control();
int ldr1=0;
void main()
   {   port_b_pullups(TRUE);
   output_low(relay);
   lcd_init();
   lcd_com(0x0e);  
   lcd_com(0x01);
   lcd_com(0x80);
   lcd_puts(" WIRELESS  ");
   lcd_com(0xc0);
   lcd_puts("  ENERGY   ");
   delay_ms(2000);
   lcd_com(0x80);
   lcd_puts("  METER ");
   lcd_com(0xc0);
   lcd_puts("READING ");
   delay_ms(1000);
   setup_adc_ports( ALL_ANALOG );
   setup_adc(ADC_CLOCK_INTERNAL );
   set_adc_channel( 0 );
while(true)
      {      get_data();
      control();      }  }
void get_data()
   {      set_adc_channel( 0 );
      delay_ms(50);
      ldr1=read_adc()*2;           
      conversion(ldr1,0xc6);
   } void conversion(int dat,int add)
{   int i,j,k;
   i=dat/100;
   j=dat%100;
   k=j%10;
   j=j/10;
   i=i|0x30;
   j=j|0x30;
   k=k|0x30;
   lcd_com(add);
   lcd_data(i);
   lcd_data(j);
   lcd_data(k);}        
void control()
{   if(ldr1<20)
   {     output_high(relay);
          lcd_com(0x80);
          lcd_puts(" METER ");
          lcd_com(0xc0);
          lcd_puts("                   ");        }
     else
   {       output_low(relay);
          lcd_com(0x80);
          lcd_puts("ON ");
          lcd_com(0xc0);
          lcd_puts("          OFF         ");        
      }
          if(!input(key1))
     {    delay_ms(50);
      lcd_com(0x80);
      lcd_puts("light ");
      lcd_com(0xc0);
      lcd_puts("                  ");
      output_low(relay);          }}
//lcd
#include<string.h>
void lcd_init();
void lcd_com(unsigned char a1);
void lcd_data(unsigned char a2);
void lcd_puts(unsigned char st);
void lcd_com(unsigned char a1)
{unsigned char temp;
            temp=a1;
            temp=temp&0xf0;
            output_b(temp);
            output_low(reset);
            output_low(read_write);
            delay_ms(1);
            output_high(enable);
            delay_ms(1);
            output_low(enable);
            temp=a1<<4;
            temp=temp&0xf0;
            output_b(temp);
            output_low(reset);
            output_low(read_write);
            delay_ms(1);
            output_high(enable);
            delay_ms(1);
            output_low(enable);
            delay_ms(1);}
void lcd_data(unsigned char a2)
{unsigned char temp1;
            temp1=a2;
            temp1=temp1&0xf0;
            output_b(temp1);
            output_high(reset);
            output_low(read_write);
            delay_ms(1);
            output_high(enable);
            delay_ms(1);
            output_low(enable);
            temp1=a2<<4;
            temp1=temp1&0xf0;
            output_b(temp1);
            output_high(reset);
            output_low(read_write);
            delay_ms(1);
            output_high(enable);
            delay_ms(1);
            output_low(enable);}
void lcd_init()
{           lcd_com(0x30);
            delay_ms(20);
            lcd_com(0x30);
            delay_ms(20);
            lcd_com(0x30);
            delay_ms(10);
            lcd_com(2);
            delay_us(10);
            lcd_com(0x28);
            delay_us(10);
            lcd_com(0x0c);
            delay_us(10);
            lcd_com(0x04);
            delay_us(10);
            lcd_com(0x06);
            delay_us(10);;
            lcd_com(0x01);
            delay_us(10);}
void lcd_puts(unsigned char st)
{
if(st!='\0')
lcd_data(st);
}
}

Wednesday, June 17, 2020

solar power system for home appliances | solar power system project 2020

solar power system for home appliances | solar power system project 2020

https://ifelsewhat.blogspot.com/2020/06/Arduino-projects-2020-Arduinoprojects2020.html
CIRCUIT DIAGRAM DESCRIPTION



                    The above circuit diagram shows the various connections used in this project, now let us see a brief working of this circuit,

                        The microcontroller used here is PIC16F7877A which operates at 16MHz speed generated by the crystal oscillator, the ADC has an 8-bit resolution, the function of the controller here is to digitalize the analog signal, to refresh the LCD, where the results are shown.

            Here in this, the project we develop a low-cost solar panel is used to store the solar energy by using microcontroller. The solar panel absorbs the solar energy and stored in the battery.

The Solar panel is connected to the ADC channel of the microcontroller. The microcontroller calculates the panel voltage and displayed in the LCD Display. At the same time, the battery gets charged from the solar panel. In that battery, we can connect the load and it is used for specific purposes.

solar power system for home appliances  Coding 


 MICROCONTROLLER PROGRAM


#include<16ff877a.h>
#use delay(clock=16000000)
#fuses put,hs,nowdt,nobrownout
#define reset PIN_b0
#define read_write PIN_b1
#define enable PIN_b2
#define relay PIN_c0
#define key1 PIN_c2
#include<lcd.h>
void get_data();
void conversion(int dat,int add);
void control();
int ldr1=0;
void main()
   {   port_b_pullups(TRUE);
   output_low(relay);
   lcd_init();
   lcd_com(0x0e);  
   lcd_com(0x01);
   lcd_com(0x80);
   lcd_puts(" Embedded based    ");
   lcd_com(0xc0);
   lcd_puts("  power     ");
   delay_ms(2000);
   lcd_com(0x80);
   lcd_puts("  based  ");
   lcd_com(0xc0);
   lcd_puts("electrical   ");
   delay_ms(1000);
   setup_adc_ports( ALL_ANALOG );
   setup_adc(ADC_CLOCK_INTERNAL );
   set_adc_channel( 0 );
while(true)
      {      get_data();
      control();      }  }
void get_data()
   {      set_adc_channel( 0 );
      delay_ms(50);
      ldr1=read_adc()*2;           
      conversion(ldr1,0xc6);
   } void conversion(int dat,int add)
{   int i,j,k;
   i=dat/100;
   j=dat%100;
   k=j%10;
   j=j/10;
   i=i|0x30;
   j=j|0x30;
   k=k|0x30;
   lcd_com(add);
   lcd_data(i);
   lcd_data(j);
   lcd_data(k);}        
void control()
{   if(ldr1<20)
   {     output_high(relay);
          lcd_com(0x80);
          lcd_puts(" Light ON   ");
          lcd_com(0xc0);
          lcd_puts("                   ");        }
     else
   {       output_low(relay);
          lcd_com(0x80);
          lcd_puts("home ");
          lcd_com(0xc0);
          lcd_puts("                   ");               }
          if(!input(key1))
     {    delay_ms(50);
      lcd_com(0x80);
      lcd_puts("light ");
      lcd_com(0xc0);
      lcd_puts("                  ");
      output_low(relay);          }}
//lcd
#include<string.h>
void lcd_init();
void lcd_com(unsigned char a1);
void lcd_data(unsigned char a2);
void lcd_puts(unsigned char st);
void lcd_com(unsigned char a1)
{unsigned char temp;
            temp=a1;
            temp=temp&0xf0;
            output_b(temp);
            output_low(reset);
            output_low(read_write);
            delay_ms(1);
            output_high(enable);
            delay_ms(1);
            output_low(enable);
            temp=a1<<4;
            temp=temp&0xf0;
            output_b(temp);
            output_low(reset);
            output_low(read_write);
            delay_ms(1);
            output_high(enable);
            delay_ms(1);
            output_low(enable);
            delay_ms(1);}
void lcd_data(unsigned char a2)
{unsigned char temp1;
            temp1=a2;
            temp1=temp1&0xf0;
            output_b(temp1);
            output_high(reset);
            output_low(read_write);
            delay_ms(1);
            output_high(enable);
            delay_ms(1);
            output_low(enable);
            temp1=a2<<4;
            temp1=temp1&0xf0;
            output_b(temp1);
            output_high(reset);
            output_low(read_write);
            delay_ms(1);
            output_high(enable);
            delay_ms(1);
            output_low(enable);}
void lcd_init()
{           lcd_com(0x30);
            delay_ms(20);
            lcd_com(0x30);
            delay_ms(20);
            lcd_com(0x30);
            delay_ms(10);
            lcd_com(2);
            delay_us(10);
            lcd_com(0x28);
            delay_us(10);
            lcd_com(0x0c);
            delay_us(10);
            lcd_com(0x04);
            delay_us(10);
            lcd_com(0x06);
            delay_us(10);;
            lcd_com(0x01);
            delay_us(10);}
void lcd_puts(unsigned char st)
{
if(st!='\0')
lcd_data(st);
}
}


Thursday, June 11, 2020

SPEECH RECOGNITION SYSTEM BASED POWERED DEVICES CONTROL SYSTEM

SPEECH RECOGNITION SYSTEM BASED POWERED DEVICES CONTROL SYSTEM


CIRCUIT DIAGRAM DESCRIPTION

               The above circuit the diagram shows various connections used in this project, now let us see the working principle of this circuit,

            The microcontroller used here is 8 bit RISC architecture PIC16F877A which has a inbuilt 10 bit ADC, the controller receives the analog signals from the amplifier with the help of ADC converts to digital and process it.
            Three toggle keys are interfaced to PORTC of the microcontroller; the keys are used for increasing and decreasing the speed level of the motor.
           
            The speed of the controller is 16MHz generated by a Crystal oscillator connected to the controller. A +5V is needed for its operation, derived from a regulated power supply.

In the speech recognition kit, the voice messages are recorded predefined by using keypads. This kit is interfaced with the microcontroller. When the message is retrieved the microcontroller detects if it is correct means the microcontroller will turn ON / OFF the relays. In the relay, we can connect any external devices. 

            The relay is an electromechanical device.It operated on +12V DC supply When a current flows through the coil, the resulting magnetic field attracts an armature that is mechanically linked to a moving contact. When the current to the coil is switched off, the armature is returned by a force approximately half as strong as the magnetic force to its relaxed position. This condition performed by normal BC 547 transistors. When the transistor is ON the relay will be ON otherwise it will be always OFF


           

MICROCONTROLLER PIC16F877A


Introduction:
High-Performance RISC CPU:
v  Only 35 single-word instructions to learn
v  All single-cycle instructions except for program branches, which are two-cycle
v  Operating speed: DC – 20 MHz clock input
         DC – 200 ns instruction cycle
v  Up to 8K x 14 words of Flash Program Memory,
v  Up to 368 x 8 bytes of Data Memory (RAM),
v  Up to 256 x 8 bytes of EEPROM Data Memory
v  Pinout compatible to other 28-pin or 40/44-pin
v  PIC16CXXX and PIC16FXXX microcontrollers

Peripheral Features:
v  Timer0: 8-bit timer/counter with 8-bit Prescaler
v  Timer1: 16-bit timer/counter with Prescaler can be incremented during Sleep via external crystal/clock
v  Timer2: 8-bit timer/counter with 8-bit period register, Prescaler and postscaler
v  Two Capture, Compare, PWM modules
v  Capture is 16-bit, max. resolution is 12.5 ns
v  Compare is 16-bit, max. resolution is 200 ns
v  PWM max. resolution is 10-bit Synchronous Serial Port (SSP) with SPI™
v  (Master mode) and I2C™ (Master/Slave) Universal Synchronous Asynchronous Receiver
v  Transmitter (USART/SCI) with 9-bit address detectionParallel Slave Port (PSP) – 8 bits wide with external RD, WR and CS controls (40/44-pin only)
v  Brown-out detection circuitry for Brown-out Reset (BOR)

Analog Features:
v  10-bit, up to 8-channel Analog-to-digital converter (A/D)
v  Brown-out Reset (BOR)

Analog Comparator module with:
v  Two analog comparators Programmable on-chip voltage reference (VREF) module Programmable input multiplexing from device inputs and internal voltage reference Comparator outputs are externally accessible

Special Microcontroller Features:
v  100,000 erase/write cycle Enhanced Flash program memory typical
v  1,000,000 erase/write cycle Data EEPROM memory typical
v  Data EEPROM Retention > 40 years
v  Self-reprogrammable under software control
v  In-Circuit Serial Programming™ (ICSP™) via two pins
v  Single-supply 5V In-Circuit Serial Programming
v  Watchdog Timer (WDT) with its own on-chip RC oscillator for reliable operation
v  Programmable code protection
v  Power saving Sleep mode
v  Selectable oscillator options
v  In-Circuit Debug (ICD) via two pins

CMOS Technology:
v  Low-power, high-speed Flash/EEPROM technology
v  Fully static design
v  Wide operating voltage range (2.0V to 5.5V)
v  Commercial and Industrial temperature ranges
v  Low-power consumption

            The high performance of the PICmicro devices can be attributed to a number of architectural features commonly found in RISC microprocessors. These include:
• Harvard architecture
• Long Word Instructions
• Single Word Instructions
• Single Cycle Instructions
• Instruction Pipelining
• Reduced Instruction Set
• Register File Architecture
• Orthogonal (Symmetric) Instructions

Figure shows a simple core memory bus arrangement for Mid-Range MCU devices.

Harvard Architecture

            Harvard architecture has the program memory and data memory as separate memories and is accessed from separate buses. This improves bandwidth over traditional von Neumann architecture in which program and data are fetched from the same memory using the same bus. To execute an instruction, a von Neumann machine must make one or more (generally more) accesses across the 8-bit bus to fetch the instruction. Then data may need to be fetched, operated on, and possibly written. As can be seen from this description, that bus can be extremely congested. While with Harvard architecture, the instruction is fetched in a single instruction cycle (all 14-bits). While the program memory is being accessed, the data memory is on an independent bus and can be read and written. These separated buses allow one instruction to execute while the next instruction is fetched. A comparison of Harvard vs. von-Neumann architectures is shown in Figure.

 SPEECH RECOGNITION IC


    The speech recognition system is a completely assembled and easy to use programmable speech recognition circuit. Programmable, in the sense that you train the words (or vocal utterances) you want the circuit to recognize. This board allows you to experiment with many facets of speech recognition technology. It has 8-bit data out which can be interfaced with any microcontroller for further development. Some of the interfacing applications which can be made are controlling home appliances, robotics movements, Speech Assisted technologies, Speech to text translation, and many more.