build details

Show: section status errors & todos local changes recent changes last change in-page changes feedback controls

Part 2: IR Sensor Checkpoint

Modified 2020-10-18 by sageshoyu

Expected Time: 30 minutes

Overview

Modified 2020-08-06 by Garrett Warren

You will now checks to see if the IR sensor on your drone is working properly. The first check will involve reading the raw IR sensor measurements using a multimeter. Then, you will using the drone software and the web interface to see drone’s height estimate.

Reading the IR sensor using a multimeter

Modified 2020-08-05 by Garrett Warren

Power the Sensor

Modified 2020-08-05 by Garrett Warren

Plug the battery into your drone build

Setup Multimeter

Modified 2020-08-05 by Garrett Warren

Set the multimeter to read voltage up to 2V

Multimeter in the correct setting

Probe

Modified 2020-08-06 by Garrett Warren

  1. Insert the black probe into any hole in the GND rail.

  2. Insert the red probe into any hole that is on the same rail as the yellow IR wire, which is connected to A0 on the ADC

The ADC shown in the image is from a previous hardware version. You will use the technique shown, but not necessarily the same probe placement.

Probing the IR sensor data wire

Test

Modified 2020-09-01 by Garrett Warren

While holding the probes in place, point the IR sensor at an object and then move the sensor closer and further to that object within the range of 10-50cm away. Check that the value on the multimeter is getting smaller when the object is further, and larger when it is closer. If this is correct, then your IR sensor is working properly!

if the measurement is taken closer than 10cm or further than 50cm, the sensor will not read properly. If you’re interested in why, take a look at Fig. 5 in the datasheet.

Reading the IR sensor on the web interface

Modified 2020-08-05 by Garrett Warren

Connect to the drone

Modified 2020-09-01 by Garrett Warren

  1. Plug the battery into your drone build and connect to the drone’s wifi network. By default, the network is named, defaultdrone, and the password is bigbubba.

  2. Browse to the drone’s code editor: http://192.168.42.1:8081

  3. In a new tab, browse to the web interface: http://192.168.42.1. The web interface is what you will use to fly the drone. It also contains graphs that show data from the sensors.

Start up the code

Modified 2020-09-01 by Garrett Warren

  1. In the code editor, click the menu bar in the top left corner, then click Terminal > New Terminal

  2. Type ./start and press enter

  3. Go back to the web interface tab, wait about 5 seconds, and refresh the page. Make sure that you see “Connected” at the top of the page. If you do not see this, wait a few more seconds and try refreshing again.

Test

  1. locate the Height Readings chart on the web interface

  2. Use your hand to move the IR sensor closer and further to an object and check that the Height Readings chart is changing

Congrats on finishing Build Part 2!