BRITOV DENIS
Machine Design
Unfortunately, we did not get the necessary kit and we decided to do a project
using gears and stepper motors.
Our machine rotates around the axis Z and can tilt relative to the horizontal
plane. Thus it can be used to orient the solar array or a laser sight.
Design
As main materual was selected a plywood. All parts was designed in CorelDraw
and cut in laser cutter. All gears was created in GearGenerator.
Making
Here is the main parts of our machine:
Here is the first version of machine, but the platform was too heavy and motor could not rotate whole platform, so we started redesign of second controller. As in the first one we decidet to use gears.
Here is video of controlling each stepper:
Programming
To program it we use Arduino. Here is the code, which allow us to control it using keyboard:
#define in4 4 // a
#define in3 2 // b ШИМ вывод для управления двигателем 1
#define in2 3 // c Направление вращение двигателя 2
#define in1 5 // d ШИМ вывод для управления двигателем 2
//o1=blue=d
//o2=grn=c
//o3=red=b
//o4=blc=a
bool direction = 0; // Текущее направление вращения
int t =100;
void setup()
{
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
pinMode(in3, OUTPUT);
pinMode(in4, OUTPUT);
Serial.begin(9600);
}
void loop() {
while (Serial.available()){
char val = Serial.read();
if (val == 'R')
{
st(1,0,0,0);
delay(t);
st(0,1,0,0);
delay(t);
st(0,0,1,0);
delay(t);
st(0,0,0,1);
delay(t);
}
if (val == 'L')
{
st(1,0,0,0);
delay(t);
st(0,0,1,0);
delay(t);
st(0,1,0,0);
delay(t);
st(0,0,0,1);
delay(t);
}
}
void st(int a, int b, int c, int d)
{
digitalWrite(in1, a); // Задаем направление вращения
digitalWrite(in2, b);
digitalWrite(in3, c);
digitalWrite(in4, d);
}
Group work
This machine was designed, created and programmed by me and my colegue Ivan Savchenko. Whole time we worked togather and help each other to solve problems. Ivan designed top platfolm and my task was to design stage with second stepper and write code to control our machine using keyboard. So now we have our machine working, i want to try put on it a crossbow and try to fire.