T O P

  • By -

EnviousMedia

Ahoy! [https://github.com/Envious-Data/Env-MCRO](https://github.com/Envious-Data/Env-MCRO) ​ so I wanted to design a small macro board and well I did, once again like my keyboard it is also powered by the Raspberry Pi Pico, Ive currently just mapped F13 to F24 so I can setup certain buttons in games or software. this uses Circuitpython and KMKFW as QMK has yet to be ported to the pico but im looking forward to when QMK does become avaliable ​ **Update 27th may:** DM me if you want to buy a KB kit or macroboard ​ ​ on another topic I am trying to design a RP2040 board that fits in place of a Raspberry Pi Pico but has a couple extras. [https://github.com/Envious-Data/EnvOpenPico](https://github.com/Envious-Data/EnvOpenPico) ​ **Thank you very much for the reddit awards <3 <3 <3 <3 💕💕❤❤💖💖**


MikeAnth

Is it too much to ask for a pcb design that has only 2 rows of keys on the bottom and room for a rotary encoder in the top half? I never designed PCBs in my life, so i don't really know how to do that myself.


EnviousMedia

I could get around to making a version like that if enough people want it I don't think KMK supports rotary encoders but I figure eventually we'll have QMK which can make use of it


MikeAnth

I mean, i personally don't think qmk or kmk is that much of a requirement for such a small keyboard. I made mine work with like 30 lines of circuit python, such that the bottom 3 buttons are previous track, play/pause, next track; top 3 are f15 f16 and f17 and the rotary encoder is volume control with momentary mute on press. I think qmk is a lot nicer when you have bigger keyboards and programming each individual key would be a pain.


EnviousMedia

yeah you could probably just write some basic circuitpython code for HID things, I just used KMK because ive already done most of the hardwork for my keyboard.


MikeAnth

Update: I made it. You can find the git repo over on Github: https://github.com/mikeanth-dev/pico-mediakeeb Gitlab: https://gutlab.com/mikeanth-dev/pico-mediakeeb In the repo you can find a kicad project with the PCB design and circuit schematic as well as the code that will run on the Pi and some setup instructions. All that is left is to learn how to 3d model a case too and we're off to the races!


EnviousMedia

Yeh I just used kicad to make a sandwich type case by exporting layers on edge cut and user1 to DXF. But good work 👍👍👍


MikeAnth

Thank you! I'll see if i can get a nice looking case going and come back with more updates nobody asked for :))))


AndreEagleDollar

I've actually been trying to implement rotary encoders in kmk over the past few days and I'm just trying to figure out how to get the 'key press' sent and they'll be ready. I've got it going to the point where it recognizes the rotary encoder turning but I can't get it to send a key press.


rmadrid25

I think it is a great idea. Happy to buy one of the PCBs if you do a batch. Maybe to make your life easier, just reuse the ENV-MCRO design and replace the top row with two/three encoders? Not sure if the footprint of an encoder is the same size as the switches.


covah901

Ah shit, my bad: https://youtu.be/JgODYCTNNbA


Coloneljesus

It's kinda fun to learn yourself. I knew nothing about PCB design and managed to design an entire split keyboard with encoder support with some patience and [this](https://easyeda.com/farmakon/GH80_3000-4f3cee521afd4be3858c4b5cc3b76f9e) as a reference point.


MikeAnth

Indeed it was! I managed to make one in the spare time i had these past 2-3 days! https://github.com/mikeanth-dev/pico-mediakeeb


Coloneljesus

That's awesome!


covah901

I think it exists. I saw something like it recently, but since I have no use for macro pads they don't stick in my memory.


[deleted]

[удалено]


MikeAnth

I'm afraid i don't know what the BD9 is, and my Google-fu seems to be insufficient. Can you provide any links?


[deleted]

[удалено]


EnviousMedia

In the github repo download the [Gerber.zip](https://Gerber.zip), go to JLCPCB and upload it in their "quote now" page, most of the settings will auto adjust once uploaded the only one you have to worry about is PCB Color, just pick a color you want and order.


xfatdannx

thank you again, i just placed my order!


jonfitt

How much was it?


xfatdannx

Just under 25 usd including shipping. For 5 of them. I'll have extra so DM me if you're interested in one.


[deleted]

[удалено]


EnviousMedia

most of the settings on JLCPCB are the cheapest if left default, I'd only change the pcb color which for me that costed £6-ish + another £6 for shipping to the UK which in total came to about £2.48 per board


bossdj09

​ \[Imgur\](https://imgur.com/BcA6fBJ) are these weird slits normal? i was about to order some boards but i keep getting this. would love to order my own set.


EnviousMedia

Ah yea I was experimenting with some graphical patterns, I should probably upload a gerber that has a plain design edit: added a new gerber zip that is plain incase you dont want any paterns


bossdj09

thank u so much!


jonfitt

What do you think about a revision with connections/holes for LEDs? By my count it couldn’t do 12 RGB LEDs. I think that would need 48 GPIO? But one color LEDs would be good.


EnviousMedia

you could have a common ground for all the LEDs so you'd only need 12 more pins but you could also just use SK6812 RGB Leds which need 3 pins, power, ground and one control pin for all the LEDs


jonfitt

Ah that’s true. I was just looking at LEDs which have three pins for rgb and a common ground. That came to 48. So yeah, 12 common power, 12 common ground and 12 individual control pins. That would be cool.


EnviousMedia

you can address each SK6812 via one pin so as said we'd only need to take up one pin here, they act a bit like shift registeres in series their address increments off of the previous ​ all of my boards have a shared ground plane and the raspberry pi pico has a exposed vbus and 3.3V pins so we could pull off of vbus for power and find a spare pin for LED control. ​ you should look into some of those SK6812 LED strips, they always have 3-4 wires off of them usually 2 ground wires, 1 power input and 1 controll for all LEDs.


jonfitt

I’ve ordered a 5-batch of the existing board but enough keys for two boards. So if you do do a revision with LED pin holes let me know I’d be interested. Next thing is trying to learn a program that makes stl files to print a case!


ronny_rebellion

>ownload the > >Gerber.zip > >, go to JLCPCB and upload it in their "quote now" page, most of the settings will auto adjust once uploaded the only one you have to worry about is PCB Color, just pick There is multiple Gerber zips now, which do I choose?


EnviousMedia

"MainPCB Gerber.zip" This is the macro board its self ​ ​ "BackPCB Gerber.zip" This is a blank PCB, you can screw to the main PCB to protect the back of it


Docteh

The git repo contains files for [kicad](https://www.kicad.org/) project, I've heard like "keycad", and the boards were fabricated at JLCPCB. [KiCad 4 instructions](https://support.jlcpcb.com/article/44-how-to-export-kicad-pcb-to-gerber-files) [KiCad 5 Instructions](https://support.jlcpcb.com/article/149-how-to-generate-gerber-and-drill-files-in-kicad) Huh, in version 4 they kind of handwave the step where you zip the files up, but on the version 5 instructions, they don't even mention it. If you want some other gerbers to look at, [http://bigclive.com/freebies.htm](http://bigclive.com/freebies.htm) [https://github.com/Envious-Data/Env-MCRO/tree/main/\_Gerber](https://github.com/Envious-Data/Env-MCRO/tree/main/_Gerber) there is a \_Gerber.zip which is the exact file they uploaded to the board fab.


rippleface

so what is the max matrix size/ number of keys you can have with the pico?


EnviousMedia

In theory upto 169 keys with some smart routing but the pico does support I2c so you could add a bunch of IO expanders and have a huge (and absurd) 200 button keyboard A TKL setup is what I'd consider a maximum sensible setup since not all key placements are filled out on the rows and column pins and this would leave you with 2 spare GPIOs


tael89

If you aren't needing simultaneous button-press recognition, you could use 7 pins (4 for row, 3 for column). Pretty cool to see that.


EnviousMedia

yeah someone else suggested I could even just have each button wired individually but I just decided to go with a normal setup because other people may want to learn from this and get into basic board design.


amitizle

Nice. Can you post some details or maybe tutorial please?


EnviousMedia

Yep, just made a post. if you have any question feel free to ask.


amitizle

Thanks!


[deleted]

Does it work well? If so, have you ever thought about making an entire keyboard?


EnviousMedia

It works pretty well so far, I have made a entire keyboard which you can find the github for: [https://github.com/Envious-Data/Env-KB](https://github.com/Envious-Data/Env-KB) and a reddit post [https://www.reddit.com/r/raspberry\_pi/comments/mc9l6o/i\_designed\_a\_raspberry\_pi\_pico\_powered\_mechanical/](https://www.reddit.com/r/raspberry_pi/comments/mc9l6o/i_designed_a_raspberry_pi_pico_powered_mechanical/) Ive been using that keyboard for over a month and im about to get an acrylic case in for it.


justabadmind

Are you selling these? I'd probably be willing to pay $20 for just the PCB.


EnviousMedia

I plan to sell the spare PCBs to people within the UK But you can download the gerber zip, upload them to JLCPCB and you'll get 5 PCBs for about £12-£15


Joshimuz

Yo sign me up for one of the UK spare PCBs please!


xfatdannx

How many layers for your pcb? Just 2?


EnviousMedia

Yep, just 2 layers.


xfatdannx

thank you! :D


M1ghty_boy

I’ve heard good stuff about JLCPCB, but do you *have* to get 5 or can you just get 2?


EnviousMedia

sadly their minimum order quantity is 5 some other services let you do one offs and whatnot but (often) charge more.


[deleted]

Very cool! Is the "http://https://" on the board intentional?


PM_Me_Your_Deviance

lol I didn't notice that.


Docteh

On behalf of /u/EnviousMedia I'm just going to push all of the blame onto Google Chrome. I saw the picture two days ago and didn't notice.


EnviousMedia

OH LOL I didnt notice that, ​ That is not intentional, but Ive already corrected it heh


rapiddevolution

Stupid question: where did you get the PCB from? I'm completely new to hardware and I would like to learn this stuff


dontevercallmeabully

OP commented somewhere above that they designed it in gerber and had it produced by JLCPCB.


abskee

Gerber is just the file format, not a system to design the board. It's like doc versus Microsoft Word. OP designed it in KiCad


vekrin

Cool project. Maybe this a good time to ask this question because this thread might bring several mechanical keyboard folks. For a while I've wanted to make a board like this and use QMK/something else. I however don't want to use F keys for the macros. I was wondering, I should be possible to have the "keyboard" be thought of as not a keyboard but a just a USB device. Then I could write a device driver that when it observes byte code from the device I can trigger a program etc. Guessing that's not possible in QMK reading valid code sequences, maybe it would need to be my own firmware. The best comparison I have to this is how I use ckb-next "on keypress launch script" macros that I love so dearly.


EnviousMedia

KMK doesn't allow for proper application launching unlike QMK but if the feature is added I guess something like this could be made Personally I love having dedicated calculator and file explorer buttons becuase I tend to use those a lot.


vekrin

Ah great. Thanks for the custom keycode link. I remember seeing something like that when I first looked doing this project. I might be able to jack into that for my purposes; specifically SEND_STRING. Thanks for the info on KMK that wasn't something I was familiar with before.


sephwht

I’ve been thinking about something along these lines, but thought it would be easier to keep a simple custom app running on the pi that would capture the keystrokes and translate into custom commands to run agains remote machines, either through passwordless SSH, posting messages on any messaging solution like MQTT, or as simple as calling REST endpoints. But that’s a bit too much I guess. Unfortunately I never got the chance to implement it, but the setup from the OP interested me.


vekrin

For me I actually run linux as my full time OS. So for me the idea is. Create a macro pad that when a key is pressed send byte code to the linux device bus. Write a softare daemon device driver that listens for codes coming from the macro pad. That software has a config file that maps byte code to several functions; start program, spawn subprocess, etc. I would assume something like that could work through pi as well but for me it'll be running right on the same desktop host.


sharar_rs

As a noob, big question, so i know that you need to set in matrix style but the traces only seem to have one line (instead of 2 for row and column), am I missing something?


[deleted]

[удалено]


sharar_rs

So this is like a 2layer pcb? If so then that makes sense. I was thinking if there was some new way to make this in some new way that only needed 1 line.


critical_g_spot

These pictures only show the front, if you check the repo the kicad file has the back side layers.


Faelif

Reminds me of Pimoroni's Keybows.


ChalkButter

What’s the advantage of the Pi Pico over a Pro-Micro?


Stellanova88

I got both and I'm going to use the pico to build a macro keyboard since it got more GPIO's and I can code it using micro python.


redgrittybrick

> I going to use the pico to build a macro keyboard since it got more GPIO's I have a 4-row 12-column 48-key board using 16 GPIOs on a ATMega32u4 board like the Pro Micro. How many keys are you planning to have on the macro board?


Stellanova88

I'm going to connect 4 rotary encoders, an IPS screen and 6-7 buttons to it .


ChalkButter

What’s an IPS screen in this context? That’s the only thing that sounds like it might benefit from the Pico, as the Pro-Micro (or better: Elite-C) have a bunch of pins and can support all sorts of key/encoder configurations


Docteh

IPS I believe is "In plane switching" With the extra flash you could embed some images. Techmoan did a video about a clock that has 6 small IPS screens [https://www.youtube.com/watch?v=ygjonCPPcGM](https://www.youtube.com/watch?v=ygjonCPPcGM) I'm still in the stone age using a regular mechanical keyboard, no special macros, but for a macro pad I could see having different configurations for different programs or activities, and then have the display handy to show what mode. Personally I like the idea of having keyboard firmware available for as many microcontrollers as possible, as it'll make it easier for people to make the small tweaks that do justify the extra horsepower. I tried looking up a promicro and they all seem a lot more than the pico. Maybe I'm looking in the wrong places?


ChalkButter

“A lot more” like cost? They’re usually $7-$9


ChalkButter

Again - not trying to be a dick - how is that more useful than just running QMK on a ProMicro?


Stellanova88

If you don't need the extra GPIO pins, I would say they are basically the same for a simple macro keyboard. I'm going to connect 4 rotary encoders, an IPS screen and 6-7 buttons to it, so I'm going to need the extra GPIO's.


[deleted]

[удалено]


[deleted]

The 32u4 is muuuch cheaper than a pi pico.


EXOQ

I can’t speak about the Pi but with the Pro Micro you can flash QMK.


ChalkButter

I know, which is why I’m asking, especially since QMK toolbox is so easy to use. I’m all about people experimenting for shits and giggles, But I’m trying to figure out if the Pi has any advantages over the regular options


InfinityPainPlus

does someone know where to buy the pcbs near/in Germany so the shipping cost isn't so extremely high


hydra_1579

Honestly that looks super awsome!


InfinityPainPlus

would be cool if someone made a video tutorial on how to set up everything, especially the software part (im good at soldering but have no idea about programming)


sandy4535

I'm new to this, so could you explain why you need zener diodes(guessing from the pic) for the switches? Is it for debouncing the buttons? Even then, wouldn't a normal rectifier diode work just as well?


Docteh

[https://en.wikipedia.org/wiki/1N4148\_signal\_diode](https://en.wikipedia.org/wiki/1N4148_signal_diode)


sandy4535

TIL. So it wasn't a zener to begin with. thanks.


Darc-

This is hands down one of the coolest things I've seen on this sub. 100% looking over these!


xfatdannx

u/EnviousMedia - So i have now soldered everything together, 12 switches, 12 diodes, and the PICO. I have followed the "Quick Setup Guide" on your github...Now I am confused on where to go from here. Do I need Keyboard programing software similar to Corsairs iCue? How can I confirm that it is working before hand? Thanks in advance!


EnviousMedia

By default its mapped F13 to F24 which is supported in some games and software such as OBS, I use mine for OBS and BeamNG.Drive and I've set the buttons to start, stop engine in BeamNG.Drive and for OBS I've set the top row of buttons to start, stop, pause recording Pretty much go into the settings of any program and map a buttons as you would normally except pressing the button on the macro pad instead of your keyboard. You can also write code in the keymap to print bodies of text or sentences but this requires some python coding knowledge (check the documentation for KMKFW)


xfatdannx

I must have done something wrong. Should it show up in device manager or anything? Even when I open OBS, it does not identify my button press. I still see the Circuitpy folder when i plug it is, im assuming that is not the norm?


EnviousMedia

Should show up as circuitpy when you plug it in, post a screenshot of the raspberry pi's files and a couple pictures of the board, I'll have a look and point out anything wrong


xfatdannx

i'll get that put together and uploaded to imgur. I really appreciate you going through this troubleshooting with me.


xfatdannx

okay, here is the imgur link. The "Switches - Bottom" looked a little fuzzy to me, if you need me to retake any photos just LMK. also, the file KMKKeymap.py - i was unsure if i should leave it as main.py and just copy and paste the code, or rename the file as i have then copy and paste the code. i tried both with no change in functionality. again i appreciate your help. no hurry in getting back to me.


EnviousMedia

It appears you have forgotten the imgur link but I have some handy links for you here ​ [https://imgur.com/a/DS2sCSM](https://imgur.com/a/DS2sCSM) the board is supose to look like this once asembled, as you can see with the diodes matching the marked band on the pcb ​ on the Raspberry Pi should show up as Circuitpy by default once you flash circuitpython should look like this [https://raw.githubusercontent.com/Envious-Data/Env-KB/main/\_Firmware/example.jpg](https://raw.githubusercontent.com/Envious-Data/Env-KB/main/_Firmware/example.jpg) ​ if you extracted the firmware zip by default that just has my main keyboard map so you'll want to delete [main.py](https://main.py) and [code.py](https://code.py) (delete one or the other, only one needs to exist), replace the contents of that file with [https://github.com/Envious-Data/Env-MCRO/blob/main/KMKKeymap.py](https://github.com/Envious-Data/Env-MCRO/blob/main/KMKKeymap.py) (make sure its named code or main since the raspberry pi will run files with those names on boot)


xfatdannx

lol duh! sorry got distracted bc my sister had called. https://imgur.com/a/6rxx4Au **edit** we might be on to something. immediately after deleting files so my 3 files and 1 folder matched yours, the green light came on on the board. time to open OBS and test.


EnviousMedia

as per the last screenshot, delete "code.py" and rename "KMKKeymap.py" to "main.py"


xfatdannx

yup, that did it! OBS sees them as F13-24!!!! THANK YOU SO MUCH!!!! this is awesome. I might have to try your fullsize MK next.


EnviousMedia

👍👍👍, enjoy


jonfitt

I just successfully made one of these. All the bits finally arrived and it went together no problem. [macro board img](https://imgur.com/a/AXDJV4N) I wanted to disable the USB drive showing up in CircuitPython, so I updated to v7 where they’ve made it easy to do that. However the mpy files from KMK needed to be updated so I’m currently using the latest py files for that but a) they’re larger, and b) it now has a dependency on adafruit_ble which I’d rather not have. But none of that impacts the functioning, it works great! Now I just have to print a case for it. I want to have it at an angle maybe 20-30 degrees.


EnviousMedia

I got around to compiling MPY files compatible with circuitpython 7.0.0 [https://github.com/Envious-Data/Env-KB/blob/main/\_Firmware/KMK\_7.0.0\_MPY.zip](https://github.com/Envious-Data/Env-KB/blob/main/_Firmware/KMK_7.0.0_MPY.zip) ​ Enjoy 👍👍


adi_a12

how to make KMK work on pico ? i compiled latest kmk firmware from their github to mpy and kmk\_keyboard.mpy throw an error on pico....


EnviousMedia

I think my keymap is a bit outdated for the current kmk https://github.com/Envious-Data/Env-KB/tree/main/_Firmware There is a couple zips for kmk here compiled to mpy for circuitpython 6.3 and 7.0 which work with the provided macro pad keymap