No changes between revisions
/Modules/Mechanical/WINDGAUGE02A/CAD/2x3MLAB_frame.scad
0,0 → 1,49
 
x_holes = 3;
y_holes = 4;
MLAB_grid = 10.16;
pile_radius = 4;
pedestal_height = 15; // designed for use the MLAB standard 20mm screws.
x_size = x_holes * MLAB_grid ;
y_size = y_holes * MLAB_grid ;
mount_hole = 3.5;
//nut_size = 6.8; //size suitable for PLA material
nut_size = 6.7; //size suitable for ABS material
clear = 0.175;
 
 
thickness = 1;
 
MLAB_grid_xoffset = MLAB_grid/2;
MLAB_grid_yoffset = MLAB_grid/2;
 
grid_list = [for (j = [MLAB_grid_xoffset : MLAB_grid: x_size], i = [MLAB_grid_yoffset :MLAB_grid: y_size])
if ((j>(x_size-10) && i>(y_size-10)) || (j<10 && i<10) || (j<10 && i>(y_size-10)) || (j>(x_size-10) && i<10) ) [j, i] ];
 
 
difference () {
union () {
for (j = grid_list) {
translate (concat(j, [0]))
cylinder (h = pedestal_height, r= pile_radius, $fn=20);
}
 
translate ([MLAB_grid_xoffset , MLAB_grid_yoffset , 0])
minkowski() {
cube([x_size - 2*(MLAB_grid/2 - pile_radius) - 2*pile_radius, y_size - 2*(MLAB_grid/2 - pile_radius) - 2*pile_radius, thickness]); // base plastics brick
cylinder(r=pile_radius,h=0.1);
}
}
translate ([2*pile_radius, 2*pile_radius, 0]) // central hole in module support
cube([x_size-4*pile_radius, y_size-4*pile_radius, 2*thickness]);
 
// MLAB grid holes
for (j = grid_list) {
translate (concat(j, [0]))
cylinder (h = 3, r= (nut_size+clear)/2, $fn=6);
translate (concat(j, [3.2])) // one solid layer for slicer (the holes will be pierced on demand )
cylinder (h = pedestal_height, r= mount_hole/2, $fn=10);
}
}
 
/Modules/Mechanical/WINDGAUGE02A/CAD/SRC/kryt_rotoru.scad
0,0 → 1,46
$fn=40; // model faces resolution.
//include <../configuration.scad>
 
//kryt_rotoru(prumer_rotoru1,sila_materialu,prumer_sroubu,vyska_rotoru1);
 
/*
prumer_rotoru1 - urcuje vnitrni prumer krytu
sila_materialu - urcuje tloustku materialu krytu
prumer
vyska_rotoru1 - urcuje vysku, kterou prekryva kryt rotor 1
 
*/
 
module kryt_rotoru(prumer_rotoru1,sila_materialu,vyska_rotoru1)
{
//kopule
difference()
{
sphere(d = prumer_rotoru1+2*sila_materialu, $fn=100);
sphere(d = prumer_rotoru1+0.1, $fn=100);
translate([0,0,-(prumer_rotoru1+2*sila_materialu)/2])
cube(size = [prumer_rotoru1+2*sila_materialu, prumer_rotoru1+2*sila_materialu, prumer_rotoru1+2*sila_materialu], center = true);
}
//válcová část krytu
difference()
{
//zakladni valec
translate([0,0,-vyska_rotoru1/2])
cylinder (h = vyska_rotoru1, r=(prumer_rotoru1+2*sila_materialu)/2, center = true, $fn=100);
//válec pro vykrojení
translate([0,0,-vyska_rotoru1/2])
cylinder (h = vyska_rotoru1+0.05, r=(prumer_rotoru1+0.1)/2, center = true, $fn=100);
}
}
 
 
 
/Modules/Mechanical/WINDGAUGE02A/CAD/SRC/lopatky.scad
0,0 → 1,96
$fn=40; // model faces resolution.
//include <../configuration.scad>
//lopatka(hloubka_uchytu,sila_uchytu,vyska_uchytu,tolerance_uchytu,prumer_lopatky,sila_materialu_lopatky,delka_uchytu_lopatky,hrana_uchytu_lopatky,prumer_rotoru1,prumer_sroubu);
 
 
 
/*
hloubka_uchytu - fefinuje delku zapusteni uchytu lopatky do rotorové casti
sila_uchytu - sirka drzaku lopatky zapustene do rotoru
vyska_uchytu - definuje vysku drzaku lopatky zapustene do rotoru
tolerance_uchytu - mezera pro snadnějsi zasunuti do rotoru
 
prumer_lopatky - prumer lopatky vnejsi
sila_materialu_lopatky
delka_uchytu_lopaty - delky tycky mezi uchytem do rotoru a lopatkou
hrana_uchytu_lopatky - hrana ctvercoveho profilu tycky mezi uchytem do rotoru a lopatkou
 
prumer_rotoru1 -
prumer_sroubu - odava prumer sroubu pro uchyceni lopatky
 
 
*/
 
 
 
module lopatka(hloubka_uchytu,sila_uchytu,vyska_uchytu,tolerance_uchytu,prumer_lopatky,sila_materialu_lopatky,delka_uchytu_lopatky,hrana_uchytu_lopatky,prumer_rotoru1,prumer_sroubu)
{
union()
{
//prechod lopatka drzak
difference()
{
translate([-hrana_uchytu_lopatky/2,prumer_lopatky/4,0])
cube([hrana_uchytu_lopatky,(prumer_lopatky/2)+5,hrana_uchytu_lopatky],center=true);
sphere(d = prumer_lopatky, $fn=100);
}
difference()
{
//lopatka
sphere(d = prumer_lopatky, $fn=100);
sphere(d = prumer_lopatky-2*sila_materialu_lopatky, $fn=100);
translate([0,-prumer_lopatky/2,-prumer_lopatky/2])
cube(size = prumer_lopatky);
}
//uchyt_lopatky - tycka
translate([-hrana_uchytu_lopatky/2,prumer_lopatky/2+delka_uchytu_lopatky/2,0])
cube([hrana_uchytu_lopatky,delka_uchytu_lopatky,hrana_uchytu_lopatky],center=true);
//uchyt lopatky cast v rotoru
translate([-sila_uchytu/2,prumer_lopatky/2+delka_uchytu_lopatky+hloubka_uchytu/2,0])
difference()
{
cube([sila_uchytu,hloubka_uchytu,vyska_uchytu],center=true);
//otvor pro sroub
translate([0,0,0])
cylinder(h=vyska_uchytu+1, r=prumer_sroubu/2, center=true, $fn=100);
//zaobleni
translate([0,+prumer_rotoru1/2-hloubka_uchytu/2,0])
difference()
{
cylinder(h=vyska_uchytu+1, r=prumer_rotoru1/2+2, center=true, $fn=100);
cylinder(h=vyska_uchytu+2, r=prumer_rotoru1/2, center=true, $fn=100);
}
}
//vyrovnávací úsek mezi úchytem v rotoru a úchytem loplatky (tyčkou)
translate([0,prumer_lopatky/2+delka_uchytu_lopatky+5/2,0])
difference()
{
translate([-hrana_uchytu_lopatky/2,0,0])
cube([hrana_uchytu_lopatky,10,hrana_uchytu_lopatky],center=true);
translate([-sila_uchytu,+prumer_rotoru1/2-5/2,0])
cylinder(h=vyska_uchytu+1, r=prumer_rotoru1/2, center=true, $fn=100);
}
}
}
/Modules/Mechanical/WINDGAUGE02A/CAD/SRC/rotor1.scad
0,0 → 1,102
$fn=40; // model faces resolution.
//include <../configuration.scad>
 
