Showing posts with label microcontroller programming. Show all posts
Showing posts with label microcontroller programming. Show all posts

Thursday, June 25, 2015

How to make PCB (Printed Circuit Board) at Home [step by step]

Today I will show how to make PCB at home. PCB means Printed Circuit Board. Would you like to know more about PCB? Please follow the link  Wikipedia.

How to make PCB (Printed Circuit Board) at Home [step by step]
We will need     1.Ferric Chloride  
                         2. Copper Board  
                         3. Glossy Paper .
                         4. Iron 
                         5. Drill Bit [Drill Bit 0.8mm]
                         6. Paint Thinner
                         7. Hand Gloves


How to make PCB (Printed Circuit Board) at Home [step by step]


How to make PCB (Printed Circuit Board) at Home [step by step]




Now follow me with my instructions.

Step 1:  

Open the PCB diagram with Foxit reader or Adobe reader. It doesn't matter what you are using, just make sure that you are printing it with 100% (Actual) size.

 How to make PCB (Printed Circuit Board) at Home [step by step]


 Now the picture will be looked like this :


 How to make PCB (Printed Circuit Board) at Home [step by step]

It is recommended, the printer should be Laser printer. If you don't have Laser printer don't worry, I have a solution. First print out the circuit diagram on a normal paper in 100% size. Now make a photo copy of the diagram with glossy paper  by photostat machine. Because both Laser printer and Photostat machine have same type of ink. 


Note : We are getting the circuit diagram on a glossy paper.



After printing the circuit will  look like that :


How to make PCB (Printed Circuit Board) at Home [step by step]


Keep it for future and look at step 2.


Step 2:

Buy a copper board and cut it with required dimension. If you are in Bangladesh , you can visit http://toolsbd.com to collect necessary parts. A little rubbing is required to make clean the copper board . Look at the picture :

How to make PCB (Printed Circuit Board) at Home [step by step]
 
Now using  Masking Tape, add  PCB Diagram with  Copper Board carefully . 
 
This picture of masking is collected from techtunes.com.bd .Some how i missed this step to capture
 We need to provide heat on this and we should use an Iron. Be careful, you don't need to provide very high temperature . At first keep it on copper board so that heat can spread. After 2or3 min, start ironing  smoothly. Keep it in mind that rough ironing will damage the copper board
 

How to make PCB (Printed Circuit Board) at Home [step by step]

How to make PCB (Printed Circuit Board) at Home [step by step]
 
After heating for 15or 20 mins. Now pour water on it carefully and keep it underwater at least 20 mins.  Look the picture here.
 

How to make PCB (Printed Circuit Board) at Home [step by step]



How to make PCB (Printed Circuit Board) at Home [step by step]
wait for 20 mins


Now  remove the paper carefully and carefully wash it by water. It will look like this 
 

How to make PCB (Printed Circuit Board) at Home [step by step]

Step 3:

Bring  a pot with water and provide some Ferric Chloride on that . Be careful you should provide
Ferric Chloride on water . Don't watering on Ferric Chloride . Now sink the copper board and keep moving the water pot slowly for 20 min . You will see that copper will be being vanished . 

How to make PCB (Printed Circuit Board) at Home [step by step]


How to make PCB (Printed Circuit Board) at Home [step by step]


How to make PCB (Printed Circuit Board) at Home [step by step]
How to make PCB (Printed Circuit Board) at Home [step by step]

After completing this step  wash the board with soap and use paint thinner to clear and remove ink from the board . 

How to make PCB (Printed Circuit Board) at Home [step by step]
 
Now, we need to drill the board. If you have drill machine, you can use it. If  you don't have a drill machine, don't worry. I have a solution for you.
 





You can follow my method using drill bit. I didn't buy any drill machine !!!


How to make PCB (Printed Circuit Board) at Home [step by step]
How to make PCB (Printed Circuit Board) at Home [step by step]


Thank You !

