RoPlug - what I learned from making an expansion card


The configurable scroll wheel

Intro story…

RoPlug: a configurable scroll wheel with the ability to remap to whatever the user wishes using the QMK framework.

I was not the first person to think of the idea of a scroll wheel. In fact, I got the idea from user gs1 on the forums! (Thanks @gs1)

A side-mounted scroll wheel card is a cool idea, never would have thought of that!

At that time, I thought that it would be cool if I could make that come true. As I remember overhearing someone say, “Environment affects the person”, I happened to be into the mechanical keyboard phase with my student career, and had a bunch of Arduino Pro Micro clones lying around for a hand wired keyboard project (which I never got around to start). With an expansion card + Arduino Pro Micro clone, I figured: why not make an expansion card with the Arduino chip? The chip, ATMega32U, is supported on QMK, so why not? I didn’t have a name for the board yet, but I figured I’ll come up with it on the spot when I need to sell it.

So off I went.

Getting started

I don’t know how to do schematic. The very first thing I needed to do was learn how to make a PCB, or a tool to make the board. As a Linux user, the first thing that came up in the open source software options was KiCad. Having the software itself isn’t useful without the knowledge of how to use it. It’s like giving a baby the keys to the car and expecting them to know where to insert the key… not even at the expectation of how to drive.

With the help of community members on the keyboard discord servers, I was directed to the YouTube playlist of Blinky 5.0 by Contextual Electronics. After practicing along with the playlist, I immediately started on the scroll wheel project.

Creating the board

The initial thought process behind the board was to make an Arduino Pro Micro clone with a male USB C connector instead of the usual Female Micro USB connector. Looking around the internet, I was able to find the schematics of the SparkFun Pro Micro on GitHub. I grabbed that, changed the connector to Male USB C, and called it a day. But it wasn’t good enough! It’s not in the form of an expansion card!

While I now had the knowledge for the tools on making a PCB, I didn’t have the knowledge about the USB C connector requirements, and other things like reading datasheets for the ATMega32U. I watched a couple YouTube videos on converting Micro USB ports to USB C; however, not so much about wiring them together, and details like only needing one 5k resistor on the USB C CC line. I will eventually come around to this tidbit of info, but not until very late. (Thanks @ExplodingWaffle for the pointer!)

In an attempt to put the ATMega32U to the expansion card form, I tried to copy the layout of the Pro Micro while considering the footprint for a rotary encoder. Taking the laziest direct route, I took out most of the pins and only exposed four pins: three IO pins, and a reset pin. I didn’t consider exposing the rest of the pins, as I thought the board was already a rat’s nest of routes all over the board.

I’ll skip out the story about my experience with the PCB fab, and jump to the next part… the costs of this project.


When I was making this project, COVID19 was at its height of chaos around the world. My professors were struggling to learn how to use Zoom for their PowerPoints, classmates not knowing how to turn off their mics, and everyone figuring out how to digitally reconnect their lives. While it was a field day for me to do other things while lectures were behind one alt tab away, it was also a field day for supply and demand. The chip that I had in my project: ATMega32U, was one of the chips that were impacted by the increase of demand for chips. As a result, I was quoted $17.850 for a chip that was normally sold for $5. Without any financial experience, I thought it would be a good idea to go ahead. Thinking about it today, if I waited three more years, I probably could have saved more than $200 dollars.

I used PCBWay for the fab and assembly, and the prices I got were as follows for ten pieces:

  • PCB:
    • 26x25mm 2 Layers
    • Thickness: 0.8 mm
    • Finished copper: 1
    • Surface finish: Immersion gold
    • Total price: $110.0
  • Assembly + parts:
    • ATMega32U: $17.850 x 10
    • USB C plug: $3.255 x 10
    • 16Mhz crystal: $1.260 x 10
    • Other parts like resistors and capacitors…
    • Parts total: $22.953 x 10 = $229.530
    • Total price after assembly: $318.00
  • Self sourced:
    • Rotary encoder x10: $27.90
  • Fees:
    • Bank/Paypal Fee: $20
  • Total cost for everything: $470.90

Selling the board

I made an interest check for the board around the time when I paid for the boards and assembly in an attempt to convince myself that I didn’t make a financial mistake. I didn’t get an exact tally of the votes at that time, but the majority had voted for “Yes, I’m interested!”. With the votes as a small dopamine boost, I decided to sell the board, while considering the costs of recouping my funds. However, seeing that the most expensive expansion card, that is not storage, at the time was at most $19, I doubt anyone would buy a prototype card that only has the function of a wheel for $44—and that doesn’t even count for shipping!

I only wanted 2 cards at most. Having only one framework laptop and four ports, selling the rest at a loss to get some funds back would be better than having the board sit on my desk. I decided on $25 for $6 more than an HDMI/mSDcard/DP card, and tack on a couple bucks for other things like an encoder, a 3D printed shell, and also the 3D files for the shell.

Over the remainder of 2021, I sold 4 boards. In 2022, I sold 2; and in 2023, I sold 1. In total (at the time of this writing), I sold 7 assembled PCBs, 8 rotating encoders, and other accessories for a total of $234. As for shipping costs, it was an additional total of $26.89—All within the continental US.


What I wish could have been different:

  • Better and lower fab prices
  • I could have used the framework expansion card template from the start. This would have made designing the case slightly easier.
  • I wish there can be lower profile rotary encoders… with a clickable button!
  • Alternatively, I could have exposed more of the pins on the ATMega32U for future proofing

Overall, this project was a net negative of $236.90, as I did not make profit off shipping. However, through the course of this project, I…

  • Learned how to make PCBs with KiCad
  • Learned what to do with USB C ports
  • Learned what to expect when contacting the PCB fab
  • Learned about financial literacy
  • and got my bachelors degree…

If there is more interest in the card, or if someone finds a rotary encoder with an even lower profile than the EC12E1220301 encoder, I’ll address the things that I could have done differently. Maybe it might be cheaper compared to the time when I made this project.

I know I skipped a lot of details between each part, but feel free to ask away!

Also, I should note that the QMK repository for roplug has been cleaned up and moved to GitHub - mrwm/mrwm_mk: QMK repository for QMK devices by mrwm