Beiträge von CalamityLime

    So I got around to adding that fabled pin 8.

    Unfortunately most of my time for today was wasted on the SDK that decided to no longer work after an update.
    I reinstalled everything and it still won't work. No idea what's wrong, at this stage I'm just going to reinstall windows this time taking a snapshot of a working environment.

    Anyway. That's the board and I think it's ready to go.

    With the C SDK the Pico comes on instantly, I haven't noticed any delay at all. With Micropython/circuitpython there is a definite delay.
    There is already a hack in the pico, if it remakes a connection with the USB mouse after it had lost it's connection, the pico does a reboot, which in and of itself is a hack. I have a little function that tells the hardware watchdog to watch an infinite loop and the watchdog triggers the reboot.
    I had to do that because of TinyUSB. It's happy to let a device go and reconnect to it but once it gets some data from the device, it crashes complaining that something exists already. I was hoping that alone would have it work on a KVM and it might on some cheap KVM's but as far as I can see based on the one I have to tinker with, the KVM just sends out a packet missing something that TinyUSB is looking for and it gives up. Maybe it's a hub issue but TinyUSB should already be configured to work with a hub, now that I write that out I realize that I never tried a hub.
    I'm going to do that before messing anymore with the firmware.

    Ah, yes, probably. Then everything seems to be right. But why do you think, that you need Pin 8?

    I don't know yet. I'm going to have to experiment with it on my breadboard, I have it wired up on the breadboard already.
    I know that serial mice don't seem to use it, none I've seen anyway but there is a weird bug in the firmware that could potentially be fixed by "poking" the computer to see if it's even there.
    The weird bug happens if you reboot the PC but not the pico, it thinks the serial connection is already made. It's copes just fine with the PC saying "hello there are you a mouse?" when the driver initializes but the ALRT led will give you the wrong information until that handshake happens.


    Okay, I was looking into this trying to figure out what was going on and I think I figured out the source of the issue.

    I based the names on the silkscreen on the pin out of the female DB9. So we both used pin 7 for init but you called it RTS I assume from the doc you linked but I called CTS based on the name of the pin of the female port.
    I should probably change that to reflect where the pin goes on the serial controller itself.

    I think I will wire up pin 8 just to have it, I already made room for it on the PCB and it could be handy in the future.

    if you want you can order your pcb fully assembled from jlcpcb, it does only cost part costs and will save you a lot of time.

    If you swap out led and dip switch this could also be assembled here.

    so you only have to hand solder the connectors ;)

    I was thinking about paying the extra to have the SMD parts done for me, it would save time and fiddly work.
    However, I do love a dip switch and I do prefer a little 3mm led to an SMD one, just easier to see if it's lit from the side.

    Glad you added values. :) It's not a big thing but helps alot when building a project, especially if you got just the board from a swap. I often miss that

    Have to have the values where possible, having to look up at an excel sheet while soldering sucks the fun out of it!
    R4 and R3 don't have a value because I'm not sure what I'll set them to. I'm thinking 1k or if I can get away with it 1.5k to limit the variety of SMD parts on the board. They are indicators, not lights, so long as they are visible in a decently well lit room they'll be fine.

    As I see on the silk, you use CTS for the init notification. It is more reliable to use RTS, or both, if possible. On my adapter I played with both and ended up with RTS. Both is complicated, since max232 has not enough inputs.

    Well that answers why you used RTS, I was wondering why you did that.
    I'm a little confused about this though "max232 has not enough inputs."

    RTS is sent out from the max232, so can't I just plug into pin 10 of the MAX232 from the pico?

    Or have I read a datasheet wrong? It wouldn't be the first time.

    PS: I know that pin 2 could be wired up wrong there. Some reference schematics say to wire it that way and the TI one says to have a cap to ground. I used a cap to VCC there because it worked on my breadboard.

    Hallo!

    So today/tonight I worked on the silk screen.
    The board is pretty much the same but I tried to refine it a little more. A few traces got moved around to less silly places and I added a taper to on the board towards the serial port.

    It needs a name and maybe something for the back then I think it's ready for the first order.

    The test point numbers start with 2 for the sake of the pico.
    TP2 on the pico goes to TP2 on the PCB.
    TP3 on the pico goes to TP3 on the PCB.

    I've been soldering long enough to know that that little thing will save a headache down the line.


    I got a bit carried away and done all the tracks, keeping the pcb as narrow as I can. I really don't think I can narrow it down anymore without mounting the rp2040 directly to the board OR swapping out the DIP switch with something else which I'd rather not do.

    • PCB TP1 == USB D- == TP2 on the underside of the Pico
    • PCB TP2 == USB D+ == TP3 on the underside of the Pico
    • That way the Pico folds on top of the PCB, which should keep the soldering neat and easy to do.
    • J1 is a USB header out, that is compatible with a the headers that plug into a motherboard.
    • J2 is 5v power in
    • J3 is serial out


    And yes, you can just plug the mouse into USB1, powering the system using the picos micro usb or J2 or hacked USB cable.
    You don't have to solder TP1 and TP2, you can use a USB OTG to plug the mouse into the pico itself.


    Better :?:


    Yes.


    Needs not much more space then miniusb

    Since the usb data lines are not accessible from the pins on the sides of the pico, I thought it would be a bit messy to run wires to the either the test pads or to a micro usb cable from the board.



    I'd suggest to make the board just as wide as the Serial port. You often have no place around it to have such a wide PCB. Usually there is the case edge from one side and the LPT port from the other, where you could have another cable, or covox, or something else...

    Thanks for pointing that out. That honestly somehow slipped my mind.

    Guten Tag!


    So I have been tinkering with a PCB and how to lay out the board.
    I tried a few idea's but I stumbled on a shape I like. Before routing traces and making it look nice. I'd like to ask what ye think and if it's missing anything important.

    Just for context, this is the first time I've layed out a PCB in KiCad from scratch.


    Information:

    • J2 is a serial out, so the signals come out of that as well as from the serial port on the board.
    • J3/J4 is 5v power in.
    • Switch is a run switch for the pico so you can do a hard reset.
    • Mini USB for power in.
    • JP1 is for switching between 3v3 and 5v supply for the max232. This is to allow the board to take a max232 or a max3232
    • The USB port on the pico points in the opposite direction to the serial port.


    While the layout is not final and some bits may shuffle around a little, you can see the shape and rough layout that I had in mind.

    The pin headers are to allow you build the thing into a PC or something. Power can be pumped into it via the pin header, the mini USB port or the picos micro USB with certain USB OTG cables.


    The bottom of the board is bare.


    :thumbup:
    Danke


    Awesome! I'd omit PS/2 since there's already a dedicated adapter for it, and most mice support both protocols anyway.


    I'm definitely interested in a PCB whenever it's finished.

    Fair point.

    Supporting a PS/2 mouse isn't a priority but I think it's worth exploring the option on some late night. :D I think the only added cost would be the PS2 header itself, maybe some ferries to clean up any noise.


    Danke!

    I should point something out.

    I explained why I'm using resistor dividers on the ROUT lines on the Vogons thread but long story short:

    • I didn't realize that the Pi Pico wasn't 5v tolerant so I ordered the max232 instead of the max3232.
    • The schematic here is not final, it's just what's on my breadboard currently.
    • For the moment I plan to make the pads for R1 and R2 (as shown above) easily bridgeable so either the MAX232 or the MAX3232 can be used.

    Danke!

    Guten Tag!


    I have been working on a USB to Serial Mouse adapter using a Pi Pico as the MCU. The original thread I made on Vogons can be found here for full details.



    Gesamtübersicht:

    • 25%/50%/75% Mouse XY Tracking Speeds.
    • Two Button/Three Button/Wheel mouse support.
    • 7N1/7N2 Serial (this idea came from a comment in Scorps PS/2 to serial project)
    • Hot swapping the USB mouse. No need to restart anything if you want to use a different USB mouse or if usb connection is lost.
    • KVM's are not supported yet. TinyUSB panics when it's connected to a KVM and I'm still trying to figure out why.
    • Open Source Code, not much of a feature but here is the GitHub repo.


    Pläne für die Zukunft:

    • PCB, I have a general shape in mind for the PCB but the point below is still up in the air.
    • PS/2 support. I'm not entirely sure about supporting both USB and PS/2 mice but I do plan on exploring an implementation when I have a chance.
    • Sell a few ready made adapters, if the interest is there I'd be happy to make a small batch of ready made boards.

    Again check the Vogons thread for full details!


    I'm posting this here to try to bring some awareness to this project and hopefully get some feedback. My ears are open and I'd love to hear what you have to say about this project.


    :thumbup:
    Danke


    Have a few pictures.

    Hallo

    Just to clarify, I am not Aviancer.
    My USB to Serial mouse is a different project that started before I found out about Aviancer's project.

    Danke.

    Thanks for pointing them out.

    I have found them already. Scorps project helped me figure out how the serial packet are structured and Aviancer's project helped me fix a silly issue I was running into.
    I started my project I learned of Aviancers one.

    :thumbup:

    Danke!