Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
akash a s
Published © GPL3+

Linear Voice Coil Actuator

Build a precise linear motion actuator with my custom voice coil actuator for robotics and automation projects!

BeginnerFull instructions provided5 hours278
Linear Voice Coil Actuator

Things used in this project

Hardware components

36Gauge Enameled Copper wire
×1
Neodymium Magnet OD25 ID8 TH5
×1

Story

Read more

Custom parts and enclosures

Magnet Holder

Sketchfab still processing.

Spacer

Sketchfab still processing.

Spring

Sketchfab still processing.

Coil-Revolution

Sketchfab still processing.

BobbinA

Sketchfab still processing.

BobbinB

Sketchfab still processing.

CaseA

Sketchfab still processing.

CaseB

Sketchfab still processing.

CenterCap

Sketchfab still processing.

CenterRod

Sketchfab still processing.

Code

Push Button Control

C/C++
#define in1 6
#define in2 7
#define l 4
#define r 3
void setup() {
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);
  pinMode(l, INPUT_PULLUP);
  pinMode(r, INPUT_PULLUP);
}
void loop() {
  if (digitalRead(l) == 1 && digitalRead(r) == 0) {
    digitalWrite(in1, 1);
    digitalWrite(in2, 0);
  } else if (digitalRead(r) == 1 && digitalRead(l) == 0) {
    digitalWrite(in1, 0);
    digitalWrite(in2, 1);
  } else {
    digitalWrite(in1, 0);
    digitalWrite(in2, 0);
  }
}

PWM Control

C/C++
#define in1 6
#define in2 7
#define ena 5
#define pot A0
void setup() {
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);
  pinMode(ena, OUTPUT);
  pinMode(pot, INPUT);
}
void loop() {
  int contrl = map(analogRead(pot), 0, 1024, 0, 255);
  analogWrite(ena, contrl);
}

Credits

akash a s
5 projects • 7 followers
Electronics student who loves making projects
Contact

Comments

Please log in or sign up to comment.