Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 14:15 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite VGA - USB to PS2 Keyboard Adapter

     Page 1 of 4    
Author Message
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 06:10pm 17 Feb 2024
Copy link to clipboard 
Print this post

Hello

I have a PicoMite VGA with a PS2 keyboard connector. I don't want to buy a new PS2 keyboard. Does anyone know a good PS2 to USB connector adapter? Amazon has a ton of them with mixed reviews.
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 213
Posted: 06:32pm 17 Feb 2024
Copy link to clipboard 
Print this post

  LeoNicolas said  
I have a PicoMite VGA with a PS2 keyboard connector. I don't want to buy a new PS2 keyboard. Does anyone know a good PS2 to USB connector adapter? Amazon has a ton of them with mixed reviews.

Hi Leo,
For my PicoMite I use a USB keyboard connected via a homemade adapter USB-PS/2 adapter made from RP2040-Zero
It is connected directly without unnecessary details :))
It also allows you to simultaneously convert a USB mouse to PS/2
https://github.com/No0ne/ps2x2pico  

 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 11:12pm 17 Feb 2024
Copy link to clipboard 
Print this post

Thank you
I have bought one RP2040-Zero board. I will test it as soon as the board arrive.
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 12:08am 18 Feb 2024
Copy link to clipboard 
Print this post

Using that circuit with no level shifter is adventurous. You will be feeding 5 volt signals into the pico. Not good.

The adapters on Amazon and others are meant for keyboards that can automatically switch between USB and PS2, there is no converter inside them little adapter plug. Keyboards that can do that often come with an adapter plug but they seem to be getting harder to find.

Bill
Keep safe. Live long and prosper.
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 01:01am 18 Feb 2024
Copy link to clipboard 
Print this post

Good to know.
I doubt my keyboard has support for PS2. What do I need to do to connect the board to the PS2 connector?
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 01:09am 18 Feb 2024
Copy link to clipboard 
Print this post

  Turbo46 said  You will be feeding 5 volt signals into the pico. Not good.


I thought the Raspberry Pi Foundation had asserted that the Pico was 5V tolerant (but not much more than 5V).
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 01:33am 18 Feb 2024
Copy link to clipboard 
Print this post

  lizby said  I thought the Raspberry Pi Foundation had asserted that the Pico was 5V tolerant (but not much more than 5V).

Not as I understand it. All designs by matherp and Mixte90 and Silicon Chip use a level shifter. Even if they are 5v tolerant, the keyboard expects 5v logic signals, 3.3v may be a bit marginal for my like.

Leo, you need something like this if one didn't come with your keyboard.

Bill
Keep safe. Live long and prosper.
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 01:37am 18 Feb 2024
Copy link to clipboard 
Print this post

This is probably a dumb question; I'm not a hardware guy.

Can I add a small resistor in series to bring down the voltage to save levels?
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 02:22am 18 Feb 2024
Copy link to clipboard 
Print this post

Others may know better but I believe the clock signal is unidirectional, transmitted by the Pico and received by the keyboard. So that should be OK, it may be marginal but if it works then good.

The data line is bidirectional so the keyboard is transmitting 5v logic signal to the Pico and the Pico is transmitting 3.3v logic to the keyboard. A 1k resistor in series with the keyboard signal should protect the Pico input. To be safer a 1k8 to 2k2 resistor from the Pico input to GND to would make a voltage divider that will reduce the 5v to something near enough to 3.3v. The data to the keyboard may be marginal but again if it works...

A level shifter is not expensive though.

The only place I know to get a kit for something like this is Silicon Chip which uses a normal Pico.

Bill
Keep safe. Live long and prosper.
 
ebbandflow
Newbie

Joined: 31/08/2023
Location: United States
Posts: 19
Posted: 02:24am 18 Feb 2024
Copy link to clipboard 
Print this post

  LeoNicolas said  This is probably a dumb question; I'm not a hardware guy.

Can I add a small resistor in series to bring down the voltage to save levels?


No, I don't believe so but the github for the ps2x2pico here https://github.com/No0ne/ps2x2pico shows how to solder a little level shifter board directly to a pico. I have built and used the circuit described in the GITHUB and it works well.

If you're not using a level shifting circuit on the picomite VGA side, then level shifting is not required and I have had success with the ps2x2pico firmware and this circuit:


Edited 2024-02-18 12:25 by ebbandflow
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 03:12am 18 Feb 2024
Copy link to clipboard 
Print this post

From the rp2040-datasheet:


From that table if you are running the Pico at 3.3v then the maximum voltage on an I/O pin allowed is 3.3v + 0.5v or 3.8v.

Bill

PS I don't understand how ebbandflow's voltage divider works if the drawing is correct.
Keep safe. Live long and prosper.
 
ebbandflow
Newbie

Joined: 31/08/2023
Location: United States
Posts: 19
Posted: 03:27am 18 Feb 2024
Copy link to clipboard 
Print this post

Its not a voltage divider they are pulldowns controlled by the ps2x2pico's gp13. This is the circuit without level shifting.
Edited 2024-02-18 13:31 by ebbandflow
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 04:02am 18 Feb 2024
Copy link to clipboard 
Print this post

Thank you, I don't see any reference to that circuit on the Github site but I do see plenty of references to level shifters. I cannot see how it adds anything worthwhile to the circuit. It will not reduce the 5v logic levels to safe limits.

The output impedance of the keyboard's data line may be high enough to limit the current to a safe level for the Pico's input protection to handle, but that will depend on the individual keyboard and your luck.

Bill
Keep safe. Live long and prosper.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6098
Posted: 04:22am 18 Feb 2024
Copy link to clipboard 
Print this post

Pico to pico is both 3.3V so no level shift needed.
It is only when you connect 'real' PS/2 devices or hosts that are expecting real PS/2 levels that the problem is present.

Jim
VK7JH
MMedit   MMBasic Help
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 04:50am 18 Feb 2024
Copy link to clipboard 
Print this post

I bought a level shifter board to be at the safe side.
How is the connection diagram?
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 04:57am 18 Feb 2024
Copy link to clipboard 
Print this post

  TassyJim said  Pico to pico is both 3.3V so no level shift needed.
Right again Jim. I went off on a tangent again.

Leo, Please ignore my ravings.

Bill
Keep safe. Live long and prosper.
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 04:59am 18 Feb 2024
Copy link to clipboard 
Print this post

Oh cool, this means it is safe to connect them directly, right?
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6098
Posted: 05:08am 18 Feb 2024
Copy link to clipboard 
Print this post

Yes, for your purpose, all signals are at 3.3V so no level shifter.
VK7JH
MMedit   MMBasic Help
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 05:36am 18 Feb 2024
Copy link to clipboard 
Print this post

Thank you everyone for helping me  
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 05:41am 18 Feb 2024
Copy link to clipboard 
Print this post

The first circuit plugs into the PS2 connector on the PicoVGA (I Believe) which does use 5v levels but...

I should give while I'm only so far behind.

Which circuit do you want to use?

The first one shows something which is separate and connects between the keyboard and the PicoVGA. The level shifter in the PicoVGA uses 10k pullup resistors so that should limit any input current to safe levels so a level shifter should not be needed.

It could also be fitted internally without the socket and PS2 lead the same as the second one shows. This means surgery on the PicoVGA board.

The second one is meant to be fitted internally. This also means surgery on the PicoVGA board.

A third option may be to use Peter's "CMM1.5" firmware which means you can plug the keyboard into the Pico's USB socket via a USB A to C adapter. I have not followed it closely enough to know if this is viable.

Personally, I would just buy a PS2 keyboard. I bought one from an op-shop for a couple of dollars.

Bill
Keep safe. Live long and prosper.
 
     Page 1 of 4    
Print this page
© JAQ Software 2024