9. E-Textiles and Wearables II#
In the Lecture taken by Liza is very useful to me to understand electronics. I got ineterest to this week as compare to E textile 1. Suhas teached me programming On Arduino IDE software. Dance performance in this video inspire me . This is video of event by rahaniyat in Pune,Maharashtra.
#rahaniyat from HARSHADA RAUT on Vimeo.
What’s an arduino?#
Arduino is an open-source electronics platform based on easy-to-use hardware and software. It’s intended for anyone making interactive projects. Arduino consists of both a physical programmable circuit board and a piece of software, or IDE (Integrated Development Environment) that runs on your computer, used to write and upload computer code to the physical board. This help me to learn more about Arduino.
What is sensor?#
Sensors are used to measure physical quantities such as temperature, light, pressure, sound, and humidity. They send signals to the processor. To learn more about sensor go here
Flipping Wing#
Tool
- Sewing machine
- Scissors
- Multimeter
- Needle
- Soldering station
Components
- Copper wire
- Magnet
- Fabric- net and cotton
- Battery 5V
- Tread
Untitled from HARSHADA RAUT on Vimeo.
Wearable E-textile with Ultrasonic sensor#
I am very begining for coding and programming. Suhas help me to understanding ardiuno. I never done anything in electronics before this but suhas and supriya help me amd teach me programming very well. I wanted to make T-shirt with Ultra sonic sensor. For this i used Arduino uno. I desolder Arduino headers to sew it on T-shirt. But It is new for me. I failed to desolder it. Then I use Arduino Nano which is very easy to sewable on fabric. For Arduino nano I changed tools setting in programming. First I draw curcuit on paper then sew it . I create Embroidery of two birds on USHA memory craft 200E machine.
However, I had…
Circuit diagram#
Schamatic diagram#
Tools:
- Soldering station
- Soldering iron
- Scissors
- Multimeter
- Needle
Components:
- Conductive thread
- Arduino nano
- LED
- Buzzer
- Ultrasonic sensor
- Battery 5v
- Fabric
Process:
-
Emroidery On Fabric and make holes where I show LED and Buzzer.
-
Sew LED and Buzzer on fabric with possitive and negetive sides seprately with conductive tread.
-
Sew Arduino nano and Ultra sonic as I draw on paper.
-
Solder the copper tape circuit where is necessary
-
Use the multimeter to check electrical continuity along the process.
-
Just after that, Connect all pins and give battery supply.
-
Finally, I checked it was working as I expected.
Ultrasonic_sensor from HARSHADA RAUT on Vimeo.
- I did embroidery of birds on Usha Memory Craft 200E CNC machine.
- And make a hole to eyes of those birds for led and make hole and make another hole to bird’s beak where I put buzzer.
- I sew all circuit with conductive thread and solder remaining with copper wire.
Code for Ultra sonic senser with buzzer and LED#
// defines pins numbers
const int trigPin = 12;
const int echoPin = 10;
const int buzzer = 6;
const int ledPin = 8;
// defines variables
long duration;
int distance;
int safetyDistance;
void setup() {
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
pinMode(buzzer, OUTPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(9600); // Starts the serial communication
}
void loop() {
// Clears the trigPin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);
// Calculating the distance
distance= duration*0.034/2;
safetyDistance = distance;
if (safetyDistance <= 30){
digitalWrite(buzzer, HIGH);
digitalWrite(ledPin, HIGH);
}
else{
digitalWrite(buzzer, LOW);
digitalWrite(ledPin, LOW);
}
Ultrasonic sensor on fabric from HARSHADA RAUT on Vimeo.
Learn Attiny microcontroller#
Arduino is awesome. The ATTINY45 is a high performance and low power AVR 8-bit microcontroller with 4K bytes of in-system programmable flash, alongside 256 bytes of EEPROM and 256 bytes of SRAM. It is very useful in e-wearable. I learn Attiny programs. in this assignment I learn only how to program Attiny.
- Pinout and configuration of Attiny45
To program the ATtiny85 we need to first set Arduino Uno in ISP mode. Connect your Arduino Uno to the PC. Open Arduino IDE and open the ArduinoISP example file (File -> Examples -> ArduinoISP) and upload it.
- Add ATtiny45 Support to Arduino IDE
Open File -> Preferences and in the Additional Boards Manager URLs give this url
After this is done open Tools -> Board -> Board Manager. Open Board Manager scroll down the list where it says “attiny by Davis A. Mellis”. Click on that and install it. After installing this I can see Attiny in board menu.
- Connecting ATtiny45 with Arduino Uno
Connect the arduino uno pins to attiny45 using breadboard as below;
Arduino Uno – ATtiny45
5V – Vcc
Gnd – Gnd
Pin 13 – Pin 2
Pin 12 – Pin 1
Pin 11 – Pin 0
Pin 10 – Reset
- Uploading program to ATtiny45
Select ATtiny under Tools -> Board. Then select ATtiny85 under Tools -> Processor. And select 1 MHz (internal).
Then make sure Arduino as ISP is selected under Tools -> Programmer
open the Blink example from arduino examples and change the pin number from 13 to PB2 and upload.
I uploaded the blink program to ATtiny45 and now its ready to program.
- Testing ATtiny85 Blink
Now its time to test. Remove all connections from Arduino and take a power source. Here I will use a button cell to power ATtiny45.
Fabricademy by Harshada raut is licensed under a Creative Commons Attribution 4.0 International License.
Based on a work at https://class.textile-academy.org/.
Permissions beyond the scope of this license may be available at http://vigyanashram.com/.