Driving is a very complex activity which requires all the attention of the driver. Nowadays, the human factor is related in 90% of the accidents and the distraction is one of the most considerable factors of influence, specially the somnolence. The objective of this project is to create a confident somnolence detector.In order to obtain essential data from the drivers while they fall asleep to calibrate the algorithm, we needed to create a system which allows the driver to handle the car, but detects when the conduction is not correct and takes control to keep safe the driver and the car. It was extremely important that the system must be autonomous, and the driver must be alone in the car, so as not to distort the experiment.As a result, we will obtain a semi-autonomous non-intrusive system which makes impossible to have an accident in our platform where a track is circumscribed. It opens the doors of the experimentation with drowsy drivers, when there are possibilities of loss of control of the vehicle. It can be used also to increase the safety in test track installations like ours or some control applications out of automobile industries, where safety is fundamental.