N6 Board Won't Power from Some USB Ports

Good Afternoon,

I have an N6 board that worked at first but now won’t power when plugged into USB. It does work when a battery is plugged in and it does work from simple USB power wall warts like the apple 20W power adapter, it also works from portable USB batteries like those sold by Anker.

This all leads me to think that the USB power delivery negotiation is failing (it’s all I can think of). What can I do to fix this? Is it a bootloader or firmware problem?

Hi, there’s no power negotiation on the board.

If you are able to power it from power banks, then the board is alive and well. Same for the batteries.

So… what program is on the board? Is it the default main.py? How are you telling that it’s on? It’s possible to put a script on the board that immediately kills it when it turns on. Such scripts are possible to erase.

Please let me know the details on what is working and what is not.

The program that’s on the PYBHFLASH drive is the default program (provided below), but the program I’ve been running in the IDE is very different. From my understand the programs run in the IDE are only temporary, aren’t stored on flash, and don’t run on power up, is that correct?

import time
from machine import LED

led = LED("LED_BLUE")

while True:
led.on()
time.sleep_ms(150)
led.off()
time.sleep_ms(100)
led.on()
time.sleep_ms(150)
led.off()
time.sleep_ms(600)

I am determining that the board is not on because the LEDs don’t light when it is plugged in, Windows doesn’t show any connected USB devices, and the OpenMV IDE can’t find the board. When I add a battery to the LiPo connector it immediately powers on, the LEDs flash, Windows shows the device, and the IDE can connect. If I remove the LiPo it disconnects.

If I connect other USB peripherals to the same USB port, they work as normal. The OpenMV H7 works as normal on the same USB ports. This behaviour is repeatable across multiple computers.

I have tried multiple USB-C cables from multiple vendors (UGreen, Apple, GoPro, and other no-name brands) and the same issue is present with all of them.

When testing with the Apple 20W wall wart and Anker battery I am only determining that it’s working because the LEDs turn on, I am not verifying program function.

Hmmm, that’s very weird. The only thing I can think of is that somehow the 5.1k resistors on the USB-C port failed. Those are how the PC detects the camera.

Since it works on a regular USB port without USB-C in particular, it means 5V is fine.

Check that this is 5.1K

And this too:

Alternatively, the pins on the connector could have been damaged. I’ve never managed to do that, but it’s possible. If this is the case, you’ll need to use the board through a USB-C to USB-A back to USB-C adapter that just supplies 5V without checking the CC pins.

I get 3.9KR when measuring the resistor on the bottom of the board, and 5KR when measuring the one on the top (on the USB port side).

As for damage to the USB connector, I don’t think this is the cause. I’m now trying to power the board via the VIN pin on the GPIO and am seeing the same issue where the board won’t power up. I’ve validated that 4.99V is being provided to the VIN pin.

Could the power supply decide not to activate for some reason? Does it look for certain conditions to power up all the other rails?

Weirdly I’ve noticed that if I reboot my PC while the board is plugged in, it works when the PC boots back up. But if I unplug and plug back in the board it will stop working.

Mmm, that resistor shouldn’t read 3.9K. It’s definitely a 5.1K resistor, though. Maybe it was a bad resistor? Can you use a USB-A to USB cable? Then the resistors don’t matter.

However, given you tried via VIN and it won’t power up… means that something more serious happened. So, it’s probably not USB, but, damage to a component.

Try this: apply 5V to RAW through a diode. If that works, it means the battery charger or ideal diode failed. These would fail only if 6V or greater was applied to them for a long period of time. We’ve tested them against 5.6V (more than USB’s 5V) quite a bit, and they are fine.

I’ve been using the board with a USB A-C cable the entire time. Just now I tested with a USB C to USB C and it has worked every time I plug it in. Switching from the C-C cable back to the C-A cable it stops working, then back to the C-C and it works again. I’ve now repeated this ~10 times.