/*
prumer_rotoru1 - vnejsi prumer
vyska_rotoru1 - vyska rotoru1 bez vysky uchytu lopatky
prumer_sroubu-
vyska_matky -
prumer_orechu - vnejsi prumer nástroje pro dotahovani matky
sila_materialu - pro pripad vyvoreni zapusti pro kryt rotoru
sila_materialu_vule
hloubka_prekryti - hloubka zapusteni krytu rotoru
hloubka_uchytu - definovano lopatkou
sila_uchytu - definovano lopatkou
vyska_uchytu - definovano lopatkou
tolerance_uchytu - definovano lopatkou
 
*/
 
//rotor1(prumer_rotoru1,vyska_rotoru1,prumer_sroubu,vyska_matky,prumer_orechu,sila_materialu,sila_materialu_vule,hloubka_prekryti,hloubka_uchytu,sila_uchytu,vyska_uchytu,tolerance_uchytu);
 
 
module rotor1(prumer_rotoru1,vyska_rotoru1,prumer_sroubu,vyska_matky,prumer_orechu,sila_materialu,sila_materialu_vule,hloubka_prekryti,hloubka_uchytu,sila_uchytu,vyska_uchytu,tolerance_uchytu)
{
difference()
{
union ()
{
cylinder (h = vyska_rotoru1-hloubka_prekryti, r=prumer_rotoru1/2, center = true, $fn=100);
 
translate([0,0,vyska_rotoru1/2])
cylinder (h = hloubka_prekryti, r=(prumer_rotoru1/2) -sila_materialu-sila_materialu_vule, center = true, $fn=100);
 
//otvory pro lopatky
translate([0,0,-(vyska_rotoru1-hloubka_prekryti)/2-(vyska_uchytu+tolerance_uchytu)/2])
//otvory pro lopatky
difference ()
{
cylinder (h = vyska_uchytu+tolerance_uchytu, r=(prumer_rotoru1/2), center = true, $fn=100);
cylinder (h = vyska_uchytu+2*tolerance_uchytu, r=(prumer_rotoru1/2-hloubka_uchytu+5), center = true, $fn=100);
//dira pro prvni uchyt lopatky
translate([hloubka_uchytu/2+(prumer_rotoru1/2-hloubka_uchytu),0,0])
cube([hloubka_uchytu,sila_uchytu+tolerance_uchytu,vyska_uchytu+2*tolerance_uchytu],true);
//dira pro druhy uchyt lopatky
rotate(a=[0,0,120])
translate([hloubka_uchytu/2+(prumer_rotoru1/2-hloubka_uchytu),0,0])
cube([hloubka_uchytu,sila_uchytu+tolerance_uchytu,vyska_uchytu+2*tolerance_uchytu],true);
//dira pro treti uchyt lopatky
rotate(a=[0,0,240])
translate([hloubka_uchytu/2+(prumer_rotoru1/2-hloubka_uchytu),0,0])
cube([hloubka_uchytu,sila_uchytu+tolerance_uchytu,vyska_uchytu+2*tolerance_uchytu],true);
}
}
 
//otvor pro uchyceni prvni lopatky
translate([hloubka_uchytu/2+(prumer_rotoru1/2-hloubka_uchytu),0,hloubka_prekryti/2])
cylinder (h = vyska_rotoru1+0.1, r=prumer_sroubu/2, center = true, $fn=100);
 
translate([hloubka_uchytu/2+(prumer_rotoru1/2-hloubka_uchytu),0,-(vyska_rotoru1-hloubka_prekryti)/2+vyska_matky/2])
cylinder (h = vyska_matky+0.1, r=prumer_orechu/2, center = true, $fn=100);
//otvor pro uchyceni druhe lopatky
rotate(a=[0,0,120])
translate([hloubka_uchytu/2+(prumer_rotoru1/2-hloubka_uchytu),0,hloubka_prekryti/2])
cylinder (h = vyska_rotoru1+0.1, r=prumer_sroubu/2, center = true, $fn=100);
 
rotate(a=[0,0,120])
translate([hloubka_uchytu/2+(prumer_rotoru1/2-hloubka_uchytu),0,-(vyska_rotoru1-hloubka_prekryti)/2+vyska_matky/2])
cylinder (h = vyska_matky+0.1, r=prumer_orechu/2, center = true, $fn=100);
 
//otvor pro uchyceni treti lopatky
rotate(a=[0,0,240])
translate([hloubka_uchytu/2+(prumer_rotoru1/2-hloubka_uchytu),0,hloubka_prekryti/2])
cylinder (h = vyska_rotoru1+0.1, r=prumer_sroubu/2, center = true, $fn=100);
 
rotate(a=[0,0,240])
translate([hloubka_uchytu/2+(prumer_rotoru1/2-hloubka_uchytu),0,-(vyska_rotoru1-hloubka_prekryti)/2+vyska_matky/2])
cylinder (h = vyska_matky+0.1, r=prumer_orechu/2, center = true, $fn=100);
}
 
}
 
 
 
 
/Modules/Mechanical/WINDGAUGE02A/CAD/SRC/rotor2.scad
0,0 → 1,83
$fn=40; // model faces resolution.
//include <../configuration.scad>
 
//rotor2 (vyska_rotoru2,prumer_rotoru1,vyska_kryti,sila_materialu,stator1_sila,vyska_matky,vzdalenost_rot_stat,lozisko_prumer_vnitrni,lozisko_prekryv,sila_pod_loziskem,delka_hridele,lozisko_vyska,sirka_matky_tol,sirka_matky,hloubka_uchytu,vyska_rotoru1,prumer_sroubu,vyska_matky,prumer_orechu,vzdalenost_rot_stat2,sirka_matky_tol);
 
 
 
module rotor2 (vyska_rotoru2,prumer_rotoru1,vyska_kryti,sila_materialu,stator1_sila,vyska_matky,vzdalenost_rot_stat,lozisko_prumer_vnitrni,lozisko_prekryv,sila_pod_loziskem,delka_hridele,lozisko_vyska,sirka_matky_tol,sirka_matky,hloubka_uchytu,vyska_rotoru1,prumer_sroubu,vyska_matky,prumer_orechu,vzdalenost_rot_stat2,sirka_matky_tol)
{
 
difference()
{
union ()
{
cylinder (h = vyska_rotoru2, r=prumer_rotoru1/2, center = true, $fn=100);
 
//kryci kroužek
translate([0,0,-(vyska_rotoru2)/2-(vyska_kryti)/2])
difference ()
{
cylinder (h = vyska_kryti, r=(prumer_rotoru1/2), center = true, $fn=100);
cylinder (h = vyska_kryti+0.1, r=(prumer_rotoru1/2-sila_materialu), center = true, $fn=100);
}
//doraz na lozisko
translate([0,0,-(vyska_rotoru2+stator1_sila+vyska_matky+vzdalenost_rot_stat)/2])
cylinder (h = stator1_sila+vyska_matky+vzdalenost_rot_stat, r=(lozisko_prumer_vnitrni+2*lozisko_prekryv)/2, center = true, $fn=100);
 
//hridel
translate([0,0,-(vyska_rotoru2+stator1_sila+vyska_matky+vzdalenost_rot_stat+lozisko_vyska+sila_pod_loziskem+delka_hridele)/2])
cylinder (h = stator1_sila+vyska_matky+vzdalenost_rot_stat+lozisko_vyska+sila_pod_loziskem+delka_hridele, r=(lozisko_prumer_vnitrni/2), center = true, $fn=100);
}
//otvor v hřídeli
translate([0,0,-(stator1_sila+vyska_matky+vzdalenost_rot_stat+lozisko_vyska+sila_pod_loziskem+delka_hridele)/2])
cylinder (h = vyska_rotoru2+stator1_sila+vyska_matky+vzdalenost_rot_stat+lozisko_vyska+sila_pod_loziskem+delka_hridele+0.1, r=(prumer_sroubu/2), center = true, $fn=100);
//otvor pro matku
translate([0,0,(vyska_rotoru2-vyska_matky)/2])
cylinder (h = vyska_matky+0.1, r= (sirka_matky+sirka_matky_tol)/2, center = true,$fn=6);
 
//otvor pro uchyceni prvni lopatky
translate([hloubka_uchytu/2+(prumer_rotoru1/2-hloubka_uchytu),0,0])
cylinder (h = vyska_rotoru1+0.1, r=prumer_sroubu/2, center = true, $fn=100);
 
translate([hloubka_uchytu/2+(prumer_rotoru1/2-hloubka_uchytu),0,-(vyska_rotoru2)/2+vyska_matky/2])
cylinder (h = vyska_matky+0.1, r=prumer_orechu/2, center = true, $fn=100);
//otvor pro uchyceni druhe lopatky
rotate(a=[0,0,120])
translate([hloubka_uchytu/2+(prumer_rotoru1/2-hloubka_uchytu),0,0])
cylinder (h = vyska_rotoru1+0.1, r=prumer_sroubu/2, center = true, $fn=100);
 
rotate(a=[0,0,120])
translate([hloubka_uchytu/2+(prumer_rotoru1/2-hloubka_uchytu),0,-(vyska_rotoru2)/2+vyska_matky/2])
cylinder (h = vyska_matky+0.1, r=prumer_orechu/2, center = true, $fn=100);
 
//otvor pro uchyceni treti lopatky
rotate(a=[0,0,240])
translate([hloubka_uchytu/2+(prumer_rotoru1/2-hloubka_uchytu),0,0])
cylinder (h = vyska_rotoru1+0.1, r=prumer_sroubu/2, center = true, $fn=100);
 
rotate(a=[0,0,240])
translate([hloubka_uchytu/2+(prumer_rotoru1/2-hloubka_uchytu),0,-(vyska_rotoru2)/2+vyska_matky/2])
cylinder (h = vyska_matky+0.1, r=prumer_orechu/2, center = true, $fn=100);
}
}
 
