X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=atreus.rkt;h=3783c5ae333ab4f743f2497d0b61245b32b15814;hb=99528bd789b9485dd9f069131850457ecbc174b6;hp=abd9b1027200a89e3d16dcf3743979827ab03188;hpb=7558cc19b71d5d0fb3594fd1d7c160d880be89f9;p=atreides.git diff --git a/atreus.rkt b/atreus.rkt index abd9b10..3783c5a 100644 --- a/atreus.rkt +++ b/atreus.rkt @@ -9,29 +9,29 @@ (define spacing 19) (define angle 10) -(define column-offsets '(8 5 0 6 11 59 59 11 6 0 5 8)) +(define column-offsets '(8 5 0 6 11 53 53 11 6 0 5 8)) (define (switch-module x y rotation label net-pos net-neg) ;; TODO: set timestamps? `(module MX_FLIP (layer Front) (tedit 4FD81CDD) (tstamp 543EF801) (at ,x ,y ,rotation) (path /543DB910) ; TODO: this is not documented; no idea what it does - (fp_text reference ,label (at 0 3.302) (layer F.SilkS) + (fp_text reference ,label (at 0 3.302 ,rotation) (layer F.SilkS) (effects (font (size 1.524 1.778) (thickness 0.254)))) (fp_line (start -6.35 -6.35) (end 6.35 -6.35) - (layer Cmts.User) (width 0.381)) + (layer F.SilkS) (width 0.381)) (fp_line (start 6.35 -6.35) (end 6.35 6.35) - (layer Cmts.User) (width 0.381)) + (layer F.SilkS) (width 0.381)) (fp_line (start 6.35 6.35) (end -6.35 6.35) - (layer Cmts.User) (width 0.381)) + (layer F.SilkS) (width 0.381)) (fp_line (start -6.35 6.35) (end -6.35 -6.35) - (layer Cmts.User) (width 0.381)) + (layer F.SilkS) (width 0.381)) (pad 0 np_thru_hole circle (at 0 0) (size 3.9878 3.9878) - (drill 3.9878) (layers *.Cu)) ; switch hole, no copper - (pad 0 thru_hole circle (at -5.08 0) (size 1.7018 1.7018) - (drill 1.7018) (layers *.Cu)) ; board-mount hole, no copper - (pad 0 thru_hole circle (at 5.08 0) (size 1.7018 1.7018) - (drill 1.7018) (layers *.Cu)) ; board-mount hole, no copper + (drill 3.9878)) ; switch hole, no copper + (pad 0 np_thru_hole circle (at -5.08 0) (size 1.7018 1.7018) + (drill 1.7018)) ; board-mount hole, no copper + (pad 0 np_thru_hole circle (at 5.08 0) (size 1.7018 1.7018) + (drill 1.7018)) ; board-mount hole, no copper (pad 1 thru_hole circle (at 2.54 -5.08) (size 2.286 2.286) (drill 1.4986) (layers *.Cu *.SilkS *.Mask) ,net-pos) (pad 1 thru_hole circle (at 3.81 -2.54) (size 2.286 2.286) (drill 1.4986) @@ -48,13 +48,19 @@ (fp_text reference D2:2 (at 0 0 180) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032)))) (fp_line (start -1.524 -1.143) (end 1.524 -1.143) - (layer Cmts.User) (width 0.2032)) + (layer F.SilkS) (width 0.2032)) (fp_line (start 1.524 -1.143) (end 1.524 1.143) - (layer Cmts.User) (width 0.2032)) + (layer F.SilkS) (width 0.2032)) + (fp_line (start 0 -1.143) (end 0 1.143) + (layer F.SilkS) (width 0.2032)) + (fp_line (start 0 -1.143) (end -1.524 0) + (layer F.SilkS) (width 0.2032)) + (fp_line (start -1.524 0) (end 0 1.143) + (layer F.SilkS) (width 0.2032)) (fp_line (start 1.524 1.143) (end -1.524 1.143) - (layer Cmts.User) (width 0.2032)) + (layer F.SilkS) (width 0.2032)) (fp_line (start -1.524 1.143) (end -1.524 -1.143) - (layer Cmts.User) (width 0.2032)) + (layer F.SilkS) (width 0.2032)) (fp_line (start -3.81 0) (end -1.6637 0) (layer Back) (width 0.6096)) (fp_line (start 1.6637 0) (end 3.81 0) (layer Back) (width 0.6096)) (fp_line (start -3.81 0) (end -1.6637 0) (layer Front) (width 0.6096)) @@ -75,14 +81,10 @@ (define microcontroller-module `(module A_STAR (layer Front) (tedit 4FDC31C8) (tstamp 543EF800) - (at 134 70 270) + (at 134 65 270) (path /543EEB02) - (fp_text value A-STAR (at -3 0 270) (layer F.SilkS) - (effects (font (size 3.048 2.54) (thickness 0.4572)))) - (fp_line (start -15.24 -7.62) (end -15.24 7.62) (layer Dwgs.User) (width 0.381)) - (fp_line (start -15.24 7.62) (end 10.1 7.62) (layer Dwgs.User) (width 0.381)) - (fp_line (start 10.1 7.62) (end 10.1 -7.62) (layer Dwgs.User) (width 0.381)) - (fp_line (start 10.1 -7.62) (end -15.24 -7.62) (layer Dwgs.User) (width 0.381)) + (fp_line (start 10.1 7.62) (end 10.1 -7.62) (layer F.SilkS) (width 0.381)) + (fp_line (start 10.1 -7.62) (end -15.24 -7.62) (layer F.SilkS) (width 0.381)) (pad B5 thru_hole circle (at -13.97 6.35 270) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) (net 7 N-col-2)) @@ -115,7 +117,11 @@ (pad B7 thru_hole circle (at -6.35 -6.35 270) (size 1.7526 1.7526) (drill 1.0922) (layers *.Cu *.SilkS *.Mask) (net 15 N-col-10)) (pad D6 thru_hole circle (at -3.81 -6.35 270) (size 1.7526 1.7526) - (drill 1.0922) (layers *.Cu *.SilkS *.Mask) (net 14 N-col-9)))) + (drill 1.0922) (layers *.Cu *.SilkS *.Mask) (net 14 N-col-9)) + (pad RST thru_hole circle (at -1.27 -6.35 270) (size 1.7526 1.7526) + (drill 1.0922) (layers *.Cu *.SilkS *.Mask) (net 0 "")) + (pad GND thru_hole circle (at 6.35 -6.35 270) (size 1.7526 1.7526) + (drill 1.0922) (layers *.Cu *.SilkS *.Mask) (net 0 "")))) (define nets `((net 0 "") @@ -206,13 +212,17 @@ (for/list ([col (in-range cols)] #:when true [row (if (or (= 5 col) (= 6 col)) - '(0) (in-range rows))]) + '(0 1) (in-range rows))]) (list (switch row col) (diode row col)))) (define edge-cuts - (for/list [(s '([31 22] [84 22] [128 30] [128 54] [140 54] [140 30] [185 22] + (for/list [(s '([31 22] [84 22] [127 30] + [129 49] [129 75] [139 75] + [139 49] [141 30] [185 22] [237 22] [250 95] [161 112] [107 112] [18 95])) - (e '([84 22] [128 30] [128 54] [140 54] [140 30] [185 22] + (e '([84 22] [127 30] + [129 49] [129 75] [139 75] [139 49] + [141 30] [185 22] [237 22] [250 95] [161 112] [107 112] [18 95] [31 22]))] `(gr_line (start ,@s) (end ,@e) (angle 90) (layer Edge.Cuts) (width 0.3)))) @@ -234,7 +244,13 @@ (for ([f board]) (pretty-print f op 1)) (display (call-with-input-file "traces.rktd" - (curry read-string 99999)) op) + (curry read-string 999999)) op) (display ")" op)))) -(write-placement "/tmp/atreus.kicad_pcb") +;; TODOs: + +;; controller traces +;; middle switch traces +;; middle switch diodes below + +(write-placement "atreus.kicad_pcb")