Example Projects
Workshops
Announcements
Actuators
Connections
Power
Sensors
Traces

Circuits and Code Wireless

Meet the Materials
Conductive Materials
Non-Conductive Materials
Tools
Techniques
Thinking Out Loud
Circuits and Code
  • Arduino Overview
  • Arduino as Bluetooth HID
  • ATtiny: 7-Segment Display
  • ATtiny: Capacitive Sensing
  • ATtiny: Programming
  • ATtiny Serial & Wireless Boards!
  • ATtiny: Soft Serial
  • ATtiny: Sound
  • ATtiny: Soft Fade
  • Multiplexed Matrix
  • Controlling EL Panel and EL Wire
  • EL panel/wire inverter hack
  • EMF amplifier
  • Heat Controlling Circuit
  • LED with Light Sensor
  • Lilypad XBee Shield
  • pressure matrix code + circuit
  • Pull-up Resistors
  • RGB Colour Fade
  • simple heat circuit
  • Solar Powered Motor Circuit
  • Sound Amplifying Circuits
  • Graphing and Drawing Sensor Values
  • Teensy as HID Device
  • Transistor Switch
  • Volume Detection
  • Visualization: 2x2 Matrix
  • Visualization: Drawing
  • Visualization: Graph
  • Visualization: Pressure Sensor Matrix
  • Visualization: Touchpad
  • Voltage Divider
  • Voltage Divider with Arduino
  • Support the creation of content on this website through PATREON!
  • About
  • E-Textile Events
  • E-Textile Spaces
  • Newsletter
  • Print & Publications
  • E-Textile Shopping

  • SEARCH
    Content by Mika Satomi and Hannah Perner-Wilson
    E-Textile Tailor Shop by KOBAKANT
    The following institutions have funded our research and supported our work:

    Since 2020, Hannah is guest professor of the Spiel&&Objekt Master's program at the University of Performing Arts Ernst Busch in Berlin

    From 2013-2015 Mika was a guest professor at the eLab at Kunsthochschule Berlin-Weissensee

    From July - December 2013 Hannah was a researcher at the UdK's Design Research Lab

    From 2010-2012 Mika was a guest researcher in the Smart Textiles Design Lab at The Swedish School of Textiles

    From 2009 - 2011 Hannah was a graduate student in the MIT Media Lab's High-Low Tech research group led by Leah Buechley


    In 2009 Hannah and Mika were both research fellows at the Distance Lab


    Between 2003 - 2009 Hannah and Mika were both students at Interface Cultures
    We support the Open Source Hardware movement. All our own designs published on this website are released under the Free Cultural Works definition
    Circuits and Code

    Voltage Divider with Arduino

    You can divide the voltage with 2 resisters. The voltage gets divided according to the ratio between the 2 resisters. Let’s make an experiment.

    Here, 5V is divided with 2 resisters. both of them are 10k ohm, so ratio 1:1. I connect the middle to A0, which we are reading with the current code on Arduino. What do you see in serial monitor?

    Now I change right side resister to 1k ohm. the ratio between the two resisters are 10:1. Now what is your analog pin reading?

    Now I change the right side resister to 47K ohm. Ratio between the two is 1:4,7 What does your analog pin reads?

    Notice when the resistance of right side resister change, the ratio between the two resister change and resulting in the change in incoming voltage at the reading point. As your analog sensor also changes the resistance as you manipulate, it works similar to this right side resister. You just need to use a resister on the left that works with your sensor’s resistance range. For example, if your sensor range is 100 ohm to 600 ohm and you had 10k ohm fix resister, then the ratio goes from 1:100 to 6:100. That is not a big change. If you changed your resister to 100 ohm, the ratio change now goes from 1:1 to 6:1. This will result in bigger reading range.

    *note: the above image made with frizing shows knitted button as a sensor. You can connect any resistive sensor instead. Knitted buttons are actually digital sensor (on/off) but as there were no suitable component installed on my frizing software, it is used as a general “textile sensor”

    Serial Plotter

    You can use the plotter (graph) tool of Arduino IDE to monitor your sensor behavior. Add these four lines before Serial.println() to fix the plotting range.

    int myValue = 0;
     void setup() {
        Serial.begin(9600);
      }
      // the loop function runs over and over again forever
      void loop() {
        myValue = analogRead(A0); 
        Serial.print(0); 
        Serial.print(" "); 
        Serial.print(1023); 
        Serial.print(" ");   
        Serial.println(myValue);
     delay(10);
      }

    Open plotter from Tools/Serial Plotter. It opens a new window and graphs what your are printing out.



    Leave a comment