/Modules/Mechanical/WINDGAUGE02A/CAD/SRC/rotor3.scad
0,0 → 1,45
$fn=40; // model faces resolution.
//include <configuration.scad>
 
 
 
 
 
//dutinka pro upevneni rotoru
module rotor3 (sila_pod_loziskem,delka_hridele,lozisko_prumer_vnitrni,lozisko_prekryv)
{
difference()
{
 
//dotahovací kroužek
translate([0,0,0])
cylinder (h = sila_pod_loziskem+delka_hridele+2, r=(lozisko_prumer_vnitrni+2*lozisko_prekryv)/2, center = true, $fn=100);
cylinder (h = sila_pod_loziskem+delka_hridele+2+0.1, r=((lozisko_prumer_vnitrni+0.2)/2), center = true, $fn=100);
}
}
 
 
module rotor4 (vyska_pod_magnetem,magnet_zapusteni,magnet_prumer,vyska_hlavy_sroubu,prumer_hlavy_sroubu,prumer_sroubu)
{
difference()
{
//segment pro sroub a magnet
translate([0,0,0])
cylinder (h = vyska_pod_magnetem+magnet_zapusteni, r=(magnet_prumer+5)/2, center = true, $fn=100);
//otvor pro magnet
translate([0,0,vyska_pod_magnetem/2+0.1])
cylinder (h = magnet_zapusteni, r=((magnet_prumer+0.2)/2), center = true, $fn=100);
//zapusteni uchytného sroubu
translate([0,0,(vyska_pod_magnetem-vyska_hlavy_sroubu-1)/2+0.1])
cylinder (h = vyska_hlavy_sroubu+1, r=((prumer_hlavy_sroubu+0.2)/2), center = true, $fn=100);
 
//otvor pro sroub
cylinder (h = vyska_pod_magnetem+magnet_zapusteni+0.1, r=(prumer_sroubu)/2, center = true, $fn=100);
}
}
 
 
/Modules/Mechanical/WINDGAUGE02A/CAD/SRC/stator1.scad
0,0 → 1,39
$fn=40; // model faces resolution.
//include <../configuration.scad>
 
 
 
module stator1(stator1_sila,lozisko_prumer_vnejsi,sirka_matky,lozisko_prumer_vnitrni,lozisko_prekryv,prumer_sroubu)
{
difference()
{
cylinder (h = stator1_sila, r=(lozisko_prumer_vnejsi+10+sirka_matky)/2, center = true, $fn=100);
 
//otvor pro hridel rotoru
translate([0,0,0])
cylinder (h = stator1_sila+0.1, r=(lozisko_prumer_vnitrni+2*lozisko_prekryv+2)/2, center = true, $fn=100);
//otvor pro sroub 1
translate([(lozisko_prumer_vnejsi+prumer_sroubu+5)/2,0,0])
cylinder (h = stator1_sila+0.1, r=prumer_sroubu/2, center = true, $fn=100);
 
//otvor pro sroub 2
rotate(a=[0,0,120])
translate([(lozisko_prumer_vnejsi+prumer_sroubu+5)/2,0,0])
cylinder (h = stator1_sila+0.1, r=prumer_sroubu/2, center = true, $fn=100);
//otvor pro sroub 3
rotate(a=[0,0,240])
translate([(lozisko_prumer_vnejsi+prumer_sroubu+5)/2,0,0])
cylinder (h = stator1_sila+0.1, r=prumer_sroubu/2, center = true, $fn=100);
}
}
 
 
 
 
 
 
/Modules/Mechanical/WINDGAUGE02A/CAD/SRC/stator2.scad
0,0 → 1,92
$fn=40; // model faces resolution.
//include <../configuration.scad>
 
