Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
*.aux
*.log
*.pdf
*.synctex.gz
*.synctex.gz
22,800 changes: 22,800 additions & 0 deletions tic500/11HS20-0674S-PG27.STEP

Large diffs are not rendered by default.

Binary file added tic500/11HS20-0674S-PG27.stl
Binary file not shown.
Binary file added tic500/17HS13-0404S-PG27.stl
Binary file not shown.
92 changes: 92 additions & 0 deletions tic500/adapter-plate.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// mount tic500 to optical breadboard

$fn=50;
inch = 25.4;

// center to center dimensions
mw = 2*inch; // mounting width
mh = 1*inch; // mounting width
bw = 1.5*inch - 5.1 - 2.5; // board width
bh = 1.05*inch - 5.0; // board height

// hole diameters
md = 0.28*inch; // mounting hole diameter
bd = 0.09*inch; // board hole diameter

module roundedRect(size, radius) {
x = size[0];
y = size[1]; // what was I thinking again??

z = size[2];
linear_extrude(height=z)
hull() {
// place 4 circles in the corners, with the given radius
translate([(-x/2)+radius, (-y/2)+radius, 0])
circle(r=radius);
translate([(x/2)-radius, (-y/2)+radius, 0])
circle(r=radius);
translate([(-x/2) + radius, (y/2)-radius, 0])
circle(r=radius);
translate([(x/2)-radius, (y/2)-radius, 0])
circle(r=radius);
}
}


module counterSunk(position, radius) {
union() {
translate(position)
translate([0,0,-0.1])
union() {
cylinder(3.2, radius, radius, 8, center=false);
translate([0,0,0.1])
cylinder(3.5, 0, 3.5, center=false);
}
}
}

module place_tic500(pos, rot=0){
translate(pos)
color("red", 0.3)
//flip downward facing
rotate([180, 0, 0])
// center board holes and move downward
translate([-(0.75+0.05)*inch, -0.5025*inch, 0.125 * inch])
import("tic_t500_crude.stl");
}


// plate itself
difference() {
// positive rectangle
roundedRect([mw + 0.5*inch, mh + 0.5*inch, 3], 5, center=false);
// four table mounting holes
translate([-mw/2, -mh/2, -0.1])
cylinder(3.2, md/2, md/2, 8, center=false);
translate([-mw/2, mh/2, -0.1])
cylinder(3.2, md/2, md/2, 8, center=false);
translate([mw/2, -mh/2, -0.1])
cylinder(3.2, md/2, md/2, 8, center=false);
translate([mw/2, mh/2, -0.1])
cylinder(3.2, md/2, md/2, 8, center=false);
// four board holes
union() {
counterSunk([bw/2, bh/2, 0], bd/2);
counterSunk([-bw/2, bh/2, 0], bd/2);
counterSunk([bw/2, -bh/2, 0], bd/2);
counterSunk([-bw/2, -bh/2, 0], bd/2);
}
// negative cutouts
translate([0,0,-0.1])
linear_extrude(height=5)
offset(r=3){
offset(r=-6){
union(){
square([mw,bh-0.5*inch], center=true);
square([bw-0.5*inch,mh], center=true);
}
}
}
}

place_tic500();
69 changes: 69 additions & 0 deletions tic500/assembled_nema17.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

$fn=50;
inch = 25.4;
default_color = "aqua";

d_shaft = 5; // shaft diameter

// dimensions
mw = 4*inch; // board width
mh = 2.5*inch; // board height
mt = 0.25*inch; // board thickness

motor_stl = "17HS13-0404S-PG27.stl";

stepper_positions = [
[-1*inch, 0, 0],
[1*inch, 0, 0]
];


module countersunk(diameter, pos){
union(){
through_hole(diamter, pos);
};
}

module through_hole(diameter,pos){
translate(pos)
linear_extrude(mt*1.2, center=true)
color("red", 0.2)
circle(d=diameter);
}

module place_tic(pos){
translate(pos)
color("red", 0.2)
import("tic_t500_crude.stl");
}

module place_stepper(pos){
translate([pos[0], pos[1], pos[2]-80])
// rotate([180,0,0])
color("silver", 0.2)
import(motor_stl);
}

color(default_color)
difference(){
cube([mw, mh, mt], center=true);
union(){
through_hole(5.5, [-1*inch,0,0]);
through_hole(5.5, [1*inch,0,0]);
for (center=stepper_positions) {
translate(center)
for (rot=[0,90,180,270]) {
rotate([0, 0, rot])
through_hole(3.4,[-14, 0, 0]);
}
}
}
}

for (pos = stepper_positions){
place_stepper(pos);
}

place_tic([1*inch, 0, 1*inch]);


69 changes: 69 additions & 0 deletions tic500/delay_vs_angle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
"""calculate important parameters for window delay stage"""

import numpy as np


w = 2e-3 # window length, in m
n1 = 1. # refractive index of air
n2 = 1.45 # refractive index of window material


def calculate(alpha, w=w, n1=n1, n2=n2):
refracted_angle = np.arcsin(n1 * np.sin(alpha) / n2)
beta = alpha - np.arcsin(n1 * np.sin(alpha) / n2)
B1 = w / np.cos(refracted_angle) # length of travel through glass (including refraction)
B2 = B1 * np.sin(beta) * np.tan(alpha) # length of travel after glass to meet with wavefront of path C
C = w / np.cos(alpha) # path length through glass without refraction
path_difference = 2 * (n2 * B1 + n1 * B2 - n1 * C)
return dict(
refracted_angle = refracted_angle,
beta = beta,
B1 = B1,
B2 = B2,
C = C,
path_difference = path_difference,
)

