Hi guys,
I am using two HG-C 1100 measurement sensor for measuring the width of the metal. In the top of the sensor I will be having the measurement value. The sensor is capable of measuring the dimensions from -35mm to 35mm.
So I am using the formula:
If I use this code, I will get the proper width of the metal. But when I place the metal in between the sensor, I am getting the exact width in the serial monitor. But at the top of the sensors the values are different.
I don't why the analog values are different on the serial monitor and the top of the sensors. But the output of the sensor is perfect in the serial monitor.
Can anyone help me with this? HG-C_Series.pdf (3.0 MB) Metal Width Detector.pdf (168.9 KB)
While teaching the sensor also, I get +35.00 and -34.98. But when I place the sensor, I get +35.70 and -35.70. Why is this error occurs in the sensor?
How can I rectify the errors?
Is this errors adding to my other values?
Kindly help me,.
@manoj_maniyan no-one here is familiar with this sensor. I have read parts of the document you attached. It is more like a sales brochure or a user instruction manual than a data sheet. The document focuses on the sensor's display and controls. There is no detailed description in the document about the analog output and how to interpret it's value.
You say that the output on serial monitor is different from the displayed value on the sensor but you give no examples of what those values are. Perhaps that would help us in some way
If my sensor value in the top is 16.45 means, The serial monitor displays 16.65. Why there is variation in the value. The exact sensor value from the sensor is not displaying in the serial monitor.
The sensor has a zero adjustment feature. Has this been used? Is it possible that the zero adjust feature affects the display but does not affect the analog output?
Another explanation for the difference could be that the 5V regulator in the Arduino is not very accurate, and does not exactly match the 5V signal used by the sensor.
It might be more accurate to use the Arduino's interval voltage reference, which is 1.1V for Uno. It will be necessary to use a voltage divider to reduce the signal from the sensor down to below 1.1V.
But when I add the arduino code and see in the serial monitor, the values aren't as like the top of the sensor. if the first sensor is -17.5, it is taking as -17.78. if the second sensor is -21.5, it is taking as -21.12.
I have to know why there is a difference.
But the metal I place between the sensor gives me the proper output.
What percent accuracy are your potential divider resistors?
You may have to tune the potential divider values to get exact data.
Or adjust your software conversion equation.
How can I adjust the software?
I have 10 BIT ADC and the my measurement is from -35mm to 35mm. So I am using the map function.
What else I can do with the software?