module stator2(lozisko_vyska,sila_pod_loziskem,prumer_rotoru1,sila_materialu,vule1,stator3_sila_steny,lozisko_prumer_vnejsi,lozisko_prumer_vnitrni,lozisko_prekryv,
prumer_sroubu,
lozisko_vyska,vzdalenost_der_x,vzdalenost_der_y,vyska_hlavy_sroubu,prumer_hlavy_sroubu,prumer_rotoru1,stator3_vzdalenost_od_steny)
{
difference()
{
cylinder (h = lozisko_vyska+sila_pod_loziskem, r=(prumer_rotoru1-2*sila_materialu-2*vule1-stator3_sila_steny-0.5)/2, center = true, $fn=100);
 
//otvor pro lozisko
translate([0,0,sila_pod_loziskem])
cylinder (h = lozisko_vyska+0.1, r=(lozisko_prumer_vnejsi+0.1)/2, center = true, $fn=100);
//otvor pro hridel rotoru
translate([0,0,0])
cylinder (h = lozisko_vyska+sila_pod_loziskem+0.1, r=(lozisko_prumer_vnitrni+2*lozisko_prekryv+2)/2, center = true, $fn=100);
//otvor pro sroub 1
translate([(lozisko_prumer_vnejsi+prumer_sroubu+5)/2,0,0])
cylinder (h = lozisko_vyska+sila_pod_loziskem+0.1, r=prumer_sroubu/2, center = true, $fn=100);
 
//otvor pro sroub 2
rotate(a=[0,0,120])
translate([(lozisko_prumer_vnejsi+prumer_sroubu+5)/2,0,0])
cylinder (h = lozisko_vyska+sila_pod_loziskem+0.1, r=prumer_sroubu/2, center = true, $fn=100);
//otvor pro sroub 3
rotate(a=[0,0,240])
translate([(lozisko_prumer_vnejsi+prumer_sroubu+5)/2,0,0])
cylinder (h = lozisko_vyska+sila_pod_loziskem+0.1, r=prumer_sroubu/2, center = true, $fn=100);
//otvory pro uchyceni senzoru
//otvor pro sroub 1
translate([(vzdalenost_der_x/2),-vzdalenost_der_y/2,0])
cylinder (h = lozisko_vyska+sila_pod_loziskem+0.1, r=prumer_sroubu/2, center = true, $fn=100);
 
translate([(vzdalenost_der_x/2),-vzdalenost_der_y/2,(lozisko_vyska+sila_pod_loziskem-vyska_hlavy_sroubu)/2])
cylinder (h = vyska_hlavy_sroubu+0.1, r=prumer_hlavy_sroubu/2, center = true, $fn=100);
 
 
//otvor pro sroub 2
rotate(a=[0,0,0])
translate([(-vzdalenost_der_x/2),-vzdalenost_der_y/2,0])
cylinder (h = lozisko_vyska+sila_pod_loziskem+0.1, r=prumer_sroubu/2, center = true, $fn=100);
 
translate([(-vzdalenost_der_x/2),-vzdalenost_der_y/2,(lozisko_vyska+sila_pod_loziskem-vyska_hlavy_sroubu)/2])
cylinder (h = vyska_hlavy_sroubu+0.1, r=prumer_hlavy_sroubu/2, center = true, $fn=100);
 
//otvor pro sroub 3
rotate(a=[0,0,0])
translate([(vzdalenost_der_x/2),vzdalenost_der_y/2,0])
cylinder (h = lozisko_vyska+sila_pod_loziskem+0.1, r=prumer_sroubu/2, center = true, $fn=100);
 
translate([(vzdalenost_der_x/2),vzdalenost_der_y/2,(lozisko_vyska+sila_pod_loziskem-vyska_hlavy_sroubu)/2])
cylinder (h = vyska_hlavy_sroubu+0.1, r=prumer_hlavy_sroubu/2, center = true, $fn=100);
 
 
//otvor pro sroub 4
rotate(a=[0,0,0])
translate([(-vzdalenost_der_x/2),vzdalenost_der_y/2,0])
cylinder (h = lozisko_vyska+sila_pod_loziskem+0.1, r=prumer_sroubu/2, center = true, $fn=100);
 
translate([(-vzdalenost_der_x/2),vzdalenost_der_y/2,(lozisko_vyska+sila_pod_loziskem-vyska_hlavy_sroubu)/2])
cylinder (h = vyska_hlavy_sroubu+0.1, r=prumer_hlavy_sroubu/2, center = true, $fn=100);
 
 
//otvory pro uchyceni stator 3
//otvor pro sroub 1
translate([0,(prumer_rotoru1-2*sila_materialu-2*vule1-2*stator3_sila_steny-prumer_hlavy_sroubu-2*stator3_vzdalenost_od_steny)/2,0])
cylinder (h = lozisko_vyska+sila_pod_loziskem+0.1, r=prumer_sroubu/2, center = true, $fn=100);
 
translate([0,(prumer_rotoru1-2*sila_materialu-2*vule1-2*stator3_sila_steny-prumer_hlavy_sroubu-2*stator3_vzdalenost_od_steny)/2,2])
cylinder (h = lozisko_vyska+sila_pod_loziskem+0.1, r=prumer_hlavy_sroubu/2, center = true, $fn=100);
 
//otvor pro sroub 2
translate([0,-(prumer_rotoru1-2*sila_materialu-2*vule1-2*stator3_sila_steny-prumer_hlavy_sroubu-2*stator3_vzdalenost_od_steny)/2,0])
cylinder (h = lozisko_vyska+sila_pod_loziskem+0.1, r=prumer_sroubu/2, center = true, $fn=100);
 
translate([0,-(prumer_rotoru1-2*sila_materialu-2*vule1-2*stator3_sila_steny-prumer_hlavy_sroubu-2*stator3_vzdalenost_od_steny)/2,2])
cylinder (h = lozisko_vyska+sila_pod_loziskem+0.1, r=prumer_hlavy_sroubu/2, center = true, $fn=100);
 
}
 
}
 
 
 
 
/Modules/Mechanical/WINDGAUGE02A/CAD/SRC/stator3.scad
0,0 → 1,78
$fn=40; // model faces resolution.
//include <../configuration.scad>
 
module stator3(stator3_vyska,prumer_rotoru1,lozisko_vyska,sila_pod_loziskem,sila_materialu,vule1,stator3_sila_steny,
stator3_vyska_prekryti,prumer_hlavy_sroubu,stator3_vzdalenost_od_steny,lozisko_vyska,prumer_sroubu,roztec_sroubu,uchyt_prumer_sroubu,vyska_stator4,kabel_prumer)
{
difference()
{
cylinder (h = stator3_vyska, r=(prumer_rotoru1)/2, center = true, $fn=100);
translate([0,0,(stator3_vyska-lozisko_vyska-sila_pod_loziskem)/2])
cylinder (h = lozisko_vyska+sila_pod_loziskem+0.1, r=(prumer_rotoru1-2*sila_materialu-2*vule1-stator3_sila_steny)/2, center = true, $fn=100);
 
cylinder (h = stator3_vyska+0.1, r=(prumer_rotoru1-2*sila_materialu-2*vule1-2*stator3_sila_steny-1)/2, center = true, $fn=100);
translate([0,0,(stator3_vyska-stator3_vyska_prekryti)/2])
difference()
{
cylinder (h = stator3_vyska_prekryti+0.1, r=(prumer_rotoru1+0.1)/2, center = true, $fn=100);
cylinder (h = stator3_vyska_prekryti+0.1, r=(prumer_rotoru1-2*sila_materialu-2*vule1)/2, center = true, $fn=100);
}
//otvory pro uchyceni stator 3
//otvor pro sroub 1
translate([0,(prumer_rotoru1-2*sila_materialu-2*vule1-2*stator3_sila_steny-prumer_hlavy_sroubu-2*stator3_vzdalenost_od_steny)/2,0])
cylinder (h = lozisko_vyska+sila_pod_loziskem+0.1, r=prumer_sroubu/2, center = true, $fn=100);
 
translate([0,(prumer_rotoru1-2*sila_materialu-2*vule1-2*stator3_sila_steny-prumer_hlavy_sroubu-2*stator3_vzdalenost_od_steny)/2,2])
cylinder (h = lozisko_vyska+sila_pod_loziskem+0.1, r=prumer_hlavy_sroubu/2, center = true, $fn=100);
 
//otvor pro sroub 2
translate([0,-(prumer_rotoru1-2*sila_materialu-2*vule1-2*stator3_sila_steny-prumer_hlavy_sroubu-2*stator3_vzdalenost_od_steny)/2,0])
cylinder (h = lozisko_vyska+sila_pod_loziskem+0.1, r=prumer_sroubu/2, center = true, $fn=100);
 
translate([0,-(prumer_rotoru1-2*sila_materialu-2*vule1-2*stator3_sila_steny-prumer_hlavy_sroubu-2*stator3_vzdalenost_od_steny)/2,2])
cylinder (h = lozisko_vyska+sila_pod_loziskem+0.1, r=prumer_hlavy_sroubu/2, center = true, $fn=100);
}
 
 
//dno stator3
 
translate([0,0,-(stator3_vyska-stator3_sila_steny)/2])
difference()
{
cylinder (h = stator3_sila_steny, r=(prumer_rotoru1)/2, center = true, $fn=100);
//otvory pro uchyceni stator 3
//otvor pro sroub 1
translate([0,(prumer_rotoru1-2*sila_materialu-2*vule1-2*stator3_sila_steny-prumer_hlavy_sroubu-2*stator3_vzdalenost_od_steny)/2,0])
cylinder (h = stator3_sila_steny+0.1, r=prumer_sroubu/2, center = true, $fn=100);
 
 
//otvor pro sroub 2
translate([0,-(prumer_rotoru1-2*sila_materialu-2*vule1-2*stator3_sila_steny-prumer_hlavy_sroubu-2*stator3_vzdalenost_od_steny)/2,0])
cylinder (h = stator3_sila_steny+0.1, r=prumer_sroubu/2, center = true, $fn=100);
//srouby pro uchycení anemometru
translate([roztec_sroubu/2,roztec_sroubu/2,0])
cylinder (h = stator3_sila_steny+0.1, r=uchyt_prumer_sroubu/2, center = true, $fn=100);
translate([-roztec_sroubu/2,roztec_sroubu/2,0])
cylinder (h = stator3_sila_steny+0.1, r=uchyt_prumer_sroubu/2, center = true, $fn=100);
 
translate([roztec_sroubu/2,-roztec_sroubu/2,0])
cylinder (h = stator3_sila_steny+0.1, r=uchyt_prumer_sroubu/2, center = true, $fn=100);
translate([-roztec_sroubu/2,-roztec_sroubu/2,0])
cylinder (h = stator3_sila_steny+0.1, r=uchyt_prumer_sroubu/2, center = true, $fn=100);
//dira na kabel
cylinder (h = vyska_stator4+0.1, r=(kabel_prumer/2+0.1), center = true, $fn=100);
}
}
/Modules/Mechanical/WINDGAUGE02A/CAD/SRC/stator4.scad
0,0 → 1,50
$fn=40; // model faces resolution.
//include <../configuration.scad>
 
 
 
