Search This Blog

Sunday, 22 April 2012

Object Counter using PIC16F877

Hey,
This blog is about the circuit that I've designed for my college project.
I've designed Object counter using PIC16F877 and used Op-Amp as comparator-LM324.
The circuit diagram and simulation is as under:


1).Sensor Circuit.

 Working of Sensor:


  • Resistance of LDR when light falls on it=7.8k
  • Resistance of LDR when light is blocked=19k
  •  Voltage drop across R2 when light falls on LDR=1.42V
  • Voltage drop across R2 when light is blocked by an object=0.7V
  • Voltage given to comparator by potentiometer=1.38V
  • Output Voltage from Comparator=2.17V
          As you can see from the circuit that when light is blocked by an object the resistance of the LDR increases hence voltage drop across R2 is decrease. We've given this decreased voltage to the negative terminal of Op-Amp. Hence difference between reference voltage and sensor output will be amplified.


 2).Microcontroller Programming and Proteus Simulation:


I've done simulation in proteus. I couldn't find a way to give input from sensor to microcontroller for simulation. So, I've skipped that part and simulate only initialization of 16x2 LCD.
Programming is done in MPLAB using HI-Tech C Compiler. I've made my own library to use 16x2 LCD.I've made a simple mistake while programming that skips the counts of 10,20,30....etc.
So, whenever count reaches to 8,18,28..... it skips 9,19,29,..... and shows 10,20,30....etc.

The recording was done before I can edit my program.I made some modification after that and now the circuit works fine. So, hope you'll bear me for this video that was recorded before I can find my mistake.

Bill Of Materials

U1            PIC16F877                                                           
U2            LM324                                                               
X1            4MHz Quartz Crystal                                       
2              15pF Capacitor
1              16x2 JHD162A LCD
2              150 resistors
2              1k  resistors
2              IC Sockets
1              Yello LED in white
2              10k POT
1              LDR
1              9V Battery

 Some Photos







PS: To get proteus file or MPLAB coding file mail me or write your e-mail address in comment.

52 comments:

  1. Hello sir i need the codes and simulation for the object counter could you please send it to my email raja000raja@gmail.com thank you.. i need it urgently

    ReplyDelete
  2. hi... sir, do you mind share the proteus file and MPLAB coding with me. I am a student and interested to do this project. here my email zainur_5292@yahoo.com
    tq very much...

    ReplyDelete
  3. Hello sir i need the codes and simulation for the object counter could you please send it to my email nancy.cutin@gmail.com thank you.. i need it urgently for my project in Microprocessor.

    ReplyDelete
  4. You have done a really great job..Can I get the code for the the counter? I would really appreciate it..I need it for my final year project..

    ReplyDelete
  5. My email is nabil_2611@hotmail.com

    ReplyDelete
  6. great job..here is my email jeffreyoaing@gmail.com

    ReplyDelete
  7. Hello sir i need the codes and simulation for the object counter could you please send it to my email qzajmal@gmail.com thank you.. i need it with quad 7 segment display.

    ReplyDelete
  8. please mail me the code and project details, thank you so much.
    sngh_stym@yahoo.com

    ReplyDelete
  9. Hello

    You did a great job. So if you don't mind can you send me the protus and the code.
    My e-mail: kalarl@hotmail.com

    And thank you very much.

    ReplyDelete
  10. hello ,


    this is amaizng~ mind giving me the code and the protus

    email : flower-child24@hotmail.com

    thank u so much

    ReplyDelete
  11. marijastefanovski@yahoo.com

    ReplyDelete
  12. hi sir nice project! i want the program please! vppadmanaban74@yahoo.in thank u!

    ReplyDelete
  13. pls sir i need the code for bi-directional digital object counter for my project eaglesamchuks@yahoo.com, or eaglesamchuks@gmail.com, thanks

    ReplyDelete
  14. Hi, can i have the proteus file and MPLAB coding file? Thankyou very much. my email address is je_14anne@hotmail.com

    ReplyDelete
  15. Hi, can i have the proteus file and MPLAB coding file? Thankyou very much. my email address is je_14anne@hotmail.com

    ReplyDelete
  16. I want coding and proteus file

    ReplyDelete
  17. Hi, i would like the files my email is:
    carlosmarinhobl@gmail.com

    ReplyDelete
  18. Hi..nice project..can i have the coding files? my email is aslamraub90@gmail.com.
    waiting 4 ur good reply.tQ

    ReplyDelete
  19. erikluu.khailam@gmail.com
    I am very thankful if you send me all the files of this project cause i am new to this. Thank you very much

    ReplyDelete
  20. Hi, can i have the proteus file and MPLAB coding file?
    Email-ID- mishras1132@gmail.com

    ReplyDelete
  21. Hello please can I have the code please :) >?

    Email : meguda25@gmail.com

    ReplyDelete
  22. Hi there ! Can I get the code for this project ? Thanks !

    Email : zombiemeaw@gmail.com

    ReplyDelete
  23. i need the codes email shubhampatna@gmail.com

    ReplyDelete
  24. Hi, could your email the code to me?
    soh2510@gmail.com

    ReplyDelete
  25. Plz mail me ...i am doing project of object counter using conveyor belt

    ReplyDelete
  26. hii sir i need proteus and hex file my mail is saichandu322@gmail.com

    ReplyDelete
  27. good day sir! can you send me the code and proteus file for this project. I am working on the same project right now. thanks in advance. email: claytoncrivera@gmail.com

    ReplyDelete
  28. Can you send me ir counter codes
    kasunm@sltc.edu.lk

    ReplyDelete
  29. hello can i get the codes?
    Email: yaan.uchiha29@gmail.com

    Thanks!

    ReplyDelete
  30. This comment has been removed by the author.

    ReplyDelete
  31. Hi, i would like to get the codes even though it's a long time after this post was uploaded.
    Email: nelson101096@gmail.com

    ReplyDelete
  32. Hello sir, would you plss send me the codes

    ReplyDelete
  33. Hello sir,would you plss send me the codes
    Email-pravinrajbhar890@gmail.com

    ReplyDelete
  34. Hello sir i need the codes and simulation for the object counter could you please send it to my email kadamsiddhesh03@gmail.com thank you.. i need it urgently

    ReplyDelete
  35. Hello sir I need the codes and simulation for the object counter can you send it to me? Thank you. This is my email rie123riee@gmail.com that would be a great help.

    ReplyDelete
  36. hello sir would you please send the codes.

    ReplyDelete
  37. Hello sir, i need the codes for object counter. Would you please send it to me. Thank you in advance. This is my email : srijisreenivasan6@gmail.com .

    ReplyDelete
  38. Hello sir i need the codes and simulation for the object counter could you please send it to my email sanjuweerawarna@gmail.com thank you.

    ReplyDelete
  39. Hello sir, please can you share the codes to me and every other valuable material as I would love to recreate it, thanks so much in advance. My email is boluadediji@gmail.com

    ReplyDelete
  40. Hi, can i have the proteus file and MPLAB coding file? my email address is rokfarm14@gmail.com

    ReplyDelete
  41. biherbat@gmail.com please send to me code and proteus file

    ReplyDelete