VOGONS


USB to Serial Mouse using the Pi Pico!

Topic actions

Reply 100 of 175, by CalamityLime

User metadata
Rank Member
Rank
Member

Hall​o!

​While laying out some of the components on the PCB, I was noticing that I have a lot of space.
​As a test fit I added a ch340N to the board with a mini USB port. The idea is that the ch340 connects to the pi picos UART0 and will allow the user to easily configure the adapter on another computer.

​The ch340N is a small and cheap UART to USB chip with drivers for win XP all the way to win 10. I showed in a past video that I was accessing the config terminal with another pi pico acting as a UART to USB converter, this would let the user do the same but without having to get an adapter.

​What do you think of the idea? the ch340 is about 40 cent on JLC so it might be worth it.

​I know that the 3d model for the mini USB port doesn't match the footprint, it's just there for fitting really.

Attachments

Be Happy, it's only going to get worse.

Reply 101 of 175, by CalamityLime

User metadata
Rank Member
Rank
Member

I've started routing the traces. I forgot how slow of a process it was.
Still, getting to a final shape that's more square than the original.

Attachments

Be Happy, it's only going to get worse.

Reply 102 of 175, by Sphere478

User metadata
Rank l33t
Rank
l33t

Ps2 footprint may fit under the din also

Sphere's PCB projects.
-
Sphere’s socket 5/7 cpu collection.
-
SUCCESSFUL K6-2+ to K6-3+ Full Cache Enable Mod
-
Tyan S1564S to S1564D single to dual processor conversion (also s1563 and s1562)

Reply 103 of 175, by CalamityLime

User metadata
Rank Member
Rank
Member

So the trace routing should be done now.

Two holes were added for the sake of a case and J7 labelled "DIN PWR" allows you to power the device from the keyboard port of your PC.
I don't really recommend using it unless you know what you're doing since it connects the power of everything together.

So you'd have to be careful if you KVM gives out power over the USB port or if you were using the mini USB port to configure the device, you could back feed a connected computer.
If it doesn't pop the polyfuse on the adapter it would pop the fuse on the keyboard port.

OH, almost forgot. I added the footprint for a ps2 port on top of the 5 pin din port just in case someone wanted a female ps2 port there for some reason.

That's all I got the moment.

Attachments

Be Happy, it's only going to get worse.

Reply 104 of 175, by Sphere478

User metadata
Rank l33t
Rank
l33t
CalamityLime wrote on 2022-05-17, 21:22:

OH, almost forgot. I added the footprint for a ps2 port on top of the 5 pin din port just in case someone wanted a female ps2 port there for some reason.

Yay! I helped!

So there is a micro on the pi, I assume for interfacing and programming it,

Then there is a A on the board. I assume for a usb kb/mouse

But what’s the mini usb under the pi for again? For power?

Btw, combining multiple 5v sources should’t hurt anything so long as they are common negative. That common negative could even source back to house neutral, so long as they are tied there. shouldn’t be any issue. (Beware of reversible plugs) Except maybe line noise? But no biggie.

Sphere's PCB projects.
-
Sphere’s socket 5/7 cpu collection.
-
SUCCESSFUL K6-2+ to K6-3+ Full Cache Enable Mod
-
Tyan S1564S to S1564D single to dual processor conversion (also s1563 and s1562)

Reply 105 of 175, by CalamityLime

User metadata
Rank Member
Rank
Member
Sphere478 wrote on 2022-05-18, 04:36:

So there is a micro on the pi, I assume for interfacing and programming it,

Then there is a A on the board. I assume for a USB kb/mouse

But what’s the mini USB under the pi for again? For power?

The micro on the pico is part of the pico. You can use it to program the pico or you can use a USB OTG cable to plug in a KB and mouse.

The USB A uses the break out pads on the bottom of the pico. The pico and the A are wired together, it just gives the user a less silly way of plugging in a KB and mouse.

The USB mini goes to a ch340N which is connected to UART0 of the pico. That is just a cheap UART to USB chip. Plugging into that port will make the pico appear as a COM on your PC and you can use Putty to connect to the configuration terminal.
The Pico has 2 UARTs caked into it. I use UART1 for the max232 and I used UART0 for the real debug logging; printf.
However I also made the configuration terminal available over UART0 to make my life easier while making it and I left it available. I decided to add a 40 cent chip to the PCB to make it easy to use and if someone didn't want it then they can leave it out.
You can also power the device using the mini B. Which is probably what I'd do TBH. USB micro is terrible and I went out of my way while programming it to handle the USB micro having an intermittent connection but even so; give it steady power, especially while it's saving your settings to flash.

