LED Projects

LED chasers,LED drivers,LED lamps,Automatic lighting systems etc

Microcontroller projects

Projects in PIC,AVR,MSP 430,ARM,Raspberry pi,Arduino etc

Coding

Coding in Microcontrollers,Arduino,MATLAB,LabView etc

Prototyping

Prototyping all kind of electronics and electrical projects

PCB Designing

PCB Dsesigning in Altium and Eagle Designer

Monday, 26 December 2016

HOW TO MAKE A MOBILE TABLET HOLDER IN 2 MINUTES

Here we are going to make a mobile tablet holder in 2 minutes using plastic card..Its so easy and simple method to make a good and attractive mobile phone holder.We can use any kind of plastic cards like visa card,sim card envelop etc.


 
 

We need 

1.Any kind of plastic cards
2.Marker pen
3.Steel rule
4.Lighter or heater

Measurements

 

 

Thursday, 22 December 2016

PIC18F_mikroC

1.LED

2.LCD

 

LED

code :

void main()
 {


  TRISB = 0;           // set pin as output


  do {

    LATB = 0x00;       // Turn OFF LEDs on PORTB

    Delay_ms(1000);    // delay of 1 sec


    LATB = 0xFF;       // Turn ON LEDs on PORTB

    Delay_ms(1000);    // delay of 1 sec
  } while(1);          // infinite loop

} 

circuit

 

 

LCD

You can download the code and proteus file below
Code :

// LCD connections
sbit LCD_RS at LATB4_bit;
sbit LCD_EN at LATB5_bit;
sbit LCD_D4 at LATB0_bit;
sbit LCD_D5 at LATB1_bit;
sbit LCD_D6 at LATB2_bit;
sbit LCD_D7 at LATB3_bit;

sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;
//  LCD connections

void main() {
ADCON1 |= 0x0F;
CMCON  |= 7;

  Lcd_Init();                // Inicializa LCD
  Lcd_Cmd(_Lcd_CLEAR);       // Limpiar display
  Lcd_Cmd(_Lcd_CURSOR_OFF);  // Desactivar cursor


while(1)
  {
    Lcd_Out(1,1,"Hello World");

    Lcd_Out(2,1,"its ecworks");

  }
}

circuit

Download

Wednesday, 21 December 2016

How to make an LED Lamp

 
  
 Here we are going to make a simple led lamp.Its a simple circuit with less     components.In this led lamp we have can adjust the brightness of the lamp.

Circuit Diagram

 

 

Components

  • battery- lead acid 4.2v
  • switch- 2 way switch with center off
  • Resistors- 220 ohm(2),20 ohm
  • led- white (4),red(1)
  • adapter socket
  • diode- 1N4007

Working

Its a very simple circuit.The working is clearly simulated in the video.When the switch is in right position then the current flow through the high value resistor with low brightness and when the switch is in right position then the current will flow through the low value resistor with high brightness

 

 Thank you very much

 

Thursday, 8 December 2016

HOW ?

HOW AN LED WORKS


An led is a Light Emitting Diode.The American engineer Nick Holonyak is the inventor of LED on 1962.LED is a special type of diode that is specifically optimized to give off light.It consist of two different type of semi conductor device place side by side to each other,that are P and N type semi conductors.P type semi conductor contains positively charged holes and N type semi conductor contains negatively charged electrons.When current passed through semi conductor,the  negatively charged electrons and positive charged holes are forced to move to the PN junction.When a free electron come near a hole they combine each other and because the holes exist art a lower energy level than the free electrons.The electrons must lose energy to combine with the hole.This energy released in the form of photos of light.The amount of photon energy released determines the frequency/color of LED.






 Advantages of LED
  • They're tiny and relatively inexpensive.
  • They're easy to control electronically.
  • They last virtually forever. That makes them brilliant for traffic signals.
  • They make light electronically without getting hot and that means they save lots of energy.


HOW A DC MOTOR WORKS





    A machine that converts dc power into mechanical energy is known as dc motor. Its operation is based on the principle that when a current carrying conductor is placed in a magnetic field, the conductor experiences a mechanical force. The direction of the force is given by Fleming’s left hand rule.
      The main parts of a DC motor are:
  1. Stator magnet - A stator magnet may be a permanent magnet or an electromagnet that provides constant magnetic field 
  2. Armature - Armature is a rotating part.The armature is an electromagnet made by coiling thin wire around two or more poles of a metal core.The armature has an axle, and the commutator is attached to the axle.The electrical contacts to the rotating ring are called "brushes" since copper brush contacts were used in early motors. Modern motors normally use spring-loaded carbon contacts, but the historical name for the contacts has persisted.




