# A Personal Microcomputer as an Access Control Management Platform in Road Transport
## 4 Creating an Access Control System  
### Device Selection  
As mentioned before, the computer and the camera used in this paper were Raspberry Pi-branded devices. However, it should also be possible to maintain a similar system based on some versions of Arduino or other single-board computers. Although there would be some differences in details, such as the programming language or way of connecting components, the overall algorithm of the program would be the same. Microcomputers from the main branch of Raspberry Pi devices have one particular advantage: they can handle 'desktop-like' operating systems, such as Raspberry Pi OS, Ubuntu MATE, Windows IoT Core, and more. This functionality extends the computer's software power and makes working with it much more manageable. That is the main reason behind the decision to choose the Raspberry Pi as the foundation of the described project [15; 16; 17]. There are several generations of Raspberry Pi microcomputers, with multiple versions and models in each. The main branch contains four generations of devices. The one used in this project is Raspberry Pi 4 Model B with 2 GB of RAM (Raspberry Pi Foundation, Cambridge, UK). Older or more compact versions of Raspberry Pi should also be possible to use in this project, as long as they can work with the camera and have enough memory to perform some image processing. Some tests were undertaken with the previous-generation Raspberry Pi 3 Model B with 1 GB of RAM to check if it would have some influence on the performance. The results will be mentioned in the next chapter of this paper. The camera used in the described project is an official Raspberry Pi High-Quality Camera with a 12 MPx Sony IMX477R Sensor (Tokyo, Japan), equipped with a 16 mm telephoto lens designed for that camera. The other official lens for the described camera, a 6 mm wide-angle lens, would be a better option depending on the planned distance between the camera and the monitored entry gate in the final form of the developed system. In this project, that distance was about 4 m. The 6 mm lens would be preferred when the space is lower than 4 m. It should also be possible to successfully use the older Raspberry Camera modules, especially since the sufficient resolution of processed images is 640 \(\times\) 480 pixels. The overall costs may be lower, and there is no need to buy additional lenses, but there may be problems with purchase availability. It is also safe to assume that the latest Raspberry Pi Camera module generation--version 3, which came out in January--would also work. Regardless of choice, the camera connects to Raspberry Pi via a CSI flat cable. The standard length of this cable is 30 cm. Because of that, the microcomputer has to be close to the camera. Placing it in the same case is a good option. There are various ways of checking if the vehicle is below the arm of the opened barrier. One of the most popular options is to use induction loops. These devices installed on the surface of the road use electromagnetism to detect all metal objects placed above them. The significant advantages of this solution are its reliability and lifetime. However, the setup process generates significant costs due to the need for the road's surface modifications. It is possible to lower the overall cost of the described system by using a different object detection method. It has been used as an ultrasonic distance sensor in this project. It is a device capable of emitting and receiving high-frequency sound signals. Considering the time between signal emission and echo reception, it is possible to calculate the distance between the sensor and the detected obstacle. The sensor should be placed on the entry gate, under the arm of the barrier. With that, if the sensor detects an obstacle in a specified range, it would mean that something is under the component of the barrier, and the system should prevent it from closing down.