Sunday, December 07, 2014

Create Musical Tone Using PIC Microcontroller[Step by Step ]

In this tutorial , i will show how to create melody using microcontroller and in this tutorial i will use pic18f2550 microcontroller .So let's create a project in proteus .

Proteus Project :

Please follow the instructions given below :

Now pick pic18f2550, sounder, crystal,22pf capacitor,VDD and ground according to the instructions given below :


Now complete the circuit as given below :


MikroC Code :


Now  we need the source code .So create a project in MikroC and follow the instructions given below:

Source Code :


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


void Tone1() {
  Sound_Play(659, 250);   // Frequency = 659Hz, duration = 250ms
}

void Tone2() {
  Sound_Play(698, 250);   // Frequency = 698Hz, duration = 250ms
}

void Tone3() {
  Sound_Play(784, 250);   // Frequency = 784Hz, duration = 250ms
}

void Melody() {           // Plays the melody "Yellow house"
  Tone1(); Tone2(); Tone3(); Tone3();
  Tone1(); Tone2(); Tone3(); Tone3();
  Tone1(); Tone2(); Tone3();
  Tone1(); Tone2(); Tone3(); Tone3();
  Tone1(); Tone2(); Tone3();
  Tone3(); Tone3(); Tone2(); Tone2(); Tone1();
}

void ToneA() {
  Sound_Play( 880, 50);
}
void ToneC() {
  Sound_Play(1046, 50);
}
void ToneE() {
  Sound_Play(1318, 50);
}

