GIMBLE LASER NEMA 17
Description
I needed something to use to test code for positioning motors.. So.. I designed this. It is just a test bed and was simple to design ( i did it in a night when I was stoned LOL) and assemble. You want the yaw (left right) shaft to be just under or flush at the top on the yoke. Check the STEP file for details on how this thing goes together. It uses Nema 17 size motors, timing belts, bearings and other hardware. It would be a good thing to have a kit of 3mm cap screws of varying lengths to assemble this. Also #4 x 1/2 inch philips flat heads. https://www.amazon.com/dp/B07PMW2QMT OPTP switches https://www.amazon.com/dp/B085D8TB8Z Bearings https://www.amazon.com/dp/B08QZ4365D 8MM bore pulley/belt set (you need 2 sets) https://www.amazon.com/dp/B08335MYGW Flange couplings https://www.amazon.com/dp/B08HYK9FJS 8mm shafts https://www.amazon.com/dp/B077GNZK3Ja 5mm bore pulleys (the set has the wrong bore to fir a Nema 17. screws: https://www.amazon.com/gp/product/B0812TYT5L https://www.amazon.com/gp/product/B07YFNJ5YK I included the step file so you can study the assembly. As far as code and wiring? That's up to you. This is how I have the pins assigned on my UNO. #define YAW_STEP_PIN 2 #define YAW_DIR_PIN 8 #define PITCH_STEP_PIN 3 #define PITCH_DIR_PIN 9 #define ENABLE_PIN 5 //stepper motor power. #define LED_PIN 6 #define YAW_LIMIT_PIN A0 #define PITCH_LIMIT_PIN A1 I am also using a Pololu 5mm addressable LED as a state indicator. https://www.pololu.com/product/2535 The Opto switches can be read as an analog sig or digital. Analog is is how I read. if (ENABLE_HOMING) { if (!YAW_HOMED || !PITCH_HOMED) { digitalWrite(ENABLE_PIN, LOW); // on delayMicroseconds(homing_speed); } if (!YAW_HOMED) { if (analogRead(YAW_LIMIT_PIN) < 500) { YAW_HOMED = true; digitalWrite(YAW_DIR_PIN, HIGH); for (int i = 0; i < 2400; i++) {// I am using 16 sub divisions on ny drivers! 90 degrees digitalWrite(YAW_STEP_PIN, HIGH); delayMicroseconds(2); digitalWrite(YAW_STEP_PIN, LOW); delayMicroseconds(homing_speed); } } else { digitalWrite(YAW_DIR_PIN, LOW); digitalWrite(YAW_STEP_PIN, HIGH); delayMicroseconds(2); digitalWrite(YAW_STEP_PIN, LOW); } } if (!PITCH_HOMED && YAW_HOMED) { if (analogRead(PITCH_LIMIT_PIN) < 500) { PITCH_HOMED = true; startup = true; digitalWrite(PITCH_DIR_PIN, HIGH); for (int i = 0; i < 1200; i++) { // I am using 16 sub divisions on ny drivers! 45 degrees digitalWrite(PITCH_STEP_PIN, HIGH); delayMicroseconds(2); digitalWrite(PITCH_STEP_PIN, LOW); delayMicroseconds(homing_speed); } } else { digitalWrite(PITCH_DIR_PIN, LOW); digitalWrite(PITCH_STEP_PIN, HIGH); delayMicroseconds(2); digitalWrite(PITCH_STEP_PIN, LOW); } } }
Statistics
Likes
0
Downloads
0