Maybe I celebrated too early...

A new beginn-failure

In the world of embedded systems and electronics, input devices are how a system can sense the environment, user input, or any other external parameter. Here are various types of input devices you might consider for different projects:

  • Switches and Buttons:
    • Tactile Switches: The most basic form of input, used for actions like reset or mode selection.
    • DIP Switches: Allow for multiple on-off settings and are often used for configuration settings.
    • Rotary Encoders: Provide input through rotation, often with detents to allow precise control over values.

  • Sensors:
    • Temperature Sensors: Can range from simple thermistors to sophisticated digital sensors like the DS18B20.
    • Pressure Sensors: Useful for detecting force or weight; some can measure environmental pressure for altitude.
    • Humidity Sensors: Measure moisture in the air, with common types like the DHT11 or DHT22.
    • Light Sensors: Photocells or photodiodes that change resistance or voltage in response to light intensity.
    • Proximity Sensors: Detect the presence or distance of objects, often using ultrasonic or infrared technology.
    • Motion Sensors: PIR sensors detect movement within an environment, commonly used in security systems.

  • Positional Devices:
    • Potentiometers: Analog devices that provide a variable resistance, useful for dial controls.
    • Accelerometers: Measure acceleration and can deduce orientation or movement.
    • Gyroscope Sensors: Detect rotational movement and are key in balancing or navigation applications.
    • Magnetic Sensors (Hall Effect, Magnetometer): Detect magnetic fields and can be used for position or rotation detection.

  • Audio Devices:
    • Microphones: Convert sound into an electrical signal, either as an analog output or with digital interfaces like I2S.
    • Piezoelectric Elements: Can be used both as a buzzer for output and a vibration sensor for input.

  • Environmental Sensors:
    • Gas Sensors: Detect various gases like carbon monoxide, methane, or air quality indicators.
    • Particle Sensors: Measure particulate matter in the air, important for air quality monitoring.

  • Advanced Input Devices:
    • Touch Screens: Provide both output (display) and input (touch) for interactive projects.
    • Cameras: Capture images or video for processing or surveillance.
    • RFID Readers: Read RFID tags for identification or tracking purposes.
    • Barcode Scanners: Input data by scanning barcodes, commonly used in retail and inventory management.

  • Custom Inputs:
    • Soft Potentiometers: Flexible, touch-sensitive strips that can be used in wearable tech.
    • Flex Sensors: Change resistance when bent, useful in gloves or other wearables to detect finger movement.
    • Bio Sensors: Monitor physiological data like heart rate, muscle movement, or brain activity.

Each input device offers unique opportunities and challenges. Selection typically depends on the specific requirements of your project, such as the type of data you need to collect, the environment in which the device will operate, and the level of precision required.

Integrating these devices with a microcontroller involves both hardware interface—wiring them correctly to the board—and software interface—programming the board to read and interpret the signals from the input devices.



How To Program an Input Device

In order to program an input device, the user will need to harness the Serial library in the Arduino IDE, which is indispensable for facilitating communication. This library enables the user to send and receive data over the serial ports, TX and RX. It is recommended to set the baud rate for serial communication to 9600, but the library's versatility allows them to alter this speed to suit the unique demands of their application.

For the acquisition of analog signals, turn to the analogRead() function. This function is integral; it takes a voltage reading from an analog input pin and translates it into a digital representation. The conversion relies on the Arduino's reference voltage, standardly 5V, meaning a 5V signal yields a digital reading of 1023 due to the Arduino's 10-bit ADC that maps 0-5V into integer values from 0 to 1023. Therefore, a voltage of 2.5V will result in a reading of approximately 512, signifying the midpoint of the signal's potential range.

By implementing this method, the user can precisely decode and respond to a broad spectrum of analog signals from various sensors or input apparatuses, transmuting them into a digital format that the microcontroller is capable of interpreting and processing. This setup empowers the user to discern the intricacies and fluctuations of the input devices, crucial for imparting their project with exact and dynamic control.

You can see more info in this week's Group Assignment.



Here comes the problems

My confidence was high when I started out, based on the solid design groundwork I had laid for my PCB from the previous week. The design was straightforward: it was essentially a breakout board that would funnel all the signals from the Xiao ESP32-C3 module into accessible pins.



My plan was simple—take these signals and directly connect them to the temperature sensor I had procured. This sensor, like many, had the standard pinout: GND, VCC, NC (not connected), and SIG (signal). The idea was that once connected, the Xiao would power the sensor and be able to read the temperature data from the SIG pin.


I had meticulously ensured that my PCB design accounted for the necessary connections. All I needed to do was to solder the Xiao onto my PCB and use jumper wires to connect the PCB to the sensor. With the ground and power pins providing the necessary supply to the sensor, and the signal pin ready to transmit data, it seemed like a foolproof plan.

However, the soldering process turned out to be my undoing. Despite my prior experience, the subpar solder I had bought led to a frustrating mess. The solder spread where it wasn't supposed to, creating shorts and risking damage to the Xiao module itself. The experience was disheartening, and for a moment, I feared that my entire project was compromised.

TRIGGER WARNING



With this mess it was clear that I wasn't able to use this board anymore and I couldn't finish the assignment on time. After the soldering debacle, I had to learn to desolder quickly. Thankfully a friend of mine taught me what materials I should use to desolder quickly and efficiently without causing more damage that was already done. Here are the list of materials I used to desolder:

Using desoldering mesh that was submerged with Flux and applying heat with the Heat Gun and the Weller, I painstakingly removed the excess solder from the board. This process was new to me, and while challenging, it was also a valuable skill to acquire. Following this, I understood the importance of solder paste and its role in facilitating proper soldering.

However, I was able to save my, quite expensive, Xiao ESP32C3!


And here is what the board was like after cleaning everything up...


As you can see, it's beyond saving... there is solder everywhere!

Reflecting on this journey, I realized that my initial confidence, while well-founded, had perhaps made me overlook the finer details of soldering quality and material choice. The lessons learned were clear: patience is just as important as confidence, and the right materials are crucial for success. As I prepare to reattempt soldering my PCB, I'm more cautious and informed, ready to proceed with the wisdom that setbacks are often the best teachers. I also realized that I can make my PCB safer by adding female pins into where the XIAO is supposed to go, this way, if I mess up, it won't damage the XIAO and I can change it easily.



Conclusion:

In conclusion, my journey from a confidently designed PCB to facing the trials of poor-quality solder has been both humbling and instructive. What began as a smooth path paved with clear intentions—to seamlessly integrate a temperature sensor with my Xiao module—became a testament to the unpredictability of the physical world and the craft of electronics. My ordeal with the solder taught me the irreplaceable value of quality materials and the importance of meticulousness in the soldering process.

he desoldering mesh, an unanticipated yet crucial tool, helped me salvage my components and, more importantly, served as a practical lesson in electronics repair. This experience, frustrating as it was, enriched my understanding of the assembly process and reaffirmed the notion that behind every successful project is a series of lessons learned through perseverance and adaptation.

As I look ahead, I am equipped not just with a better-soldered PCB but with a deeper appreciation for the art and science of electronics—a field where even the smallest details can make the largest difference.


The Files:

Below you can find the download links for all of the files from this week.

Main PCB files: