EXT Cartridge Module

Good to hear that you found a way to get the screen working back, even if you are somewhat back to step 1.

I’ve managed to lose my printer paper tray so removed it ready for this to go in if the project gets finished. Godspeed OP

Hey @fip how’s it going?

It just occurred to me that A06 has a microcontroller embedded right inside the cpu (Technically there are two, but one is used for “trusted firmware”, and the other can be programmed by user).

It’s a cortex M0, shares IO resources with rk3399, and can communicate with the main cpu via shared memory/mailboxes.

In theory we could achieve a good lot of peripheral controls with this controller.

how’s it going?

Still waiting for my Teensy4.1, I might be tempted to buy one off eBay instead.
Getting one right now sucks in general, but the switch to it is necessary.

Currently I’m cleaning up the firmware, the 3rd revision of the board is done but before ordering the PCB I’d like to test again on a breadboard fist.


The current state of the kernel module is in this git.

It just occurred to me that A06 has a microcontroller embedded right inside the cpu
In theory we could achieve a good lot of peripheral controls with this controller.

Sounds doable, but not by me, programming this MCU on the RK3399 is out of my skill level.
Plus I can’t get any info about it on the internet when I google for it.

3 Likes

It’s so cool, I hope uconsel can be adapted later

@fip here’s my design:

See comments in “Cartridge” block for design rationales.

3 Likes

I like the design, puts mine to shame really.
Now I really regret putting a microcontroller into it, it makes the design more complex and less robust I believe.

The support for all boards via the DIP switches is really good.
I do not necessarily like the I2C port expander, but that’s only me since if you’re not concerned with bandwidth it’s perfectly reasonable, which you should anyway if you’re using Linux GPIO to drive them.

Still kind of married to my design for myself only, but this could be sunk cost fallacy and I’m considering stopping now.
I believe this design is a real win for everyone as it is cheaper, more reliable, with thought put into it and it’s easy to assemble too.

2 Likes

The first iteration has errors all over the place:

  • USB3.D- ESD diode isn’t connected
  • The pwm fan controller SDA/SCL wired to SCL/SDA
  • The pwm fan output is shorted to GND
  • Wrong USB-A port
  • I2C chips are 5V, A06 won’t boot if I wire them up.
    • Bought TXS0102 2-bit level shifter, VSSOP-8, and tried to flywire on the 0.5mm pins and failed :joy:
    • Luckily, the functionalities can be verified by an arduino. Tested working.
  • I2C bus should not be disconnected when no cart is installed
  • UART should not be disconnected when no cart is installed
  • Wrong footprint for DIP switch
  • All components are crammed to the same side of the board while there is actually space on the back (by far the worst design decision)

I fixed these issues and submitted another run, but then discovered that

  • Cartridge port doesn’t fit with back case, need to indent 13.2mm

I guess it’s really different from writing code :stuck_out_tongue:

1 Like

Despite the mistakes, that’s a lot of progress regardless. :wink:
I feel kind of stupid now that I haven’t caught these while hastily looking over it. :expressionless:

I guess it’s really different from writing code

Yep, it’s hard but I believe it’s a good design and totally worth the hassle.

I don’t know if I can be helpful in the design progress as it is farther than mine already.
The only thing I can think of is sharing my CAD file for the mechanical things like the cartridge or the guide part which will prevent it from wobbling.

The only thing I can think of is sharing my CAD file for the mechanical things like the cartridge or the guide part which will prevent it from wobbling.

Please do! Lack of footprint/3d models has been quite a headache for me, and I haven’t even started with the carts.
I’m using a modified generic 2x22 pin conn footprint for the cart conn, and the 3d model dimension of that tricked me into thinking that it will fit with the back case, until the real connector arrived. Resulted in 2nd iteration dead on prod submission ((

3rd iteration:

All parts should arrive pretty soon.

3 Likes

…and here it is: flip/dtc-mech: Mechanical Files for the DevTerm Cartridge System - Gogs

Also, you might want this: https://files.catbox.moe/i2530x.7z
It’s the KiCAD library I used for the connector, also includes a STEP file.
If I get around it tomorrow I might just dump my entire board design.

I’m interested in the fan, is it a part that’s different from the one that comes with the DevTerm stock?
Also, where did you source the GL850G? I tried finding it early on, but I instead opted for something that makes the BOM more distributor friendly.

Edit:

Here’s my KiCAD project: https://git.bitkipper.tech/flip/dtc-module

1 Like

Many thanks! 3D models are in position.
I modified the cart footprint a bit and changed the pin assignment to even-odd.

I’m interested in the fan, is it a part that’s different from the one that comes with the DevTerm stock?

Yep, custom 4-wire PWM fan with dimension 35x35x5 (3505), while original is 3005.
Strong enough to propel itself on a smooth surface :slight_smile:
The back case can actually allow a 3507 – I may try that later. The bigger the fan, the less noise for the same air flow.

Also, where did you source the GL850G? I tried finding it early on, but I instead opted for something that makes the BOM more distributor friendly.

taobao.com Perk of living in China
But when I think about it, GL850G is not a good choice – expensive, complex external component requirements, and high power usage.

I will publish the board files when I verify it’s working.

1 Like

V3 board is assembled and verified working. It’s funny v3 boards arrived before v2. Some speculative production is assumed :stuck_out_tongue:

Assembled module


Finally got the correct USB connectors (called 90度沉板USB接口 in Chinese, while I still haven’t figured out the English term) and TXS0102 MSOP version.
Put together with a reflow station, the board is much cleaner than last time.
The only problem is that I almost blew up the power management chip: C14 (above UART chip) accidentally shorts 5V to GND, causing PMU to scream even crazier than it usually does.

There’s not a lot going on in the back:


The speaker POGO pads are hand-drawn with a semi-transparent kicad session and the OG ext board dxf window aligned in the back.

The analog switches are driven with a 2-seat dip switch:


which will re-route and align pins for different core boards.

Putting it together:




I have to cut a bit from back plate to expose the DEBUG port:

Double-cheeseburger microUSB:

Edit: if I were not stupid, I’d put microusb on the other side

Putting it back:


Cart connector ready for action:

3 devices detected on i2c-2 (A06):
image

Custom device tree mods:

/{
...
  pwm_fan: pwm-fan {
    compatible = "pwm-fan";
    #cooling-cells = <2>;
    pwms = <&gp7101 0 255 0>; // <phandle pwm_id period inverted
    cooling-levels = <0 10 30 50 70 90 110>;
  };
};

&i2c2 {
	clock-frequency = <100000>;
	i2c-scl-rising-time-ns = <1000>;
	i2c-scl-falling-time-ns = <300>;
	status = "okay";

  mcp23008: gpio@20 {
    compatible = "microchip,mcp23008";
    gpio-controller;
    #gpio-cells = <2>;
    reg = <0x20>; // change this if JP1-JP3 are soldered otherwise
    // XXX IRQ not hooked up
  };

  ds1307: rtc@68 {
    compatible = "maxim,ds1307";
    reg = <0x68>;
  };

  gp7101: pwm@58 {
    compatible = "guestgood,gp7101-pwm";
    reg = <0x58>;
    #pwm-cells = <2>;
  };
};

(wrote a custom driver for gp7101)
Thermal zone tripping points:

&cpu_thermal {
  trips {
    cpu_active0: cpu_active0 {
      temperature = <45000>; /* millicelsius */
      hysteresis = <2000>; /* millicelsius */
      type = "active";
    };
    cpu_active1: cpu_active1 {
      temperature = <50000>; /* millicelsius */
      hysteresis = <2000>; /* millicelsius */
      type = "active";
    };
    cpu_active2: cpu_active2 {
      temperature = <55000>; /* millicelsius */
      hysteresis = <2000>; /* millicelsius */
      type = "active";
    };
    cpu_active3: cpu_active3 {
      temperature = <58000>; /* millicelsius */
      hysteresis = <2000>; /* millicelsius */
      type = "active";
    };
    cpu_active4: cpu_active4 {
      temperature = <62000>; /* millicelsius */
      hysteresis = <2000>; /* millicelsius */
      type = "active";
    };
    cpu_active5: cpu_active5 {
      temperature = <65000>; /* millicelsius */
      hysteresis = <2000>; /* millicelsius */
      type = "active";
    };
  };

  cooling-maps {
    map0 {
      trip = <&cpu_active0>;
      cooling-device = <&pwm_fan 0 1>;
    };
    map1 {
      trip = <&cpu_active1>;
      cooling-device = <&pwm_fan 1 2>;
    };
    map2 {
      trip = <&cpu_active2>;
      cooling-device = <&pwm_fan 2 3>;
    };
    map3 {
      trip = <&cpu_active3>;
      cooling-device = <&pwm_fan 3 4>;
    };
    map4 {
      trip = <&cpu_active4>;
      cooling-device = <&pwm_fan 4 5>;
    };
    map5 {
      trip = <&cpu_active5>;
      cooling-device = <&pwm_fan 5 6>;
    };
  };
};

Repo

Here’s the repository of v3/v4:

Path Desc
DevTermCaseTemp.kicad_pro v3
DevTermCaseTemp_v4.kicad_pro v4 wip
devterm-ext-outline useful graphics assets + footprint + 3d models (most important one is the cart connector from @fip)
mpcie.pretty ext board template from @Carton9 (KiCAD 6 DevTerm Printer Module Template)
masked-text.svg Template to create clockwork style silkscreen labels
7 Likes

没想到国内还有这么强的大佬啊!佩服佩服!

1 Like

Congratulations!
I concede my efforts now that this design is proven functional.
Tough I’m going to fork it for personal use since I don’t agree with the debug port placement, with credit of course. :stuck_out_tongue: For anyone not wanting the MicroUSB debug port, it can just be left unpopulated.
The signals are routed to the cartrige connector, so with bringing your own UART to USB it’ll spare you some parts and a Dremel to the case.

Now it’s time to design some cartridges, here’s a summary of the ideas so far:

  • Printer: Awkward shape, but could theoretically work unless there’s a smaller module out there
  • MIDI: Obvious choice, would make the DevTerm great for musicians
  • KVM: Also very handy to interface with servers and single board computers
  • Camera: Not unlike the gameboy counterpart
  • GPIO Interface/Passthrough: Paired with a ribbon cable and a breadboard breakout, this would make the DevTerm a nice substitute for SBCs in prototyping
  • SDR: A LimeSDR Mini 2.0 could fit, or a stock chip like the RTL2832U on a custom board
  • Logic Analyzer: There’s a RPI Pico project which makes for a cheap analyzer via USB
  • USB: Just more USB-A ports, simple as that
  • Serial: CAN+RS232 would be cool
  • Networking: Altough via a USB chip, dual Ethernet would be cool, also there could be a cellular one
  • Synthesizer chips: Could be looked into, I’m having doubts the EXT GPIO would be fast enough, but there’s 6 fast IOs, paired with maybe a shift register via SPI this may work
  • Microcontroller: The Teensy4.0 idea still lives on in my heart, I think there’s value in real time programmable IO
  • Geiger Counter: This is getting into weird territory, but would be possible

Lastly, thanks for actually implementing this idea in an elegant way.
Now it’s time to actually develop cartridges, not sure what to pick tough to work on.

1 Like

Thanks!

One more thing: there are not only 6 fast IOs, because the core board pins are multifunctional.
Posting this reference table again: https://nextcloud.yatao.info:10443/s/WfrBAEMna3sMGYA

3 Likes

I see an RTC section on there, is it like one of the modules you can buy on Adafruit or something different. I want to add a clock to mine and was going to order a module after I looked at the schematic. A06 here if it matters.

oh here’s another idea, make a haptic & acoustic engine with:

  1. stepping motor
  2. electromagnet
  3. linear motor
  4. plucked strings
  5. a physical bell
  6. relay

This will be able to emulate the haptic and acoustic feedback for most retro systems.

2 Likes

haptic & acoustic engine

A great idea, I’d pair it with an accelerometer or even gyro for gaming or whatever else.

  1. Stepping motor: Never heard of haptics with a stepper
  2. Electromagnet: So basically a solenoid clanking? Reminds me of some old-school terminal keyboards.
  3. Linear motor: This one confuses me a bit
  4. Plucked strings: That’s a tricky one to implement, and I’ve never heard of this one before, def. novel.
  5. A physical bell: My favorite, I’m on the lookout for a part.
  6. Relay: Simple and effective.

I think I might start with a passthrough PCB and breadboard adapter.

Anyway here’s a blank cartridge project template:
https://git.bitkipper.tech/flip/dtc-blank

  1. Stepping motor: an imaginary floppy drive in there. Useful for DOS, amiga etc.
  2. Electromagnet: bingo: What does a keyboard solenoid sound like? (Class80 Sound Test) - YouTube
  3. Linear motor: the kind of vibrator installed in iPhone and some Android. Rich frequency response.
  4. I have no idea how to implement this either :stuck_out_tongue:

and…
7. buzzer for HDD noise emulation

1 Like