Powering electronics over VUSB / VCOM

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
swilshin
Beginner
Posts: 4
Joined: Wed Feb 26, 2020 4:52 pm

Powering electronics over VUSB / VCOM

Post by swilshin »

Hi Folks,
Hoping you might be able to help me out, I'm looking to make sure there isn't a simple way to do what I am trying to do. This a bit long, so the TLDR is - How do I power 5V electronics safely from the 'flie on a deck if the pin I need to connect to can have 5V external USB applied to it? Is there a configuration where I can use this external 5V to charge a battery connected to the flie? Do I need a voltage regulator? Is it safe to plug VCOM into external USB power?

I think the answers are - Use VCOM for getting power and use a voltage regulator, charge via VUSB. Don't short them, and don't put 5V external USB power into VCOM.

A search of the forum gets me close to an answer to my questions, particularly arnaud's answer on this thread, but I haven't found anything which specifically addressed what I'm trying to do (it might be there, but in that case I missed it, sorry!).

I'm trying to power a Teensy (model 4.0 and model 4.1 attached to a Crazyflie (model 2.0 and a Bolt). I want to be able to plug in the Teensy to external USB so I can reprogram it and pull data off of its SD card. My concern is how to do this safely. It would also be nice if I could charge the battery on the 'flie while the Teensy is attached to my computer via USB. It would be even nicer if I could not cook the 'flie when I plug the Teensy in.

My assumption was that I could connect this via the VUSB line. However if I do this with battery power with the Teensy attached the drone becomes unresponsive and does not pass the self test. Both blue indicator LEDs are on, but no other LEDs blink and the motor self test does not occur. Checking via multimeter the voltage on VUSB is about 1.2V with the Teensy attached. The only other pins I am currently attaching is the ground. I can power this set-up successfully via VCOM, but I don't know if it is safe to plug in the Teensy into USB in this configuration (I'm assuming no, since the 5V pin on the Teensy is just the 5V from USB on my computer, so this is basically the same as plugging VCOM directly into the USB which looking at the schematics has 'nope' written all over it).

The Teensy will is pretty tolerant as far as input voltage goes (3.6V-5.5V). I've consulted the REVC schematics to see how VCOM_EXP (just VCOM and on the actual board), and VUSB (CHG on the board), pins 9 and 10 on the right connector, are hooked up. Now VUSB just seems to be directly connected to the USB 5V line, while VCOM_EXP is connected via a SiP32431 load switch. When the 'flie is using a battery the path between +BATT and VUSB goes via a BQ24075 linear charger. Looking at the schematics I don't see any reason to expect 5V on VUSB unless external USB is attached, unless my understanding of the BQ24075 is flawed (which is entirely likely).

I think this gels with my observations. If I plug the 'flie or Teensy in via USB, the 'flie properly boots and the battery starts charging when the Teensy is connected via VUSB. Unplug the external USB and no dice.

Another concern I have is that VCOM seems to me as though it will sit at the battery voltage when not plugged into external USB power. Is that the case? Because if so, I'll probably need to find some new batteries if I power the Teensy over VCOM, or add a voltage regulator. Probably the latter since I'd need to charge the batteries over the BQ24075 which charges at 4.2V.

My suspicion is that I will need a voltage regulator and maybe some additional circuitry between the 5V pin on the Teensy, and VUSB and VCOM on the 'flie so that when the Teensy is plugged in it puts 5V on VUSB, and when it isn't it draws power from VCOM, and never directly connects VCOM to external USB power (or VUSB for that matter). Is that inference correct?
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Powering electronics over VUSB / VCOM

Post by kimberly »

Hi and sorry this has not been answered yet. Currently there is no-one at the office that is able to answer this...

But let us know if you are in a hurry! I can try to ask one of my colleagues that are on a holiday that know more about this. Or else nudge us again in a few weeks
swilshin
Beginner
Posts: 4
Joined: Wed Feb 26, 2020 4:52 pm

Re: Powering electronics over VUSB / VCOM

Post by swilshin »

Hi Folks, just wanted to update this post so if anyone searches the forum for anything similar they will get at an answer.

The short version is that I'm now reasonably convinced I was correct. VCOM seems to sit very close to either the battery voltage, or the external USB voltage. If you plan to power 5V electronics off of it you need a converter (boost if using 1S batteries and powering 5V electronics, buck for 2S or larger, buck-boost if you might plug in both). If you are, for some odd reason considering this is a flight controller, only powering via stable 5V USB source, then you are fine to use VCOM up to the rated current subject to the observation that VCOM is a little below VUSB (not enough to matter for my electronics, but yours might be more sensitive).

If you plan to power these 5V electronics in some other way at the same time (say by plugging it into a USB socket separate from the one on the 'flie), as I am doing, my inclination is to put a shottky between the bolt and the thing that might be on external power. This is there for the same reason there is one between VCOM and VUSB in the schematics, to protect the USB should VCOM end up overvolted. This shottky is also the reason you shouldn't short VCOM and VUSB, you bypass it completely, removing this protection.

Hope this ends up useful to folks should they run into the same problem.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Powering electronics over VUSB / VCOM

Post by tobias »

Thanks for sharing your findings! I'll try to summarize how it is set up.
  • VCOM is supplied by the BQ24075 chip and it is either VUSB voltage (if present) or VBAT. When VUSB is passed on it is limited to 500mA while VBAT has no current limit. Since it is switching between VUSB and VBAT the voltage can differ between 3.0V (empty battery) to 5.0V (usb powered)
  • VUSB is connected to the BQ24075 input and is meant for charging/powering the CF2.1, e.g. for a charging deck like the Qi-deck.
The Bolt however is a bit different since it has a DC/DC (TPS62170) instead of the BQ24075. It is configured to output ~4.9V up to 500mA if input is above 5V, else if it is lower it will output the input voltage down to ~3.0V. Thus VCOM, if you have a 2-3S lipo configuration, will always be 4.9V.
Post Reply