1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-09-09 14:40:44 +02:00

Compare commits

..

12 Commits

Author SHA1 Message Date
Chris Palmer
fc49e8068e Merge branch 'AlexVerschoot-master' 2025-02-22 12:18:10 +00:00
Chris Palmer
862357279a Updated images and readme. 2025-02-22 12:17:07 +00:00
Alex Verschoot
0b8ad93dc5 made the test cases work with the motor in the back 2025-02-16 12:23:20 +01:00
Alex Verschoot
38890400ac added new test cases for motor in the back 2025-02-16 12:22:47 +01:00
Alex Verschoot
9974c03fc9 improved the comments 2025-02-15 16:29:23 +01:00
Alex Verschoot
0208965684 added an option to emplace the motor in the back 2025-02-15 16:25:19 +01:00
Chris Palmer
11e0cfcb43 Updated changelog. 2025-01-22 01:34:04 +00:00
Chris Palmer
6c4d5de350 Merge branch 'loekwous-feature/add-blackpill-pcb' 2025-01-22 01:28:57 +00:00
Chris Palmer
8458e432fc Updated images and readme. 2025-01-22 01:28:39 +00:00
Chris Palmer
7503e8c2cf Merge branch 'feature/add-blackpill-pcb' of https://github.com/loekwous/NopSCADlib into loekwous-feature/add-blackpill-pcb 2025-01-22 00:11:47 +00:00
Chris Palmer
0154b2a32c Added Sparkfun 9DOF_stick PCB. 2025-01-21 14:45:22 +00:00
loekwous
e11bb72814 Added Black pill pcb 2025-01-01 19:29:08 +01:00
8 changed files with 268 additions and 57 deletions

View File

