I bought a 2nd-hand Lenovo USB-C PSU (ADLX65YLC3D) which indicates a range of voltages (20v, 15v, 9v, 5v) on the label. Tried to charge a few different bicycle lights but the charging indicators did not light up on any of them. I almost tossed it because the 2nd-hand market I bought from is definately dodgy. But then I tried to power a Rasberry Pi and it seems to work on that. So wtf? An a/c adapter either works or it doesn’t. What would cause this: works on some devices but not others? The Rasberry Pi needs 5v just as the bicycle lights. That is the default voltage for USB-c.

  • jet@hackertalks.com
    link
    fedilink
    English
    arrow-up
    27
    ·
    edit-2
    23 hours ago

    Welcome to the wonderful world of power delivery negotiations.

    Basically your bike lights are too dumb to tell the power brick what they need. Use a cheap charger that will just send out the default without negotiation

    Here is a 40MiB zipfile if you want the nitty gritty details: https://www.usb.org/document-library/usb-power-delivery

    You are ending up in the PE_SRC_Disabled state on the source power delivery state machine.

    • rizzothesmall@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      6
      ·
      16 hours ago

      Don’t understand why it wouldn’t provide like 5v 2a by default until a PD negotiation happens.

      I have a USB C Dell dock which can whack out 180w but won’t power anything that doesn’t give it a proprietary Dell signal, making the USB C-ness of it fairly worthless.

  • Romkslrqusz@lemmy.zip
    link
    fedilink
    English
    arrow-up
    6
    ·
    18 hours ago

    In addition to what others have said, I would hazard a guess that these bike lights shipped with a charger that uses a 5V brick and a Type A to Type C cable.

    With A to C, no negotiation happens - 5V just gets sent.

  • ThePantser@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    14
    ·
    23 hours ago

    The lights most likely do not have the extra circuitry to talk to the charger to negotiate voltages. Since it’s a charger that can change voltage as you stated then the device must be able to say “hey give me 5v”. You will need to use a dumber 5v only charger for those devices.

    • evenwicht@lemmy.sdf.orgOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      23 hours ago

      What would be the meaning of a default voltage then? My understanding of USB PD is that 5v is a default, which I took to mean it would deliver 5v in the absence of a handshake.

      • jet@hackertalks.com
        link
        fedilink
        English
        arrow-up
        7
        ·
        23 hours ago

        Yeah, but some power bricks want to be safe and wont give any power without power delivery negotiation. It’s not unreasonable, and it is safe, it wont burn anything out.

          • jet@hackertalks.com
            link
            fedilink
            English
            arrow-up
            2
            ·
            23 hours ago

            The spec is very clear, the source does not need to provide any amperage, just voltage. PE_SRC_Disabled (see my other comment in this thread)

            • evenwicht@lemmy.sdf.orgOP
              link
              fedilink
              English
              arrow-up
              2
              arrow-down
              1
              ·
              22 hours ago

              voltage = current × resistance, IIRC my high school physics correctly. If current is zero, then voltage must also be zero, no? I don’t understand how voltage can be positive if amperage is zero.

              • jet@hackertalks.com
                link
                fedilink
                English
                arrow-up
                4
                ·
                22 hours ago

                Your right, but it only needs a tiny amount to signal 5V.

                The power brick engineers can choose to fail safe (just 5V only minimal amperage), or fail dangerous (5W power delivery) - for this lenovo power brick they decided to fail safe.

  • Notsosuperfloh@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    12
    ·
    23 hours ago

    Most usb- c pd adapters wont put ouz any voltage on their own. the end device must tell the adapter what voltage they want via the cc pins. on the raspberry pi this is done via resistors between cc1 snd cc2 to get 5v. those pins are most likely unpopulated on your bycicle lights, so they get no power.

    • brillotti@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      23 hours ago

      This is correct. I made my own USB C to 30 pin adaptors for old iPods and this is precisely how I had to build them.

  • FartsWithAnAccent@fedia.io
    link
    fedilink
    arrow-up
    2
    ·
    17 hours ago

    What lights are you using? I’ve been able to charge everything from Sofirn to Cateye without issue off my laptops.