USB to Serial Mouse using the Pi Pico!

  • BerryBase does indeed have some loose RP2040 chips for sale at 1€ a pop!

    Also I should have the update out later today. Finished the last of it last night, just have to get dinner sorted for today before it's too late.

    -Lime

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

  • No need to buy loose ICs, we can have them assembled by Fab :)


    had no time yet to continue work.

    i had a busy weekend, mothers birthday.. doing stuff for others..

    совок

  • No need to buy loose ICs, we can have them assembled by Fab :)


    had no time yet to continue work.

    i had a busy weekend, mothers birthday.. doing stuff for others..

    Yeah I get you but I don't think I've ever seen an rp2040 instock in any fabs. Maybe times have changed since I last checked.

    I assembled a unit for you if you want it. Just doing some small tests on the firmware update before posting it.

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

  • Hallo!

    Version 1.2 of the USB-2-232 firmware has been released!

    GitHub - LimeProgramming/USB-serial-mouse-adapter: Convert USB mouse to Serial mouse using Pi Pico
    Convert USB mouse to Serial mouse using Pi Pico. Contribute to LimeProgramming/USB-serial-mouse-adapter development by creating an account on GitHub.
    github.com

    Change log:

    • Modified terminal code to be easier to translate.
    • German language translation added to serial terminal.
    • Multi-core Processing. The Pi Pico has two cores baked into it so might as well use them. The second core is currently dedicated to transmitting the serial mouse data over UART and the first core is dedicated to handing the USB mouse, plus the serial terminal. This should keep the report rate consistent while keeping lag to a minimum.
    • Flash wear leveling for saving configuration. Should extend the life of the Pico 200 fold.
    • Added Support for 19200 baud rate.
    • Changed the Dip Switch 6 to toggle between 19200 and 1200 baud rates.
    • PWR LED now flashes while the adapter is in serial terminal mode.
    • While adapter is in serial terminal mode changes to the dip-switches are ignored. This was an easy way to ruin your day before!
    • Changed how Coasting movement type worked. Should feel the same but work more consistently.

    Known Issues:

    • Use the Nuke Flash on the Pi Pico before if you're updating. I don't think it is strictly required but I'd recommend it.
    • Sometimes the Pico seems to crash when leaving the terminal. It's rare and very inconsistent, so I don't know why it's happening.

    So that's it for now. Sorry again for getting the translation update out so slowly.

    Danke
    -Lime

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

  • Hallo!

    I had been thinking of ordering a PCB with an at keyboard port for making a USB keyboard to AT keyboard.
    I know I've mentioned this before and shown a schematic that I tried on a breadboard. While that did work, I never had much confidence in it and I look at it worried that something has shorted.
    So why not try to get a pcb made.

    I may have mentioned before that I don't really know much about circuits and my limit of understanding of transistors is that they are magic switches.
    So I'm asking for input for handling the AT keyboard side of things. I get the feeling that I'm missing something.


    I drew up a circuit based off of the breadboard but with a better 5v to 3v voltage translation using a 74LVC2G34.
    The 74LVC2G34 is available in SOT-23-6L and the even smaller SOT-363. 6 legs, power, gnd, 2 inputs and 2 outputs. I can just power it off of the pico itself.
    According to TI's datasheet, the chip has back-drive protection so I don't think I need to add diodes to the inputs. The docs ask for a cap on the power but not much else.

    The ferrites, 2.2k resistors and 470pf clamp caps are based off of my ALPs keyboard which uses those values. Ferrites for noise and the clamp for any signal bounce (I think)


    Now about the NPN's. I'm curious if they should have a speed up cap on the base. For some reason it just bothers me that there's one on the collector side and none on the base. It feels wrong but it's likely that I'm wrong.
    I could probably go without R3 R4 R5 and R6 since the Pico has built in pull-ups of 50K but the NPN looks a bit naked without them.


    So, let me know what you think. Have I made any mistakes so far?

  • Hallo!


    So I layed out the schematic is Kicad and now I'm deciding what shape the board should take.


    Attached is my first idea. It's very rough and lots of space between bits but try to ignore that.

    What I was going for with it was to taper down to the serial connector to hopefully keep the rest of the PCB out of the way of what would be around your serial port.

    While it can be slimmed down you can see the idea of having the USB, DIN and pico micro USB pointing out one side and the serial port on the other.


    Do ye think I'm barking up the right tree with this idea or should I do something else?


    -Lime

  • I was thinking about the keyboard connector.


    I went into this thinking that I'll just use a female din port then the user just uses a midi cable to connect the adapter to the PC. The midi cable has a downside where the ground wire for midi goes to either the clock or the data line of the at keyboard din.
    For a cheaper cable that wouldn't bother grounding the connector properly, it should work fine out of the box but my advice would still be to "get a midi cable and re-wire it yourself to be safe"

    Now I'm thinking that since this project is still expecting the end user to go soldering, should I change out the connector on the PCB with something smaller? Like a female ps/2 for example.

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

  • Hallo!

    I spent a few hours tinkering with the PCB. I added a JLC part number for each component that can be soldering on with their SMT service.

    I also experimented with having the midi port point out the side of the PCB to see how much slimmer I can make the board. Not all traces are routed just some to see how viable it is to put all the surface mount parts under the pi pico. Really only the parts between the 2 20 pin sockets have any thought put into their placement.

    I added a poly fuse to the power in line from the midi port.

    J6 is UART0 out that you can use to configure the settings in software with a usb to ttl adapter. That already works with the usb-2-232 but I never added a header for it.

    One 100uf cap is connected to the power in for the pico, 232 and usb port, the second 100uf cap is connect to vsys of the pico which I added for a bit of extra safety when saving config to the flash memory.

    What do you think? I'm not sure I like the midi port pointing off the side I feel like it might be more in the way than a wider PCB but it's just a thought.

  • Hallo!

    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 I 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.

  • Hallo!

    So the trace routing should be done now.

    Two holes were added for the sake of a case and J7 labeled "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.

  • I was asked something on the vogons thread about this, I thought I'd share my answer here as well.


    Zitat

    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.



    Zitat

    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.

  • Maybe add a polyfuse in KBDPWR then :)

    There is one.

    F1 on the board. Behind the DIN and above the pin header. The DIN and the Pin header go through the poly fuse to the rest of the system. So it does come before the jumper.
    The JLC part number I noted in the schematic is for a 1amp 6v poly fuse, might swap that for a 750ma@6v one.

    I thought about adding a diode but I think the voltage drop would be too much.

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

  • Right so.

    I ordered the through hole bits from LCSC plus some extra bits I'd use.

    Also put together a BOM and CPL file for JLC, it works out to a nice chunk of cash as well.
    Half regret ordering the bits from LCSC now instead of just sticking with a my terrible breadboard job.

    I want to go over the PCB in kicad before ordering them. I don't want another case of wiring the serial port in arseways.
    I also don't want to have a pile of PCB's no-one wants and be over 100 quid in the hole again, so I won't be ordering many I think.

    That's it for the moment I think.

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

  • Alrighty, todays 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.

  • 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

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!