//stator4 (roztec_sroubu,uchyt_prumer_sroubu,vyska_stator4,sila_materialu,uchyt_vyska_matky,uchyt_prumer_orechu,kabel_prumer);
 
module stator4 (roztec_sroubu,uchyt_prumer_sroubu,vyska_stator4,sila_materialu,uchyt_vyska_matky,uchyt_prumer_orechu,kabel_prumer)
{
difference()
{
//translate([90,0,0])
cube(size = [roztec_sroubu+uchyt_prumer_orechu+2*sila_materialu,roztec_sroubu+uchyt_prumer_orechu+2*sila_materialu, vyska_stator4], center = true);
//díry pro uchycení anemometru
translate([roztec_sroubu/2,roztec_sroubu/2,0])
cylinder (h = vyska_stator4+0.1, r=uchyt_prumer_sroubu/2, center = true, $fn=100);
translate([-roztec_sroubu/2,roztec_sroubu/2,0])
cylinder (h = vyska_stator4+0.1, r=uchyt_prumer_sroubu/2, center = true, $fn=100);
 
translate([roztec_sroubu/2,-roztec_sroubu/2,0])
cylinder (h = vyska_stator4+0.1, r=uchyt_prumer_sroubu/2, center = true, $fn=100);
translate([-roztec_sroubu/2,-roztec_sroubu/2,0])
cylinder (h = vyska_stator4+0.1, r=uchyt_prumer_sroubu/2, center = true, $fn=100);
//dira na kabel
cylinder (h = vyska_stator4+0.1, r=(kabel_prumer/2+0.1), center = true, $fn=100);
//díry pro matky
translate([roztec_sroubu/2,roztec_sroubu/2,vyska_stator4/2-uchyt_vyska_matky/2])
cylinder (h = uchyt_vyska_matky+0.1, r=uchyt_prumer_orechu/2, center = true, $fn=100);
translate([-roztec_sroubu/2,roztec_sroubu/2,vyska_stator4/2-uchyt_vyska_matky/2])
cylinder (h = uchyt_vyska_matky+0.1, r=uchyt_prumer_orechu/2, center = true, $fn=100);
 
translate([roztec_sroubu/2,-roztec_sroubu/2,vyska_stator4/2-uchyt_vyska_matky/2])
cylinder (h = uchyt_vyska_matky+0.1, r=uchyt_prumer_orechu/2, center = true, $fn=100);
translate([-roztec_sroubu/2,-roztec_sroubu/2,vyska_stator4/2-uchyt_vyska_matky/2])
cylinder (h = uchyt_vyska_matky+0.1, r=uchyt_prumer_orechu/2, center = true, $fn=100);
}
}
 
/Modules/Mechanical/WINDGAUGE02A/CAD/SRC/zavity.scad
0,0 → 1,324
/*
* ISO-standard metric threads, following this specification:
* http://en.wikipedia.org/wiki/ISO_metric_screw_thread
*
* Dan Kirshner - dan_kirshner@yahoo.com
*
* You are welcome to make free use of this software. Retention of my
* authorship credit would be appreciated.
*
* Version 1.8. 2016-01-08 Option: (non-standard) angle.
* Version 1.7. 2015-11-28 Larger x-increment - for small-diameters.
* Version 1.6. 2015-09-01 Options: square threads, rectangular threads.
* Version 1.5. 2015-06-12 Options: thread_size, groove.
* Version 1.4. 2014-10-17 Use "faces" instead of "triangles" for polyhedron
* Version 1.3. 2013-12-01 Correct loop over turns -- don't have early cut-off
* Version 1.2. 2012-09-09 Use discrete polyhedra rather than linear_extrude ()
* Version 1.1. 2012-09-07 Corrected to right-hand threads!
*/
 
// Examples.
//
// Standard M8 x 1.
// metric_thread (diameter=8, pitch=1, length=4);
 
// Square thread.
// metric_thread (diameter=8, pitch=1, length=4, square=true);
 
// Non-standard: long pitch, same thread size.
//metric_thread (diameter=8, pitch=4, length=4, thread_size=1, groove=true);
 
// Non-standard: 20 mm diameter, long pitch, square "trough" width 3 mm,
// depth 1 mm.
//metric_thread (diameter=20, pitch=8, length=16, square=true, thread_size=6,
// groove=true, rectangle=0.333);
 
// English: 1/4 x 20.
//english_thread (diameter=1/4, threads_per_inch=20, length=1);
 
// Thread for mounting on Rohloff hub.
//difference () {
// cylinder (r=20, h=10, $fn=100);
//
// metric_thread (diameter=34, pitch=1, length=10, internal=true, n_starts=6);
//}
 
 
// ----------------------------------------------------------------------------
function segments (diameter) = min (50, ceil (diameter*6));
 
 
// ----------------------------------------------------------------------------
// internal - true = clearances for internal thread (e.g., a nut).
// false = clearances for external thread (e.g., a bolt).
// (Internal threads should be "cut out" from a solid using
// difference ()).
// n_starts - Number of thread starts (e.g., DNA, a "double helix," has
// n_starts=2). See wikipedia Screw_thread.
// thread_size - (non-standard) size of a single thread "V" - independent of
// pitch. Default: same as pitch.
// groove - (non-standard) subtract inverted "V" from cylinder (rather than
// add protruding "V" to cylinder).
// square - Square threads (per
// https://en.wikipedia.org/wiki/Square_thread_form).
// rectangle - (non-standard) "Rectangular" thread - ratio depth/width
// Default: 1 (square).
// angle - (non-standard) angle (deg) of thread side from perpendicular to
// axis (default = standard = 30 degrees).
module metric_thread (diameter=8, pitch=1, length=1, internal=false, n_starts=1,
thread_size=-1, groove=false, square=false, rectangle=0,
angle=30)
{
// thread_size: size of thread "V" different than travel per turn (pitch).
// Default: same as pitch.
local_thread_size = thread_size == -1 ? pitch : thread_size;
local_rectangle = rectangle ? rectangle : 1;
 
n_segments = segments (diameter);
h = (square || rectangle) ? local_thread_size*local_rectangle/2 : local_thread_size * cos (angle);
 
h_fac1 = (square || rectangle) ? 0.90 : 0.625;
 
// External thread includes additional relief.
h_fac2 = (square || rectangle) ? 0.95 : 5.3/8;
 
if (! groove) {
metric_thread_turns (diameter, pitch, length, internal, n_starts,
local_thread_size, groove, square, rectangle, angle);
}
 
difference () {
 
// Solid center, including Dmin truncation.
if (groove) {
cylinder (r=diameter/2, h=length, $fn=n_segments);
} else if (internal) {
cylinder (r=diameter/2 - h*h_fac1, h=length, $fn=n_segments);
} else {
 
// External thread.
cylinder (r=diameter/2 - h*h_fac2, h=length, $fn=n_segments);
}
 
if (groove) {
metric_thread_turns (diameter, pitch, length, internal, n_starts,
local_thread_size, groove, square, rectangle,
angle);
}
}
}
 
 
// ----------------------------------------------------------------------------
// Input units in inches.
// Note: units of measure in drawing are mm!
module english_thread (diameter=0.25, threads_per_inch=20, length=1,
internal=false, n_starts=1, thread_size=-1, groove=false,
square=false, rectangle=0)
{
// Convert to mm.
mm_diameter = diameter*25.4;
mm_pitch = (1.0/threads_per_inch)*25.4;
mm_length = length*25.4;
 
echo (str ("mm_diameter: ", mm_diameter));
echo (str ("mm_pitch: ", mm_pitch));
echo (str ("mm_length: ", mm_length));
metric_thread (mm_diameter, mm_pitch, mm_length, internal, n_starts,
thread_size, groove, square, rectangle);
}
 
