This week was somewhat slow in terms of progress and unforeseen events caused some setbacks for me. As a result I am still behind schedule, although not as critically as past weeks. When it comes to deliverables for the week, some personal circumstances caused a delay in my ethics assignment, resulting in a 1 day late submission of my write-up. In addition, I was expecting the sensors to be available by this week. However, after consulting at the equipment desk, the staff informed me that the shipping was delayed and no updated delivery date was provided by the distributor.
Despite this, I was able to get my hands on a few sensors by the end of the week and begin some informal testing to understand and observe their behavior. My aim with this lab session was to familiarize myself with the equipment and take some initial measurements that will guide more formal experiments next week. Thus, the main goal was to connect everything properly with analog components and merely determine if the sensors were operational.
Having said that, before connecting any components, I reread the documentation for our sensor. On it, the manufacturer suggests including a by-pass capacitor of 10μF or more between the input voltage (Vcc) and ground (GND) in order to stabilize the power supply line. As a result, I sketched the following circuit diagram and connected the components accordingly.
The DC voltage source was configured initially to 5V and an LED was connected in-between ground and Vo in order to measure the voltage outputted with the voltmeter shown and have visual cues of the sensors behavior. After firing up the circuit, I observed the LED dim as the distance from the sensor was altered. However, on the meter I saw some figures that were concerning. I compared the voltage drop across the LED to the following graph and numbers provided by the manufacturer.
Admittedly I used a rather crude form of measurement using stacked rulers, yet I observed that the sensor did not behave as depicted on the graph. Firstly I saw that the voltage drop across the LED was never higher than 2V. Secondly the output was off by a few centimeters. For instance, I had expected to observe upwards of 2.5V around 16cm yet the peak voltage was observed closer than that at around 11cm and it was still no larger than 2V. I also noticed that the sensors behavior at very close distances is not as expected. since the LED was still on and the voltage was high despite the object being less than 5cm from the sensor. At large distances the sensor started to behave as expected fluctuating between 0.5 to 0.7V. However, it was quite jittery. I also proceeded to toggle the input voltage based the operating range of the sensor (4.5V – 5.5V), yet this did not seem to have any effect on the output which is a behavior that is beneficial in our case. ( I performed most tests at 4.8V since this is the voltage we expect from our battery supply later in the future when we make the sensor module mobile.)
As mentioned all these results were informally recorded. The unexpected behavior is most likely caused by the properties of the LED and my thoughts are that these measurements will be more true to what the manufacturer suggests when the NodeMcu is integrated and connected to our sensor. So for next week, I will test things more meticulously and properly record the data from these experiments. I will try some things out at the analog level to see if the behavior described above changes. For instance, I intend to use a circuit configuration that is not dependent on the LED. I will also employ a measuring tape to obtain more accurate distance readings. In addition, I want to see if changing the power supply line capacitance has any effects on the output voltage (which I think not) and perhaps figure out if there is a ways to reduce the jittery behavior at long distances so that we can feed a better voltage to our NodeMcu.
Speaking of NodeMcu, I set up the Arduino IDE and performed some basic tests to familiarize myself with the component and its behavior. I followed an online tutorial to setup the IDE with the NodeMCU and successfully ran a simple program suggested in said tutorial that blinked an LED every second.
Thus for next week, after finishing my tests with the sensor, I will proceed to develop a script for the NodeMcu that will display the distance measured by the sensor connected to it. I will compare and contrast these results with the analog measurements as well as the graph from the datasheet and see how we can fine tune the measuring portion of our project or if an entirely different sensor or approach is necessary (which we estimate is highly unlikely).