Ingo Lohs
Published © LGPL

"muscle wire" - whats that?

MigaOne is a unique electric actuator based on Shape Memory Alloy (SMA) wire, also known as muscle wire.

BeginnerProtip1 hour1,562

Things used in this project

Hardware components

MigaOne - Dash4
×1
MigaOne - MAD v5.0
×1
Jumper wires (generic)
Jumper wires (generic)
2 pieces
×1
Power Supply
10 Volt
×1

Story

Read more

Schematics

Datasheet

Code

Example code für Arduino

C/C++
//--------------MigaOne Cycling------------------------------
//Cycles the MigaOne, using analog position readings from pot
//Supply desired voltage (suggested 12V)
//Outputs number of cycles, time to reach end of stroke
//Initial variable declarations
int motorPin = 8; //motor control
int potPin = 2; //analog input (wiper)
int val = 100; //serial reading
int potBuffer = 10; //pot reading buffer
int reps = 0; //cycles completed
long startTime = 0; //starting time value
long time = 0; //current time
int dist = 150; //desired travel distance (calibrated)
int initPot = 70; //initial pot value  > 0
int thresh = 0; //pot value threshold
void setup() {
//Pin setup
pinMode(motorPin,OUTPUT);
pinMode(potPin,INPUT);
//Begin serial communication
Serial.begin(9600);
}
void loop() {
//Initialization
initPot = analogRead(potPin);
thresh = initPot + dist;
startTime = millis();
//Power actuator
digitalWrite(motorPin,HIGH);
//Wait until threshold is reached
while (val < thresh) {
val = analogRead(potPin);
time = millis() - startTime;
}
//Stop acuation
digitalWrite(motorPin,LOW);
//Wait until actuator reaches initial position (+ buffer)
while (val > (initPot + potBuffer)) {
val = analogRead(potPin);
}
//Increment cycles
reps = reps + 1;
//Print reps completed and actuation time
Serial.print(reps);Serial.print(" ");Serial.println(time);
}

Credits

Ingo Lohs

Ingo Lohs

182 projects • 194 followers
I am well over 50 years and come from the middle of Germany.

Comments