// ----------------------------------------------------------------------------
module metric_thread_turns (diameter, pitch, length, internal, n_starts,
thread_size, groove, square, rectangle, angle)
{
// Number of turns needed.
n_turns = floor (length/pitch);
 
intersection () {
 
// Start one below z = 0. Gives an extra turn at each end.
for (i=[-1*n_starts : n_turns+1]) {
translate ([0, 0, i*pitch]) {
metric_thread_turn (diameter, pitch, internal, n_starts,
thread_size, groove, square, rectangle, angle);
}
}
 
// Cut to length.
translate ([0, 0, length/2]) {
cube ([diameter*3, diameter*3, length], center=true);
}
}
}
 
 
// ----------------------------------------------------------------------------
module metric_thread_turn (diameter, pitch, internal, n_starts, thread_size,
groove, square, rectangle, angle)
{
n_segments = segments (diameter);
fraction_circle = 1.0/n_segments;
for (i=[0 : n_segments-1]) {
rotate ([0, 0, i*360*fraction_circle]) {
translate ([0, 0, i*n_starts*pitch*fraction_circle]) {
thread_polyhedron (diameter/2, pitch, internal, n_starts,
thread_size, groove, square, rectangle, angle);
}
}
}
}
 
 
// ----------------------------------------------------------------------------
// z (see diagram) as function of current radius.
// (Only good for first half-pitch.)
function z_fct (current_radius, radius, pitch, angle)
= 0.5* (current_radius - (radius - 0.875*pitch*cos (angle)))
/cos (angle);
 
// ----------------------------------------------------------------------------
module thread_polyhedron (radius, pitch, internal, n_starts, thread_size,
groove, square, rectangle, angle)
{
n_segments = segments (radius*2);
fraction_circle = 1.0/n_segments;
 
local_rectangle = rectangle ? rectangle : 1;
 
h = (square || rectangle) ? thread_size*local_rectangle/2 : thread_size * cos (angle);
outer_r = radius + (internal ? h/20 : 0); // Adds internal relief.
//echo (str ("outer_r: ", outer_r));
 
// A little extra on square thread -- make sure overlaps cylinder.
h_fac1 = (square || rectangle) ? 1.1 : 0.875;
inner_r = radius - h*h_fac1; // Does NOT do Dmin_truncation - do later with
// cylinder.
 
translate_y = groove ? outer_r + inner_r : 0;
reflect_x = groove ? 1 : 0;
 
// Make these just slightly bigger (keep in proportion) so polyhedra will
// overlap.
x_incr_outer = (! groove ? outer_r : inner_r) * fraction_circle * 2 * PI * 1.02;
x_incr_inner = (! groove ? inner_r : outer_r) * fraction_circle * 2 * PI * 1.02;
z_incr = n_starts * pitch * fraction_circle * 1.005;
 
/*
(angles x0 and x3 inner are actually 60 deg)
 
/\ (x2_inner, z2_inner) [2]
/ \
(x3_inner, z3_inner) / \
[3] \ \
|\ \ (x2_outer, z2_outer) [6]
| \ /
| \ /|
z |[7]\/ / (x1_outer, z1_outer) [5]
| | | /
| x | |/
| / | / (x0_outer, z0_outer) [4]
| / | / (behind: (x1_inner, z1_inner) [1]
|/ | /
y________| |/
(r) / (x0_inner, z0_inner) [0]
 
*/
 
x1_outer = outer_r * fraction_circle * 2 * PI;
 
z0_outer = z_fct (outer_r, radius, thread_size, angle);
//echo (str ("z0_outer: ", z0_outer));
 
//polygon ([[inner_r, 0], [outer_r, z0_outer],
// [outer_r, 0.5*pitch], [inner_r, 0.5*pitch]]);
z1_outer = z0_outer + z_incr;
 
// Give internal square threads some clearance in the z direction, too.
bottom = internal ? 0.235 : 0.25;
top = internal ? 0.765 : 0.75;
 
translate ([0, translate_y, 0]) {
mirror ([reflect_x, 0, 0]) {
 
if (square || rectangle) {
 
// Rule for face ordering: look at polyhedron from outside: points must
// be in clockwise order.
polyhedron (
points = [
[-x_incr_inner/2, -inner_r, bottom*thread_size], // [0]
[x_incr_inner/2, -inner_r, bottom*thread_size + z_incr], // [1]
[x_incr_inner/2, -inner_r, top*thread_size + z_incr], // [2]
[-x_incr_inner/2, -inner_r, top*thread_size], // [3]
 
[-x_incr_outer/2, -outer_r, bottom*thread_size], // [4]
[x_incr_outer/2, -outer_r, bottom*thread_size + z_incr], // [5]
[x_incr_outer/2, -outer_r, top*thread_size + z_incr], // [6]
[-x_incr_outer/2, -outer_r, top*thread_size] // [7]
],
 
faces = [
[0, 3, 7, 4], // This-side trapezoid
 
[1, 5, 6, 2], // Back-side trapezoid
 
[0, 1, 2, 3], // Inner rectangle
 
[4, 7, 6, 5], // Outer rectangle
 
// These are not planar, so do with separate triangles.
[7, 2, 6], // Upper rectangle, bottom
[7, 3, 2], // Upper rectangle, top
 
[0, 5, 1], // Lower rectangle, bottom
[0, 4, 5] // Lower rectangle, top
]
);
} else {
 
// Rule for face ordering: look at polyhedron from outside: points must
// be in clockwise order.
polyhedron (
points = [
[-x_incr_inner/2, -inner_r, 0], // [0]
[x_incr_inner/2, -inner_r, z_incr], // [1]
[x_incr_inner/2, -inner_r, thread_size + z_incr], // [2]
[-x_incr_inner/2, -inner_r, thread_size], // [3]
 
[-x_incr_outer/2, -outer_r, z0_outer], // [4]
[x_incr_outer/2, -outer_r, z0_outer + z_incr], // [5]
[x_incr_outer/2, -outer_r, thread_size - z0_outer + z_incr], // [6]
[-x_incr_outer/2, -outer_r, thread_size - z0_outer] // [7]
],
 
faces = [
[0, 3, 7, 4], // This-side trapezoid
 
[1, 5, 6, 2], // Back-side trapezoid
 
[0, 1, 2, 3], // Inner rectangle
 
[4, 7, 6, 5], // Outer rectangle
 
// These are not planar, so do with separate triangles.
[7, 2, 6], // Upper rectangle, bottom
[7, 3, 2], // Upper rectangle, top
 
[0, 5, 1], // Lower rectangle, bottom
[0, 4, 5] // Lower rectangle, top
]
);
}
}
}
}
 
// Thread for mounting on Rohloff hub.
difference () {
cylinder (r=20, h=5, $fn=100);
 
metric_thread (diameter=34, pitch=1, length=5, internal=true, n_starts=6);
}
 
metric_thread (diameter=33, pitch=1, length=10, internal=false, n_starts=6);
/Modules/Mechanical/WINDGAUGE02A/CAD/assembly.scad
0,0 → 1,120
use <configuration/rotor1.scad>
use <configuration/rotor2.scad>
use <configuration/rotor3.scad>
use <configuration/stator1.scad>
use <configuration/stator2.scad>
use <configuration/stator3.scad>
use <configuration/stator4.scad>
use <configuration/lopatky.scad>
use <configuration/kryt_rotoru.scad>
 
