How to use a Pro Micro as a cheap controller/converter

User avatar
scottc

15 Jul 2018, 14:25

Maybe that's why my ADB converter never worked. :lol:

User avatar
Laser
emacs -nw

15 Jul 2018, 16:04

scottc wrote: Maybe that's why my ADB converter never worked. :lol:
Sounds like a very late coin drop :)

User avatar
mac80211

30 Jul 2018, 04:49

I have some Soarer's XT / AT USB Converter listed on my site at www.tinkerboy.xyz if you do not want to get through all the steps in building one yourself.

User avatar
scottc

30 Jul 2018, 10:30

Such shameless promotion!

Build them yourselves, it’s better for your wallet and more fun ;)

green-squid

28 Aug 2018, 20:14

apologies if this has been asked before, but if I'm on linux, do I type in the same AVRdude command, just without 'AVRdude?'

User avatar
scottc

28 Aug 2018, 20:18

I don't think I understand your question. The commands I posted are exactly what you need for Linux. Are you having trouble?

green-squid

28 Aug 2018, 20:24

oh okay, so just those? I don't think I have AVRdude on my computer, but if my package manager is enough (pacman?) then I just do 'pacman[command]' instead of AVRdude?

User avatar
scottc

28 Aug 2018, 20:26

Use pacman to install avrdude, then run the commands as they are shown in the first post

green-squid

30 Aug 2018, 17:25

