Stamp Pico USB Serial



  • Hi ,
    im testing the Pico to create a standalone measurement device with 2 ADC and 2 DACs.Before i was using MCUs with internal USB but now i want to create a separte USB serial connection only to transmit the measurements to the PC and receive some settings from the PC.I can use the burner to transmit the program but i do not know how to create an additional serial.Where can i find a example code which is running on the PICO and where do i have to connect the D+D-?An additional USBC breakout board is available. Hope anybody can help me to get started. Best regards Hannes



  • Hello @HannesKannes

    the M5Stamp Pico uses the ESP32-PICO-D4 and searching within its datasheet for 'USB' yields nothing. I don't think this particular ESP32 variant has USB built in. If you want built in USB have a look at the M5Stamp C3; USB pins are GPIO18 and GPIO19.

    Thanks
    Felix



  • Hello @felmue is correct, the C3 is the only one with usb built in.



  • Thanks Guys!
    I was hoping to get the connections (0,) G1 and G3 modified to be used as serial only after the programm was "burnt"
    I dont need a complete build in USB only the serial connection for data transmition.
    0_1637869556165_5124c704-b359-440a-afc9-7b371dd3a6ac-grafik.png
    All of the other s connections are perfect for my project with 2 DACs and more than 2 ADCs.
    Additional components wouldnt be a problem. I have enough space on my SMD layout...
    Best regards

    Hannes



  • Hello @HannesKannes

    hmm, I am a bit confused. You wrote 'where do i have to connect the D+D-'. That indicated to us that you'll want built in USB.

    That said, what is wrong about just using the same TX and RX you used to program the device? If in your code you use Serial.println() that will be sent to RX and can be read by your PC (via external Serial USB dongle)? What are we missing?

    Thanks
    Felix



  • Hi Felix,
    @felmue
    sorry for this confusion.I tested to connect Tx0,Rx0,D+,D- but the USB wasnt recognized by PC. So there was no chance for me to initialize the com port to establish the connection.
    0_1637902107608_34cbde9d-1f19-4efb-b2b0-ee0455b8fef0-grafik.png

    I also tested to change D- and D+.Same result.
    I must have done something wrong^^

    Best regards

    Hannes



  • Hello @HannesKannes

    D+ and D- are USB signals whereas Tx0 and Rx0 are serial signals. They are different and just wiring them together doesn't work. Somewhere between the two there needs to be an USB serial converter.

    If you'd like to use Tx0 and Rx0 of the M5PicoStamp you'll need an external USB serial converter - for instance the same you used to program the M5PicoStamp.

    If you'd like to connect D- and D+ from the USB-C breakout directly to an ESP32 you'll need to use an ESP32 variant like the ESP32C3 which has USB built in.
    Or in other words, there is no way to directly connect D- and D+ from the USB-C breakout to the M5PicoStamp.

    Thanks
    Felix



  • @felmue said in Stamp Pico USB Serial:

    Or in other words, there is no way to directly connect D- and D+ from the USB-C breakout to the M5PicoStamp.

    Hi Felix,

    thanks alot for that information.
    Was hoping this converter could be easy be done by some ICs and restistors maybe but would be too difficult for me yet.
    So i think i will get another controller with built in or a cojntroller with onboard USBC connection.
    Makes no sense to spend much time and money if the device will be procudes 100 times each with MCU and a serial converter.

    Your help was great!!!

    Best regards
    Hannes