include <configuration.scad>
 
barva_krytu = "yellow";
barva_rotor1 = "cyan";
barva_rotor2 = "green";
barva_rotor3 = "green";
barva_rotor4 = "yellow";
barva_stator1 = "cyan";
barva_stator2 = "red";
barva_stator3 = "green";
barva_stator4 = "yellow";
barva_lopatky = "yellow";
 
 
posunuti_dilu=10; //posunuti dilu od sebe
 
//KRYT ROTORU
//-------------------------------------------------------------
//-------------------------------------------------------------
color(barva_krytu)
translate([0,0,posunuti_dilu*4+(vyska_rotoru1-hloubka_prekryti)/2+vyska_uchytu+tolerance_uchytu+vyska_rotoru2])
kryt_rotoru(prumer_rotoru1,sila_materialu_krytu,vyska_rotoru1);
 
//ROTOR1
//-------------------------------------------------------------
//-------------------------------------------------------------
color(barva_rotor1)
translate([0,0,posunuti_dilu*3+(vyska_rotoru1-hloubka_prekryti)/2+vyska_uchytu+tolerance_uchytu+vyska_rotoru2/2])
rotor1(prumer_rotoru1,vyska_rotoru1,prumer_sroubu,vyska_matky,prumer_orechu,sila_materialu,sila_materialu_vule,hloubka_prekryti,hloubka_uchytu,sila_uchytu,vyska_uchytu,tolerance_uchytu);
 
//ROTOR2
//-------------------------------------------------------------
//-------------------------------------------------------------
color(barva_rotor2)
translate([0,0,0])
rotor2 (vyska_rotoru2,prumer_rotoru1,vyska_kryti,sila_materialu,stator1_sila,vyska_matky,vzdalenost_rot_stat,lozisko_prumer_vnitrni,lozisko_prekryv,sila_pod_loziskem,delka_hridele,lozisko_vyska,sirka_matky_tol,sirka_matky,hloubka_uchytu,vyska_rotoru1,prumer_sroubu,vyska_matky,prumer_orechu,vzdalenost_rot_stat2,sirka_matky_tol);
 
//ROTOR3
//-------------------------------------------------------------
//-------------------------------------------------------------
color(barva_rotor3)
translate([0,0,-posunuti_dilu*3-(vyska_rotoru2/2+vyska_matky+vzdalenost_rot_stat+stator1_sila+(lozisko_vyska+sila_pod_loziskem)+((sila_pod_loziskem+delka_hridele+2)/2)-sila_pod_loziskem)])
rotor3 (sila_pod_loziskem,delka_hridele,lozisko_prumer_vnitrni,lozisko_prekryv);
 
//ROTOR4
//-------------------------------------------------------------
//-------------------------------------------------------------
color(barva_rotor4)
translate([0,0,-posunuti_dilu*4-(vyska_rotoru2/2+vyska_matky+vzdalenost_rot_stat+stator1_sila+(lozisko_vyska+sila_pod_loziskem)+((sila_pod_loziskem+delka_hridele+2))-sila_pod_loziskem+(vyska_pod_magnetem+magnet_zapusteni)/2)])
rotate(a = [0, 180, 0])
rotor4 (vyska_pod_magnetem,magnet_zapusteni,magnet_prumer,vyska_hlavy_sroubu,prumer_hlavy_sroubu,prumer_sroubu);
 
//STATOR1
//-------------------------------------------------------------
//-------------------------------------------------------------
color(barva_stator1)
translate([0,0,-posunuti_dilu-(vyska_rotoru2/2+vyska_matky+vzdalenost_rot_stat+stator1_sila/2)])
 
stator1(stator1_sila,lozisko_prumer_vnejsi,sirka_matky,lozisko_prumer_vnitrni,lozisko_prekryv,prumer_sroubu);
 
//STATOR2
//-------------------------------------------------------------
//-------------------------------------------------------------
color(barva_stator2)
translate([0,0,-posunuti_dilu*2-(vyska_rotoru2/2+vyska_matky+vzdalenost_rot_stat+stator1_sila+(lozisko_vyska+sila_pod_loziskem)/2)])
stator2(lozisko_vyska,sila_pod_loziskem,prumer_rotoru1,sila_materialu,vule1,stator3_sila_steny,lozisko_prumer_vnejsi,lozisko_prumer_vnitrni,lozisko_prekryv,
prumer_sroubu,
lozisko_vyska,vzdalenost_der_x,vzdalenost_der_y,vyska_hlavy_sroubu,prumer_hlavy_sroubu,prumer_rotoru1,stator3_vzdalenost_od_steny);
 
//STATOR3
//-------------------------------------------------------------
//-------------------------------------------------------------
color(barva_stator3)
translate([0,0,-posunuti_dilu*6-(vyska_rotoru2/2+vyska_matky+vzdalenost_rot_stat+stator1_sila+stator3_vyska/2)])
stator3(stator3_vyska,prumer_rotoru1,lozisko_vyska,sila_pod_loziskem,sila_materialu,vule1,stator3_sila_steny,
stator3_vyska_prekryti,prumer_hlavy_sroubu,stator3_vzdalenost_od_steny,lozisko_vyska,prumer_sroubu,roztec_sroubu,uchyt_prumer_sroubu,vyska_stator4,kabel_prumer);
 
 
//STATOR4
//-------------------------------------------------------------
//-------------------------------------------------------------
color(barva_stator4)
translate([0,0,-posunuti_dilu*7-(vyska_rotoru2/2+vyska_matky+vzdalenost_rot_stat+stator1_sila+stator3_vyska+vyska_stator4/2)])
rotate(a = [180, 0, 0])
stator4 (roztec_sroubu,uchyt_prumer_sroubu,vyska_stator4,sila_materialu,uchyt_vyska_matky,uchyt_prumer_orechu,kabel_prumer);
 
 
//LOPATKY
//-------------------------------------------------------------
//-------------------------------------------------------------
 
//LOPATKA1
color(barva_lopatky)
rotate(a = [0, 0, 90])
translate([sila_uchytu/2,-prumer_lopatky/2-delka_uchytu_lopatky-hloubka_uchytu-prumer_rotoru1/2+hloubka_uchytu,posunuti_dilu+vyska_rotoru2/2+vyska_uchytu/2])
lopatka(hloubka_uchytu,sila_uchytu,vyska_uchytu,tolerance_uchytu,prumer_lopatky,sila_materialu_lopatky,delka_uchytu_lopatky,hrana_uchytu_lopatky,prumer_rotoru1,prumer_sroubu);
 
//LOPATKA2
color(barva_lopatky)
rotate(a = [0, 0, 210])
translate([sila_uchytu/2,-prumer_lopatky/2-delka_uchytu_lopatky-hloubka_uchytu-prumer_rotoru1/2+hloubka_uchytu,posunuti_dilu+vyska_rotoru2/2+vyska_uchytu/2])
lopatka(hloubka_uchytu,sila_uchytu,vyska_uchytu,tolerance_uchytu,prumer_lopatky,sila_materialu_lopatky,delka_uchytu_lopatky,hrana_uchytu_lopatky,prumer_rotoru1,prumer_sroubu);
 
//LOPATKA2
color(barva_lopatky)
rotate(a = [0, 0, 330])
translate([sila_uchytu/2,-prumer_lopatky/2-delka_uchytu_lopatky-hloubka_uchytu-prumer_rotoru1/2+hloubka_uchytu,posunuti_dilu+vyska_rotoru2/2+vyska_uchytu/2])
lopatka(hloubka_uchytu,sila_uchytu,vyska_uchytu,tolerance_uchytu,prumer_lopatky,sila_materialu_lopatky,delka_uchytu_lopatky,hrana_uchytu_lopatky,prumer_rotoru1,prumer_sroubu);
 
 
/Modules/Mechanical/WINDGAUGE02A/CAD/configuration.scad
0,0 → 1,117
$fn=40; // model faces resolution.
 
