User Tools

Site Tools


latinet:unicaes:workshops:sensors-23

This is an old revision of the document!


Sensors and Communication

Welcome to Day 2 of our IoT Workshop! Today, we'll take a closer look at sensors, the backbone of IoT data collection. You'll gain insights into how sensors operate and discover key protocols like Analog, OneWire, and I2C that facilitate communication between devices and sensors. This foundational knowledge will empower you to effectively utilize sensors in your IoT projects.

1. Output - PWM

Now, we're stepping into the practical aspect of our workshop, focusing on Pulse Width Modulation (PWM) output with the ESP8266. PWM isn't just about adjusting the brightness of an LED; it's a versatile method of communication. Through this segment, you'll grasp how PWM operates as a form of control, allowing us to transmit information using varying pulse widths. This will come to life as we demonstrate PWM in action, using an attached LED as an illustrative example.

Fig. 1: ESP8266 with LED - Schematic Fig. 2: ESP8266 with LED - Breadboard

2. Libraries

In the dynamic landscape of Arduino development, libraries play a pivotal role, especially when it comes to effective communication with sensors. These compact packages of pre-written code provide an invaluable resource, simplifying the process of interfacing with various sensors and components.

For IoT enthusiasts and makers, libraries serve as a bridge between complex hardware and user-friendly coding. By abstracting the intricate details of sensor communication, libraries empower you to focus on the application logic rather than low-level protocol intricacies.

Remember, in the Arduino world, libraries are your trusted companions, facilitating smooth communication and opening doors to limitless possibilities.

3. Inputs / Protocols

3.1. Analog sensors (ex. capacitive soil moisture sensor)

Through a special circuit, the sensor is able to translate from the soil moisture around it to an analog output voltage. The sensor consists of a PCB with a long thick trace on one end. If you want to learn more about this sensor you should read the following article: How Capacitive Soil Moisture Sensors Work by rbaron.

Capacitive Soil Moisture Sensor

Fig. 3: Wiring of the analog sensor Fig. 4: Schematic

3.2. 1-Wire (ex. temperature sensor)

3.3. I2C (ex. ToF sensor)

3.3. UART

Recording

53

latinet/unicaes/workshops/sensors-23.1693345012.txt.gz · Last modified: 2023/08/29 23:36 by jan.sonntag