So I have a Nucleo F401-RE that I'm using with a Huskylens AI camera via I2C. During development I use the USB to debug and power the board which works fine. I also added 4.7k pull-up resistors to the SDA/SCL with 5V from the board. But when I want to use an external power source it doesn't connect. When I remove the huskylens.begin(Wire) I confirmed that the board has enough power to start/enter the loop() method.

So what I have is JP5 is set to 2&3, I power the board, no connection via SDA/SCL. I change nothing just plug in the USB connector and at that point SDA/SCL connects instantly. The same way as if I power the board with JP5 set to 1&2 and I use USB to power the board. The external power supply is 7V > & < 12V which is required according to the manual.

Note that I tried to use VCC for pull up resistors both from the board (ext power and usb power) and external power supply. All variants work as along as USB is connected.

What could be the cause of this?

  • \$\begingroup\$ In addition to the I2C lines, you do have GND connected between your Nucleo board and the camera don't you? \$\endgroup\$
    – brhans
    Oct 13, 2023 at 17:31
  • \$\begingroup\$ No the camera is powered via USB, it has it's own power supply. \$\endgroup\$
    – Leon
    Oct 15, 2023 at 10:23
  • 1
    \$\begingroup\$ You must have a common ground connected between both systems, irrespective of what's powering them. It'll never work properly with just the 2 I2C lines alone. Plugging USB into your Nucleo gives you that common GND - so it starts working. \$\endgroup\$
    – brhans
    Oct 15, 2023 at 14:33
  • \$\begingroup\$ @brhans it appears that this was the issue, I now connected everything via the 5V port and have the camera also powered via the nucleo board. \$\endgroup\$
    – Leon
    Oct 15, 2023 at 15:56

1 Answer 1


Make sure that your pullup resistors are wired to the right 5V Pin.

There are 3 different 5 Volt rails:

  • U5V which is powered by the USB connection
  • E5V which is powered from your external power supply
  • 5V which is selected via JP5 from U5V or E5V

5 Volt Rails on nucleo boards

Note that all three are present on the Pin Headers: 5V Rails on Pin Headers

I would always use the +5V pin first for the pullup transistors.

The schematic of your nucleo board can be downloaded here: STM32F401RE

  • \$\begingroup\$ I used the 5V pin from the arduino headers and measured ~4.8V. I also tried to use 5V via an external power source. \$\endgroup\$
    – Leon
    Oct 13, 2023 at 10:53
  • \$\begingroup\$ So I use 2 power supplies, 12V on VIN and 5V for the pull-up-resistors, and I connected the two grounds but for some reason that doesn't work. \$\endgroup\$
    – Leon
    Oct 15, 2023 at 10:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.