fig1 and 2 show the entire automatic packaging machine having an input 20 in the form of a hopper 22 with a trough or chute 24 for feeding small items to a loader position in a small item orientation section 26 . as here shown , there are two such hoppers to insure that all pockets are filled , in case they were not filled as they are loaded from a first hopper . the oriented small items are laid down on insertion trays in an area 28 ( fig2 ). at 30 , a sensor counts the small items in the insertion trays to be sure that exactly the correct number is deposited in each carton . cartons blanks are stored in a magazine 32 to be formed into boxes in an area 34 . at location 36 , the small items are resting on an insertion tray so that they can be inserted into the formed cartons . a stripper 38 causes the small items to remain in the carton as the insertion tray is withdrawn from the carton . from there , the cartons are sealed and discharged in area 40 , in a conventional manner . note , the small items are carried and not pushed into the carton . the orientation section 26 is shown in greater detail in fig4 . fig5 shown the orientation section 26 in perspective . the parts can be identified by comparing reference numerals in the various figures . the small items are initially placed in hoppers 22 in any suitable manner , as for example by a conveyor carrying product from the output of a manufacturing process . the small items flow into pockets in a metering wheel 42 ( fig4 ) which turns until a sensor 43 detects a heap of small products , piled up to a suitable height . means are provided for arranging the small items in an orientation corresponding to the orientation that they will have in a carton . more particularly , a conveyor 44 is formed by a plurality of elongated spaced parallel pocketed plates 45 ( fig5 ) joined to a link chain . each plate has a plurality of pockets 46 arranged in an orientation which corresponds to an expected orientation of the small items inside a carton . here the pockets are in the form of a grid having two columns and five or six rows ; however , other arrangements may also be used . the pockets may be frames with an open bottom so that the small items are captured by the frames while debris , such as broken bits of a candy coating , fall through the open bottom . the object is to fill each pocket with a single small item in a correct orientation and to place the rows and columns of small items inside the carton in the corresponding orientation . conveyor 44 is oriented to incline upwardly at an angle of approximately 12 °- 15 ° ( fig4 ) with respect to the horizontal . this angle will be selected on a basis of the physical characteristics of the small items so that gravity tends to fill the pockets and to enable excess small items to slide back toward the fill location at metering wheel 42 . three conveyors 48 , 50 , 52 are positioned above conveyor 44 . these conveyors may be selectively driven at different speeds , in opposite directions , or in the same direction , according to the needs for packaging the small items . each of these conveyors carries a plurality of brushes 54 at equally spaced intervals . the brushes are attached to and carried by link chains 56 ( fig6 ) trained over sprocket wheels 58 . by way of example , fig6 shows two of these brushes 54 mounted on conveyors 48 , 50 , respectively . the brushes 54 sweep ( fig4 ) away the small items which have not become lodged in the pockets 46 . the act of sweeping also fills any empty pockets and moves any surplus small items back toward metering wheel 42 . between the conveyors 48 , 50 , paddle wheel 60 , having relatively solid blades , is located to help clean out any debris of broken small items which may have become lodged in conveyor 44 . for example , when the small items are candy coated chewing gum , the debris may be bits and parts of the candy coating broken away . near the end of conveyor 44 , a rotary brush 62 extending across the width of conveyor 44 is positioned to sweep away everything that is not within the pockets 46 . by now , there should not be anything on conveyor 44 except for the small items in the pockets 46 and every pocket should be filled by a properly oriented small item . a diverter 64 ( fig7 and 8 ) is located at the distal end of the conveyor 44 ( i . e . opposite the loading end of the conveyor 44 ). the diverter is formed by a number of spaced parallel plates , such as 66 , 68 ( fig8 ). the plates are close enough to form a space 70 which is too narrow to pass any small items that are correctly oriented and lodged in the pockets 46 , but which is wide enough to pass debris laying on conveyor 44 , and perhaps to pass any small items which are not correctly oriented in a pocket . as best seen in fig7 these spaced plates 66 , 68 form a concave surface which is spaced closely enough to the conveyor 44 to keep the small items in the pockets 46 while they are inverted . by way of example , a single plate 45 of conveyor 44 , is shown passing through the concavity of diverter 64 . two small items 72 , 74 are shown as being captured in pockets 76 , 78 by the spaced diverter plates 66 , 68 . all of the pocket plates 45 forming conveyor 44 travel past diverter 64 in a similar manner . after the conveyor 44 emerges from the diverter 64 , the pocket plates 45 are inverted so that any remaining debris falls away while the small items continue to be held in place by a floor plate extending from the end 80 of the diverter plates 64 ( fig5 ). at the opposite end of conveyor 44 , there is a common section 28 where the inverted pocket plates 45 travel over and in confronting alignment with a conveyor 82 made of joined insertion tray assemblies attached to link chains , such as insertion tray assembly 88 . ( fig9 - 11 ). fig3 a and 3b show a wheel 91 having a plurality of aligned pegs 93 projecting from the surface thereof and being mounted on axle 95 which , in turn , is supported on bearings 97 , 97 . there are pairs of rows of pegs 93 , with the spacing between undivided pegs corresponding to the spacing between the pockets 46 in plates 45 . ( fig5 ). as the conveyor 44 carrys the pocket plates 45 under the wheel 91 , each pocket is penetrated by one peg 93 in order to push the small item out of the pocket . for example , fig3 b shows pegs 93a , 93b penetrating pockets 46a , respectively . the insertion tray assembly may be understood best by an inspection of fig9 which shows the major parts of the assembly as track section 96 and product insertion tray member 108 . the track section 96 is attached to anchor means 98 , 100 by bolts 97 , which in turn facilitate an attachment of track section 96 to a link chains conveyor 82 ( fig4 ). the track section 96 has a centrally located elongated slot 102 flanked by opposed side walls 104 , 106 . the product insertion tray member 108 is a slide having dimensions which enable it to slide smoothly between side walls 104 , 106 of the track section 96 . a block 110 is attached to insertion tray slide member 108 by bolts 111 and has a section 113 which slides in and is guided by groove 102 . a &# 34 ; smart pin &# 34 ; is shown in fig9 and elsewhere in the prior art as in fig5 and 6 of u . s . pat . no . 4 , 856 , 566 , for example . more particularly , pin 112 slides up and down in a bronze bearing 114 embedded in hole 115 of insertion tray member 108 and hole 116 of sliding block 110 . two circumferential grooves 118 , 120 on &# 34 ; smart pin &# 34 ; 112 engage a spring biased detent 121 which holds the pin in either a raised or a lowered position . fig9 a shows the product insertion tray slide member 108 , in detail . the small items are carried in the two grooves 90 , 92 , for insertion into the carton . these specially designed product insertion trays provide the most effective and positive handling of the small items , such as &# 34 ; chiclets .&# 34 ; however , trays with other configurations may be provided for loading other small items . the product insertion trays 108 have grooves matching the 3 - dimensional shape of &# 34 ; chiclets &# 34 ; or another small item . further , the outside contour of the insertion tray 108 is matched to the inside dimensions of the carton 120 ( fig1 ). hence , a three dimension contour on the outside of the insertion tray 108 assists in forming the recipient carton , which is squared responsive to an introduction of the insertion tray into the carton . the center ridge 93 of the insertion tray 108 is higher than the remainder of the top surface of the insertion tray which goes into the carton . the raised ridge 93 forms the confronting top panel 125 of the carton into a crown shape for preventing the carton from causing a friction or interference with the orientation of the small items during their insertion into or from the carton . fig1 shows the insertion tray 108 in a retracted position on slide track 96 and confronting an open end of carton 120 . the insertion tray 108 is filled with the proper number of small items . then , it moves forward ( fig1 ) entering the carton 120 , with ridge 93 slightly raising the top panel 125 thereof , and carrying with it the small items loaded in grooves 90 , 92 . both the slide track 96 and product insertion tray 108 are shown at 38 ( fig1 ) as being extended toward the loading station 36 . it will be noted that each of the grooves 90 , 92 ( fig1 , 11 ) on the insertion tray terminates in a cove 122 or 124 . suitable stripper fingers ( seen at 121 in fig4 ), which are carried by a conveyor belt 125 , enter these coves 122 , 124 . then , the insertion tray 108 is retracted from the position shown in fig1 to the position shown in fig1 while the stripper fingers preclude a removal of the small items from carton 120 . this stripping action deposits the small items formerly in grooves 90 , 92 into the carton 120 . the fingers 121 are withdrawn from the coves by the retraction motion of insertion tray 108 as it leaves the small items in carton 120 . stated another way , each of the insertion tray assemblies 88 ( fig9 ) follows a straight path along a conveyor section 82 ( fig3 ). in the conveyor section 38 , where the product is to be inserted into the carton , the entire insertion tray assembly 88 is thrust forward . while in the forward thrust position , the filled product insertion tray 108 is moved by sliding on track 96 from the retracted position ( fig1 ) to the extended position ( fig1 ) and into carton 120 . next , empty insertion tray 108 is withdrawn from the carton and returned to the retracted position of fig1 . thereafter , the entire insertion tray assembly 88 is returned from the forward thrust position shown at 38 in fig3 . the forward thrust and return movement of the insertion tray assembly 88 is controlled by a &# 34 ; smart pin &# 34 ; 127 . the movement of product insertion tray 108 on track 96 is controlled by another &# 34 ; smart pin &# 34 ; 112 ( fig9 ). at any suitable and convenient point upstream of the insertion position 36 ( fig1 ), a sensor 30 ( fig3 , 12 , 13 ) detects whether the grooves 90 , 92 are filled with the proper numbers of small items , such as shown at 140 , 146 ( fig1 , 14 ). this sensor 30 includes light emitting diodes 128 , 130 ( fig1 ) which direct narrow beams of light 136 , 138 at the small items . here , the small items are shown as &# 34 ; chiclets &# 34 ; candy coated chewing gum , such as 140 , for example , which have a white candy coating that reflects light . the light reflected from each of the &# 34 ; chiclets &# 34 ; gum pieces is picked up by a photo cell 142 , 144 . the output from each of the photo cells 142 , 144 is a train of pulses , as shown in fig1 ( a and b ). each individual pulse is generated by reflections from an individual one of the &# 34 ; chiclets &# 34 ; in each of the grooves 90 , 92 . although they are generally uniformly shaped and spaced rectangular objects , fig1 has been deliberately drawn to show that , as the small item , the &# 34 ; chiclets &# 34 ; pieces may be irregularly shaped , randomly spaced and perhaps skewed in the grooves . for example , fig1 has been drawn to show that one &# 34 ; chiclet &# 34 ; 146 has been oriented in a position rotated about 90 ° ( more or less ) relative to the remaining &# 34 ; chiclets .&# 34 ; these random event are reflected in the pulse trains of fig1 a and 14b . thus , for example , the large gap 148 ( fig1 ) between two &# 34 ; chiclets &# 34 ; causes a corresponding wide space 150 between two pulses in the output of photocell 142 . likewise , the cross ways &# 34 ; chiclet &# 34 ; 146 produces a corresponding wide pulse 152 in the output of photocell 144 . the point is that the only requirement of the sensor 30 is that the pulses must be suitable for counting . thus , the automatic packaging machine counts the pulses of fig1 ( a and b ) and knows that there will be two rows , each having six &# 34 ; chiclets &# 34 ; in each row , and further that two &# 34 ; chiclets &# 34 ; will be side - by - side when tray 108 is inserted into the carton . as the insertion tray 108 approaches the sensor 30 , the &# 34 ; smart pin &# 34 ; 112 ( fig3 and 9 ) is in a raised position . if the trains of pulses produced by photocells 142 , 144 ( fig1 ) do not have the correct and desired number of pulses , the pin 112 is left in the raised position where it is held by spring loaded detent 121 ( fig9 ) resting in circumferential groove 120 . on the other hand , if each of the pulse trains from the photocells have the proper number of pulses , the sensor triggers a solenoid 153 ( fig9 ). the &# 34 ; smart pin &# 34 ; is then pushed down 112 so that detent 121 snaps out of groove 120 and into groove 118 to hold the pin 112 in the down position . while in the down position , the pin 112 follows a cam track 154 ( fig1 ) which is in the insertion area 36 ( fig3 ) of the conveyor . in greater detail , a bearing or wheel 156 ( fig9 ) is attached to the bottom 158 of the pin 112 so that it may roll within and along the cam track 154 . in the region 160 of the cam track , rolling bearing 156 moves the insertion tray 108 outwardly and into a loading position ( as shown in fig3 ) and in the carton 120 ( fig1 ). in the region after the small items are loaded into insertion tray 92 and before they reach the carton 120 , the cam track t ( fig1 a ) for smart pin 112 is undulating to vibrate the insertion tray 92 enough to shake the small item into this desired loading position . in the region 162 of the cam track ( fig1 ), the stripping fingers 38 ( fig2 ) enter the coves 122 , 124 ( fig1 ). in the region 164 of the cam track , the rolling bearing 156 pulls the insertion tray 108 out of the carton 120 and back to the retracted position of fig1 . in the region 166 of the cam track , the floor of the cam track slopes upwardly to raise the &# 34 ; smart pin &# 34 ; 112 to its elevated position in preparation for the next time that the conveyor presents an associated insertion tray 108 to the sensor 30 . detent 121 ( fig9 ) snaps into groove 120 to hold pin 112 in the elevated position . in its present form , the automatic packaging machine can fill up to approximately 500 cartons ( 6000 &# 34 ; chiclets &# 34 ;) per minute . those who are skilled in the art will perceive modifications which may be made in the invention . therefore the appended claims should be construed to cover all equivalent structures falling within the scope and spirit of the invention .