Sphere478 wrote on 2022-05-18, 04:36:

Btw, combining multiple 5v sources shouldn't hurt anything so long as they are common negative. That common negative could even source back to house neutral, so long as they are tied there. shouldn’t be any issue. (Beware of reversible plugs) Except maybe line noise? But no biggie.

Connecting multiple 5v sources together will just get a little burst of EMF when they are connected. The whole system will tend towards the higher voltage source but it should "balance" itself generally speaking.
The issue is if the retro PC is turned off and you connect the adapter to power, say the mini B for configuration. If the jumper is set you would wind up back feeding the retro PC with 5v. In old PC's the same 5v that goes to your keyboard, goes to your ISA cards, to your hard drive, floppy drive and CPU VRM.
That's why I included a fuse on the adapter, so hopefully that'll pop before anything else in the event of a short or back-feed.

-Lime.

PS: I've finally bought a socket 7 motherboard.

Be Happy, it's only going to get worse.

Reply 106 of 175, by Sphere478

User metadata
Rank l33t
Rank
l33t

Oh that’s a good idea.

I’d say diode would fix that problem but at low voltages like that forward bias is a lot. Maybe a small relay to isolate? Many usb circuits are current limiting though. May be a non issue.

Anyway what board did you get?

Sphere's PCB projects.
-
Sphere’s socket 5/7 cpu collection.
-
SUCCESSFUL K6-2+ to K6-3+ Full Cache Enable Mod
-
Tyan S1564S to S1564D single to dual processor conversion (also s1563 and s1562)

Reply 107 of 175, by CalamityLime

User metadata
Rank Member
Rank
Member
Sphere478 wrote on 2022-05-18, 17:27:

Oh that’s a good idea.

I’d say diode would fix that problem but at low voltages like that forward bias is a lot. Maybe a small relay to isolate? Many usb circuits are current limiting though. May be a non issue.

Anyway what board did you get?

The voltage drop of a diode would be an issue. Since the 5v has to power your mouse and keyboard as well as the pico and max232.
I lowed the poly fuse to 750ma so hopefully that'll take care of it.

The board I bought is a Soyo SY-5TF with an Intel 430HX chipset that I believe is a good one.
From the images the seller provided it looks like the caps are just starting to leak and I'm just remembering that now when I already ordered stuff from LCSC, yay hopefully I got what it needs already. I don't have any 220uf caps so I don't think I do. wonderful!

I'll need some socket 7 cpu and a way to cool it and woo, first socket 7 machine.
I wanted something with pci since isa cards are expensive.

Be Happy, it's only going to get worse.

Reply 108 of 175, by Sphere478

User metadata
Rank l33t
Rank
l33t

430hx is a good platform. Lacks sd ram and acpi of 430tx but makes up for it with up to 512mb of ram, dual cpu support and 512mb cachable.

Max cache is 512k for both though.

Some are stable at 83mhz I’m told. Which is nice.

Lack of agp sucks ss7 chipsets with higher fsb and agp are the next step.

But you may be able to get as much as a k6-3+ 500 to work on a 430hx.

Sphere's PCB projects.
-
Sphere’s socket 5/7 cpu collection.
-
SUCCESSFUL K6-2+ to K6-3+ Full Cache Enable Mod
-
Tyan S1564S to S1564D single to dual processor conversion (also s1563 and s1562)

Reply 109 of 175, by CalamityLime

User metadata
Rank Member
Rank
Member
Sphere478 wrote on 2022-05-18, 22:08:
430hx is a good platform. Lacks sd ram and acpi of 430tx but makes up for it with up to 512mb of ram, dual cpu support and 512mb […]
Show full quote

430hx is a good platform. Lacks sd ram and acpi of 430tx but makes up for it with up to 512mb of ram, dual cpu support and 512mb cachable.

Max cache is 512k for both though.

Some are stable at 83mhz I’m told. Which is nice.

Lack of agp sucks ss7 chipsets with higher fsb and agp are the next step.