def total_reflectivitiy(theta, n1=n1, n2=n2, polarization="p"):
c1 = (1- (n1/n2 * np.sin(theta))**2 )**0.5
if polarization == "p":
top = n1 * c1 - n2 * np.cos(theta)
bottom = n1 * c1 + n2 * np.cos(theta)
elif polarization == "s":
top = n1 * np.cos(theta) - n2 * c1
bottom = n1 * np.cos(theta) + n2 * c1
else:
raise ValueError
r = np.abs(top / bottom)**2
return 1 - (1 - r)**4


if __name__ == "__main__":
alpha = np.arange(0, 70, 1.8)
# alpha = np.linspace(0, 70, 90)
calculations = [a for a in map(calculate, alpha * np.pi / 180)]
opt_delay = np.array([a["path_difference"]/3e8 for a in calculations])
no_refraction = lambda a: 2 * (n2-n1) *a["C"]
approx_delay = np.array([x/3e8 for x in map(no_refraction, calculations)])

import matplotlib.pyplot as plt
fig, (ax1, ax2, ax3) = plt.subplots(figsize=(5,8), nrows=3, sharex=True)

ax1.plot(alpha, opt_delay * 1e12, lw=2, marker="o")
# ax1.plot(alpha, approx_delay * 1e12)
ax2.plot(alpha, np.array([2 * a["B1"]*1e3 for a in calculations]), lw=2)
ax3.plot(alpha, total_reflectivitiy(alpha * np.pi / 180), lw=2, label="p-pol")
ax3.plot(alpha, total_reflectivitiy(alpha * np.pi / 180, polarization="s"), lw=2, label="s-pol")

ax1.set_ylabel("optical delay (ps)")
ax2.set_ylabel("window travel length (mm)")
ax3.set_ylabel("total reflective loss fraction")
ax3.set_xlabel("incidence angle (deg)")
ax1.set_title(f"w={w*1e3} mm, n={n2}")
# ax1.set_ylim(0, 10)
ax1.set_xlim(30, 70)
[ax.grid() for ax in fig.axes]
plt.show()



69 changes: 69 additions & 0 deletions tic500/main_plate.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

$fn=50;
inch = 25.4;
default_color = "aqua";

d_shaft = 5; // shaft diameter

// dimensions
mw = 4*inch; // board width
mh = 2.5*inch; // board height
mt = 0.25*inch; // board thickness

motor_stl = "11HS20-0674S-PG27.stl";

stepper_positions = [
[-1*inch, 0, 0],
[1*inch, 0, 0]
];


module countersunk(diameter, pos){
union(){
through_hole(diamter, pos);
};
}

module through_hole(diameter,pos){
translate(pos)
linear_extrude(mt*1.2, center=true)
color("red", 0.2)
circle(d=diameter);
}

module place_tic(pos){
translate(pos)
color("red", 0.2)
import("tic_t500_crude.stl");
}

module place_stepper(pos){
translate([pos[0], pos[1], pos[2]-80])
// rotate([180,0,0])
color("silver", 0.2)
import(motor_stl);
}

color(default_color)
difference(){
cube([mw, mh, mt], center=true);
union(){
through_hole(5.5, [-1*inch,0,0]);
through_hole(5.5, [1*inch,0,0]);
for (center=stepper_positions) {
translate(center)
for (rot=[0,90,180,270]) {
rotate([0, 0, rot])
through_hole(3.4,[-14, 0, 0]);
}
}
}
}

for (pos = stepper_positions){
place_stepper(pos);
}

place_tic([1*inch, 0, 1*inch]);


86 changes: 86 additions & 0 deletions tic500/main_plate_nema11.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@

$fn=50;
inch = 25.4;
default_color = "aqua";

d_shaft = 5; // shaft diameter

// dimensions
mw = 4*inch; // board width
mh = 2.5*inch; // board height
mt = 0.25*inch; // board thickness

motor_stl = "11HS20-0674S-PG27.stl";
window_stl = "window_mount_1in.stl";

stepper_positions = [
[-1*inch, 0, 0],
[1*inch, 0, 0]
];


module countersunk(diameter, pos){
union(){
through_hole(diameter, pos);
translate([pos[0], pos[1], pos[2]+mt/2-6.5])
cylinder(7, d1=0, d2=7);
};
}

module through_hole(diameter, pos){
translate(pos)
linear_extrude(mt*1.2, center=true)
circle(d=diameter);
}

module place_tic(pos){
translate(pos)
rotate([-90, 0,0])
rotate([0, 0, -90])
color("red", 0.2)
import("tic_t500_crude.stl");
}

module place_stepper(pos){
translate([pos[0], pos[1], pos[2]-40])
rotate([180,0,0])
color("silver", 0.2)
import(motor_stl);
}

module place_windows(pos, rot=0){
translate(pos)
color("green", 0.3)
rotate([0, -90, rot])
import(window_stl);
}

color(default_color, 0.5)
difference(){
cube([mw, mh, mt], center=true);
union(){
for (center=stepper_positions) {
// for shaft
through_hole(5.5, center);
translate([center[0], center[1], center[2]-mt/2-1])
cylinder(3.1, d=18.5);
translate(center)
// for fasteners to steppers
for (rot=[0,90,180,270]) {
rotate([0, 0, rot])
countersunk(3.4,[-11, 0, 0]);
}
}
}
}

for (pos = stepper_positions){
place_stepper(pos);
}

place_windows([1*inch, 0, mt/2], rot=-45);
place_windows([-1*inch, 0, mt/2], rot=45);

place_tic([0, 1*inch, -2*inch]);


Loading