Compare commits
No commits in common. "af3843a8ef54955abd6cf654e15ce2c69e12ea0f" and "08ce0d792bf07d4c65ee80ca2dbffde596699dca" have entirely different histories.
af3843a8ef
...
08ce0d792b
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "1.8.49",
|
||||
"version": "1.8.46",
|
||||
"ext_port": 1111,
|
||||
"profiles": {
|
||||
"mcopy": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mcopy-app",
|
||||
"version": "1.8.49",
|
||||
"version": "1.8.46",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mcopy-app",
|
||||
"version": "1.8.49",
|
||||
"version": "1.8.46",
|
||||
"description": "GUI for the mcopy small gauge film optical printer platform",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "1.8.49",
|
||||
"version": "1.8.46",
|
||||
"ext_port": 1111,
|
||||
"profiles": {
|
||||
"mcopy": {
|
||||
|
|
|
@ -6,8 +6,7 @@ McopyProjector::McopyProjector (AccelStepper takeup, AccelStepper feed,
|
|||
uint8_t takeupSettingA, uint8_t takeupSettingB,
|
||||
uint8_t feedSettingA, uint8_t feedSettingB,
|
||||
uint8_t takeupEmitter, uint8_t takeupReceiver,
|
||||
uint8_t feedEmitter, uint8_t feedReceiver,
|
||||
uint8_t servoPin) {
|
||||
uint8_t feedEmitter, uint8_t feedReceiver) {
|
||||
_takeup = takeup;
|
||||
_feed = feed;
|
||||
|
||||
|
@ -19,7 +18,6 @@ McopyProjector::McopyProjector (AccelStepper takeup, AccelStepper feed,
|
|||
_takeupReceiver = takeupReceiver;
|
||||
_feedEmitter = feedEmitter;
|
||||
_feedReceiver = feedReceiver;
|
||||
_servoPin = servoPin;
|
||||
}
|
||||
|
||||
void McopyProjector::begin () {
|
||||
|
@ -42,9 +40,6 @@ void McopyProjector::begin () {
|
|||
|
||||
//keep at 1 for now
|
||||
setStepperMode(1);
|
||||
|
||||
_servo.attach(_servoPin);
|
||||
_servo.write(_servoHome);
|
||||
}
|
||||
|
||||
void McopyProjector::setDirection (bool dir) {
|
||||
|
@ -69,9 +64,6 @@ void McopyProjector::frame (bool dir) {
|
|||
|
||||
_running = true;
|
||||
|
||||
_servo.write(_servoAway);
|
||||
delay(20);
|
||||
|
||||
while (running) {
|
||||
if (_takeup.distanceToGo() == 0 && _feed.distanceToGo() == 0) {
|
||||
running = false;
|
||||
|
@ -82,9 +74,6 @@ void McopyProjector::frame (bool dir) {
|
|||
_feed.run();
|
||||
}
|
||||
}
|
||||
|
||||
delay(20);
|
||||
_servo.write(_servoHome);
|
||||
|
||||
_running = false;
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <Arduino.h>
|
||||
#include <AccelStepper.h>
|
||||
#include <Servo.h>
|
||||
|
||||
/**
|
||||
* D2 X Step
|
||||
|
@ -29,16 +28,11 @@ class McopyProjector {
|
|||
AccelStepper _takeup;
|
||||
AccelStepper _feed;
|
||||
|
||||
Servo _servo;
|
||||
|
||||
const uint16_t _motorSteps = 200; //full steps
|
||||
const uint8_t _frames = 8;
|
||||
const uint16_t _stepsPerFrame = 25; //round(_motorSteps / _frames);
|
||||
const float _speed = 2000.0;
|
||||
|
||||
const uint8_t _servoHome = 90;
|
||||
const uint8_t _servoAway = 60;
|
||||
|
||||
volatile uint8_t _mode = 1;
|
||||
|
||||
int64_t _posTakeup = 0;
|
||||
|
@ -56,8 +50,6 @@ class McopyProjector {
|
|||
uint8_t _feedEmitter;
|
||||
uint8_t _feedReceiver;
|
||||
|
||||
uint8_t _servoPin;
|
||||
|
||||
long _feedSamples[200];
|
||||
long _takeupSamples[200];
|
||||
|
||||
|
@ -78,8 +70,7 @@ class McopyProjector {
|
|||
uint8_t takeupSettingA, uint8_t takeupSettingB,
|
||||
uint8_t feedSettingA, uint8_t feedSettingB,
|
||||
uint8_t takeupEmitter, uint8_t takeupReceiver,
|
||||
uint8_t feedEmitter, uint8_t feedReceiver,
|
||||
uint8_t servoPin);
|
||||
uint8_t feedEmitter, uint8_t feedReceiver);
|
||||
void begin();
|
||||
//0 = takeup, 1 = feed
|
||||
void adjust(uint8_t motor, int64_t steps);
|
||||
|
|
|
@ -42,8 +42,6 @@
|
|||
#define FEED_EMITTER 18
|
||||
#define FEED_RECEIVER A9
|
||||
|
||||
#define SERVO_PIN 14
|
||||
|
||||
AccelStepper takeup(AccelStepper::DRIVER, TAKEUP_STEP_PIN, TAKEUP_DIR_PIN);
|
||||
AccelStepper feed(AccelStepper::DRIVER, FEED_STEP_PIN, FEED_DIR_PIN);
|
||||
|
||||
|
@ -66,8 +64,7 @@ McopyProjector projector(takeup, feed,
|
|||
TAKEUP_SETTINGS_A, TAKEUP_SETTINGS_B,
|
||||
FEED_SETTINGS_A, FEED_SETTINGS_B,
|
||||
TAKEUP_EMITTER, TAKEUP_RECEIVER,
|
||||
FEED_EMITTER, FEED_RECEIVER,
|
||||
SERVO_PIN);
|
||||
FEED_EMITTER, FEED_RECEIVER);
|
||||
|
||||
void setup () {
|
||||
pins();
|
||||
|
@ -78,7 +75,6 @@ void setup () {
|
|||
delay(42);
|
||||
digitalWrite(LED_FWD, LOW);
|
||||
digitalWrite(LED_BWD, LOW);
|
||||
|
||||
//projector.home();
|
||||
}
|
||||
|
||||
|
@ -87,9 +83,9 @@ void loop () {
|
|||
cmdChar = mcopy.loop();
|
||||
cmd(cmdChar);
|
||||
if (digitalRead(BUTTON) == LOW) {
|
||||
//projector_frame();
|
||||
projector_frame();
|
||||
}
|
||||
//projector.loop();
|
||||
projector.loop();
|
||||
}
|
||||
|
||||
void pins () {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "mcopy",
|
||||
"version": "1.8.49",
|
||||
"version": "1.8.46",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "mcopy",
|
||||
"version": "1.8.49",
|
||||
"version": "1.8.46",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"arduino": "file:app/lib/arduino",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mcopy",
|
||||
"version": "1.8.49",
|
||||
"version": "1.8.46",
|
||||
"description": "Small gauge film optical printer platform",
|
||||
"main": "build.js",
|
||||
"directories": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "1.8.49",
|
||||
"version": "1.8.46",
|
||||
"ext_port": 1111,
|
||||
"profiles": {
|
||||
"mcopy": {
|
||||
|
|
|
@ -583,7 +583,7 @@ module servo_gear (pos = [0, 0, 0], rot = [0, 0, 0]) {
|
|||
}
|
||||
|
||||
module nub_rack (pos = [0, 0, 0], rot = [0, 0, 0]) {
|
||||
H = 9.25 + 2.4;
|
||||
H = 9.25 + 2.75;
|
||||
Len = 50;
|
||||
translate(pos) rotate(rot) {
|
||||
difference () {
|
||||
|
@ -638,7 +638,7 @@ module debug () {
|
|||
//nub_rack([-6, 0, -15], [-90, 0, 0]);
|
||||
}
|
||||
|
||||
PART = "nub_rack";
|
||||
PART = "servo_gear";
|
||||
|
||||
if (PART == "gate_key") {
|
||||
gate_key(KeyRot = 0);
|
||||
|
|
|
@ -12,7 +12,6 @@ include <./common/motors.scad>
|
|||
include <./common/rods.scad>
|
||||
|
||||
RailSpacing = 100; //160
|
||||
RailVoid = 20.4;
|
||||
ThreadedRodSpacing = 50;
|
||||
RailEndX = RailSpacing + 72;
|
||||
TNutVoid = 17;
|
||||
|
@ -35,8 +34,8 @@ module m3_bolt_void (pos = [0, 0, 0], BoltH = 20, CapH = 3) {
|
|||
|
||||
module bolt_voids_2020 (pos = [0, 0, 0], rot = [0, 0, 0]) {
|
||||
translate(pos) rotate (rot) {
|
||||
translate([0, -25, 0]) rotate([90, 0, 0]) m3_bolt_void(CapH = 6);
|
||||
translate([0, 25, 0]) rotate([-90, 0, 0]) m3_bolt_void(CapH = 20);
|
||||
//translate([0, -25, 0]) rotate([90, 0, 0]) m3_bolt_void(CapH = 6);
|
||||
translate([0, 25, 0]) rotate([-90, 0, 0]) m3_bolt_void(CapH = 20);
|
||||
translate([-25, 0, 0]) rotate([0, -90, 0]) m3_bolt_void(CapH = 6, BoltH = 20);
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +79,7 @@ module mounting_bolt_void (pos = [0, 0, 0], rot = [0, 0, 0]) {
|
|||
}
|
||||
}
|
||||
|
||||
module rail_end (pos = [0, 0, 0], rot = [90, 0, 0], Motors = true, Projector = false) {
|
||||
module rail_end (pos = [0, 0, 0], rot = [90, 0, 0], Motors = true) {
|
||||
Z = 95;
|
||||
RailVoid = 20.4;
|
||||
translate(pos) rotate(rot) {
|
||||
|
@ -127,10 +126,6 @@ module rail_end (pos = [0, 0, 0], rot = [90, 0, 0], Motors = true, Projector = f
|
|||
}
|
||||
}
|
||||
|
||||
echo("sled");
|
||||
echo("BOM: ", "(2) T8 Nut");
|
||||
echo("BOM: ", "(1 or 2) Linear bearing");
|
||||
echo("BOM: ", "(4 or 8) Radial bearings ()");
|
||||
module sled (pos = [0, 0, 0], rot = [90, 0, 0], Length = 60) {
|
||||
X = RailEndX;
|
||||
Y = 60;
|
||||
|
@ -230,19 +225,10 @@ module lens_sled_m5_bolt_nut_voids (pos = [0, 0, 0], rot = [0, 0, 0], Angle = 36
|
|||
}
|
||||
}
|
||||
|
||||
module extrusion_block (pos = [0, 0, 0], rot = [0, 0, 0], Y = 40, Z = 30) {
|
||||
translate(pos) rotate(rot) {
|
||||
difference () {
|
||||
cube([Y, Z, Y], center = true);
|
||||
cube([RailVoid, Z + 1, RailVoid], center = true);
|
||||
}
|
||||
end_2020([0, 0, 0], [90, 0, 0]);
|
||||
}
|
||||
}
|
||||
|
||||
module lens_sled (pos = [0, 0, 0], rot = [90, 0, 0]) {
|
||||
Y = 40;
|
||||
LensDriveX = -ThreadedRodSpacing / 2;
|
||||
RailVoid = 20.4;
|
||||
LensFrameSpacingX = (RailEndX / 2) - (Y / 2);
|
||||
LensFrameM3VoidsZ = (60 / 2) + (40 / 2) - 12.5 + 5 + 6;
|
||||
|
||||
|
@ -250,8 +236,8 @@ module lens_sled (pos = [0, 0, 0], rot = [90, 0, 0]) {
|
|||
difference () {
|
||||
union () {
|
||||
sled(rot = [0, 0, 0], Length = Y);
|
||||
extrusion_block([LensFrameSpacingX, (60 / 2) + (40 / 2) - 5, 0]);
|
||||
extrusion_block([-LensFrameSpacingX, (60 / 2) + (40 / 2) - 5, 0]);
|
||||
translate([(RailEndX / 2) - (Y / 2), (60 / 2) + (40 / 2) - 5, 0]) cube([Y, 30, Y], center = true);
|
||||
translate([-(RailEndX / 2) + (Y / 2), (60 / 2) + (40 / 2) - 5, 0]) cube([Y, 30, Y], center = true);
|
||||
translate([LensFrameSpacingX - 35 - 25, 48, 0]) cube([10, 21, 40], center = true);
|
||||
}
|
||||
T_nut_void ([LensDriveX, 0, (Y / 2) - (TNutVoid / 2) + 0.01], [180, 0, 0]);
|
||||
|
@ -265,6 +251,10 @@ module lens_sled (pos = [0, 0, 0], rot = [90, 0, 0]) {
|
|||
side_sled_bearing_void([(RailSpacing / 2) + 21.5, 0, 0], [90, -90, 0]);
|
||||
side_sled_bearing_void([-(RailSpacing / 2) - 21.5, 0, 0], [-90, -90, 0]);
|
||||
|
||||
//lens carriage frame
|
||||
translate([LensFrameSpacingX, 53.5, 0]) cube([RailVoid, 32, RailVoid], center = true);
|
||||
translate([-LensFrameSpacingX, 53.5, 0]) cube([RailVoid, 32, RailVoid], center = true);
|
||||
|
||||
//
|
||||
lens_sled_m3_bolt_voids([(RailEndX / 2) - (Y / 2), LensFrameM3VoidsZ, 0]);
|
||||
lens_sled_m3_bolt_voids([(-RailEndX / 2) + (Y / 2), LensFrameM3VoidsZ, 0]);
|
||||
|
@ -388,12 +378,12 @@ module debug () {
|
|||
}
|
||||
|
||||
|
||||
PART = "rail_end_idle";
|
||||
PART = "lens_sled";
|
||||
|
||||
if (PART == "rail_end") {
|
||||
rail_end();
|
||||
} else if (PART == "rail_end_idle") {
|
||||
rail_end(Motors = false, Projector = true);
|
||||
rail_end(Motors = false);
|
||||
} else if (PART == "lens_sled") {
|
||||
rotate([-90, 0, 0]) lens_sled();
|
||||
} else if (PART == "bearing_roller") {
|
||||
|
|
Loading…
Reference in New Issue