Author Topic: USB to USB keyboard converter build log(Pro Micro 3.3v with mini host shield)  (Read 18350 times)

0 Members and 1 Guest are viewing this topic.

Offline yangdigi

  • Thread Starter
  • Posts: 70
  • Location: China
Haus's USB to USB keyboard converter topic:
https://geekhack.org/index.php?topic=69169.0
Big thanks to him.

I found there is no guide that uses a Pro Micro 3.3V(not Mini) with mini host shield to make a USB to USB keyboard converter. I've searched the web and found only Teensy with mini host shield to do this.
https://www.pjrc.com/teensy/td_libs_USBHostShield.html

Pro Micro is much cheaper than Teensy. I got Pro Micro 3.3V and mini host shield from a friend of mine who combined all pins of the two together in a wrong way.  I separated them and combined them again. Here I want to share what I did.

There are a few examples for Teensy with mini host shield.

130848-1

Pro Micro does't have a PC7. But in fact it use pin9 and pin10. I draw a simple pic to show pin connections.


Look at Pro Micro. Only +5v and reset need to be hand wired.
130881-3

Firstly, I've tested the connections and it works well as a USB to USB keyboard converter.
130854-4

Then, It's time to make them combined. Mini host shield need a little mod to separate the USB host power from the 3.3v power. There is no jumper on this mini host shield so I cut the line on pcb. Two extra wires are needed here, one to VBUS and the other connects reset with 3.3v.
130856-5

RAW on Pro Micro 3.3v provides +5v.
130858-6
 
More pics.
130860-7
130862-8
130864-9

It's small. And I think making this one is much easier than using Teensy with mini host shield.

After simply cleaning the PCBs, it looks a litter better now.
130873-10
130875-11
130878-12
« Last Edit: Sat, 12 March 2016, 09:16:54 by yangdigi »

Offline suicidal_orange

  • * Global Moderator
  • Posts: 3282
  • Location: England
That is small!  Great guide too, thanks for writing it up :)
                               
Ducky Zero, MX Reds    JD40, Jailhouse Blues           GH60
Soarer controller

Offline njbair

  • Posts: 2825
  • Location: Cleveland, Ohio
  • I love the Powerglove. It's so bad.
    • nickbair.net
Nice work. I bought one from hasu, then built a second one from a full-size Leonardo clone and USB host shield, both made by SainSmart.

Maybe I missed it in the OP, but what was the total BOM for this project?

Alpine Winter GB | My Personal TMK Firmware Repo
IBM Rubber Band "Floss" Mod | Click Modding Alps 101 | Flame-Polishing Cherry MX Stems
Review: hasu's USB to USB converter
My boards:
More
AEKII 60% | Alps64 HHKB | Ducky Shine 3, MX Blues | IBM Model M #1391401, Nov. 1990 | IBM SSK #1391472, Nov. 1987, screw modded, rubber-band modded | Noppoo EC108-Pro, 45g | Infinity 60% v2 Hacker, Matias Quiet Pros | Infinity 60% v2 Standard, MX Browns | Cherry G80-1800LPCEU-2, MX Blacks | Cherry G80-1813 (Dolch), MX Blues | Unicomp M-122, ANSI-modded | Unicomp M-122 (Unsaver mod in progress) | 2x Unitek K-258, White Alps | Apple boards (IIGS, AEKII) | Varmilo VA87MR, Gateron Blacks | Filco Zero TKL, Fukka White Alps | Planck, Gateron Browns | Monarch, click-modded Cream Alps

Offline prod

  • Posts: 66
  • Location: China
nice work
Chicory|YDPv2(BLUP)|BLE40|Daisy|YDPM|YD40w|Golbat

Offline yangdigi

  • Thread Starter
  • Posts: 70
  • Location: China
Nice work. I bought one from hasu, then built a second one from a full-size Leonardo clone and USB host shield, both made by SainSmart.

Maybe I missed it in the OP, but what was the total BOM for this project?
In this topic, I just showed how to make USB to USB keyboard converter with a Pro Micro 3.3v and mini host shield.
The other two converters are only for size comparing.

Offline clickclack123

  • Posts: 356
  • Location: Australia, Mate!
Great work and thanks so much for all the info, this is a great option.

I bought a host shield mini a long time ago and planned to have a go at this but never got around to working it out.

With the USB Host Shield Mini boards being AUD$8.43 (US$6.29) from China on ebay now, this is a nice option. I couldn't find the 3.3V Pro Micro boards on ebay but the 5V ones are AUD$5.31 (US$3.96). It's not too hard to change the regulator to a 3.3V one, I've done it with a hot air station, kapton tape and applying solder paste with a toothpick, and the regulators are cheap, eg SPX3819 http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=181963109679 AUD$3.86 (US$2.78) for 10. That would be running the Pro Micro slightly out of spec, 16MHz at 3.3V but reports suggest that it works fine.

Offline PatrickR

  • Posts: 6
In this topic, I just showed how to make USB to USB keyboard converter with a Pro Micro 3.3v and mini host shield..
You wrote Pro Micro 3.3v, I thought a Pro Micro 3V3 variant has a 8MHz quartz but on your pictures it seems it's the 16MHz quartz on the board like on the 5V Pro Micro ?
So I'm a little bit confused.

Patrick

Offline yangdigi

  • Thread Starter
  • Posts: 70
  • Location: China
In this topic, I just showed how to make USB to USB keyboard converter with a Pro Micro 3.3v and mini host shield..
You wrote Pro Micro 3.3v, I thought a Pro Micro 3V3 variant has a 8MHz quartz but on your pictures it seems it's the 16MHz quartz on the board like on the 5V Pro Micro ?
So I'm a little bit confused.

Patrick
That Pro Micro is a Chinese clone one from taobao. It's 3.3v but 16Mhz quartz.
Pro Micro 3.3v with 8Mhz quartz can work well too.

Offline Liocer

  • Posts: 117
  • Location: London, UK
The USB Host adaptors seem pretty impossible to get :S

Offline PatrickR

  • Posts: 6
The USB Host adaptors seem pretty impossible to get :S
Which do you mean ?

That Pro Micro is a Chinese clone one from taobao. It's 3.3v but 16Mhz quartz.
Pro Micro 3.3v with 8Mhz quartz can work well too.
As hint, but I'm sure you know it already, related to the "ATMega32U4", the 3.3V with 16MHz, is out of the Safe Operating Area.
But I also read that it works as you described and done it.  :thumb:

Patrick

Offline Liocer

  • Posts: 117
  • Location: London, UK
Re: USB to USB keyboard converter build log(Pro Micro 3.3v with mini host shield)
« Reply #10 on: Tue, 14 February 2017, 06:37:10 »
The USB Host adaptors seem pretty impossible to get :S
Which do you mean ?

That Pro Micro is a Chinese clone one from taobao. It's 3.3v but 16Mhz quartz.
Pro Micro 3.3v with 8Mhz quartz can work well too.
As hint, but I'm sure you know it already, related to the "ATMega32U4", the 3.3V with 16MHz, is out of the Safe Operating Area.
But I also read that it works as you described and done it.  :thumb:

Patrick

Apparently my ebay fu was not strong.. but it got better  :thumb:

Offline PatrickR

  • Posts: 6
Re: USB to USB keyboard converter build log(Pro Micro 3.3v with mini host shield)
« Reply #11 on: Fri, 24 February 2017, 02:34:38 »
@yangding

Which bootloader did you use ?
The one which is provided with the board, which is this ?
Or did you upload the Caterina https://github.com/sparkfun/Arduino_Boards/tree/master/sparkfun/avr/bootloaders/caterina ?

Do you have some information about the software libs which you used ?

Many thanks.
Patrick

Offline spuxx

  • Posts: 14
Re: USB to USB keyboard converter build log(Pro Micro 3.3v with mini host shield)
« Reply #12 on: Tue, 28 February 2017, 08:29:05 »
I tried this but can't get the Pro Micro 3.3V 8MHz to work with the tmk usb_usb converter firmware. When I plug in the Pro Micro with the firmware flashed, there is always a USB enumeration problem and the converter does not show up as a USB device. @yangding, did you change anything in the usb_usb converter code or did it work for you without a problem?

Offline yangdigi

  • Thread Starter
  • Posts: 70
  • Location: China
@yangding

Which bootloader did you use ?
The one which is provided with the board, which is this ?
Or did you upload the Caterina https://github.com/sparkfun/Arduino_Boards/tree/master/sparkfun/avr/bootloaders/caterina ?

Do you have some information about the software libs which you used ?

Many thanks.
Patrick
I use its default bootloader.

Offline yangdigi

  • Thread Starter
  • Posts: 70
  • Location: China
I tried this but can't get the Pro Micro 3.3V 8MHz to work with the tmk usb_usb converter firmware. When I plug in the Pro Micro with the firmware flashed, there is always a USB enumeration problem and the converter does not show up as a USB device. @yangding, did you change anything in the usb_usb converter code or did it work for you without a problem?
If your Pro Micro is 8MHz, change F_CPU = 16000000 to F_CPU = 8000000 in Makefile

Offline Liocer

  • Posts: 117
  • Location: London, UK
Not sure if I've done something wrong, built the board exactly as you have, my pc sees the pro micro with tmk flashed on it. But no keyboard when connected.

Will have to get the multimeter out to check the connections (pretty sure they're good).

Hmm, any ideas?

Offline hackqiang

  • Posts: 2
great job!

Offline supersjimmie

  • Posts: 1
My question is probably very easy, but there's only one thing that I don't understand.
The Reset pin... 
There is a RST on the Arduino and a RESET on the USB Host shield but they are different reset pins and are not inter-connected.
Also, on my "normal sized" USB Host shield, on an Arduino UNO, the host shield reset is connected to the ICSP pin called RESET.
Since there is no ICSP on the Pro Micro, I think that's why this topic explains that there needs to be done something with the reset pin.

But do I correctly understand that here the USB Host Shield RESET is connected to the +3.3V, so it will always be HIGH?

Offline Farmers

  • Posts: 1
My question is probably very easy, but there's only one thing that I don't understand.
The Reset pin... 
There is a RST on the Arduino and a RESET on the USB Host shield but they are different reset pins and are not inter-connected.
Also, on my "normal sized" USB Host shield, on an Arduino UNO, the host shield reset is connected to the ICSP pin called RESET.
Since there is no ICSP on the Pro Micro, I think that's why this topic explains that there needs to be done something with the reset pin.

But do I correctly understand that here the USB Host Shield RESET is connected to the +3.3V, so it will always be HIGH?

Hey Jimmie I was just wondering about that too. Did you manage to find the answer?

Offline alive

  • Posts: 1
Hi! I'm newbie here. Yesterday I made exactly the same scheme with arduino pro micro and usb host shield. I wanted to make something like this for a half of year and yesterday I found this topic. But at the moment I can't make working code for it. You said, that you are using stock bootloader, so you aren't using firmware from tmk topic ( https://geekhack.org/index.php?topic=69169.0 )? I tried to upload USBHIDBootKbd and USBHIDMultimediaKbd from USB_Host_Shield_2.0 examples. But it seems, that it made for teensy. I replaced #include <spi4teensy3.h> by #include <SPI.h>, but it doesn't helps. Port mon shows only "Start" and nothing else, when I'm pressing keys on plugged keyboard. Please, can you share your code if it's written with arduino IDE or firmware?

P.S.: Sorry for my terrible english.  :-[

Offline odd

  • Posts: 283
Can some one help me here. I am having a hell of a time trying to figure out where to wire up the reset wire on the USB shield. I have been looking at the pics here and the ones on from the links and I just don't get it. It looks like I am supposed to wire it to the 3.3v on the USB shield but I though that (3.3v on USB) goes to VCC on the promicro.

I have included this pic, thanks everyone

http://imgur.com/a/m692R

Offline odd

  • Posts: 283
Not sure if I've done something wrong, built the board exactly as you have, my pc sees the pro micro with tmk flashed on it. But no keyboard when connected.

Will have to get the multimeter out to check the connections (pretty sure they're good).

Hmm, any ideas?

I have the same issue

Offline PatrickR

  • Posts: 6
@yangding

Could you tell us which software did you used ?
Maybe you can provide your software to us including your adaptions ?
Maybe you have an Arduino tradable file.

Many thanks for you great nice work and that you told us about it.

THX

Patrick
« Last Edit: Mon, 30 April 2018, 02:23:24 by PatrickR »

Offline clickclack123

  • Posts: 356
  • Location: Australia, Mate!
Thanks yangdigi for the great instructions!!

I just wired up my Pro Micro 3.3V 8MHz to the USB Host Shield Mini (official circuitsathome version).

Haven't tried it as a keyboard converter as I don't really need it anymore (Ergodox FTW!!) but I did run some of the Arduino example sketches. It could scan USB devices that are connected to it and I even got it reading an Xbox controller, so I do know it's wired up correctly.

Very neat.

Can some one help me here. I am having a hell of a time trying to figure out where to wire up the reset wire on the USB shield. I have been looking at the pics here and the ones on from the links and I just don't get it. It looks like I am supposed to wire it to the 3.3v on the USB shield but I though that (3.3v on USB) goes to VCC on the promicro.

I have included this pic, thanks everyone

http://imgur.com/a/m692R

I'm sure you've worked it out by now, but...

The RST on the host board needs to go to 3.3V, which is the same as VCC on the ProMicro. You do have a 3.3V ProMicro, right?

The other wire is for 5V (RAW on the Promicro) to VBus on the Host Shield. Remember to cut the link on the Host Shield for VBus, otherwise you'd be shorting 5V to 3.3V.
« Last Edit: Tue, 23 April 2019, 00:30:04 by clickclack123 »