@@ -3,6 +3,18 @@
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
### [v21.33.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.33.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.32.1...v21.33.0 "diff with v21.32.1")
* 2025-01-22 [`8458e43`](https://github.com/nophead/NopSCADlib/commit/8458e432fcb472c0b2f7c880f9c06ea7d4f7511f "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
* 2025-01-01 [`e11bb72`](https://github.com/nophead/NopSCADlib/commit/e11bb72814010692e22f0cbe891c77fac0bcebfe "show commit") [L.](# "loekwous") Added Black pill pcb
* 2025-01-21 [`0154b2a`](https://github.com/nophead/NopSCADlib/commit/0154b2a32ce6cd9fd0a5e8cd69e1b26f0358f816 "show commit") [C.P.](# "Chris Palmer") Added Sparkfun `9DOF_stick` PCB.
#### [v21.32.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.32.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.32.0...v21.32.1 "diff with v21.32.0")
* 2025-01-21 [`0b80218`](https://github.com/nophead/NopSCADlib/commit/0b802187bb56726e84128df9ccb46c9a830e7dbc "show commit") [C.P.](# "Chris Palmer") Corrected the chip number on `ZC_A0591` pcb.
* 2025-01-21 [`923c3b5`](https://github.com/nophead/NopSCADlib/commit/923c3b5c573cde6f9bc4611e6bf0e5cc2922443e "show commit") [C.P.](# "Chris Palmer") Avoid making empty folders for dxfs, stls or png if there are no parts of that type.
### [v21.32.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.32.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.31.0...v21.32.0 "diff with v21.31.0")
* 2024-10-20 [`4d89117`](https://github.com/nophead/NopSCADlib/commit/4d8911718c54fdee5054d934c4aeeee34386d7f9 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1016 KiB

After

Width:  |  Height:  |  Size: 1018 KiB

View File

@@ -2982,6 +2982,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `pcb(BTT_SKR_E3_TURBO)` | BigTreeTech SKR E3 Turbo |
| 1 | `pcb(BTT_SKR_MINI_E3_V2_0)` | BigTreeTech SKR Mini E3 v2.0 |
| 1 | `pcb(BTT_SKR_V1_4_TURBO)` | BigTreeTech SKR v1.4 Turbo |
| 1 | `pcb(BlackPill)` | Black Pill |
| 1 | | Cat 5 patch cable 300mm |
| 1 | `d_plug(DCONN15, pcb = true)` | D-type 15 way PCB mount plug - not shown |
| 1 | `pcb(DuetE)` | Duet 2 Ethernet electronics |
@@ -3009,7 +3010,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `molex_254(3)` | Molex KK header 3 way - not shown |
| 20 | `nut(M2_nut, nyloc = true)` | Nut M2 x 1.6mm nyloc |
| 38 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc |
| 47 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
| 48 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
| 8 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc |
| 1 | `pcb(OPZ2)` | Orange Pi Zero 2 |
| 1 | `pcb(PI_IO)` | PI_IO V2 - not shown |
@@ -3033,17 +3034,19 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 4 | `screw(M2_cap_screw, 25)` | Screw M2 cap x 25mm |
| 2 | `screw(M2p5_cap_screw, 20)` | Screw M2.5 cap x 20mm |
| 8 | `screw(M2p5_cap_screw, 30)` | Screw M2.5 cap x 30mm |
| 12 | `screw(M2p5_cap_screw, 35)` | Screw M2.5 cap x 35mm |
| 8 | `screw(M2p5_cap_screw, 35)` | Screw M2.5 cap x 35mm |
| 4 | `screw(M2p5_cap_screw, 40)` | Screw M2.5 cap x 40mm |
| 4 | `screw(M2p5_dome_screw, 25)` | Screw M2.5 dome x 25mm |
| 4 | `screw(M2p5_pan_screw, 20)` | Screw M2.5 pan x 20mm |
| 8 | `screw(M2p5_pan_screw, 30)` | Screw M2.5 pan x 30mm |
| 19 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm |
| 13 | `screw(M3_cap_screw, 20)` | Screw M3 cap x 20mm |
| 4 | `screw(M3_cap_screw, 25)` | Screw M3 cap x 25mm |
| 5 | `screw(M3_cap_screw, 25)` | Screw M3 cap x 25mm |
| 11 | `screw(M3_cap_screw, 35)` | Screw M3 cap x 35mm |
| 4 | `screw(M4_cap_screw, 20)` | Screw M4 cap x 20mm |
| 4 | `screw(M4_cap_screw, 25)` | Screw M4 cap x 25mm |
| 1 | `pcb(XIAO)` | Seeeduino XIAO |
| 1 | `pcb(9DOF_stick)` | Sparkfun 9 degrees of freedom IMU |
| 1 | `pcb(TP4056)` | TP4056 Li-lon Battery charger module |
| 3 | `terminal_35(2)` | Terminal block 2 way 3.5mm - not shown |
| 2 | `green_terminal(gt_2p54, 4)` | Terminal block 4 way 0.1" - not shown |
@@ -3052,7 +3055,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `pcb(WD2002SJ)` | WD2002SJ Buck Boost DC-DC converter |
| 20 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm |
| 38 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
| 47 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
| 48 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
| 8 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
| 1 | `pcb(ZC_A0591)` | ZC-A0591 ULN2003 driver PCB |
@@ -3066,18 +3069,18 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 4 | pcb_spacer2090.stl |
| 2 | pcb_spacer25110.stl |
| 4 | pcb_spacer25140.stl |
| 4 | pcb_spacer25170.stl |
| 4 | pcb_spacer25180.stl |
| 4 | pcb_spacer25190_2.stl |
| 4 | pcb_spacer25190.stl |
| 4 | pcb_spacer25200_2.stl |
| 4 | pcb_spacer25240.stl |
| 4 | pcb_spacer25210_2.stl |
| 4 | pcb_spacer25250.stl |
| 4 | pcb_spacer25260.stl |
| 4 | pcb_spacer25270.stl |
| 4 | pcb_spacer2580.stl |
| 4 | pcb_spacer30130.stl |
| 4 | pcb_spacer30210.stl |
| 5 | pcb_spacer30130.stl |
| 4 | pcb_spacer30220.stl |
| 3 | pcb_spacer30230.stl |
| 4 | pcb_spacer30230.stl |
| 3 | pcb_spacer30240.stl |
| 10 | pcb_spacer3050.stl |
| 9 | pcb_spacer3060.stl |
| 9 | pcb_spacer3070.stl |
@@ -7217,9 +7220,9 @@ allows flexible positioning of the motors.
### Modules
| Module | Description |
|:--- |:--- |
| `coreXY(type, size, pos, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false)` | Wrapper module to draw both belts of a coreXY setup |
| `coreXY(type, size, pos, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false, motor_back = false)` | Wrapper module to draw both belts of a coreXY setup |
| `coreXY_belts(type, carriagePosition, coreXYPosBL, coreXYPosTR, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false)` | Draw the coreXY belts |
| `coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_offset = [0, 0], drive_pulley_offset = [0, 0], show_pulleys = false, lower_belt = false, hflip = false)` | Draw one belt of a coreXY setup |
| `coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_offset = [0, 0], drive_pulley_offset = [0, 0], show_pulleys = false, lower_belt = false, hflip = false, motor_back = false)` | Draw one belt of a coreXY setup |
![core_xy](tests/png/core_xy.png)
@@ -7228,12 +7231,15 @@ allows flexible positioning of the motors.
| ---:|:--- |:---|
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 728mm |
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 790mm |
| 7 | `pulley(GT2x16_toothed_idler)` | Pulley GT2 idler 16 teeth |
| 3 | `pulley(GT2x16_plain_idler)` | Pulley GT2 idler smooth 9.63mm |
| 2 | `pulley(GT2x20ob_pulley)` | Pulley GT2OB 20 teeth |
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 826mm |
| 1 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 826mm |
| 2 | `belt(GT2x6, [ ... ])` | Belt GT2 x 6mm x 836mm |
| 15 | `pulley(GT2x16_toothed_idler)` | Pulley GT2 idler 16 teeth |
| 15 | `pulley(GT2x16_plain_idler)` | Pulley GT2 idler smooth 9.63mm |
| 6 | `pulley(GT2x20ob_pulley)` | Pulley GT2OB 20 teeth |
| 8 | `screw(M3_cap_screw, 20)` | Screw M3 cap x 20mm |
| 4 | `screw(M3_grub_screw, 6)` | Screw M3 grub x 6mm |
| 2 | `NEMA(NEMA17_40)` | Stepper motor NEMA17 x 40mm (5x20 shaft) |
| 12 | `screw(M3_grub_screw, 6)` | Screw M3 grub x 6mm |
| 6 | `NEMA(NEMA17_40)` | Stepper motor NEMA17 x 40mm (5x20 shaft) |
<a href="#top">Top</a>

View File

@@ -132,5 +132,57 @@ module coreXY_belts_test() {
}
}
if ($preview)
module coreXY_motor_in_back_test1() {
size = [200,200];
pos = [100,100];
separation = [20,5,10];
coreXY(coreXY_GT2_20_16, size, pos, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = true, left_lower = false, motor_back = true);
rotate([180,0,0])
translate (
[ separation.x/2
, 0
, -separation.z/2 -15 ])
NEMA(NEMA17_40);
translate (
[ size.x - separation.x/2
, 0
, -separation.z/2 - 15 ])
NEMA(NEMA17_40);
}
module coreXY_motor_in_back_test2() {
size = [200,200];
pos = [100,100];
separation = [0,5,10];
upper_drive_pulley_offset = [20, 5];
lower_drive_pulley_offset = [20, 5];
coreXY(coreXY_GT2_20_16, size, pos, separation, x_gap = 0, plain_idler_offset = [20, 0], upper_drive_pulley_offset, lower_drive_pulley_offset, show_pulleys = true, left_lower = false, motor_back = true);
translate (
[ size.x - separation.x/2 - lower_drive_pulley_offset.x
, lower_drive_pulley_offset.y
, -separation.z/2 - 15 ])
NEMA(NEMA17_40);
translate (
[ separation.x/2 + upper_drive_pulley_offset.x
, upper_drive_pulley_offset.y
, separation.z/2 - 25 ])
NEMA(NEMA17_40);
}
if ($preview) {
coreXY_belts_test();
translate ([-250, 0,0])
coreXY_motor_in_back_test1();
translate ([-250, -250,0])
coreXY_motor_in_back_test2();
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 KiB

After

Width:  |  Height:  |  Size: 237 KiB

162
utils/core_xy.scad Normal file → Executable file
View File

@@ -68,41 +68,61 @@ function coreXY_drive_plain_idler_offset(type) = //! Offset of plain drive idler
[ coreXY_plain_idler_offset(type).x, -(pulley_od(coreXY_plain_idler(type)) + pulley_od(coreXY_drive_pulley(type))) / 2, 0 ];
module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_offset = [0, 0], drive_pulley_offset = [0, 0], show_pulleys = false, lower_belt = false, hflip = false) { //! Draw one belt of a coreXY setup
module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_offset = [0, 0], drive_pulley_offset = [0, 0], show_pulleys = false, lower_belt = false, hflip = false, motor_back = false) { //! Draw one belt of a coreXY setup
// y-carriage toothed pulley
p0_type = coreXY_toothed_idler(type);
p0 = [ size.x / 2, -size.y / 2 - pulley_od(p0_type) / 2 + pos.y - separation_y / 2 ];
p0t_type = coreXY_toothed_idler(type);
p0p_type = coreXY_plain_idler(type);
p0t = [ size.x / 2, -size.y / 2 - pulley_od(p0t_type) / 2 + pos.y - separation_y / 2 ];
p0p = [ size.x / 2, -size.y / 2 - pulley_od(p0p_type) / 2 + pos.y - separation_y / 2 ];
// bottom right toothed idler pulley
p1_type = p0_type;
p1t_type = p0t_type;
p1p_type = p0p_type;
p1 = [ size.x / 2, -size.y / 2 ];
// bottom left anchor toothed idler pulley
p2_type = p0_type;
p2_type = coreXY_toothed_idler(type);
p2 = [ -size.x / 2, -size.y / 2 ];
//drive type if the motor is in the back
p2d_type = coreXY_drive_pulley(type);
p2d = [ lower_belt ? p2.x - drive_pulley_offset.x:p2.x + drive_pulley_offset.x,
p2.y + drive_pulley_offset.y
];
// plain idler for offset stepper motor if the motor is in the back
p2p_type = coreXY_plain_idler(type);
p2p = [ lower_belt ? p2.x + plain_idler_offset.x - drive_pulley_offset.x : p2.x + plain_idler_offset.x + drive_pulley_offset.x,
p2.y + plain_idler_offset.y
];
// stepper motor drive pulley
// stepper motor drive pulley if motor not in back
p3d_type = coreXY_drive_pulley(type);
p3d = [ -size.x / 2 + coreXY_drive_pulley_x_alignment(type) + drive_pulley_offset.x,
size.y / 2 + drive_pulley_offset.y
];
// toothed idler for offset stepper motor drive pulley
// toothed idler for offset stepper motor drive pulley if motor not in back
p3t_type = coreXY_toothed_idler(type);
p3t = [ -size.x / 2 + (drive_pulley_offset.x > 0 ? 0 : plain_idler_offset.x + 2 * coreXY_drive_pulley_x_alignment(type)),
p3t = [ -size.x / 2 + ((drive_pulley_offset.x > 0 || motor_back ) ? 0 : plain_idler_offset.x + 2 * coreXY_drive_pulley_x_alignment(type)),
size.y / 2 + coreXY_drive_pulley_x_alignment(type)
];
// y-carriage plain pulley
p4_type = coreXY_plain_idler(type);
p4t_type = coreXY_toothed_idler(type);
p4 = [ -size.x / 2 + pulley_od(p4_type) / 2 + pulley_od(p3d_type) / 2 + coreXY_drive_pulley_x_alignment(type) + (drive_pulley_offset.x == 0 ? 0 : plain_idler_offset.x),
-size.y / 2 + pulley_od(p4_type) / 2 + pos.y + separation_y / 2
];
p4mb = [-size.x / 2 + pulley_od(p4_type) / 2 + pulley_od(p3t_type) / 2 + coreXY_drive_pulley_x_alignment(type),
-size.y / 2 + pulley_od(p4_type) / 2 + pos.y + separation_y / 2];
// plain idler for offset stepper motor drive pulley
// plain idler for offset stepper motor drive pulley if motor not in back
p3p_type = p4_type;
p3p = [ drive_pulley_offset.x > 0 ? p4.x : -p0.x - pulley_od(p0_type),
p3p = [ drive_pulley_offset.x > 0 ? p4.x : -p0p.x - pulley_od(p0p_type),
size.y / 2 - pulley_od(p3p_type) / 2 - pulley_od(p3d_type) / 2 + plain_idler_offset.y
];
@@ -110,7 +130,7 @@ module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_off
start_p = [ pos.x - size.x / 2 + x_gap / 2, -size.y / 2 + pos.y - separation_y / 2, 0 ];
end_p = [ pos.x - size.x / 2 - x_gap / 2, -size.y / 2 + pos.y + separation_y / 2, 0 ];
//p6_type = p0_type;
//p6_type = p0p_type;
module show_pulleys(show_pulleys) {// Allows the pulley colour to be set for debugging
if (is_list(show_pulleys))
@@ -121,33 +141,81 @@ module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_off
}
show_pulleys(show_pulleys) {
translate(p0)
pulley_assembly(p0_type); // y-carriage toothed pulley
if ( !motor_back ) {
translate(p0t)
pulley_assembly(p0t_type); // y-carriage toothed pulley
translate(p1)
pulley_assembly(p1t_type); // bottom right toothed idler pulley
translate(p2)
pulley_assembly(p2_type); // bottom left anchor toothed idler pulley
translate(p3d)
hflip(hflip)
pulley_assembly(p3d_type); // top left stepper motor drive pulley
translate(p1)
pulley_assembly(p1_type); // bottom right toothed idler pulley
if (drive_pulley_offset.x ) { // idler pulleys for offset stepper motor drive pulley
translate(p3t)
pulley_assembly(p3t_type); // toothed idler
translate(p2)
pulley_assembly(p2_type); // bottom left anchor toothed idler pulley
translate(p3d)
hflip(hflip)
pulley_assembly(p3d_type); // top left stepper motor drive pulley
if (drive_pulley_offset.x) { // idler pulleys for offset stepper motor drive pulley
translate(p3t)
pulley_assembly(p3t_type); // toothed idler
translate(p3p)
pulley_assembly(p3p_type); // plain idler
translate(p3p)
pulley_assembly(p3p_type); // plain idler
}
translate(p4)
pulley_assembly(p4_type); // y-carriage plain pulley
}
translate(p4)
pulley_assembly(p4_type); // y-carriage plain pulley
else { //motor in the back
if (drive_pulley_offset.x ) { // idler pulleys for offset stepper motor drive pulley
translate(p0p)
pulley_assembly(p0p_type); // y-carriage plain pulley
translate(p1)
pulley_assembly(p1p_type); // bottom right plain idler pulley
//left bottom corner
translate(p2)
pulley_assembly(p2p_type); // plain idler
translate(p2p)
pulley_assembly(p2p_type); // plain idler
translate(p2d)
hflip(hflip)
pulley_assembly(p2d_type); // bottom left stepper motor drive pulley
translate(p3t)
pulley_assembly(p3p_type); // top left plain idler
translate(p4mb)
pulley_assembly(p4t_type); // y-carriage toothed pulley
} else {
translate(p0t)
pulley_assembly(p0t_type); // y-carriage toothed pulley
translate(p1)
pulley_assembly(p1t_type); // bottom right toothed idler pulley
//left bottom corner
// bottom left stepper motor drive pulley
translate(p2)
if(lower_belt)
hflip(hflip)
pulley_assembly(p2d_type);
else
hflip(!hflip)
pulley_assembly(p2d_type);
translate(p3t)
pulley_assembly(p3t_type); // top left toothed idler
translate(p4mb)
pulley_assembly(p4_type); // y-carriage plain pulley
}
}
}
path0a = [
[ p0.x, p0.y, pulley_od(p0_type) / 2 ],
[ p1.x, p1.y, pulley_od(p1_type) / 2 ],
[ p0p.x, p0p.y, pulley_od(p0p_type) / 2 ],
[ p1.x, p1.y, pulley_od(p1p_type) / 2 ],
[ p2.x, p2.y, pulley_od(p2_type) / 2 ]
];
path0b = [
@@ -169,8 +237,28 @@ module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_off
belt = coreXY_belt(type);
path0 = drive_pulley_offset.x == 0 ? concat(path0a, path0b) : drive_pulley_offset.x > 0 ? concat(path0a, path0c) : concat(path0a, path0d);
path = concat([start_p], path0, [end_p]);
path0 = drive_pulley_offset.x == 0 ? concat(path0a, path0b) : drive_pulley_offset.x > 0 ? concat(path0a, path0c) : concat(path0a, path0d);
path_mb_0a = [
[ p0p.x, p0p.y, pulley_od(p0p_type) / 2 ],
[ p1.x, p1.y, pulley_od(p1p_type) / 2 ],
[ p2.x, p2.y, pulley_od(p2d_type) / 2 ],
[ p3t.x, p3t.y, pulley_od(p3t_type) / 2 ],
[ p4mb.x, p4mb.y, -pulley_od(p4_type) / 2 ]
];
path_mb_0b = [
[ p0t.x, p0t.y, pulley_od(p0t_type) / 2 ],
[ p1.x, p1.y, pulley_od(p1p_type) / 2 ],
[ p2p.x, p2p.y, pulley_od(p2p_type) / 2 ],
[ p2d.x, p2d.y, -pulley_od(p2d_type) / 2 ],
[ p2.x, p2.y, pulley_od(p2p_type) / 2 ],
[ p3t.x, p3t.y, pulley_od(p3p_type) / 2 ],
[ p4mb.x, p4mb.y, -pulley_od(p4_type) / 2 ]
];
path_mb0 = drive_pulley_offset.x == 0 ? path_mb_0a : path_mb_0b;
path = motor_back? concat([start_p], path_mb0, [end_p]):concat([start_p], path0, [end_p]);
belt(type = belt,
points = path,
@@ -179,18 +267,18 @@ module coreXY_half(type, size, pos, separation_y = 0, x_gap = 0, plain_idler_off
tooth_colour = lower_belt ? coreXY_lower_tooth_colour(type) : coreXY_upper_tooth_colour(type));
}
module coreXY(type, size, pos, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false) { //! Wrapper module to draw both belts of a coreXY setup
module coreXY(type, size, pos, separation, x_gap = 0, plain_idler_offset = [0, 0], upper_drive_pulley_offset = [0, 0], lower_drive_pulley_offset = [0, 0], show_pulleys = false, left_lower = false, motor_back = false) { //! Wrapper module to draw both belts of a coreXY setup
translate([size.x / 2 - separation.x / 2, size.y / 2, -separation.z / 2]) {
// lower belt
hflip(!left_lower)
explode(25)
coreXY_half(type, size, [size.x - pos.x - separation.x/2 - (left_lower ? x_gap : 0), pos.y], separation.y, x_gap, plain_idler_offset, [-lower_drive_pulley_offset.x, lower_drive_pulley_offset.y], show_pulleys, lower_belt = true, hflip = true);
coreXY_half(type, size, [size.x - pos.x - separation.x/2 - (left_lower ? x_gap : 0), pos.y], separation.y, x_gap, plain_idler_offset, [-lower_drive_pulley_offset.x, lower_drive_pulley_offset.y], show_pulleys, lower_belt = true, hflip = true, motor_back);
// upper belt
translate([separation.x, 0, separation.z])
hflip(left_lower)
explode(25)
coreXY_half(type, size, [pos.x + separation.x/2 + (left_lower ? x_gap : 0), pos.y], separation.y, x_gap, plain_idler_offset, upper_drive_pulley_offset, show_pulleys, lower_belt = false, hflip = false);
coreXY_half(type, size, [pos.x + separation.x/2 + (left_lower ? x_gap : 0), pos.y], separation.y, x_gap, plain_idler_offset, upper_drive_pulley_offset, show_pulleys, lower_belt = false, hflip = false, motor_back);
}
}

View File

@@ -1020,6 +1020,39 @@ ArduinoNano = let(l = 43.18, w = 17.78, pitch = inch(0.6), pins = 15, poffset =
[(l - inch(pins - 1) / 10) / 2 + poffset, (w - pitch) / 2, pins, 2, silver, 2.54, pitch], // 15x2 grid of holes
];
BlackPill = let(l = 52.81, w = 20.78, pitch = inch(0.6), pins = 20, poffset = inch(-0.05), led_spacing = [0, 9.93/2], btn_spacing = [0, 4.3/2]) [
"BlackPill", "Black Pill",
l, w, 1.6, // Size
0, // corner radius
0, // mounting hole diameter
0, // pad around mounting hole
"#101010", // color
false, // true if parts should be separate BOM items
[],
[ // components
[l / 2 + poffset, w / 2 - pitch / 2, 0, "-2p54joiner", pins, 1, undef, "yellow"],
[l / 2 + poffset, w / 2 + pitch / 2, 0, "-2p54joiner", pins, 1, undef, "yellow"],
[l - inch(0.27), w / 2, 90, "2p54header", 4, 1, undef, undef, true],
[ l -26.75, w / 2, 45, "chip", 7, 7, 1.3],
[ 3.6, w / 2, 180, "usb_C" ],
[ 15, 5.3, 0, "text", 4, 1.27, "BOOT0"],
[ 15, w-5.3, 0, "text", 4, 1.27, "NRST"],
[ l - 16, w/2-led_spacing.y, 0, "text", 4, 1.27, "PWR"],
[ l - 16, w/2+led_spacing.y, 0, "text", 4, 1.27, "C13"],
[ 15, w / 2 - btn_spacing.y, 90, "chip", 3.5, 6, 1.8, silver ], // mock button boot0
[ 15, w / 2 - btn_spacing.y, 90, "chip", 1.3, 2.6, 2.6, grey(90) ], // mock button boot0
[ 15, w / 2 + btn_spacing.y, 90, "chip", 3.5, 6, 1.8, silver ], // mock button nrst
[ 15, w / 2 + btn_spacing.y, 90, "chip", 1.3, 2.6, 2.6, grey(90) ], // mock button nrst
[ l - 12, 8.5, 90, "chip", 3.5, 6, 1.8, silver ], // mock button user
[ l - 12, 8.5, 90, "chip", 1.3, 2.6, 2.6, grey(90) ], // mock button user
[ l - 17, 12.5, 90, "chip", 3.2, 2.5, 0.6, brass ], // xtal
[ l - 12, 12.5, 90, "smd_sot", SOT23],
[ l - 12, w / 2 - led_spacing.y, 0, "smd_led", LED0603, "red"],
[ l - 12, w / 2 + led_spacing.y, 0, "smd_led", LED0603, "blue"]],
[], // accessories
[(l - inch(pins - 1) / 10) / 2 + poffset, (w - pitch) / 2, pins, 2, silver, 2.54, pitch], // 15x2 grid of holes
];
KY_040 = ["KY_040", "KY-040 rotart encoder breakout",
26.3, 19.5, 1.6, 0, 3, 0, grey(20), false,
[
@@ -1244,11 +1277,31 @@ tiny_buck = pcb("tiny_buck", "Ultra Small 3A buck regulator", [20, 11, 1.6],
]
);
tiny_pcbs = [ESP_201, ESP_01M, XIAO, ESP_12F, MP1584EN, ESP_01,tiny_buck, LIPO_fuel_gauge];
9DOF_stick = pcb("9DOF_stick", "Sparkfun 9 degrees of freedom IMU", [24, 11, 0.8],
colour = "red",
hole_d = 3.3,
holes = [[-1.2 - 3.3 / 2, 11 / 2]],
components = [
[9.7, 11/ 2, 0, "chip", 3, 3.5, 1],
[9.7, 8.5, 0, "smd_cap", CAP0603, 0.8],
for(i = [0 : 3])
[5.27, 2.5 + i * 2, 0, "smd_cap", CAP0603, 0.8],
[12.8, 4, 90, "smd_res", RES0603, "472"],
[14.1, 4, 90, "smd_res", RES0603, "472"],
// Silkscreen
[17.75, 1.4, 0,"text", 11, 1.4, "9DOF Stick", "Liberation Sans:style=Bold"],
[3, 11/2, 90, "text", 10, 1, "SCL SDA VDD GND", "Liberation Sans:style=Bold"],
],
grid = [inch(0.05), 11 / 2 - inch(0.15), 1, 4, "silver", 0, inch(0.1)]
);
tiny_pcbs = [ESP_201, ESP_01M, XIAO, ESP_12F, MP1584EN, ESP_01,tiny_buck, LIPO_fuel_gauge, 9DOF_stick];
big_pcbs = [BTT_RELAY_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
pcbs = [KY_040, TP4056, L9110S, ZC_A0591, RCWL0516, MT3608,RAMPSEndstop, ArduinoNano, HW803_1WAY_RELAY, Feather405, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, OPZ2, PanelDue_v3, RPI3A, RPI3, RPI4];
pcbs = [KY_040, TP4056, L9110S, ZC_A0591, RCWL0516, MT3608,RAMPSEndstop, ArduinoNano, HW803_1WAY_RELAY, Feather405, RPI_Pico,
ESP32_DOIT_V1, BlackPill, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, OPZ2, PanelDue_v3, RPI3A, RPI3, RPI4];
pcbs_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1, PI_IO, ExtruderPCB];