Commutation in DC Motor
In order to produce unidirectional force(or torque) on the armature conductors of a motor, the conductors under any pole must carry the current in the same direction at all times.The function of commutator and brush gear in a dc motor is to cause the reversal of current in a conductor as it moves from one side of a brush to the other.

Working

 

 The armature is connected to a DC power source through a pair of commutator rings. When the current flows through the coil an electromagnetic force is induced on it according to the Lorentz law, so the coil will start to rotate. You will notice that as the coil rotates, the commutator rings connect with the power source of opposite polarity. As a result, on the left side of the coil the electricity will always flow ‘away ‘and on the right side , electricity will always flow ‘towards ‘. This ensures that the torque action is also in the same direction throughout the motion, so the coil will continue rotating.



 

Friday, 2 December 2016

DIY Projects

Saturday, 26 November 2016

PIC16F877A


Here are some basic examples of pic programming in Hi-tech C with Proteus simulation


  Here you can use any pin for uart communication.go to suart.h and edit the following steps depend on our pins using
#define TxData RB0            /* Map TxData to pin */
#define RxData RB1                /* Map RxData to pin */
#define INIT_PORT TRISB0 = 0    /* set up I/O direction */
#define INIT_PORT1 TRISB2 = 1    /* set up I/O direction */ 

ABOUT US

ECworks is a freelancer site.We are doing freelance works in 

  • Electronics Circuit designing
  • Electronics and embedded projects and prototyping
  • Embedded programming in PIC,AVR,Arduino,ARM,MSP430,Raspberry pi etc
  • PCB designing in Altium,Eagle,Circuit wizard
  • Circuit simulation in Proteus and circuit wizard
  • MatLab
  • LabView
  • SketchUP designing etc

Tuesday, 15 November 2016

C program tutorials

1. How to start a new program in compiler Code Blocks

2. Difference between gets(),getch(),getche(),getchar() 

3. Pointers 

Pointers

Pointers are variables that contains the address of another variable.Pointers are declared as

<data type><*name of pointer>   => int *ptr
 
Example 1:

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a=15;
    int *ptr=&a;
    printf("pointer value=%d",*ptr);
}
 
Here we declare two variables one is a and other is ptr.Here variable ptr contains the address of variable a.When print *ptr it will go to the address of a and print the value in the address of a,ie 15.


Difference between gets(),getch(),getche(),getchar()-c program tutorial

Here this tutorial explain the difference between input functions gets(),getch(),getche(),and getchar() in a c program.The compiler used is Code Blocks.





gets() used to read a string and getch(),getche(),getchr() are used to read character

gets() -       Reading or accepting a string from the user

getch() -      it do not displayed on the screen and do not wait for enter key

getche() -     it displayed on the screen and don't wait for the enter key

getchar() - it displayed on the screen and wait for the enter key

Thursday, 10 November 2016

Tutorials

 

How to start a new program in CODE BLOCKS


Tuesday, 8 November 2016

C Programs




sum of digits in a number

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int num,rem=0,sum=0;
    printf("enter number : ");
    scanf("%d",&num);
    while(num!=0)
    {
       rem=num%10;
       sum=sum+rem;
       num=num/10;
    }
    printf("sum of integer is : %d",sum);
    printf("\n");








odd or even

 #include <stdio.h>
#include <stdlib.h>

int main()
{
   int num=0;
   printf("enter the number :");
   scanf("%d",&num);
   num=num%2;
   if(num==0)
   {
     printf("number is even ");
   }
   else
   {
       printf("number is odd");
   }
}







day equivalents

 #include <stdio.h>
#include <stdlib.h>

int main()
{
    int total_days=0,b1=0,year=0,week=0,day=0;
    printf("enter days : ");
    scanf("%d",&total_days);
    year=total_days/365;
    b1=total_days-(year*365);
    week=b1/7;
    day=b1-(week*7);
    printf("years=%d,week=%d,days=%d \n",year,week,day);
}







binary to decimal

#include <stdio.h>
#include <stdlib.h>
int main()
{
   int num,rem=0,dec=0,base=1;
   printf("enter binary number : ");
   scanf("%d",&num);
   while(num>0)
   {
       rem=num%10;
       dec=dec+(rem*base);
       base=base*2;
       num=num/10;
   }
   printf("decimal number is : %d ",dec);
}



decimal to binary


 #include <stdio.h>
#include <stdlib.h>

int main()
{
   int num,rem=0,bin=0,base=1,dec;
   printf("enter decimal number : ");
   scanf("%d",&dec);
   while(dec!=0)
   {
       rem=dec%2;
       bin=bin+(rem*base);
       base=base*10;
       dec=dec/2;
   }
   printf("corresponding binary= %d\n",bin);

}





