Elke Melk 2019

Students: David van Dijk, Khanh Nguyen Duy, Wesley Damen & Youri Verschut. (2019)


ElkeMelk is a dairy farmer company that has an automated production of bottling milk. The special thing of ElkeMelk is that every bottle of milk is unique with every cow. With a high tech integrated system they can track and follow which cow is going to be milked, which nutritional value the milk has after it is milked and in which bottle the milk of that specific cow is put in. 

Where the cows are milked, where the milk gets pasteurized and where the milk is put in bottles are all separate subsystems of the whole production line. The area where the challenges are for us are in the subsystems where the bottles are getting filled.

The current situation

At first all the bottles are placed on the conveyor belt. Then the bottles are getting feed into the system one by one. After that the bottles are getting guided into the gripper by the “hook”, the rotary index can grab the bottle. When the bottle is grabbed, the rotary index turns to the next step. Below are all the steps of the rotary index:

  1. The bottle is taken off the conveyor belt.
  2. The bottle is getting UV irradiated (to kill bacteria).
  3. The bottle is getting filled with milk.
  4. A cap is put on to the bottle.
  5. The cap is pushed on to the bottle.
  6. The bottle is placed back on the conveyor belt.

After that there is only one step left and that is the stickering of the bottle with the nutritional value of the milk and from which specific cow, the milk in the bottle is. Then the bottles are placed in boxes and getting put onto pellets.

Figure 1: rotary index

The problem

The system needs to wait for the bottles to be filled before it can do the next step. Because of this there is an empty bottle at the infeed gripper. This bottle will rotate inside the open infeed gripper because the conveyer keeps on running. If the bottle inside the system is filled the gripper will close and the empty bottle will be put inside the system. Because of this situation, the orientation of the bottles is completely random. This will cause that the sticker with the cow’s name and nutritional values are not placed correctly in line with the label of the bottle. The stickers need to be placed underneath and in line with the ElkeMelk label.

The second challenge is to do a quality control. There are a few possible abnormalities of bottles, like: Bottles with a bad placed label and bottles that are deformed. Those bottles need to be removed from the system.

Figure 2: orientation problem

Our solution

For the solution of the orientation of the bottle we came with the idea to use the barcode on the bottle. With an industrial camera the system detects the barcode twice before the rotary index grabs the bottle. That way the system can do the quality control for the label after it detects the barcode for the first time until it detects the barcode for the second time. The barcode part of the system also detects faulty barcodes. The label could be folded in such a way that the barcode or part of the barcode is not visible anymore.

For detecting the bad label on the bottle there were many different solutions tested. Some concepts gave good results but couldn’t be used in ElkeMelk’s machine. The quality control needs to be done within a small area in the machine while the bottle is rotating in a gripper. Different lighting concepts didn’t work because of the cylindrical transparent bottle. The solution is using a laser line projection on the bottle. The laser is placed on an angle right above the camera. The laser line is then projecting a vertical line on the label of the bottle. When the label is folded, the vision system can see a shadow below the fold. Using a red bandpass filter the camera is able to recognize the red laser better.

Major decisions

To determine the orientation of the bottle we decided to go and look for the barcode. This is a robust solution because it is easy to recognize and there are a lot of different ways to see it. Because our solution needs to be placed within the current machine/process, we decided to go with a Raspberry Pi 4 4GB with Raspbian as our operating system. The reason for this is so it is easily implemented into the system because it is small and we can use the GPIO pins to communicate to PLC from the machine. 

We also chose to use a relay board so that we can control some signals from the machine without changing a lot in the machine. With this we used the NC(normally closed) ports so that if the raspberry pi is turned off or broken the machine can still run like usual. 

For the vision part we decided to go for an industrial USB 3.0 camera. The USB camera works best with our solution because we are using openCV.


In the end we got it working at the demonstration setup that we made. The next step is to implement it in the actual machine at the company.