Making Z module
To fix the z position of the Extruder module, I made the z axis module.
2D design with Illustrator
move board
bottom board
electronic board case
bottom board
electronic board case
Electronic Board and Programing
Two stepper motor is used for z axis module. Those two stepper motor have to rotate samely to keep the same z position. And Z axis module is controled manualy using tact switch based on the my design concept.
stepper control board
stepper signal distribution board
controller(tact switch)
By using controller z height can be controled like a game.
The boards were in the following box. But controller was outside the box. Considering the structural strength, it should be into the box, but I wanted to move z axix module as a game based on my part of design concept "people are involved".
I wrote program with Arduino IDE. Program is follows.
stepper control board
stepper signal distribution board
controller(tact switch)
By using controller z height can be controled like a game.
The boards were in the following box. But controller was outside the box. Considering the structural strength, it should be into the box, but I wanted to move z axix module as a game based on my part of design concept "people are involved".
I wrote program with Arduino IDE. Program is follows.
#include <avr/io.h>
#define A2 0//(1 << PA0) // H-bridge output pins
#define A1 1//(1 << PA1) // "
#define B2 3//(1 << PA3) // "
#define B1 4//(1 << PA4) // "
#define SwU 8//(1 << PA4) // "
#define SwD 9//(1 << PA4) // "
#define BASESTEPANGLE 1.8// 1ステップの角度
#define PulseWidth (20.0) // 1パルスの長さ msec
bool rotLock = false;
void setup()
{
pinMode(A2, OUTPUT);
pinMode(A1, OUTPUT);
pinMode(B2, OUTPUT);
pinMode(B1, OUTPUT);
pinMode(SwU, INPUT);
pinMode(SwD, INPUT);
CLKPR = (1 << CLKPCE);
CLKPR = (0 << CLKPS3) | (0 << CLKPS2) | (0 << CLKPS1) | (0 << CLKPS0);
}
void loop()
{
//clockwise();
//counter_clockwiese();
if(digitalRead(SwU)==LOW){
clockwise();
}else if(digitalRead(SwD)==LOW){
counter_clockwiese();
}
}
void clockwise(){
digitalWrite(B1, HIGH);//2in1
digitalWrite(B2,LOW);//2in2
delay(PulseWidth);
digitalWrite(A1, HIGH);//1in1
digitalWrite(A2,LOW);//1in2
delay(PulseWidth);
digitalWrite(B1, LOW);//2in1
digitalWrite(B2, HIGH);//2in2
delay(PulseWidth);
digitalWrite(A1, LOW);//1in1
digitalWrite(A2,HIGH);//1in2
delay(PulseWidth);
}
void counter_clockwiese(){
digitalWrite(A1, LOW);//1in1
digitalWrite(A2,HIGH);//1in2
delay(PulseWidth);
digitalWrite(B1, LOW);//2in1
digitalWrite(B2,HIGH);//2in2
delay(PulseWidth);
digitalWrite(A1, HIGH);//1in1
digitalWrite(A2,LOW);//1in2
delay(PulseWidth);
digitalWrite(B1, HIGH);//2in1
digitalWrite(B2, LOW);//2in2
delay(PulseWidth);
}