Skip to content

Commit

Permalink
Introducing x4-flat dfu, firmware, and box.
Browse files Browse the repository at this point in the history
  • Loading branch information
mar0x committed May 10, 2022
1 parent 1f13078 commit e4043c2
Show file tree
Hide file tree
Showing 14 changed files with 5,564 additions and 8 deletions.
48 changes: 46 additions & 2 deletions box/box.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import cadquery as cq
import math

flat = True
#midi_sock_count = 7
midi_sock_count = 4
#midi_sock_count = 3 # Splitter x6
Expand Down Expand Up @@ -42,11 +43,12 @@
# or led_size = 2 for round hole

usb_led_step = 20
usb_led_count = 3

rst_hole_z = 4 # above board
rst_hole_y = 0 # from center line

if midi_sock_count == 4:
if midi_sock_count == 4 and not flat:
board_length = 96
board_width = 50
board_thickness = 1.2
Expand Down Expand Up @@ -85,6 +87,45 @@
rst_hole_z = 14 # above board
rst_hole_y = 7 # from center line

if midi_sock_count == 4 and flat:
board_length = 100
board_width = 80
board_thickness = 1.5
board_clearance = 0.6
board_corner_r = 10
fillet_r = 3

box_inner_height = 33
box_thickness = 2

base_stand_d = 8
screw_cup_hole_d = 5.5
base_edge_height = 2

base_stand_h = 3

cover_stand_d = base_stand_d
cover_stand_d1 = 10
cover_edge_height = 4
cover_clearance = 0.2

stand_x_step = 90
stand_y_step = 66
central_stand_x_step = 40

midi_sock_step = 20
midi_sock_d = 16
midi_sock_shift = 10 # above board
led_shift = midi_sock_shift + 13 # above board
led_size = 2 # round hole
# or led_size = (5.2, 2.7) for rect

usb_led_step = 20
usb_led_count = 3

rst_hole_z = 4 # above board
rst_hole_y = 0 # from center line


if midi_sock_count == 3:
board_length = 96
Expand Down Expand Up @@ -201,6 +242,9 @@
if 'usb_y_shift' not in locals():
usb_y_shift = 0

if 'usb_led_count' not in locals():
usb_led_count = 3

rst_hole_d = 2

usb_z_shift = box_thickness + base_stand_h + board_thickness + usb_height / 2
Expand Down Expand Up @@ -316,7 +360,7 @@
.pushPoints(stand_centers) \
.hole(cover_stand_hole_d)

if midi_sock_count == 4 or midi_sock_count == 3:
if (midi_sock_count == 4 and not flat) or midi_sock_count == 3:
stands = stands.cut(
cq.Workplane("XY").rect(94, 30 + 1).extrude(led_shift) \
.union(
Expand Down
4 changes: 3 additions & 1 deletion firmware/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,7 @@ endef

$(eval $(call BOARD_MCU_template,midi-router-x2,atxmega128a1u))
$(eval $(call BOARD_MCU_template,midi-router-x4,atxmega32a4u))
#$(eval $(call BOARD_MCU_template,midi-router-x4,atxmega128a4u))
$(eval $(call BOARD_MCU_template,midi-router-x4-flat,atxmega32a4u))
$(eval $(call BOARD_MCU_template,midi-router-x4,atxmega128a4u))
$(eval $(call BOARD_MCU_template,midi-router-x4-flat,atxmega128a4u))
$(eval $(call BOARD_MCU_template,midi-router-x7,atxmega128a1u))
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@
# define ISP_PORT_PINCTRL PORTC_PIN1CTRL
# define ISP_PORT_IN PORTC_IN
# define ISP_PORT_PIN 1
#elif defined(MIDI_ROUTER_X4_FLAT)
# define ISP_PORT_DIR PORTB_DIR
# define ISP_PORT_PINCTRL PORTB_PIN2CTRL
# define ISP_PORT_IN PORTB_IN
# define ISP_PORT_PIN 2
#else
# define ISP_PORT_DIR PORTC_DIR
# define ISP_PORT_PINCTRL PORTC_PIN3CTRL
Expand Down
Loading

0 comments on commit e4043c2

Please sign in to comment.