void main() {
    ADCON1=0x0F;   //disable adc
    CMCON=7;         //disable comparator



  Sound_Init(&PORTC,0);
  Sound_Play(880, 1000);             // Play sound at 880Hz for 1 second

  while (1) {
  ToneA();
  delay_ms(100);
  ToneC();
   delay_ms(100);
  ToneE();
   delay_ms(100);
  Melody();


  }
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


Now follow the next instructions .
.
Now just run the project.

Thank You!

Matrix [4x4] Keypad interfacing with PIC Microcontroller [ PIC18f2550 ] in Proteus [Step by Step]




 Matrix [4x4] Keypad  interfacing with PIC Microcontroller [ PIC18f2550 ] in Proteus [Step by Step]
 Matrix [4x4] Keypad  interfacing with PIC Microcontroller [ PIC18f2550 ] in Proteus [Step by Step]


Basically a matrix keypad[ 4x4] can be compared as a keyboard of microcontroller .The keypad contains 16 buttons .Internal architecture of keypad described below :
 Matrix [4x4] Keypad  interfacing with PIC Microcontroller [ PIC18f2550 ] in Proteus [Step by Step]
Taken from Internet

You can see  the button's structure  .Here each row is connected with ground through 10k ohm resistor . Now consider that A=1, B=0,C=0,D=0 and column A get +5v .At this situation , if you press   button[A,E]  , the E link get +5v .In this way for button[A,F] , F=+5v or 1, button[A,G] , G=1, button[A,H] , H= 1.
Listen , if we can make ABCD(1000) ,ABCD(0100),ABCD(0010), ABCD(0001) through a loop . Now any button  pressed  , we can uniquely identify the button .In this way the matrix keypad works .

Now Create a project in Proteus :

Proteus Project :

Please follow the steps




I am just trying to make easy for beginner .Now follow the instruction for pick parts from library .




Now pick  PIC18F4550  microcontroller , 22pf capacitor ,crystal , LCD DISPLAY [LM016L] , keypad  from proteus library .Now see the complete circuit given below :
 Matrix [4x4] Keypad  interfacing with PIC Microcontroller [ PIC18f2550 ] in Proteus [Step by Step]
 Matrix [4x4] Keypad  interfacing with PIC Microcontroller [ PIC18f2550 ] in Proteus [Step by Step]

Here i have connected each column with +5v instead of GND and now i am going to provide (1000) ,(0100),(0010),(0001) in each row respectively .So if any button  is pressed we get 0 according to this.
Now We have completed the Circuit and create a project in MikroC .

MikroC Project :

If  you are a beginner , please follow the steps given below :

Source Code :

  


  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 LCD_D4_Direction at TRISB5_bit;  
  sbit LCD_D5_Direction at TRISB4_bit;  
  sbit LCD_D6_Direction at TRISB3_bit;  
  sbit LCD_D7_Direction at TRISB2_bit;  
  // End LCD module connections  
  char ch[]="   ";  
  int j=0,ak=0,i=0;  
  void main() {  
  ADCON1=0x0F;  
  CMCON=7;  
  TRISA.F0=1;  
  TRISA.F1=1;  
  TRISA.F2=1;  
  TRISA.F3=1;  
  TRISC.F0=0;  
  TRISC.F1=0;  
  TRISC.F2=0;  
   TRISC.F4=0;  
  Lcd_Init();  
   Lcd_Cmd(_LCD_CLEAR);    // Clear display  
  Lcd_Cmd(_LCD_CURSOR_OFF);  
  delay_ms(200);  
  j=0;  
   while(1){  
    PORTC=0x00;  
    LCD_Out(1,1,"Matrix Keypad");  
    ak=5;  
    delay_ms(200);  
   while (ak==5){  
  PORTC=0x01;       //  
  if(PORTA.F0==1 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==0) {  
   ak=2;  
   Lcd_Chr(2,4,'7');  
    ch[j]='7';  
   j++;  
  }  
  if(PORTA.F0==0 & PORTA.F1==1 & PORTA.F2==0 & PORTA.F3==0) {  
   Lcd_Chr(2,4,'4');  
   ak=2;  
    ch[j]='4';  
   j++;  
  }  
  if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==1 & PORTA.F3==0) {  
  Lcd_Chr(2,4,'1');  
      ch[j]='1';  
   ak=2;  
   j++;  
  }  
   if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==1) {  
     Lcd_Chr(2,4,'C');  
    ch[j]='C';  
   ak=2;  
   j++;  
  }  
   PORTC=0x02;  
   if(PORTA.F0==1 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==0) {  
   Lcd_Chr(2,4,'8');  
  ch[j]='8';  
   ak=2;  
   j++;  
  }  
  if(PORTA.F0==0 & PORTA.F1==1 & PORTA.F2==0 & PORTA.F3==0) {  
   Lcd_Chr(2,4,'5');  
  ch[j]='5';  
   ak=2;  
   j++;  
  }  
  if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==1 & PORTA.F3==0) {  
   Lcd_Chr(2,4,'2');  
  ch[j]='2';  
   ak=2;  
   j++;  
  }  
   if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==1) {  
    Lcd_Chr(2,4,'0');  
   ch[j]='0';  
   ak=2;  
   j++;  
  }  
  /////////////////////////  
  PORTC=0x04;        //  
   if(PORTA.F0==1 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==0) {  
   Lcd_Chr(2,4,'9');  
  ch[j]='9';  
   ak=2;  
   j++;  
  }  
  if(PORTA.F0==0 & PORTA.F1==1 & PORTA.F2==0 & PORTA.F3==0) {  
    Lcd_Chr(2,4,'6');  
   ch[j]='6';  
   ak=2;  
   j++;  
  }  
  if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==1 & PORTA.F3==0) {  
    Lcd_Chr(2,4,'3');  
    ch[j]='3';  
   ak=2;  
   j++;  
  }  
   if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==1) {  
    Lcd_Chr(2,4,'=');  
    ch[j]='=';  
   ak=2;  
   j++;  
  }  
   /////////////////////////  
  PORTC=0x10;        //  
   if(PORTA.F0==1 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==0) {  
   Lcd_Chr(2,4,'/');  
  ch[j]='/';  
   ak=2;  
   j++;  
  }  
  if(PORTA.F0==0 & PORTA.F1==1 & PORTA.F2==0 & PORTA.F3==0) {  
    Lcd_Chr(2,4,'*');  
   ch[j]='*';  
   ak=2;  
   j++;  
  }  
  if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==1 & PORTA.F3==0) {  
    Lcd_Chr(2,4,'-');  
    ch[j]='-';  
   ak=2;  
   j++;  
  }  
   if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==1) {  
    Lcd_Chr(2,4,'+');  
    ch[j]='+';  
   ak=2;  
   j++;  
  }  
  }  
   }  
  }  




 Now follow the instructions, how to create .hex file and save .


 Now go to Proteus and Run the Project .



 Matrix [4x4] Keypad  interfacing with PIC Microcontroller [ PIC18f2550 ] in Proteus [Step by Step]

 In this way you will able to interface Keypad with Microcontroller .