I then tried the C-C cable on a power brick that doesn’t support USB PD and it wouldn’t power up. On a power brick that does support USB PD it powered right up.

To me it seems to me that whatever circuit is responsible for taking a raw 5V in (whether that’s from the VIN pin or the USB port without a USB PD supply on the other end) and powering the board isn’t working correctly.

Edit: I’ll wire it up to test the RAW pin and report back on my results.

Powering the board through the RAW pin works from the same source I was attempting to use to power it through the VIN pin. Is this the enough information to point to a particular component that could be replaced/repaired?

Edit: I just plugged it back into my PC via the USB C-A cable and it worked again at first, but when unplugged and plugged back in stopped working. Whatever is wrong is somewhat intermittent.

Hi, uh… so, USB-C to C is the harder one. That requires the 5.1K resistors to work. With a USB-A to C cable, the 5.1K resistors don’t matter. The power circuit is the same. So, the USB-A to C cable is then bad.

About power delivery, we don’t have that circuit on the system. You simply need to have 5.1k pull downs on the CC bus lines on a USB-C connector to make sure the host knowns it should supply 5V. Without them the host won’t provide power. Older USB A cables had no such resistors so they always provide 5V.

I am now completely baffled…

I went to test with different USB C-A cables and now it’s working every time I plug it in, even using the same cable as before. I don’t think that the cable is the source of the issue but maybe it’s my PC? That still won’t explain why it doesn’t power via VIN though…

Cables go bad a lot. Usually you have to toss them after 1 year. The pin connectors aren’t actually rated for that many connect/disconnect cycles. Like, this is a real issue, I toss mine regularly.

I’m absolutely certain it’s not the cables. For two reasons:

  1. They all work perfectly with many other devices including high speed USB 3/thunderbolt devices.
  2. Blaming the cables doesn’t explain the other issues I’m having. e.g. Not working when powered from VIN.

Why would 5V on VIN not work but 5V on RAW does work?

My latest issue is the board powering over USB but no longer showing as a USB device, unable to connect to the IDE. It just seems to behave randomly every time I connect it.

I am convinced something is wrong with this board. I have another N6 on order, hopefully that one will work.

Hi itsroo,

I’ve been using the board with a USB A-C cable the entire time. Just now I tested with a USB C to USB C and it has worked every time I plug it in. Switching from the C-C cable back to the C-A cable it stops working, then back to the C-C and it works again. I’ve now repeated this ~10 times.

This statement implies it’s the USB cables, though, since the same circuit is used to power the board with each.

However, not working when powered through VIN would imply there’s an issue with the ideal diode on the board as USB 5V and VIN go through that ideal diode, then a battery charger, and finally to the main power input.

RAW is after the battery charger.

Here’s the power tree circuit to be clear:

So, any USB cable always applies voltage to the ideal diode in the same place. VIN/USB voltage goes through the ideal diode. There’s also another regular diode designed to handle supplying current during the switchover in parallel with the ideal diode.

Then, after the ideal diode, power goes into the battery charger, which then goes through another ideal diode that powers RAW.

So, when you power via RAW you bypass everything.

One chip that is finicky is the battery charger; it doesn’t turn on and blocks current unless you are at like 4.6V. It being damaged could explain a lot. If you are able to probe here and see voltage but the system doesn’t turn on then the battery charger may have an issue:

Thanks for the explainer, here is the result of my test: When plugged in with the USB C-A cable and not powering up that probe point has a voltage of 4.993V.

Okay, then it sounds like the battery charger chip is damaged.

It’s weird though, that chip is rated for 16V and we use 16V rated components for the caps around it.

Probe here:

If that’s not ~4.99V but the other one is ~4.99V then the battery charger is not turning on.

You may also probe RAW:

Anyway… this issue would only happen on some electrical damage to the battery charger. We’ve been using this same circuit for the RT1062 for years now and it’s quite sturdy.

You can however bypass the circuit by soldering a wire from:

to RAW. After doing so, the battery charger won’t matter and the camera should work as normal.