I have a simple circuit where 5V signal is fed into a buffer (Nexperia 74LVC1G07), then from the buffer into another device. The buffer is fed 5V by a switching DC-DC (R-78HB5.0-0.5/W). After it’s been off for a while, the buffer works, the signal is recognized by the receiver. This continues for some time, minutes, to tens of minutes. Then the buffer stops working. The DC-DC still works as well as the source. If I unplug it and let it sit for an hour, it resets back to working for a while until it stops.

Context:

The setup runs on an ebike 36V battery. Theres a hub motor connected to the same battery (via power controller). The signal source is a torque sensor. The destination is a bike computer.

Any idea what could be causing this? I don’t know much about electronics. I learn specific bits to do something but I’m ignorant otherwise. E.g. I know what a buffer does, I understand how it works on high level but I have no clue for example how it could be affected by the rest of the system electrically through noise, EMI, etc. My physics intuition here makes me think there must be some charge buildup happening which dissipates with time when turned off. I’ve no idea if this is remotely valid, or if it is how to fix it. Any ideas are appreciated!

  • litchralee
    link
    fedilink
    English
    arrow-up
    3
    ·
    7 days ago

    When the buffer gets into this glitch scenario, is the output stuck at high or low?

    • Avid Amoeba@lemmy.caOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      7 days ago

      The output is stuck at low.

      The input keeps alternating high/low. I’ve checked by disconnecting it and then measuring it. I’ve also checked by substituting the source for identical brand and model spare unit.

      E: Something really bizarre to me happened during testing today. I decided to change the buffer power supply to another 5V rail to isolate the DC-DC from the equation. The buffer still got stuck. But that’s not the funny part. After getting stuck, I disconnected the 5V power to the buffer to let it rest. To my shock, the output went high. I cycled the input and to my surprise output signal at the bike computer was correctly registering high/low. With no power going into the buffer. 🫢 That is, the buffer has its input, output and GND wired, 5V disconnected. I never tested this scenario before because I was disconnecting the whole circuit, upstream of the DC-DC, which also feeds the torque sensor (input). I wish I understood enough to explain why this unpowered IC makes the bike computer recognize the signal it otherwise wouldn’t. 😂

      E2: For completeness, the original problem that necessitated this whole operation was that when directly connected to the computer, the signal low never fell below 1.2V and the computer’s threshold for registering low is around 1-1.1V. High was registering correctly.

      • litchralee
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 days ago

        For your edit #2, can you post a schematic of the relevant part of the circuit? It’s a bit hard to imagine how things are arranged, especially where your pull up resistor at the output of the buffer is.

        • Avid Amoeba@lemmy.caOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          5 days ago

          This is my attempt at a diagram of it. There’s 3 connectors, bike computer PAS, Bafang PAS torque sensor, DC barrel (battery). There’s a Recom DC-DC with built-in wire leads. There’s a breakout board on which I’ve soldered the buffer onto. All lines on the diagram are short, thin wires, 1-4cm in length. As far as I know, there’s a pull-up resistors inside the bike computer on its inputs. I can see the values going high when I disconnect the cable from it (there’s debug screen on the computer that shows the input values). When assembled it becomes a part of a cable. I’m using heavy duty heat shrink tubing for structure. I have one of these working on another bike without issues for a while now. The components in the adapter are the same, but the bike motor and controller are slightly different, so there could be differences in what noise there’s in the system.

          Yesterday I replaced the Nexperia IC for a TI which I had on hand, no capacitors still (on order). The TI worked well during a test for an hour. Then it stopped working at LOW, just like the Nexperia. Is it possible for these events to be damaging the IC? I feel like newly replaced chips last a little longer during first use, then they stop working much faster after recovery.

          • Avid Amoeba@lemmy.caOP
            link
            fedilink
            English
            arrow-up
            2
            ·
            edit-2
            4 days ago

            Retested with a newly soldered buffer IC and an external battery. It died again. Perhaps the issues are coming through the input/output lines. I finally threw in the towel and implemented it using a Trinket M0. Seems to work for now. Will do more testing.

            • litchralee
              link
              fedilink
              English
              arrow-up
              1
              ·
              edit-2
              3 days ago

              (sorry for the long delay)

              From your description, I’m wondering if the internal pull-up from the bike computer might actually be an active output, and that the open-drain buffer is causing the bike computer to give up sourcing that pull-up voltage. That is to say, if a larger-than-expected current is drawn from the bike computer, it might trigger a protection mechanism to avoid damage to its output circuitry.

              To that end, I would imagine that either: 1) an inline resistor to limit drain current, 2) a push-pull buffer, or 3) both, would help rectify the issue.

              My suspicion is based purely on the fact that getting stuck low for an open-drain device could be an issue “upstream”. If it were stuck high, I wouldn’t normally suspect this path.

              If you still have the original configuration, measurement of the drain current would be valuable info, as well as the current when the buffer is omitted (when the motor and bike computer are directly attached, a la factory configuration). That would indicate if perhaps the currents are too mismatched.

              • Avid Amoeba@lemmy.caOP
                link
                fedilink
                English
                arrow-up
                2
                ·
                edit-2
                3 days ago

                (sorry for the long delay)

                No prob whatsoever. I appreciate your time.

                As for the computer, I have no idea and I’m not skilled enough to check. I ordered some push-pull quad channel buffers from TI and Nexperia, SOIC breakout board and decoupling caps. Unfortunately I made it work using a Trinket M0 with a trivial CircuitPython program before those arrived. Already tested it on a bike ride and just sitting powered on over 24 hours. No failure so far, so I conformally coated it and installed it. The fly was killed with a bazooka. 😂 And so I think I’m gonna keep it like that and will revisit the new buffer ICs I bought if it fails again, or if I need to build another adapter. Thank you for your help!

                • litchralee
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  3 days ago

                  BTW, you might consider posting about your finished results at [email protected] . We enjoy all things bicycle-related there, especially when it’s solving a unique problem or solving it in unique ways.

      • litchralee
        link
        fedilink
        English
        arrow-up
        1
        ·
        7 days ago

        If I had to guess, perhaps the buffer circuit is going onto latch-up due to ESD spikes, which is then locking the open drain to conduct, which is why you’re seeing a LOW output.

        When in doubt, I suppose you can tack on more decoupling capacitors nearby the buffer’s Vcc.

        • Avid Amoeba@lemmy.caOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          6 days ago

          As an idiot, do I wire capacitors in parallel to Vcc and GND of the buffer? What value?

          Also I have the same kind of buffer from TI. Is there any sense to change the Nexperia IC and see if the TI fares better?

          E: I read on decoupling capacitors. They go between Vcc and GND. The suggested general values I see from SparkFun are 0.1µF, 1µF and 10µF. Does that make sense?

          • bitfucker@programming.dev
            link
            fedilink
            English
            arrow-up
            2
            ·
            5 days ago

            Yes, sounds about right. For general purpose decoupling that is a good value. Make sure to place it as close to the IC as possible. A longer path will add more “noise” to the system. Do read more about the capacitor type too since it can matter a lot. I suggest looking at Phil’s Lab video on YouTube to learn more about this stuff