Tuesday, April 23, 2024

Powering a USB Dash Cam: Lessons Learned from VanTrue N4 Pro

Welcome back guys and gals. This time around, there won't be any diagrams, pictures, or wonky Excel charts. Just a public service announcement from a guy who just spent a few days troubleshooting an issue with the VanTrue N4 Pro dash cam. I promise to keep it short, unlike the troubleshooting process I just went through. Ha ha.

This is for folks who are using their dash cams with 3rd party power supplies or cables. If you're using the exact power supply that came with your camera, this issue might not apply to you.

The issue

I bought the VanTrue N4 Pro a few days back, and immediately decided that I don't like the included power adapter. It's bulky, it's ugly, the cable isn't even straight having spent weeks/months bunched up in the retail box. I have a box full of high-quality braided USB-C cables, and a few car adapters with 3A outputs. Why not use those instead?

It worked great, until it didn't. First, the camera would restart randomly with the engine stopped, but worked fine while driving. Then, it started rebooting randomly at all times. I'm not (yet) a complete idiot, so I assumed it could be a power adapter issue. The camera kit comes with the front and the rear unit, so at first I unplugged the rear unit, which made the reboots go away. Is it the rear camera, or is it the additional power draw caused by it?

After a couple more days, the camera wouldn't go for 30 seconds without restarting, with the rear module connected. Time to do some actual troubleshooting.

Troubleshooting

If you look online, you will find plenty of threads telling you to use high-quality USB adapters with 2.4A  output or higher. Well, obviously. But what if you're already using a 3A adapter from Breitling, and a high quality cable made by Cartier (just kidding, I would never)?

I tested the power adapter, and confirmed it can easily support the required amperage, and I even used a USB combiner cable to split the load between two USB ports in the adapter. 

Frustrated by the lack of progress, I went back to the basis and started measuring voltage/current at the end of the supply cable. After all, the cable (both the stock one and the "nice" one I used) was 12ft (~3.7m) long, so you'd expect some voltage drop across that length. Voltage drop is a physics thing, so you can't avoid it, but you can design to work around it. That's where I had my breakthrough.

For the test, I used two cables/adapters:
  1. 3rd party adapter made by Anker or Aukey rated for 2.4A, paired with a 12ft USB-C (22AWG).
  2. The stock VanTrue adapter rated for 2.4A, with a built-in 12ft USB-C cable, also 22AWG.
A 22AWG cable at 12ft should translate to ~0.2 Ohms of resistance. That's a 0.2V loss at 1A, or 0.4V at 2A. The camera can easily sink 1.5-2A, and I've seen it spike to >2A, so let's assume 0.5V for the sake of the discussion.

The results were as follows:
  1. With the Anker/Aukey adapters and a 12ft, 22AWG cable, the end-of-line voltage (at the camera) started at 5.17V (camera off) and dipped to 4.5-4.6V (camera on).
  2. With the stock VanTrue adapter, the voltage started at 5.22V (camera off) and did not move at all regardless of the load.
I ran additional tests with a USB-C load attached to the cable, and got the expected voltage drop with my own cable (as expected from Ohm's law), but the VanTrue adapter delivered ~5.2V no matter if I pulled 0.1A, 1A, or 2A.

As it turns out, this issue had nothing to do with power, but voltage. Big surprise right there, yet another problem that can explained by Ohm's law alone!

Conclusion

The power adapter bundled with the camera appears to be designed specifically to maintain a USB-spec voltage at the end of the line. In a way, it doesn't follow the USB spec at the source, but it's designed to meet USB spec at the end of the wire. In real-world terms, this means that the adapter must be boosting voltage at the source in order to reach the expected voltage at the end. With a 22AWG cable, the adapter is likely putting out 4.7-5.8V at the source to compensate for the loss. This is not how any regular 3rd party USB adapter will behave, and that's why it might not matter how good your adapter is. It doesn't "know" that it's powering something across a 12ft connection, and wasn't designed to compensate for voltage loss.

Suggestions

VanTrue (and other dashcam makers) should make it clear the bundled power adapters are not actually USB-spec adapters, and that a regular power supply (even a high quality one) might not be able to reliably run the cameras. It's not enough to say "use the original adapter" and leave it at that. Most of the time, when a hardware vendor tells you to "only use the original power adapter", it's because they want to make more money selling power adapters. As consumers, we are trained to dismiss those notes as signs of greed, not something that's supported by technical reasons. In this case, the vendor should make it clear why the original power supply matters, in technical terms that can be understood by regular people.

Monday, December 14, 2020

DIY 16-bit precision voltage source with MAX5717A DAC

If you need a precision voltage source, you have three options. You can spend thousands of dollars and buy a lab instrument from a reputable company, you can spend hundreds and get an amazing enthusiast-grade device from Ian Johnston, or... If you're a cheap ass like me, you can build your own device that might just be enough for your use case at a fraction of the cost, and with hours and hours of fun included for free. Guess what we're going to do!


Saturday, November 21, 2020

26 AWG solid copper wire: the perfect choice for hand-soldered Arduino projects

This post is my little token of appreciation for the 26 AWG solid core copper wire. Perfect for creating permanent version of Arduino projects, or if not perfect, then at least much simpler than wire wrapping and much, much more practical than using solder traces. Man, I love 26 AWG solid core.

Saturday, November 7, 2020

Using a FLIR thermal camera to improve the taste uniformity of a tea-infused cake

Making a layer cake is a serious task. There are... layers... of complexity to it. Make a mistake, miss a step, and the whole thing can turn into a disaster. 


Thursday, November 5, 2020

Quick look: Voltage drift / instability on Ruideng RD6006 power supply

This post is a quick record of voltage drift / variations I noticed during recent experiments with using a MOSFET as a voltage-controlled resistor, where the MOSFET's Gate-Source voltage was driven by the Ruideng RD6006(W) DC-DC power supply.

Sunday, October 18, 2020

TL-21 Kelvin clip test lead upgrade for DER EE E-5000 LCR meter

There's no shortage of blog posts and videos describing TL-21 probe upgrade for the extremely popular DER EE E-5000 LCR meter. With that said, this post will is somewhat repetitive, but hey, I already took the pictures, so why not share.

For impatient readers, this is what the finished job looks like:


Tuesday, October 6, 2020

Measuring NiMH vs Li-Ion voltage sag at small loads with ESP32

This article is a brief excerpt from my experience with using Nickel Metal Hydride (NiMH) and Lithium-ion (Li-ion) cells for powering home sensors running the ESP32 Wi-Fi microcontroller.



Measuring breadboard wiring resistance: how bad is bad?

This article is a brief record of my early breadboard wiring adventures, because learning things the hard way is fun! You may also read the related post if you wish:




Sunday, June 18, 2017

The story of MySQL Bug #86664

This is a story about why it's a good idea to test and verify the behavior of new software releases, even if the change log says that a particular bug was already fixed.

Wednesday, May 31, 2017

Database proof-of-concept & migration best practices

This post tries to answer some of the most popular questions I receive from customers, regarding the best practices for database proof-of-concept and migration projects.