Powering 5" and 7" displays from USB

Status
Not open for further replies.

Experimentalist

Well-known member
Hi

I am looking to power these displays along with the Teensy 3.1 direct from USB without external power:
5 inch - ER-TFTM050-3
7 inch - ER-TFTM070-5

The 5" display is rated at 3.3V 450ma and the 7" is rated at either 3.3V 480ma or 5V 300ma.

As far as I am aware a USB port is capable of providing 500ma in 100ma increments. I think I read somewhere that you have to request power from the USB hub via commands to get more then the initial 100ma.

I am aware that the Teensy 3.1 can only supply 3.3V at 100ma max so I will need to add another regulator for the 5" display. I was going to use the "LM1117 3.3V 1A Voltage Regulator LDO SOT-223" see attachment for details.

Does anyone have any experience with this? I have no idea on how I would go about instructing the hub to provide more power and would also guess that not all hubs are created equal and capable of providing this amount of power. I would be grateful of any guidance anyone can offer.

Anybody?

Ex
 

Attachments

  • AMS1117.pdf
    92.9 KB · Views: 109
If you want to do this, it would be a great idea to use a 3.3V switching regulator for the TFT, and the teensy, though the teensy doesn't matter as much. The 3.3V regulator could supply more current without using too much from the USB ,as compared to a linear regulator.

I don't know exactly how you get 500mA from the USB, but I know that it sounds like teensy+450mA load would be very close to your limit.

3.3V @ 500mA is your limit with a linear regulator.
(5V/3.3)*500mA*80% = 606mA = 21% more current available.

Alternatively, most of the power draw on the screen is the backlight, so usually you can run that at 50% power and be decently bright enough.
 
Last edited:
The USB power setting doesn't actually instruct the hub or computer to provide more power.

According to the USB spec, which isn't always followed precisely, your USB device is supposed to draw no more than 100 mA, until the host sets its configuration. Then you're allowed to draw up to the amount your info says you need. The actual setting is called "bMaxPower". You can find it inside the USB code in hardware/teensy/cores, if you really want to edit it.

The intended way this is supposed to work, which you'll probably find to be underwhelming, is the PC (or Mac) can tell if your device needs more power than the hub can provide. High power ports (powered hubs and PC ports) can deliver 500 mA, and low power ones only 100 mA. The low power ones are 4-port hubs without power supplies, where 500 mA comes in, the hub uses 100 mA, and each port can have 100 mA.

The whole idea is to be able to show an error message to the non-technical end user, so they understand to plug their high power device into a port capable of providing more power. The ports don't have the ability to somehow provide different power levels. The system is only about preventing high power devices from configuring.

Actually, it is possible (but not supported by any of the Teensyduino software) to create a USB device with 2 or more configurations. The PC will choose the first configuration in the list that can be supported by the available resources. The configurations specify how much power and how much bandwidth the USB device uses. This is really only useful for things like webcams, where a lower bandwidth config (lower res or lower quality compression) lets it still work on a USB bus where other devices have already reserved a lot of the bandwidth. In theory, if your hardware can be designed to draw different power levels, you could have 2 configs (perhaps one where you don't allow the backlight brightness above some level) and do a lot of fiddling in the USB code to report both configs to the PC, and then look at which is chose and adjust your backlights or other hardware. But in practice, pretty much only webcams use the USB multi-config feature, for fallbacks to lower quality video modes.

Also, while the bMaxPower number lets you specify power in 2 mA increments, really, there's only power levels that matter. USB host ports provide either 500 mA or 100 mA. At least on PCs and Macs. Ports on things like iPads may be different....

The one other aspect of USB power is the over-current protection. According to the USB spec, all host ports are supposed to have current limiting devices. It's really only meant to protect against physical damage or starting a fire, if your device shorts the power. The spec allows the current limiting threshold to be anywhere from 500 mA to 5 amps. Apple has used very good, very sensitive over-current detection on some Macs, which can be tripped by even having more than the max 10 uF capacitance. Many PCs have just a cheap ceramic PTC, and some appear to have no limiting at all (in violation of the USB spec and probably also safety standards). The thing to keep in mind is the over current protection isn't meant to enforce the current spec. It's meant only as a basic safety protection, to prevent a fire from the thin wires in very cheap USB cables from burning, since they're connected to a PC power supply capable of delivering hundreds of watts to modern CPUs and graphics cards.
 
Last edited:
3.3V @ 500mA is your limit with a linear regulator.
(5V/3.3)*500mA*80% = 606mA = 21% more current available

Looking at this equation you are saying that 606mA at 3.3V would equate to 500mA at 5V with a linear regulator that delivers 80% efficiency, right?
 
I read in an article (it was about external usb-harddrives), that newer usb-ports can provide 1 amp without problems. But not "official".
 
An update . . .

Having studied the circuit board of the ER-TFTM050-3 I observed a set of pads, with nothing soldered in place, that appeared to be for a linear voltage regulator with silk screen labelling U2. Further investigations show that the same circuit board is used for the ER-TFTM050-2 screen and it has 3.3V and 5V options. Reading the manual for this second screen shows that to use the 5V option the solder link J8 is open circuited.

Out with the multi-meter and it all seems to ring true. Anyway thought I would give it a go and so I soldered a AMS1117 3.3V 1A Voltage Regulator in place at U2 and removed the solder blob short circuiting J8.

I set the jumpers as per
4 wire serial
J9,J11,J13,J15 open
J10,J12,J14,J16 short
R1,R2,R3 all 10Kohm resistors

Teensy 11 mosi to 8875 JP1 pin 7 sdi
Teensy 12 miso to 8875 JP1 pin 6 sdo
Teensy 13 sck to 8875 JP1 pin 8 sclk
Teensy 10 cs to 8875 JP1 pin 5 scs

I removed the reference to the 3.3V input from the above quote as I am now using 5V straight from the USB supply. Ground on pin1 +5V on pin 3 of JP1 and pins 5-8 as in quote above.

I have read that you do not need the resistors R1-R3 but I had some SMD 10K resistors and so I painstakingly soldered them in place by hand.

I cloned the repo also recommended here
compiled it with Arduino 1.0.6 and TD 1.20 final, hooked it up to the 5V USB supply, uploaded, and hey presto it works!

Been running for hours and the voltage regulator is only just above ambient temperature.

Anyway, I hope this may be of use to someone. If I get a chance I may measure the current draw from the USB later and report back but it is working fine.

Ex.
 
Status
Not open for further replies.
Back
Top