But you may be able to get as much as a k6-3+ 500 to work on a 430hx.

Honestly, I'm not too sure what I'm getting into with the socket 7. Never had a socket 7 board so this is gonna be all new to me.
I wanted the socket 7 for two reasons, the pci cards are cheaper than the isa, I have a nic on pci kicking around and it could be fun to network with old windows.
I am curious if I can set up cheap hAP lite to make it safer for the old machine to be on the network. Not necessarily a firewall but some basic port blocking could be a fun experiment. I want to brush up on my MikroTik know-how.

While testing the usb-2-232 on my 486, the speed under 95 was a little painful at times, the 486 was just fine for dos and 3.1 but not win 95. Not to mention that the bios doesn't support booting to CD.
Which is ironic since the whole project started because I didn't have a serial mouse and I wasn't going to pay top dollar for a decent used one but I do have a few ps/2 mice and the socket 7 boards has a ps/2 mouse port.

Ah well.

I've been thinking of selling off the last of my usb-2-232 boards off at cost + postage. First fun boards with some small issues. 4 bodge wires for the serial port to work but otherwise fine. It would help pay for the usb-2-232-AT's
I'm tired of looking at them and binning them feels wasteful.

-Lime

Be Happy, it's only going to get worse.

Reply 110 of 175, by CalamityLime

User metadata
Rank Member
Rank
Member

​Alrighty, today's mission is going to be making the back of the board look nicer.
​Silkscreen, move traces around to look nicer, teardrops, some filleting maybe.

​Outside of the name of the thing, does anyone have a suggestion for something to write into the silkscreen or even the ground flood fill?

Be Happy, it's only going to get worse.

Reply 111 of 175, by CalamityLime

User metadata
Rank Member
Rank
Member

​There we go.

​Moved some traces around to keep vias away from the silk screen and to try to make them look nice.
​The 5v power got itself a nice thicc trace, I don't think it needs it but I think it looks nice.

​I also went ahead and renamed the project from USB-2-232-AT to USB-2-232-KBD

Hopefully it can be made support both AT and XT Keyboards, I haven't looked too deep into that topic and ultimately I lack the hardware to test it but to my understanding both standards are fairly similar with XT not having the same back and forth conversation that AT has.

​-Lime

Attachments

Be Happy, it's only going to get worse.

Reply 112 of 175, by Sphere478

User metadata
Rank l33t
Rank
l33t
CalamityLime wrote on 2022-05-19, 12:27:
​Alrighty, today's mission is going to be making the back of the board look nicer. ​Silkscreen, move traces around to look nicer […]
Show full quote

​Alrighty, today's mission is going to be making the back of the board look nicer.
​Silkscreen, move traces around to look nicer, teardrops, some filleting maybe.

​Outside of the name of the thing, does anyone have a suggestion for something to write into the silkscreen or even the ground flood fill?

Write “Sphere was here”

Labeling the port functions and explaining them seems standard.

Sphere's PCB projects.
-
Sphere’s socket 5/7 cpu collection.
-
SUCCESSFUL K6-2+ to K6-3+ Full Cache Enable Mod
-
Tyan S1564S to S1564D single to dual processor conversion (also s1563 and s1562)

Reply 113 of 175, by Sphere478

User metadata
Rank l33t
Rank
l33t

This would be pretty handy when playing with win 3.11

Sphere's PCB projects.
-
Sphere’s socket 5/7 cpu collection.
-
SUCCESSFUL K6-2+ to K6-3+ Full Cache Enable Mod
-
Tyan S1564S to S1564D single to dual processor conversion (also s1563 and s1562)

Reply 114 of 175, by CalamityLime

User metadata
Rank Member
Rank
Member
Sphere478 wrote on 2022-05-19, 20:46:

Labeling the port functions and explaining them seems standard.

The front of the board has a bit more information than the back of it but today's mission was making the back of it look decent.
The front is fairly dense with bits but I put as much on the silk as I could.

I feel that some documentation fill in the last of the info the user needs.

Sphere478 wrote on 2022-05-19, 20:46:

Write “Sphere was here”

I'll put it in the ground fill. There's spots around for that.

Attachments

Be Happy, it's only going to get worse.

Reply 115 of 175, by CalamityLime

User metadata
Rank Member
Rank
Member
Sphere478 wrote on 2022-05-19, 20:48:

