EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / Object counting on conveyor system

Object counting on conveyor system

|

Microcontroller › 8051 › Object counting on conveyor system

  • This topic has 2 replies, 2 voices, and was last updated 14 years, 8 months ago by praveen.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • June 1, 2011 at 11:14 am #969
    praveen
    Participant

     

    Hi there…
     
    I am trying to count the no of object pass in a conveyor systems and it need to be displayed in a LCD every time a object passes through it. I used IR for this purpose… wen ir detect the Object the led gets turned off and vice versa.
    Now the problem is wen LED turned off the counter keeps on counting till it get turned on
     
    And also the counter counts only upto value 10 and it gets return to 1…
     
    can any one pls help me.
     
    check the program below
     
    while(True)
    {
    if (LED1 == 0)
    {
    Count = Count+1;
    //LED1 = 1;
    }
     
     
    // UserMessageStorage[4] = Count;
    // UserMessageStorage[1]+= 1;
     
     
    UserMessageStorage[4]= Count/1000;
    Count=(Count-(UserMessageStorage[4]*100));
    UserMessageStorage[4]+=0x30;
     
    UserMessageStorage[5]= Count/100;
    Count=(Count-(UserMessageStorage[5]*10));
    UserMessageStorage[5]+=0x30;
     
    UserMessageStorage[6]= Count%100;
    UserMessageStorage[6]+=0x30;
     
     
    TotalCount[0] =  UserMessageStorage[4];
    TotalCount[1] =  UserMessageStorage[5];
    TotalCount[2] =  UserMessageStorage[6];
     
    // u8Temp = (TotalCount[0] – 0x30) * 100;
    // u8Temp += (TotalCount[1] – 0x30) * 10;
    // u8Temp += (TotalCount[2] – 0x30) * 1;
    //
     
    //TotalCount[0] = UserMessageStorage[1];
     
     
    // SerTx(TotalCount[0]);
    // SerTx(TotalCount[1]);
    // SerTx(TotalCount[2]);
     
    ArrayBasePtr=”Total Objects=     “;
    DisplayLCD(1,0,ArrayBasePtr);
    ArrayBasePtr=&TotalCount[0];
    DisplayLCD(2,0,ArrayBasePtr);
    ArrayBasePtr=” Objects”;
    DisplayLCD(2,3,ArrayBasePtr);
    TimeDelay(1000);
    LCD_CLEAR();
     
    Thanks in advance guys
     
    June 3, 2011 at 11:17 am #6322
    pandian
    Participant

    well it is difficult to write a program without your circuit diagram 

    just send the diagram 

    or send ir sensing pin number and lcd port

    June 7, 2011 at 8:54 am #6332
    praveen
    Participant

    IR sensor pin p3.2 and lcd is on Port 0

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • ANOTHER OLD PROJECT REDO February 9, 2026
  • Buffer design? February 9, 2026
  • BPF February 9, 2026
  • To couple or decouple February 9, 2026
  • Op amp shock February 9, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise