Hello. there is mpu-6050. I want to install it in a car to measure overload in turns (y axis). the problem is that when the car is inclined, therefore, the sensor starts to give out the value as if overload occurs (I understand that in the horizontal position the gravity acts on the z axis, but when the sensor tilts, the gravity starts to act on the y axis) is the question. how to make Arduino understand that the roll is happening and not the overload and does not give out a false value.

What are you really trying to measure? Likelihood of vehicle losing traction or rolling, or load shifting? These will be affected if you are driving across a slope and it is not a false reading.

Gravity, tip, and inertial sensors see no difference between tip and centripetal force. If you want to ignore tip, you probably need to look at how sharp the vehicle is turning and how fast it is moving.

I need Arduino to understand if the car turns at speed. because the higher the speed, the greater the inertia. Here it is necessary to consider this quantity. but ignore if roll occurs

The sensor works as described. Whether the car is moving, standing still, parked on a slope, etc., inertia will still result in loss of traction if it exceeds the coefficient of friction. For example, if I park the car on a slope that results in enough inertia to exceed the traction of the tires, the car will slide down the slope until it’s velocity is reduced enough that the traction is within the coefficient of friction again. This will occur no matter if the vehicle is in motion or not.

Long story short, the sensor reads inertia and is independent of any other condition other than initial reference to G when calibrated.

Perhaps more important is to compensate for body roll? As the others have said, any slope on the road is ‘real’ in terms of overturning.

absolutely right. it is necessary that mpu-6050 does not pay attention to horizontal inclinations