This would be pretty handy when playing with win 3.11

I'm not sure I get what you mean, could you elaborate?

Be Happy, it's only going to get worse.

Reply 116 of 175, by Sphere478

User metadata
Rank l33t
Rank
l33t

Win 3.11 and usb don’t play well. 😀

I am understanding that this adapts usb, din, ps2 HIDs to serial right? And vice versa?

I guess I should ask what are all the possible combinations?

Sphere's PCB projects.
-
Sphere’s socket 5/7 cpu collection.
-
SUCCESSFUL K6-2+ to K6-3+ Full Cache Enable Mod
-
Tyan S1564S to S1564D single to dual processor conversion (also s1563 and s1562)

Reply 117 of 175, by matze79

User metadata
Rank l33t
Rank
l33t

It adapts usb keyboard or usb mouse to either DIN AT Keyboard or RS232 Serial Microsoft Mouse or maybe both at same time

https://dosreloaded.de - The German Retro DOS PC Community
https://www.retroianer.de - under constructing since ever

Co2 - for a endless Summer

Reply 118 of 175, by CalamityLime

User metadata
Rank Member
Rank
Member
Sphere478 wrote on 2022-05-19, 21:21:

Win 3.11 and usb don’t play well. 😀

I am understanding that this adapts usb, din, ps2 HIDs to serial right? And vice versa?

I guess I should ask what are all the possible combinations?

The original USB-2-232 adapts a USB mouse to a serial mouse, supporting MS 2 button, Logitech 3 button and MS wheel mouse protocols.
It has some extra bells and whistles to make it nicer to use and I might go back to the mouse side of things in time to add Mouse Systems, Sun and maybe some Logitech C7 extensions.
Currently I am tired of making that and I won't add those for a while. I'll only update the mouse side of things if something is currently broken.

The aim of the KBD variant is to adapt USB keyboards to DIN AT/ps2 and as a stretch goal XT.
General idea is that you plug the device into your serial port, use a modified midi cable to connect it to the Keyboard DIN also. You can power it from a USB charger or from the keyboard din port, you can toggle that with a Jumper.

Then you could use the USB port on the board to connect it to a USB hub, mouse, keyboard or KVM.
While adding a USB hub to the board would give a visual indicator of "You can plug in 2 devices" I feel like the added cost and complexity wouldn't be worth it unless the pico has issues with hub compatibility that I haven't ran into myself.

The USB-2-232, due to a feature request, does has a serial terminal that you can access to configure the device. You can access it in DOS with Kermit over the same com port you're using for the mouse OR over the unused uart of the pi pico.
That's where the mini B port comes into play. The ch340n is hooked up to the previously unused UART of the PICO and you can connect it to your modern win10 machine, it'll appear as a COM port and you can access the serial terminal using PUTTY (or whatever) with hardcoded settings. This would be very handy if you want to configure the adapter on it's own, while playing a game on your retro PC (to get the feel right) or if you pick settings that don't work with your retro PC's serial port.

matze79 wrote on 2022-05-19, 21:41:

It adapts usb keyboard or usb mouse to either DIN AT Keyboard or RS232 Serial Microsoft Mouse or maybe both at same time

The hope is that it'll be able to do both at the same time with the use of a hub or KVM. I won't know how achievable that is until I get coding something better than my proof of concept.

That's why I'm making the board, my breadboard worked for proof of concept but something keeps shorting on it and burning the AND gate that I'm using as a buffer. So I don't trust it really.

One last hope is that the firmware will be compatible with both USB-2-232 and USB-2-232-KBD, regardless of the difference in pinouts. The USB-2-232 just won't have the hardware for the keyboard.
I have a config file in the firmware that sets which pins of the pico do what. I've also been using that file as a pseudo manual.

I hope that helps explain things.

Be Happy, it's only going to get worse.

Reply 119 of 175, by CalamityLime

User metadata
Rank Member
Rank
Member

For a bit of fun and to make the most out of ordering from JLC, I made a board to hold a PS/2 port in a serial port mount on my at case.
The board holds the ps2 port and a 3d printed bracket holds the board to the case.

There's probably better things out there so I'm not going to bother releasing it. This is mostly to try panellising.

-Lime

Attachments

Be Happy, it's only going to get worse.