Maker Pro
Maker Pro

Object counting in conveyor

Hello guys

i am designing a simple conveyor system.

I using 12V DC motor with 1500 rpm

Now my problem is, i need to count the no of objects place in the belt on the run time

As well as to control the speed of the motor.

I thought of using IR to count objects, but dono how to get start.

so guys pls help... if there is any other better option i ll consider tat also

Advance Thanks for helping
 
Firstly is this system for comercial use or is it a home project??

You could use an LDR and either a microcontroller or a counting ciruit (using latches and flip flops.

For controlling the speed of the motor i would suggest a PWM aproach using either a microcontroller or 555 timers with the speed control using a potentiometer.

Please outline exactly how you want this conveyor system to work and we can quide you on your design :)
 
I am just using the conveyor for educational purpose... to show kids how conveyor works. PLC is a good option but i need to finish this one in low budget.

since it is for edu purpose i m not using very big machine (12cm -width and 1 meter length) conveyor and i can control the speed using gears.

so there no specific objects is used for this application .

for me wat exactly required is the sensor need to count the objects as we place in the conveyor and need to display it on the lcd.

the problem is i dono wat type sensor need to used,how to extract the value frm sensor to display in lcd.

Thanks...
 
Ok well you could count the amount of objects placed on the conveyor using weight. This would be relativly simple if the weight of each object is the same.

you could use an LDR (as previously mentioned) to count the amount of objects as they pass the LDR on the conveyor.

However whatever method you use you will need to use a microcontroller to comunicate with an LCD. do you have experiance with microcontollers?? Displaying just a single value from a sensor will be quite a trivial task using a PIC however it will require some calculation and timing.
 
well i had done once. i just displayed value from the pressure gauge to lcd using ADC... is tat i have to do in the same way for LDR
 
It will be even simpler using an LDR as you are looking to change an I/O pin on the pic either high or low (depending on how you have your LDR the resistance will either drop - allowing the pin to go high or it will increase allowing the pin to go low). You will then use the pic to initiate a count that for everytime this pin goes high (so every time an object is detected by the LDR) 1 is added to the count. Then you can display this integer on the LCD.
 
"Poor mystic" made a good point that in order for your students to learn about how this conveyor system works it is probably a good idea to bypass microcontrollers and stick to Cmos. Would it be feasable for you to use Seven Segment Displays to display the count on the conveyor??

Please see attached circuit.

I have knocked this up for you as it is quite a simple circuit that should fit the purpose of you conveyor. When something is detected infront of the LDR a 1 is sent to the divide by ten counter then to the Seven segment Decoder and finally is displayed on the SSD. everytime this happens a 1 is added to the count. This particular model will coutn up to 999 but it can easily be changed to count to any number or to count down or to count to a certain number and then reset etc...

SW1 is the on switch, SW2 is the reset switch (to reset the count)

Hope this helps.
 

Attachments

  • Conveyor.jpg
    Conveyor.jpg
    70.7 KB · Views: 528
Last edited:
Well Rob thanks for your suggestion.

It seem there will be some problem in detecting objects while using LDR (it requires a closed surface to detect object). If i am wrong forgive me

So I think the better option would be IR.

so can you suggest me how to program n design using IR pls. I mean some schematics and material explaining how to interface IR with 8051 by program

thanks
 
conveyor object counting

Guys i m trying to count the no of objects passing in a conveyor belt. for that purpose i am using IR sensor. When sensor goes low it have increase the count by 1.
Now the problem is in the debugger mode it increments the count properly. but while displaying in LCD it increment the count twice...
And i want to know whether i had followed correct procedure.. since i am new to this programming field. i had include my code below

Code:
P3   = 0x00;
	LED1 = 1;
/* LCD initialization */	
	InitializeLCD();

	/* Display project titles */
	DisplayProjectTitle();
	
	*ArrayBasePtr=&UserMessageStorage;
	
	EA   = 1;
	EX0  = 1;
	IT0  = 1; 
		 
	while(True)
	{

/* Serial bit transmissions */
		SerTx(TotalCount[0]);
		SerTx(TotalCount[1]);
		SerTx(TotalCount[2]);
		
                ArrayBasePtr="  TOTAL OBJECTS  ";
		DisplayLCD(1,0,ArrayBasePtr);
		ArrayBasePtr=&TotalCount[0];
		DisplayLCD(2,5,ArrayBasePtr);
		TimeDelay(850);
		LCD_CLEAR();
void Extint0 (void) interrupt 0
{
//  IE0=0;
  value++;
  Count = value; 

   		UserMessageStorage[4]= Count/100;
		Count=(Count-(UserMessageStorage[4]*100));
		UserMessageStorage[4]+=0x30;
		
		UserMessageStorage[5]= Count/10;
		Count=(Count-(UserMessageStorage[5]*10));
		UserMessageStorage[5]+=0x30;
		
		UserMessageStorage[6]= Count%10;
		UserMessageStorage[6]+=0x30;
		
		TotalCount[0] =  UserMessageStorage[4];
		TotalCount[1] =  UserMessageStorage[5];
		TotalCount[2] =  UserMessageStorage[6];

		ArrayBasePtr="  TOTAL OBJECTS  ";
		DisplayLCD(1,0,ArrayBasePtr);
		ArrayBasePtr=&TotalCount[0];
		DisplayLCD(2,5,ArrayBasePtr);

		TimeDelay(850);
		LCD_CLEAR();
 }

thanks for you help
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
OK, congratulations on getting this far.

If it works fine in the debugger, and not so fine in real life then chances are it is something in real life that fouling you up.

It is possible that you are seeing multiple pulses from the detector, or that something is causing it to be erroneously re-triggered.

Can you show us how you have connected the IR detector? Is it detecting a beam being broken?

Do you get multiple counts if you wave your hand in front of the sensor?

Doe you get one count as the object obscures the beam, and another as it clears the beam, or do both happen as the beam is being occluded?
 
Actually when i include the display commands out side the interrupt for eg. say in a separate function the lcd display some random counts cant say it is multiples of previous count at each time when ir turned off.
when i include the display command in interrupt as shown above the count increases twice when i wave my hand...
If i pass an big object , wen led gets off it increase the count twice and wen it turned on once again increase two times... i dont know how to slove it...
 
If you use an active IR beam and a receiver, it could be that you count reflexes from the moving object or other objects. You should make some debounce code in your counter routine. Reading the input several times at defined intervals and compare a number of them to be the same before validating the change of state. This goes both ways.

To make the debouncer more foolproof, you can calculate the minimum time the object is blocking the beam and use this to calculate the debounce of the signal.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
You can also debounce the circuit with electronics, but I would do it in software as it makes everything easier to adjust.

Placing a capacitor (say 0.1uF) across your IR detector may improve things somewhat. If it does, then debouncing is certainly your problem. This will cause the sensor to react more slowly, so it may bot count if you wave your hand in front of the sensor quickly, so beware of that too.
 
Top