←Index



11/08 Input Devices ## Week 8: In this week, we learned how to ... # Class notes Show and Tell - Climbing wall by [Alejandro Diaz](https://fab.cba.mit.edu/classes/863.20/EECS/people/AlejandroDiaz/index.html) - [Turn buckle](https://www.homedepot.com/b/Hardware-Fasteners-Metal-Hooks-Turnbuckles/N-5yc1vZc2ge) - multidimensional lidar VL53L7CX # Protocals DAC - Digital to Analog Converter How do you change Analog to digital signals I2C - Talk to multiple sensors, you can connect more sensors than pins. Multiple targets share a line through pulldown resistors, but resistors are slow, so I2C is slow. SPI - e.g. SD-card is a spi device. MISO and MASI # switch To connect a switch to a MCU use a resistor. Resistor is a pull up and switch is a pull down. Debouncing is a saftey measure to take a break between reading. # Magnetic field Hall effect sensor, when the magnet gets closer it can sense it. There are also Hall effect sensors that can sense the vector of the magnetic field. Use capacitor e.g. 1microF before a linear voltage regulator! Cables are capacitors. # Step response (resistor and capacitor) senses the time delay through a resistor or capacitor # Temperature Sensor NTC Thermistor - 'Resistor that changes with resistence with temperature.' # Light sensors Phototransistor Transistors is a non-physical button. By making an LED blink on and off, you can calculate the ambient light away. Idea: make a sensor that senses light. # Motion sensors # Distance sensors sonar distance meassurment - not so good time of flight - really good idea: time of flight camera for spotting satellites? # Acceleration, orientation, rotation gyro and magnetic field idea: make an acoustic navigation system Piezo can produce sound, make sound that only you can hear? idea: you can hear where you are drawn to? workspace? home? nature? # Rotary encoder idea: control a water painting optical rotary encoder # Recitation - Signal processing idea: make an animal input sensor e.g. load cell idea: make a comming home welcome light 512 is the ADC resolution of RP2040, which equals to 0.35deg of resolution. But do expect less, 1/2. Tare could be reading 100 inputs and average it to get a good tare value. Noise and Filtering come at a price, there is a "lag" in the measurement. Batch average takes batches of data and averages it. Moving average takes in one new value while disposing the oldest value in the current batch. --- ## Idea - make a sensor that senses light. - make an animal input sensor e.g. load cell - make a comming home welcome light - make an acoustic navigation system # Assignment # 1) Kirgami Keyboard Continuing week 2, where I made a Kiragami Sensor Button using [CapacitiveSensor](https://www.arduino.cc/reference/en/libraries/capacitivesensor/). In collaboration with Lancelot, we used connected the Button with Abelton MAX for Live to change the volume of a chord. Motivated by that try-out, we wanted to spiral back to the beginning of the idea and make more buttons to create a Midi, a Kirigamidi. We were advised to look into [Xiao SAMD21](https://wiki.seeedstudio.com/Seeeduino-XIAO/) which has QTouch Capative Touch Library embedded in it. ![kirigamidi_2](../week-8/media/kirigamidi_2.jpg) ![kirigamidi_3](../week-8/media/kirigamidi_3.jpg) ![kirigamidi_4](../week-8/media/kirigamidi_4.jpg) ![kirigamidi_6](../week-8/media/kirigamidi_6.jpg) # 1) LoRa between 2 boards For my final project, I am interested in receiving LEO satellite LoRa signals. So, as a first step (two months ago together with JB), we wanted to make two Arduino LoRa 915MHz boards communicate with each other. (I did not make the boards) LoRa is an ultra low power, long range communication protocol that can send small amounts of data. It is often used for environmental sensing of humidity, temperature, wind speed ect. This is the [tutorial](https://docs.arduino.cc/learn/communication/lorawan-101#example-sending-and-receiving-data-to-a-network-server) I followed. ![LoRa](media/LoRa_1.jpeg) The distance that was still able to capture data was from E14-348 to Life Alive. With line of sight and a better antenna, this could be improved. # 2) LoRa with TinyGS TinyGS is a Open Source Global Satellite Network. It is based on ESP32 and supports sx126x and sx127x LoRa modules. This platform also provides a library. However, there were a couple of things going wrong from there, or one big one. - I could not load the firmware to the board. I tried a couple of things: - Flashing it with PlatformIO, a IDE for VSC, but it showed that my ESP32S3 is not compatible with the library - I joined the TinyGS Telegram community and tried to flash the board with a beta Firmware that supports ESP32S3. I tried flashing it in 2 ways: - esptool.py, a python-based, open source bootloader for Espressif chips. Within an virtual env, I was able to flash the chip. - Espressif Tool, official flashing programme provided by Espressif that only runs on Windows. Alan was kind enough to let me do it on his computer. However, even though the flash was successful, the board did not respond. ![satellite](media/LoRa_3.jpeg) I am still trying to make it work. ## Next Steps - Try Arduino IDE - Find a library independent from TinyGS to test out the LoRa function of the board - buy another or make a LoRa board and test it. --- # Resources - files - [Keyboard](files/keyboard.svg) --- ↳About