Hello! I assembled my converter, and even after double checking my USB ports, it still gives me this error :( . I'm so unlucky today.
Attachments
unt1tled.png
unt1tled.png (162.52 KiB) Viewed 9241 times

User avatar
scottc

30 Aug 2018, 17:30

I said the same on Telegram, but can say it again here - your device is not in the bootloader by the time you run that command. Maybe try to run it in a loop while you short the pins. You have seconds between the device appearing and disappearing.

Code: Select all

while true; do sudo avrdude blah blah; sleep 2; done
Then short the pins again.

green-squid

02 Sep 2018, 19:17

hm. kinda lost... still having some issues.

So here's my understanding of the possible way of flashing it is:

1st: Check /dev/tty/
2nd: while true; do sudo avrdude -p atmega32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:Soarer_at2usb_v1.12_atmega32u4.hex; sleep 2; done
(2a: while shorting RST and GND)
3rd: profit?

User avatar
Laser
emacs -nw

02 Sep 2018, 20:33

I usually just hit Enter on the already prepared command "sudo avrdude ..." *right after* (i.e. ~1s) removing the short between RST and GND. I.e. in one hand have some metal wire that hooks on those pins, remove it, and quickly hit Enter with the other hand. You have to remove the short, otherwise the Pro Micro won't enter the bootloader mode (where/when it can be flashed).

User avatar
snacksthecat
✶✶✶✶

02 Sep 2018, 21:28

How to get a pro micro into bootloader mode:
  1. Get a piece of wire
  2. plug in the pro micro
  3. Throw the piece of wire away
  4. Say a prayer
  5. Cough three times
  6. Backflip
  7. Fly around the world
  8. Pick up the pro micro
  9. ...
:lol:
Spoiler:
No but really:
  1. Get a piece of wire
  2. Get your avrdude command typed out so all you have to do is hit enter
  3. Plug in the pro micro
  4. Short Gnd to Rst twice quickly
  5. Send your command and hope that it flashes
The last three steps have to be done pretty quickly

User avatar
kokokoy

03 Sep 2018, 03:01

Laser wrote: I usually just hit Enter on the already prepared command "sudo avrdude ..." *right after* (i.e. ~1s) removing the short between RST and GND. I.e. in one hand have some metal wire that hooks on those pins, remove it, and quickly hit Enter with the other hand. You have to remove the short, otherwise the Pro Micro won't enter the bootloader mode (where/when it can be flashed).
This.

In windows though, sometimes the com # changes so usually I have an open device manager. But nowadays I use QMK toolbox to flash my hex.

green-squid

03 Sep 2018, 16:29

So.. I tried trying to flash it within 1sec, and even with the help of my dad (who plugged in the promicro into the usb as fast as he could), then I tried to short the pins (the two pin extenders I found always fell out, never could do it fast) and then press enter. But again, never worked. Also, i could never short it two times that fast. (my usb cable is 10cm long) :(

I will keep trying, but I will never buy a promicro for a controller ever again, if I need to do this for flashing.
Though TBF, the fact that I don't have a functional soldering iron may play a part in why it's not AS easy to do it.

green-squid

03 Sep 2018, 17:01

snacksthecat wrote: How to get a pro micro into bootloader mode:
  1. Get a piece of wire
  2. plug in the pro micro
  3. Throw the piece of wire away
  4. Say a prayer
  5. Cough three times
  6. Backflip
  7. Fly around the world
  8. Pick up the pro micro
  9. ...
:lol:
Spoiler:
No but really:
  1. Get a piece of wire
  2. Get your avrdude command typed out so all you have to do is hit enter
  3. Plug in the pro micro
  4. Short Gnd to Rst twice quickly
  5. Send your command and hope that it flashes
The last three steps have to be done pretty quickly
can't do it fast enough! :(

User avatar
Laser
emacs -nw

03 Sep 2018, 17:39

You don't need to plug it "fast" to USB (just keep it plugged), and try to keep it shorted before flashing - press Enter *after* un-shorting it.

ergya

16 Sep 2018, 15:03

Hi everyone,

I am pretty new to any DIY electronic projects, I managed to brake the Pro Micro (Chinese one) USB jack from the PCB of a friends WYSE keyboard :(. He used Soarers converter so I bought a new Pro Micro, desoldered the broke one, flashed 1.12 to the new one, soldered and all I have at the moment is the keyboard LEDs (Scroll Lock...) are on constantly, no inputs from the keyboard. On the Pro Micro the power LED is on, no other LEDs are on. I am new to anything like this so I am stuck at the moment. Took pictures, notes... before desoldering from the wiring (just you know, to make sure...), so I am pretty sure the wiring is OK, checked conductivity with a multimeter between the solder joints and the end of the cables (end=just before they connect to the PCB of the keyboard), all OK, no bridges... Executed hid_listen but nothing. These are the outputs I collected to debug, could someone be so kind to help me out with some suggestion?

flash output: https://pastebin.com/HLH7vM07
journalctl output when connecting the keyboard: https://pastebin.com/PmJkQYNt, the only "red" in the log is: hid-generic 0003:16C0:047D.0005: No inputs registered, leaving
the output of hid_listen (keyboard is still connected): https://pastebin.com/1L8vXWd9, nothing else when hitting any keys
I desoldered the pro micro controller and did the clock/data short test Soarer suggested on page 4, output: https://pastebin.com/DyUZwtLf

What I did not do is to "send" any config to the cotroller (like modify keyboard mapping...) but according to the step-by-step guide is not necesseraly needed.

User avatar
chuckdee

16 Sep 2018, 15:43

I had similar symptoms recently with a board, and it turned out to be the cable. I'd start there if you haven't checked that yet.

ergya

16 Sep 2018, 15:50

Hi, thanks for the answer, you mean the USB cable? I tried with 2 different cable, tried with 2 different USB port on my computer, no luck :(.

User avatar
chuckdee

16 Sep 2018, 17:27

ergya wrote: Hi, thanks for the answer, you mean the USB cable? I tried with 2 different cable, tried with 2 different USB port on my computer, no luck :(.
Funny story... I tried mine with 3 different USB cables on 3 different machines on different USB ports on each. Only after the guy that sold me the pro-micro sent another did I realize that all 3 were bad. Did you socket the pro-micro? If so, I'd suggest trying another in order to rule out that the pro-micro is bad. I'd also check the USB cables on something that works to verify your test cables.

ergya

16 Sep 2018, 19:26

chuckdee wrote:
ergya wrote: Funny story... I tried mine with 3 different USB cables on 3 different machines on different USB ports on each. Only after the guy that sold me the pro-micro sent another did I realize that all 3 were bad. Did you socket the pro-micro? If so, I'd suggest trying another in order to rule out that the pro-micro is bad. I'd also check the USB cables on something that works to verify your test cables.
I tried with 3 different cables, with the 1 I flashed the controller too, same... for the pro-micro, they mentioned for test 1 that I should see "R04" code too, I did not see any (checked multiple times), donno what that means but maybe that is the problem. I also tried with 1.10, same outcome.

User avatar
ThePillenwerfer

07 Nov 2018, 13:34

I successfully followed this guide last week. I did encounter one problem which nobody else seems to have mentioned.

AVRdude was on my computer as part of the Arduino IDE. When I tried to upload the .HEX file it produced errors. I eventually fixed it by temporarily renaming the ~/.avrduderc file.

Thanks to Scottc for his original instructions and to Arakula for his modified firmware.

Ivich

25 Nov 2018, 04:29

Hi, does anyone have an idea what I could be doing wrong here? I'm trying to convert a Model F XT to USB

I flash the atmega32u4 hex to the pro micro:
Spoiler:
Image
then figured out which pinouts go to which wires on my 5 pin adapter:
Spoiler:
ImageImage
and connected them to the pro micro:
Spoiler:
ImageImage
But when I connect the pro micro to the computer nothing happens. I've tried both Windows and Linux.

User avatar
snacksthecat
✶✶✶✶

25 Nov 2018, 04:32

For my XT, I had to connect the plate/case Gnd wire to the circuit Gnd before it would work. I don't think there is any harm in trying this but maybe someone else can chime in with a more informed perspective.

User avatar
ThePillenwerfer

25 Nov 2018, 04:51

When you say nothing happens do you mean that the computer isn't even aware that a USB device has been plugged in? Windows will make a noise and you can check on Linux with

Code: Select all

lsusb
If it is detecting but not working the only thing I can suggest is checking the wiring, again, remembering that the diagram view is as though you are looking into the socket from the front, ie where the plug goes. It could be something as silly as one of the croc-clips not making a decent connexion.

Not many keyboards need the Reset line connected but it's possible that yours is one of the few that do so connecting that — Pin 3 of the 5-pin DIN socket to Hole 10 on the ProMicro — wouldn't hurt.

Do you know that your keyboard works? Somebody else recently had a similar problem which turned out to be a break in the cable where it goes into the keyboard.

Ivich

25 Nov 2018, 05:10

Connecting the ground wire didn't seem to have an effect.

It looks like the computer is detecting the keyboard, but typing does nothing. Thanks for the suggestions, i'll try connecting the reset.

I don't know for certain that the keyboard works, but the cable is intact.

User avatar
ThePillenwerfer

25 Nov 2018, 05:17

I've had a closer look at your screen-shot and spotted that you flashed the original firmware. With that the reset line is inoperative on a ProMicro.

On page two of this thread post187874.html#p187874 is a modified version which enables it on Hole 10.

Ivich

25 Nov 2018, 05:33

I flashed the hex with reset enabled and connected the reset line to hole 10, unfortunately no difference.

Could just be the keyboard isn't functioning, surprising as it seems to be in good shape.

User avatar
ThePillenwerfer

25 Nov 2018, 13:30

I'm afraid that I'm out of ideas. You did the hard part, flashing the code, fine and the wiring is simple and looks correct from the photos.

Have you tried HID_Listen with it connected? That would show if the keyboard is sending any sort of output even if the OS can't understand it for some reason.

If you've got or can borrow another keyboard with a 5-pin Din or PS/2 connector it would be handy to try that as if that worked it would strongly indicate that there's a problem with your keyboard.

Good luck.

Post Reply

Return to “Workshop”