number of 1s

#include<stdio.h>
int main()
{
    int n,result,count=0;
    printf("enter the number : ");
    scanf("%d",&n);
     while (n)
    {
      n &= (n-1) ;
      count++;
    }
    printf("number of 1's in the number = %d\n",count);
}


Description

9 = 1001 so there is total 2 number of 1s in 9


position of 1s



#include <stdio.h>
#include <stdlib.h>

int main()
{
    int num=0,check=0,i=0;
    printf("enter the number=");
    scanf("%d",&num);
    printf("1's in\n");
    for( i=0;i<9;i++)
    {
      if(num&(0x80>>i))
       {

           printf("position %d\n",i+1);
       }
    }
}


Description
Here we enter the number 9 = 00001001 ( 8 bit binary equivalent of 9 ) . So here in this example from LSB to MSB 1's in the position 5 and 8.

Pointers 

sum of array

 #include <stdio.h>
#include <stdlib.h>
int main()
{
   int num[11],*ptr,sum=0,i;
   printf("enter 10 elements : \n");
   for(i=0;i<10;i++)
   {
         printf("element %d=",(i+1));
         scanf("%d",&num[i]);   // exit from scanf() only when press enter key
   }
   ptr=&num;
   for(i=0;i<10;i++)
   {
       sum=sum+*ptr;
       ptr++;
   }
   printf("sum of array elements = %d\n",sum);
}

 

swapping

#include <stdio.h>
#include <stdlib.h>
int main()
{
   int num1,num2;
   printf("enter first number:");
   scanf("%d",&num1);
   printf("enter second number:");
   scanf("%d",&num2);
   swap(&num1,&num2);
   printf("\nswapped result is\n");
   printf("first number=%d\n",num1);
   printf("second number=%d\n",num2);
}
int swap(int *ptr1,int *ptr2)
{
    int reg;
    reg=*ptr1;
    *ptr1=*ptr2;
    *ptr2=reg;
}

reverse

#include<stdio.h>
int main()
{
    int num,rem,rev=0;
    printf("enter the number : ");
    scanf("%d",&num);
    while(num>0)
    {
        rem=num%10;
        rev=rev*10+rem;
        num=num/10;
    }
    printf("The reverse of number = %d\n",rev);
}


length of a string

#include <stdio.h>
#include <stdlib.h>
int main()
{
   char str[20],length=0;
   printf("enter the string=");
   gets(str);
   length=string_length(&str);
   printf("length of string=%d",length);
   length=0;
}
string_length(char *ptr)
{
    int num=0;
    while(*ptr!='\0')
    {
        num++;
        ptr++;
    }
    return num;
}



 


Sunday, 6 November 2016

Videos

HOW TO MAKE AN LED FLASH LIGHT 

 

15 MODE LED CHASER

 

led propeller display  

 

How to simulate arduino in proteus



Top 10 Weird And funny Inventions in world 

 

Adjustable Timer Circuit using 555

 

How to add bluetooth device in Proteus simulator  

 

How to switch between 2 different voltages with out relay

 

Elementary circuit simulation_circuit wizard

 

RGB led+VB.Net+Microcontroller 

 

MEASURING INCLINATION ANGLE (ARDUI+MPU6050) 

 

CIRCUIT WIZARD-BEST SIMULATOR FOR BEGINNERS 

 

How to design a PCB in Eagle Cad - Simple & easy tutorial for beginners  


Altium Designer Tutorial:Simple and easy tutorial for beginners 

 

 

 

 

 

 

 


Monday, 17 October 2016

Bluetooth in Proteus

This video explain how to add Bluetooth device library in to Proteus and how to simulate the Bluetooth module in Proteus.



Steps to add library

1. download the Bluetooth library
2. Extract the compressed file
3. Copy the two files to the Proteus library folder
4. Open on restart Proteus

Eltima virtual port emulator

Here used Eltima virtual port emulator software to create virtual port for the communication between two Bluetooth devices
 

 DOWNLOAD the Library

 

 

Friday, 7 October 2016

Switching Between 2 Different Voltages With Out Relay


This is a simple circuits to switch between two different voltage sources using two diodes.. No need of any relay or complicated circuits.If you are using schottky diodes then voltage drop will reduced.
when we connect to voltages we get the highest one on the output.Here in this example if we connect 9v first then the output voltage will be 8.6v(9v-diode drop) and when we connect 12 v in this circuit we will get 11.4v(12v-diode drop)

 

 

Electronics Hobby Circuits

Simulation