I would recommend you to have a SN-LV-EZ1 instead of SN-US-40. SN-LV-EZ1 will give you the analog output which proportional to the distance detected and no need waste your time to develop a circuit or programming for SN-US-40. You also can consider other cheaper distance analog sensors like SN-GP2Y0A21(RM65) and IR01A(only RM25).
Thanks your suggestions, appreciated. However, the price of SN-LV-EZ1 is out of my budget. May I know whether there is any other ultrasonic sensor available in the market which is more or less the same with SN-LV-EZ1 but is cheaper than it?
For me, SN-LV-EZ1 really worth because you no need to develop the circuit for SN-US-40. It is quite difficult to do it and also save your time. But I don't know whether there has cheaper ultrasonic sensor or not in the market.