Record the period of the pulse in the first column of your Google Sheet, then record the ultrasonic sensor's distance along the ruler for that pulse. Start your ultrasonic sensor closest to the vertical surface and turn it on.The more data points you have, the more calibrated your ultrasonic sensor will be. Tip: Choose a small interval that spans the entirety of your ruler.Choose intervals along the ruler at which you will be placing your ultrasonic sensor such that it is facing and parallel to the vertical flat surface.Consider, for example, a tabletop and a hardcover book. Place a ruler on top of a horizontal flat surface with the end that reads zero perpendicular to a vertical flat surface.Create two columns: the first will be for pulse duration, and the second will be for distance. Microsoft Excel works too, but for this tutorial we will be using the former. We will use these values to find a correlation between the period (in microseconds) and the distance to the object the ultrasonic sensor is facing (in any unit of distance you choose). To view the period of each pulse, open the Serial Monitor (Ctrl+Shift+M). The period is the amount of time between the sensor sending out and receiving a pulse. Another term for this duration is the period of each pulse. Look through the following code labelled ultrasonic_callibration.ino to see how to print the duration of your ultrasonic sensor's pulses. Otherwise, you may see some missing spaces. Note: Due to a bug in Instructables, please click on the external link to the code in order to copy it correctly.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |