Week 9 – Digital + Analog Sensors

1. Concept

I was inspired by gloves from the creative reading “Physical Computing’s Greatest Hits (and misses)” to go for a project that involves specific responses for ways of movements. Being excited about the freedom of flight, I wanted to incorporate flight. I had two parts related to flight with me, a gyroscope (measuring rotation rates) and a barometer (measuring altitude) which were, by the definitions of the IM technical readings, analog (although it does use I2C which converts analog to digital). I incorporated a slide switch as digital sensor.

2. Highlights

I attached some popsicle sticks to the breadboard to express more clearly the idea of an airplane or jet. I used red LEDs specifically as indicators for warning.

In order to figure out how to wire up and code, I researched online and found the following resources valuable in the process of building my circuit and code:

  • https://www.instructables.com/How-to-Connect-MPU6050-to-Arduino-UNO/
  • https://www.electronicwings.com/arduino/mpu6050-interfacing-with-arduino-uno
  • https://components101.com/sensors/gy-bmp280-module
  • https://www.instructables.com/Slide-Switch-With-Arduino-Uno-R3/
  • https://projecthub.arduino.cc/SurtrTech/bmp280-measure-temperature-pressure-and-altitude-6002cd

The technical and creative work with code was in combining codes for the different components together, adjusting any pin numbers, and adding conditions for the LEDs to turn on.

I encountered major obstacles in both hardware and software:

  • I mistakenly thought the BMP-280 was a BME-280. Thus, I downloaded the wrong library for the BME-280. Reading this website made me realize that my component looked similar, and I had a strong inclination that towards the sensor being a BMP-280 based on the letters of the acronyms in the sensor that it referred to BMP (BM, ME / ).
  • Initially, I connected SCL and SDA of the pressure sensor to the analog pins A4 and A5. However, readings from the pressure sensor were not appearing. I tried to replace wires thinking they were faulty, but that didn’t work. I tried to connect the wires to the SCL and SDA on the Arduino UNO but probably because I used the wrong library (BME-280), even though wiring for pressure sensor, I did not see it work (readings from the pressure sensor were not appearing).
  • My circuit was wired up in the wrong order. The SCL and SDA from the gyroscope was correctly wired to the SCL and SDA of the pressure sensor, but the SCL and SDA of the pressure sensor should have been wired to the Arduino UNO, rather than the SCL and SDA of the gyroscope directly wired to the Arduino UNO.

3. Video

4. Reflection and ideas for future work or improvements

Overall, I am glad I learned much on the technical side of things. Improvements include incorporating a buzzer like in the sound of an aircraft to warn the pilot, incorporating a radio system with other “airplanes” to warn other airplanes of being in their vicinity with the other “airplane” having its warning light prompted.

Leave a Reply