Teensy 3.6 Vusb Current Draw limitations/ Vin versus Vusb

Status
Not open for further replies.

bk2001050

Member
Hi Guys, currently working on a joint hardware/software project. I ended up choosing the Teensy 3.6 due to some of its extraordinary features. I am having some difficulty understanding the Vusb and Vin exactly. I know they are essentially the same point if the track is left untouched, and if the track is cut, Vin can be used to power the microcontroller externally. However I would like to cut the track and make a simple switch where:

Question 1: If I cut the track between Vusb and Vin, can I put a SP3T switch so in Position 1, it connects Vusb and Vin (Powered by the microUSB), Position 2 is off(not connected) and Position 3 is connected to a battery (not directly but through a Linear Charger)? Please see the attached image for details.

Question 2: If this is possible, then I know the controller is limited to 250 mA but can Vusb supply more current? The orange arrow in the image indicates a connection to the charger. Would this be possible? Thanks in advance!

Teensy Power.jpg
 
So the trace as you've identified is there to separate the Vin and Vusb pins.
This is becuase sometimes you want to power the teensy from whatever it's plugged into through Vin, but if you have the USB plugged in you can connect the usb power supply with your boards power and that's bad. Cutting the trace disconnects the usb voltage from the Vin so you can power it yourself.

So as I understand it you want the three features:
- Power teensy from usb
- Power teensy from board
- Charge a battery from the USB if connected.

and you want to change the options with a switch. For the first two parts -
Cut the trace, then use a SP2T on Vin. One throw will re-connect Vin to Vusb, powering the board from the USB; and the other throw should connect Vin to your external supply.
As far as charging the battery, I'm 100% on what you want to do, and it's going to depend on the particular battery charger you've used. I would guess that you want to be able to charge the battery from Vusb if present, and the battery is what powers the board (and where your Vin power comes from)

Plenty of charging circuits allow you to charge and run the battery and the same time, if that's the case the easiest thing to do would be cut the trace, and permenantly connect Vusb to your charging circuit and Vin to your board supply. When you plug the USB in the power will charge the battery and also flow to the rest of your circuit (assuming the USB can source enough).
That's my best guess based on what you've said. Post a bit more detail about the rest of the circuit.

As far as the 250mA limit you mention, I'll just clarify this for you.
250mA is the maximum current you can draw out of the Teensy's 3.3V volt pins under any circumstances, and it may be less. The teensy has a regulator on board that converts Vin into 3.3V, and supplies this both to the microcontroller but also makes this available externally.
Vusb is supplied by the USB bus and it's maximum current will vary depending on the standard, and a bunch of external factors - for example if your teensy is plugged into a hub then it'll be sharing it's current limit with all the other devices.
So if you've plugged your teensy into a charging port that's good for 1.5A, and there's nothing else plugged into that port then you can draw
1.5A - teensy's operating current
out of Vusb, which will depend on what the teensy is (or isn't) doing.
 
Hi Edward, Thank you for taking your time out to write a well thought out solution. You have understood my inquiry correctly. I went with an SP3T simply because I was not confident of the operation of Vin and Vusb but it seems I have understood it correctly. Your solution with the SP2T is much better though. Thanks!

The charging circuit I plan on using is the MCP73871. Its a solid linear charger with well defined outputs/inputs. My circuit it attached below. Currently I have a separate micro usb port charging the battery. The teensy's operating current of 1.5 A makes a lot of sense. It means I can essentially draw 1.5 amps to power the circuit from its port.

I have a follow up question: Currently the charger is configured for a 1 amp draw/1 amp fast charge config. If I do connect it to the teensy's micro-usb as you suggested in your post, will there be power surges on the PC USB port? USB cannot supply that much current I believe, I wouldnt want it to run into faults and become unable to upload any code to the controller.Battery Charger.png
 
So with that charger you dont even need the switch, if you
cut the track
connect Vusb to the charger Vin pins
connect the battery to the charger Vbat pins
connect the charger Vout pins to the teensy Vin pin

then all will be gravy. If the USB is present it will power the circuit and charge the lipo, if not then the battery will power the circuit. I assume you've found that chip by looking at adafruit's charging circuits? You wont need a separate USB for charging :)

The number 1.5A was entirely arbitrary, and I worry that you've misunderstood me a little. The Vusb pin on the Teensy is directly connected to the USB bus' 5V, straight in and out. So whatever the USB is capable of doing, this pin will reflect.
It might be a particularly poor USB port, and actually the voltage is 4.7V, and you can only draw 150mA before the current starts to limit. It might be a self powered USB hub that's up at a Juicy 5.1V and capable of 2A before it's limit.

The Teensy's operating current - that it the current input required to operate the teensy - will not be huge. I dont have exact numbers to hand, but the teensy 2++ maxed out at 62mA at 5V.

What this all means is that your circuit will need to draw, in total, less current than the USB port you plug it into is capable of supplying - this will vary on the port as we've discussed, and will vary on your circuit. Now as you know, the charging chip can only pass 1A, which means if the load current (that is the current flowing out of the chip's Vout pin) is greater than 1A the battery will discharge to make up the difference, or if the current is less than 1A, the extra current will be used to charge the battery.
So you now (in order to be able to charge the battery) need the load to draw less than 1A, and obviously the less it draws the longer the battery will last.

So you're current limit is really just 1A, so you need to make sure to plug this into a USB port that's capable. If you try to use a port that doesn't have the power, the USB will do something bad. What this bad thing will be really depends on the USB, but could be anywhere from entirely benign, to break. It should just limit it's current output by lowering the voltage, but I wouldn't go plugging around based on that assumption.
 
Hi Edward,
Thank you so much for such answering in such a detailed manner. This should serve as a good answer for anyone looking for something this specific.
This clears up everything and saves me some space on my board! I will modify my schematic accordingly.

I am currently working on a final year project with the ADS1298 a 24 bit high precision A to D from Texas Instruments, trying to get the Teensy 3.6's native SD card to save EMG data. Currently designing the PCB for it. Thanks again!
 
Status
Not open for further replies.
Back
Top