This is an old revision of the document!


E-Textiles and Wearables II

Introduction

This second class on the topic of wearables and e-textiles will provide a more advanced coverage on soft sensors and actuators and programming interactions

Class Outline

Slides available on speakerdeck.

  1. Introduction to microcontrollers and single-board computers
  2. Sensor circuits for microcontrollers (voltage dividers and pull up/down resistors)
  3. Actuator circuits for microcontrollers
  4. Hard-soft connections to a microcontroller
  5. Code reading Arduino examples (how to figure out what to copy and paste)

Assignment

Create an interactive object; if you are already experienced with coding, focus on fully integrating a microcontoller into a textile circuit. If you are new to coding, choose an example and get it working using your own sensors and actuators.


Accelerometer Sensor

For this assignment, I want connect an accelerometer to a Lilypad and track the movement in a Processing environment. This thing will be very useful for my final project.

In a first step, I prototyped the circuit in a breadboard and an Arduino. The accelerometer I used is an IMU 6050, with 6 DOF.

descarga.jpeg

When I connected to the monitor serial the values of the different angles can be changing with the movement.

Once it was tested, I sewn the circuit in a felter lasercutted monster with a Lilypad instead of an Arduino

A video of the circuit working can be watched here:

Digital Sensor Circuits

A digital sensor is an electronic or electrochemical sensor, where data conversion and data transmission are done digitally.

When a digital sensor is connected to a microcontroller, need to use a pull down or pull-up resistor. A nice tutorial about pull-up, pull-down resistor can be found here.

Reading Resistive Sensors

The first thing I want to test is how my crochet pressure sensor acts in a voltage divider. Many sensors in the real world are simple resistive devices. A photocell is a variable resistor, which produces a resistance proportional to the amount of light it senses. Other devices like flex sensors, force-sensitive resistors, and thermistors, are also variable resistors.

It turns out voltage is really easy for microcontrollers (those with analog-to-digital converters - ADC’s - at least) to measure. Resistance? Not so much. But, by adding another resistor to the resistive sensors, we can create a voltage divider. Once the output of the voltage divider is known, we can go back and calculate the resistance of the sensor.

For example, the photocell’s resistance varies between 1kΩ in the light and about 10kΩ in the dark. If we combine that with a static resistance somewhere in the middle - say 5.6kΩ, we can get a wide range out of the voltage divider they create.