• Hardware
  • Exceptions to using the external 5V power supply with digital pins

I recently attended a Bela workshop where we used the external 5V power supply to drive a VCA and connected a button to one of the digital ins for interactivity. Is it fine because the input of the button is less than 3.3V or because its VCC is coming from the 3.3V pin? Would it then be safe to do this for a digital out? e.g., an ERM?
alt text

Edit: For clarity, by VCA in this context I mean a Voice Coil Actuator and by ERM I mean an Eccentric Rotating Mass actuator.

    psxjpma or because its VCC is coming from the 3.3V pin?

    it's fine because the Vcc that goes to the board comes from the 3.3V line (P9.03/P9.04). The 5V power supply there effectively overrides the 5V from the USB and it is needed because only that way the speaker amps (used to drive the VCA) work, but it is in no way routed to the digital input that the button is connected to (in fact, it's not even routed to the breadboard). Not sure what signal you send into an ERM, but if the speaker outputs (1.1W, min 8ohm, AC-coupled, push-pull) is suitable, then a similar setup could work.

    Thanks for clarifying! I'm driving 4 ERMs with 3.3V at the moment
    alt text

    but I also want to simultaneously drive a VCA with 5V like in the workshop:
    alt text

    I suppose it's safe as long as there are two power sources as in the workshop?

    What you should never do is plug 5V into any of the Bela P8/P9 pins. There are always 5V available on P9.07/P9.08. There is also 5V signal on the cape's analog out header, though this has a 100ohm resistor in series for legacy reasons and it's hardly usable for anything. If you send signals higher than 0.66 through any of the analog outs, these will also output a signal larger than 3.3V *.

    Additionally, when powered via the barrel jack, the 5V line coming in on the jack itself is also available on P9.05/P9.06.

    As long as you don't plug any of these signals into the other pins on P8 and P9 (either directly or via breadboard/switch or any external device), you are fine. In other words, if you do not take any signals from the P9 pins mentioned above or the analog out sockets, then you will be safe, _regardless of how you powered the device.

    * for completeness, I should mention that the signals on the analog out header are actually current-limited by a series resistor, so they are not guaranteed to destroy your device if you plug them into arbitrary P8/P9 pins, but do not try that (especially with the 5V pin).