//OBECNE PARAMETRY
//----------------------------------------------------------------
//----------------------------------------------------------------
 
//WINDGAUGE02A_S01
S01_vyska
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
prumer_rotoru1=70;
vyska_rotoru1=5;
vyska_rotoru2=5;
prumer_sroubu=3.2;
prumer_hlavy_sroubu=6;
vyska_hlavy_sroubu=4;
vyska_matky=3;
sirka_matky=6.6;
sirka_matky_tol=0.175;
prumer_orechu=10;
sila_materialu=2;
sila_materialu_vule=0.2;
hloubka_prekryti=0;
 
//lozisko
lozisko_prumer_vnitrni=5;
lozisko_prumer_vnejsi=16;
lozisko_vyska=5;
lozisko_prekryv=1.5;
 
//kryt rotoru
sila_materialu_krytu=1;
 
 
//stator1
stator1_sila=2;
 
//stator2
sila_pod_loziskem=1;
 
//stator3
stator3_sila_steny=2;
stator3_vzdalenost_od_steny=1; //definuje vzdalenost hlavy sroubu od steny statrou 4
stator3_vyska=60;
stator3_vyska_prekryti=10;
 
//uchyt pro anemometr
uchyt_prumer_sroubu=3.2;
roztec_sroubu=10.16;
 
 
//nastevní rotoru2
 
vzdalenost_rot_stat=2; //vzdálenost mezi statorem a rotorem uvnitř(osa Z)
vzdalenost_rot_stat2=1.5;//vzdálenost mezi statorem a rotorem (osa Z)
 
 
 
 
 
//lopatka
hloubka_uchytu=20;
sila_uchytu=12;
vyska_uchytu=10;
tolerance_uchytu=0.2;
delka_uchytu_lopatky=20;
hrana_uchytu_lopatky=4;
prumer_lopatky=50;
sila_materialu_lopatky=0.8;
 
//parametry uchytu senzoru
roztec_der=10.16;
vzdalenost_der_x=2*roztec_der;
vzdalenost_der_y=1*roztec_der;
 
//magnet
magnet_prumer=6.3;
magnet_vyska=5;
magnet_zapusteni=2;
vyska_pod_magnetem=5;
 
//rotor2
delka_hridele=5; //delka hridele koukající ve statoru
 
//rotor2
vyska_kryti=stator1_sila+vyska_matky+vzdalenost_rot_stat+stator3_vyska_prekryti-vzdalenost_rot_stat2; //udává výšku krycího prstence
 
 
vule1=1.5; //vůle mezi statorem a rotorem ze vnitř (z boku)
 
 
 
 
//uchyt pro anemometr
uchyt_prumer_sroubu=3.2;
roztec_sroubu=20;
 
//stator 4
vyska_stator4=5;
uchyt_vyska_matky=3;
uchyt_prumer_orechu=10;
 
//parametr kabelu
kabel_prumer=10;
/Modules/Mechanical/WINDGAUGE02A/PrjInfo.txt
0,0 → 1,13
[InfoShortDescription.en]
Wind-gauge
 
[InfoShortDescription.cs]
Anemometr
 
[InfoLongDescription.en]
 
 
[InfoLongDescription.cs]
 
[End]
/Modules/Mechanical/WINDGAUGE02A/SW/Data_analyser.ipynb
0,0 → 1,124
{
"metadata": {
"name": "",
"signature": "sha256:c35f5f2963a30c62e2bc2437fc0d2422404aec0dbc3c5526df0be8cecdef27ee"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"import h5py\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"file = h5py.File('test_rps.hdf5', 'r') # 'r' means that hdf5 file is open in read-only mode\n",
"dataset = file['RPS01']"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 2
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print dataset.value[4,2]"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"36.7822\n"
]
}
],
"prompt_number": 24
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"plt.plot( dataset.value[:,0], dataset.value[:,2], color = 'r')\n",
"#plt.xlim([1.45415117E9,1.4541513E9])\n",
"plt.show()"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 14
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"prev_val= dataset.value[0,2]\n",
"n = 0\n",
"angle = np.zeros_like(dataset.value)\n",
"for i in range(dataset.value.shape[0]):\n",
" if (dataset.value[i,2] - prev_val) > 300: \n",
" n += 1\n",
" angle[i] = dataset.value[i,2] + n*360\n",
" prev_val = dataset.value[i,2]"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 19
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"angle"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 20,
"text": [
"array([[ 0., 0., 0.],\n",
" [ 0., 0., 0.],\n",
" [ 0., 0., 0.],\n",
" ..., \n",
" [ 0., 0., 0.],\n",
" [ 0., 0., 0.],\n",
" [ 0., 0., 0.]], dtype=float32)"
]
}
],
"prompt_number": 20
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
/Modules/Mechanical/WINDGAUGE02A/SW/test_rps.hdf5
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Modules/Mechanical/WINDGAUGE02A/SW/test_rps.log.hdf5
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/Modules/Mechanical/WINDGAUGE02A/SW/wind_gauge.py
0,0 → 1,87
#!/usr/bin/python
 
# Python library for RPS01A MLAB module with AS5048B I2C Magnetic position sensor.
 
#uncomment for debbug purposes
#import logging
#logging.basicConfig(level=logging.DEBUG)
 
import time
import datetime
import sys
from pymlab import config
 
#### Script Arguments ###############################################
 
if len(sys.argv) != 2:
sys.stderr.write("Invalid number of arguments.\n")
sys.stderr.write("Usage: %s PORT ADDRESS\n" % (sys.argv[0], ))
sys.exit(1)
 
port = eval(sys.argv[1])
#### Sensor Configuration ###########################################
 
''''
cfg = config.Config(
i2c = {
"port": port,
},
 
bus = [
{
"type": "i2chub",
"address": 0x72,
"children": [
{"name": "encoder", "type": "rps01", "channel": 1, }
],
},
],
)
 
'''
cfg = config.Config(
i2c = {
"port": port,
},
bus = [
{
"name": "encoder",
"type": "rps01",
},
],
)
 
 
cfg.initialize()
 
print "RPS01A magnetic position sensor RPS01 readout example \r\n"
sensor = cfg.get_device("encoder")
 
print sensor.get_address()
print sensor.get_zero_position()
 
#### Data Logging ###################################################
 
try:
while True:
# for i in range(10):
angle1 = sensor.get_angle(verify = False)
time.sleep(0.1)
angle2 = sensor.get_angle(verify = False)
time.sleep(0.1)
angle3 = sensor.get_angle(verify = False)
if (angle1 < angle2):
speed = (angle2 - angle1)/0.01
else:
speed = (360 - angle1 + angle2)/0.01
sys.stdout.write("Speed: " + str(speed) +"\t"+ str(angle1) +"\t"+ str(angle2) + "\t\tMagnitude: " + str(sensor.get_magnitude())
+ "\tAGC Value: " + str(sensor.get_agc_value()) + "\tDiagnostics: " + str(sensor.get_diagnostics()) + "\r\n")
sys.stdout.flush()
time.sleep(0.01)
except KeyboardInterrupt:
sys.exit(0)
/Modules/Mechanical/WINDGAUGE02A/TODO.txt
0,0 → 1,9
prejmenovat slozku configuration na src.
 
Kryt musi mit presah nejspis az pod lopatky.
 
Mam pochybnosti o presnosti tisku a pevnosti stredove osy. Myslim, ze by zde mel byt nerezovy sroub o spravnem prurezu primo do loziska.
 
Asi by se mela prodlouzit delka lopatek na maximalni tisknutelny rozmer, protoze vetsi polomer lopatek bude vice tolerantni k promenlivemu odporu statoru vuci rotoru, napriklad namrzanim, navlhnutim atd.. 
 
Musí se pocitat se zamrzanim, mozna bude nutne umistit vyhrivani.