Result Video :



Download This Project(Google Drive)


Thank You!



Please Share and Bookmark posts.

Tags

: (1) 18F2550 (1) 36KHz (3) and (1) arduino (1) Based (1) battery (1) Bipolar (1) Blinking (1) blinks (1) Bluetooth (1) bluetooth device interfacing (1) bluetooth module (1) button (1) circuit (1) clock (1) control (1) crystal oscillator (3) Db9 (1) DC Motor (2) digital (2) Digital Voting Machine (1) digital voting machine using pic (1) display (2) DS1307 (1) electronic (1) embedded c programming tutorial (11) embedded c tutorial (11) experiment kit (4) external interrupt (4) flash (1) flashing (1) Gas Leakage detector (1) HC-06 (1) home (1) how (1) How to (10) i2c tutorial (1) in (1) indicator (1) infrared Connection (3) interface (8) interfacing (3) Interrupt (3) Introduction (1) IR Connection (3) IR Receiver (4) IR Transmitter (4) key pad (1) keyboard (1) keypad (1) lavel (1) Lcd 16x2 (2) lcd 2x16 (2) led (1) lm35 (2) LPG (1) machine (1) make (1) Make bootloader (1) making (1) matrix (1) max232 (1) membrane keyboard (2) meter (2) Micocontroller (1) microchip (4) microchip pic (2) microchips (3) microcontroller (9) microcontroller based (3) microcontroller programming (3) Microcontroller Project (4) Microcontroller Projects (1) microcontroller_project (2) microcontrollers (4) Microprocessor (2) mikroC (5) mikroc code to start and stopstart and stop dc motor (1) mikroc pro for pic (2) Motion detector (1) MQ-9 Gas Sensor (1) musical (1) NEC Protocol (4) pcb (5) PIC (3) pic controller (11) pic microcontroller (11) pic microcontroller tutorial (11) pic programming (1) pic programming in c (12) pic proteus (1) Pic Tutorial (12) pic18 (2) pic18f2550 (11) picmicrocontroller (4) picRFモジュール (1) PIR Motion Sensor (1) printed circuit board (1) proteus (6) pulse width modulation (1) push (1) push button (1) PWM (1) real (1) rf transmitter (3) Rs 232 (1) Rs232 (1) scroll (1) scrolling (1) Serial communication (1) Serial Connection (1) Serial Port (1) serial port rs232 (1) Servo Motembedded c programming tutorial (1) simulation (2) Soil Moisture Meter (1) speed control (1) step by step (7) step bystep (1) Stepper Motor (2) text (2) Thief Detector (1) time (1) timer (4) timer0 (4) tone (1) TSOP38236 Receiver (4) tutorial (2) Unipolar (1) USART Connection (1) USB (1) usb 1.0 (1) USB bootloadere (1) USB HID (1) using (9) voltmeter (1) voting (1) water level indicator (3) with (2) work (1)

Traffic Feed


Live Traffic Feed
Visitor Tracking

Leave Your Message Here

Name

Email *

Message *

Like on Facebook