USB to Serial Mouse using the Pi Pico!

  • Hallo!


    So I finally got a chance to mess with my PCB and bad news.

    I messed up the footprint of the serial port so that needs fixing. Some bodge wires should fix that issue for the moment. Very annoying, I checked and doubled checked everything and it turns out that I used the dub9 male footprint instead of the female footprint which has the pins reversed.


    Thankfully there is a pin header out for the serial out! Only problem is that the silkscreen for it is also wrong.

    So going from the pinheader to a female dsub 9 here is how to wire it properly.

    SilkScreen DSub

    CTS 2

    RTS 8

    TxD 3

    RxD 7



    Messing around with the SDK, the PCB doesn't seem to talk to the USB mice very well. A wireless mouse that I had been using is no longer picked up, a wired mouse I used before that is picked up but sends no data.

    At first I thought this was an SDK issue but now I'm thinking that it's a hardware issue. Specifically the wire going from the PCB to the Pico to make the full sized USB port work. I'll try de-soldering that wire next time I get a chance to mess with this.
    Maybe that'll fix it.


    I think I may also try setting up another board from scratch with a new Pico. mine has some battle scars from a big screw driver I used to get the thing out of the breadboard. Maybe something important is damaged and it's fecking it up.


    Not a very happy update but progress is progress. I'm not sure what to do now with the 10-odd boards I have at hand now. Maybe I'll bodge wire them and sell them at cost or something? A bit of a waste to bin them since the hardware on them is fine. Let me know what you think!


    Danke!

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

  • Regarding the port, it is symmetrical and you can simply solder it from the bottom. For a prototype it's enough and easier, than to mess with wires.


    In regards of signaling, get a logic analyzer, they cost next to nothing, but help to debug such things a lot. The software has a built in decoder for many well known protocols. That helped me a lot during the development of my adapter.

  • Hello there!

    So in regards to the mice not working, I found that just reverting to a previous version of the SDK did the trick and mice are now working again. Found complaints on a forum that the newest version of TinyUSB doesn't work right.


    Now with that out of the way.

    I soldered the serial port on upside down as Scorp suggested and that did the trick. Didn't help with the fact that I mixed up two pins, so I needed to add little bodge wires anyway.
    I designed and printed a little case to keep the PCB some bit safe from damage.


    So finally I can plug the PCB into the serial port and a mouse into the PCB and play some Doom with a brand new wireless mouse.
    It seems things are back on track for the moment.

    -Lime.

  • Hallo allo allo allo!


    The title of today is "solder madness"

    So I soldered together the last12 PCB's with all their connectors. I left out the serial connector for an experiment with an expansion slot mount. The original plan was to slide in PCB but with the upside down serial port the board takes up too much room.
    If I put together a decent little mount I'll just give the option of an expansion slot mount or the serial port for use outside the PC case.


    If you're wondering about the wires. I cut the swapped traces with a Dremel, the wires are soldered in under the 6 pin header and I'll solder them in with the serial port and might just cut them off for an expansion slot mount .

    My back is feeling a little tight from the soldering so that might be it for today. It was nice though, it felt like the adult version of gluing the Lego pieces together.

    -Lime


    PS: I ordered the Pi Picos for the boards from Berrybase.de today as well. The little things get costly when you're buying a few of them.

  • Hallo

    Happy new year everyone!

    So I updated the kicad files to fix the issue with the upside down serial port and the crossed traces.

    While I was at it, I made a slimline version of the PCB. The circuit is the same but without the dipswitchs, USB pin header and Serial pin header.

    It's as small as it can be without integrating the pico chip to the PCB itself.


    Let me know what you think!

  • Hallo!

    It's been a couple of days!


    So far the code has gone through a bit of a refactoring. It was very linear and rigid before so adding support for software configurable settings would have been messy.
    Software configurable settings were something I had been asked for on vogons a few times so I thought to try my arm.
    A basic serial terminal seems doable, currently it the PC cannot talk back but that'll come eventually.


    My box of picos arrived today, hopefully I'll get the firmware done over the course of next week. It'll be nice to get it done at this stage.

    I was also asked on vogons to make an adopter so a USB only keyboard can work on an old school DIN port. People really care about RGB.
    So that's something I'll look into when this is done. If anyone knows if that has been done already, please let me know.

    Danke
    -Lime


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

  • Seems you enter serial production now :thumbup:


    maybe it could be expanded to support Keyboard and Mouse in One Device ?

    Software limitations.

    The pico's USB stack is powered by TinyUSB which despite it's claims is kinda crap.
    For this project I'm using PicoSDK version 1.2.0 because in the newest version TinyUSB is broken.

    So Hubs and KVM's don't work for the moment. Hopefully one day TinyUSB will work properly.

    Well, I'm being harsh, it does work but it seems the lead dev is focused on MIDI devices and controllers. So a simple USB mouse, Keyboard and hub fall by the way side.
    I think the Teensy might be the way to for an "all in one" device.

    I would like to support Mouse and Keyboard with the one device, I mentioned it already on Vogons but TinyUSB. It doesn't help that TinyUSB's code is a mess so patching it manually is pain.
    If someone else wants to try, let me know.

    -Lime

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

  • Hallo!

    So a bit of an update.

    I got the serial terminal working. You can edit settings through it, it'll apply and save the settings and you can reset back to default from that menu. I'm thinking of adding another way of resetting the pico by shorting out 2 pins at start up.
    The terminal is about 1k lines of terrible code that I hope never breaks.


    I also designed an internally mounted case for the PCB. Made to fit into an expansion port. It is printed in 2 parts, the main body that the PCB slides into and the end clip that just pushes on. The end clip hold on decently well without any screws but I added 2 screw holes for added security. It definitely feel stronger than it looks but where the case screw goes in feels a bit fragile. I don't know if there's anything I can do about that outside of an epoxy coating or something.


    That's all I got for now.

    -Lime

  • Version 5 of the housing is printed and it fits.


    It uses the USB header I included on the PCB to get around the problem of a vertical USB plug not fitting in an expansion port slot.

    I think panel mount USB ports are a standard size so people should be able to source their own one's fairly easy. I'm thinking of doing two variants. One that uses the USB port on the PCB and one that uses the panel mount break out one. People could pick which one would work for them.


    I thickened up the cover itself. It fits just fine in my own case but would struggle in a case with quick releases.


    Not much else to say I think.

    Let me know what you think.

  • Thanks for the nice comments.

    I was away yesterday for funeral so it was nice to return to something positive.

    I ordered 6 of those panel mount USB ports for when it's ready for a small batch. It was actually much easier to and even cheaper to source them from those shield covers with 2 USB ports that plug into a mother board. 6 for 7€ vs 2€ a pop from ali.

    I'll have to tackle the problem of a proper case for external use today. For the moment I'm just using a sled to prevent shorts. I think I'll use a similar design with the slide in rails and clip on back just a bit slimmer to keep it out of the way.


    The code is most of the way done now, so that shouldn't take much longer.


    Keep in mind that the board and pico pictured is the unit I'm using for development. I made a mistake on the PCB when I first ordered them so the serial port will have to go on upside down for the PCBs I have on hand.


    -Lime

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

Jetzt mitmachen!

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