Skip to the content
4 layers39.4 × 96 mmMx master remake, the printed circuit board in 3D

[probe-rs]: https://crates.io/crates/probe-rs [defmt]: https://github.com/knurling-rs/defmt [flip-link]: https://github.com/knurling-rs/flip-link

Size
39.4 × 96 mm
Copper layers
4
Thickness
1.6 mm
Parts
79
Nets
110
Pads
362
Tracks, vias
866, 215
Pours
4
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
19 Jan 2024
Updated
24 Feb 2024

Overview

Mx master remake is an open-source printed circuit board by great-houk, from the great-houk/mx_master_remake repository on GitHub, published under the MIT licence. It is a 4-layer board of 39.4 × 96 mm with 79 parts on 110 nets, routed with 866 tracks and 215 vias.

It is built around the BT840, MIC2860-2PYD6-TR and TLV62568DBVR-TP, with the SSM6N7002KFU,LF(T-VB, D3V3F4U6S-7-ES and MIC5501-3.0YM5-TR among its other parts. Its parts include 29 capacitors, 16 ICs, 14 resistors, 7 connectors and 4 diodes.

Main components

6

README

README.md

app-template

Quickly set up a probe-rs + defmt + flip-link embedded project

Dependencies

1. flip-link:
console
$ cargo install flip-link
2. probe-rs:
console
$ # make sure to install v0.2.0 or later
$ cargo install probe-rs --features cli
3. cargo-generate:
console
$ cargo install cargo-generate

Note: You can also just clone this repository instead of using cargo-generate, but this involves additional manual adjustments.

Setup

1. Initialize the project template
console
$ cargo generate \
    --git https://github.com/knurling-rs/app-template \
    --branch main \
    --name my-app

If you look into your new my-app folder, you'll find that there are a few TODOs in the files marking the properties you need to set.

Let's walk through them together now.

2. Set probe-rs chip

Pick a chip from probe-rs chip list and enter it into .cargo/config.toml.

If, for example, you have a nRF52840 Development Kit from one of our workshops, replace {{chip}} with nRF52840_xxAA.

diff
 # .cargo/config.toml
 [target.'cfg(all(target_arch = "arm", target_os = "none"))']
-runner = "probe-rs run --chip {{chip}}"
+runner = "probe-rs run --chip nRF52840_xxAA"
2.1 Pass custom log format

You need to use an array of strings instead of a single string for the runner if you use a custom log format.

toml
runner = ["probe-rs", "run", "--chip", "$CHIP", "--log-format", "{L} {s}"]
3. Adjust the compilation target

In .cargo/config.toml, pick the right compilation target for your board.

diff
 # .cargo/config.toml
 [build]
-target = "thumbv6m-none-eabi"    # Cortex-M0 and Cortex-M0+
-# target = "thumbv7m-none-eabi"    # Cortex-M3
-# target = "thumbv7em-none-eabi"   # Cortex-M4 and Cortex-M7 (no FPU)
-# target = "thumbv7em-none-eabihf" # Cortex-M4F and Cortex-M7F (with FPU)
+target = "thumbv7em-none-eabihf" # Cortex-M4F (with FPU)

Add the target with rustup.

console
$ rustup target add thumbv7em-none-eabihf
4. Add a HAL as a dependency

In Cargo.toml, list the Hardware Abstraction Layer (HAL) for your board as a dependency.

For the nRF52840 you'll want to use the nrf52840-hal.

diff
 # Cargo.toml
 [dependencies]
-# some-hal = "1.2.3"
+nrf52840-hal = "0.14.0"

⚠️ Note for RP2040 users ⚠️

You will need to not just specify the rp-hal HAL, but a BSP (board support crate) which includes a second stage bootloader. Please find a list of available BSPs here.

5. Import your HAL

Now that you have selected a HAL, fix the HAL import in src/lib.rs

diff
 // my-app/src/lib.rs
-// use some_hal as _; // memory layout
+use nrf52840_hal as _; // memory layout
(6. Get a linker script)

Some HAL crates require that you manually copy over a file called memory.x from the HAL to the root of your project. For nrf52840-hal, this is done automatically so no action is needed. For other HAL crates, you can get it from your local Cargo folder, the default location is under:

text
~/.cargo/registry/src/

Not all HALs provide a memory.x file, you may need to write it yourself. Check the documentation for the HAL you are using.

7. Run!

You are now all set to cargo-run your first defmt-powered application! There are some examples in the src/bin directory.

Start by cargo run-ning my-app/src/bin/hello.rs:

console
$ # `rb` is an alias for `run --bin`
$ cargo rb hello
    Finished dev [optimized + debuginfo] target(s) in 0.03s
flashing program ..
DONE
resetting device
0.000000 INFO Hello, world!
(..)

$ echo $?
0

If you're running out of memory (flip-link bails with an overflow error), you can decrease the size of the device memory buffer by setting the DEFMT_RTT_BUFFER_SIZE environment variable. The default value is 1024 bytes, and powers of two should be used for optimal performance:

console
$ DEFMT_RTT_BUFFER_SIZE=64 cargo rb hello
(8. Set rust-analyzer.linkedProjects)

If you are using rust-analyzer with VS Code for IDE-like features you can add following configuration to your .vscode/settings.json to make it work transparently across workspaces. Find the details of this option in the RA docs.

json
{
    "rust-analyzer.linkedProjects": [
        "Cargo.toml",
        "firmware/Cargo.toml",
    ]
}

Running tests

The template comes configured for running unit tests and integration tests on the target.

Unit tests reside in the library crate and can test private API; the initial set of unit tests are in src/lib.rs. cargo test --lib will run those unit tests.

console
$ cargo test --lib
(1/1) running `it_works`...
└─ app::unit_tests::__defmt_test_entry @ src/lib.rs:33
all tests passed!
└─ app::unit_tests::__defmt_test_entry @ src/lib.rs:28

Integration tests reside in the tests directory; the initial set of integration tests are in tests/integration.rs. cargo test --test integration will run those integration tests. Note that the argument of the --test flag must match the name of the test file in the tests directory.

console
$ cargo test --test integration
(1/1) running `it_works`...
└─ integration::tests::__defmt_test_entry @ tests/integration.rs:13
all tests passed!
└─ integration::tests::__defmt_test_entry @ tests/integration.rs:8

Note that to add a new test file to the tests directory you also need to add a new [[test]] section to Cargo.toml.

Support

app-template is part of the Knurling project, Ferrous Systems' effort at improving tooling used to develop for embedded systems.

If you think that our work is useful, consider sponsoring it via GitHub Sponsors.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.

Parts

79
QtyValueFootprintReferences
1010uFCapacitor_SMD:C_0603_1608MetricC5, C6, C20, C21, C24, C25, C26, C27, C28, C29
80.1uFCapacitor_SMD:C_0603_1608MetricC9, C10, C11, C12, C13, C14, C15, C16
51uFCapacitor_SMD:C_0603_1608MetricC1, C2, C3, C7, C8
55.1kResistor_SMD:R_0603_1608MetricR1, R2, R4, R13, R14
3100nFCapacitor_SMD:C_0603_1608MetricC19, C22, C23
328.7kResistor_SMD:R_0603_1608MetricR6, R7, R8
3MIC2860-2PYD6-TRLED Driver:TSOT-23-6_D6_MCHU10, U11, U12
2DGD05473FN-7MOSFET Driver:DFN10_DGD05473_V-DFN3030-10_DIOU6, U7
2SSM6N7002KFU_LFMOSFET:SOT-363 US6_TOSU8, U9
1100kResistor_SMD:R_0603_1608MetricR11
110kResistor_SMD:R_0603_1608MetricR10
110uF/10VCapacitor_SMD:C_0603_1608MetricC18
110uHInductor:IND_ASPI-4030S_ABR-LL1
1110kResistor_SMD:R_0603_1608MetricR3
118Resistor_SMD:R_0603_1608MetricR9
1180uFCapacitor_SMD:CP_Elec_8x11.9C4
11uHInductor_SMD:L_0805_2012MetricL2
12.2uHInductor_SMD:L_0805_2012MetricL3
1232kResistor_SMD:R_0603_1608MetricR12
133uFCapacitor_SMD:C_0603_1608MetricC17
147Resistor_SMD:R_0603_1608MetricR5
1500mAInductor_SMD:L_0805_2012MetricFB1
1AP301230v Reg:SOT-23-5_DIOU5
1BT840MCU:XCVR_BT840U1
1BTN_BOTTOMBottom Button:MCSLPT4644B1TRSW2
1BTN_WHEELButton_Switch_SMD:SW_Push_1P1T_NO_CK_KSC6xxJSW3
1BatteryJSTZH:B3B-ZR-SM4-TFJ2
1D3V3F4U6S-7TVS Diode:SOT-363_DIOU2
1D_Schottky_SmallDiode_SMD:D_SOD-323D1
1Daughter BoardsFFC:TE_1-1734742-4J5
1LED1LED_SMD:LED_0603_1608MetricD2
1LED2LED_SMD:LED_0603_1608MetricD3
1LED3LED_SMD:LED_0603_1608MetricD4
1LM66200DRLRPower Diode:SOT-5X3_DRL_TEXU4
1LMBConnector_PinHeader_2.00mm:PinHeader_1x02_P2.00mm_VerticalJ6
1LOGOOutline:mouse_pcb_outlineG***
1MCP73831-2-OTPackage_TO_SOT_SMD:SOT-23-5U3
1MIC5501-3.0YM5Package_TO_SOT_SMD:SOT-23-5U14
1Mouse WheelFFC:TE_1734742-8J7
1PAW3370Sensor:PAW3370DM-T4QU 16PinU13
1Power SwitchButton_Switch_SMD:SW_SPDT_PCM12SW1
1RMBSilent Switch:SW_D2FC_OMRSW4
1SWDConnector_PinHeader_1.27mm:PinHeader_2x05_P1.27mm_Vertical_SMDJ1
1TLV62568DBVR2v Reg:SOT95P280X145-5NU16
1TPS613222ADBVR5v Reg:SOT95P280X145-5NU15
1USB4085-GF-A_REVBUSBC:GCT_USB4085-GF-A_REVBJ4
1Wheel MagnetJSTZH:B4B-ZR-SM4-TFJ3

Similar boards

  • 4 layers91.3 × 53.5 mmSsd2828 board, the printed circuit board in 3D

    Ssd2828 board

    dartcom/ssd2828-dev

    A carrier board for the ssd2828 and the LH154Q01 & VS035ZSM lcd panels

    144 parts23
  • 6 layers66 × 66 mmPD240W kicad, the printed circuit board in 3D

    PD240W kicad

    theohg/PD240W

    PD240W is a complete hardware and firmware project converting USB-C Power Delivery into a programmable 240W (48V 5A) bench power supply, featuring C++ code for Raspberry Pi Pico, custom PCB Gerbers, and a 3D-printable…

    299 parts125
  • 6 layers76.6 × 26 mmZeus le rev-2, the printed circuit board in 3D

    Zeus le rev-2

    lopsided98/zeus-le

    Synchronized wireless audio recording system

    89 parts2GPL-3.0
  • 2 layersFanstel kicad library, the printed circuit board in 3D

    Fanstel kicad library

    hemalchevli/Fanstel-kicad-library

    KiCAD symbols and footprints for Fanstel blue-tooth modules.

    9 parts17
  • 2 layers90.5 × 84.4 mmDemo badge-2023, the printed circuit board in 3D

    Demo badge-2023

    aws-samples/aws-iot-connected-product-demo-badge

    This device was designed and created for a hands-on workshop at re:Invent 2023.

    122 parts13MIT-0
  • 2 layers33 × 99.1 mmSoilmoisture, the printed circuit board in 3D

    Soilmoisture

    bahildebrand/soil-moisture-pcb

    Capacitive soil moisture sensor routed in KiCad

    9 parts8GPL-3.0
  • 4 layers19.8 × 50.9 mmZigbee air quality monitor, the printed circuit board in 3D

    Zigbee air quality monitor

    nobodyguy/zigbee_air_quality_monitor_hardware

    Opensource HA compatible air quality monitor with CO2, temperature and humidity measurements

    35 parts2Apache-2.0
  • 4 layers27 × 94.5 mmSoilmoisture, the printed circuit board in 3D

    Soilmoisture

    fredriknk/SoilSense

    21 partsGPL-3.0

Questions

How big is the Mx master remake PCB?

It measures 39.4 × 96 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Mx master remake use?

79 parts, built around the BT840, MIC2860-2PYD6-TR, TLV62568DBVR-TP and SSM6N7002KFU,LF(T-VB. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Mx master remake KiCad files?

From the great-houk/mx_master_remake repository on GitHub, at the commit this page was made from: the board is pcb/mx_master_remake/mx_master_remake.kicad_pcb and its schematic pcb/mx_master_remake/battery.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Mx master remake design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).