Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 00:01 29 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : TFT Maximite - USB power problem

Author Message
raketenbuggy
Newbie

Joined: 08/02/2014
Location: Germany
Posts: 21
Posted: 02:28am 09 Feb 2014
Copy link to clipboard 
Print this post

With my TFT Maximite I ran into a problem which might concern other Maximites (mini or Color) as well.

When I powered my TFT Maximite via USB I was not able to establish serial communication. Everything seemed to work, I saw the serial port and had full access to it, but I could not send or get a single character to or from the Maximite. At first I thought my VIA-chipset was cause of a timing problem or similar (as it often turned out to be in the past). So I tried a second computer without success although it doesn't have a VIA-chipset. Eventually I got lucky with a third computer. That's when it struck me that it might be a power problem, and BINGO!

When attached to my first computer, I had only 4.4V on the 5V rail. So I connected an external 5V supply to the 5V rail and communication worked flawlessly. It turned out, the threshold is somewhere around 4.5V. With 4.6V it works, with 4.4 it doesn't. Instead of connecting additional power to the Maximite it can help to use a different USB port, to change the USB cable or to use an active USB hub.

Has anybody encountered similar problems? Does anybody know what's happening inside the PIC at 4.4V? Except from the USB communication everything seems to work fine.

Michael
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2817
Posted: 03:33am 09 Feb 2014
Copy link to clipboard 
Print this post

Hi Michael,

Just to clarify, do you have working Coms when using just an active usb hub (i.e. with no external power applied to the Maximite's Power Input header)?

Also, can you measure the voltage on your USBs on all three computers WITHOUT a Maximite connected. This should be above 4.75V to meet USB specifications.

I cannot find a minimum value on VBus (PIC pin 54) in the datasheet for USB to be operational but would assume it has a minimum value too of 4.75V.

Also note that the TFT MaxiMite requires about 250mA depending upon TFT used and backlight current. If your USBs are overloaded with other devices (or the voltage is close to 4.75v) then this is likely to be the cause of your issue. The TFT Maximite's onboard 3v3 voltage regulator will still operate at a voltage as low as even 4v and still drive the rest of the circuit resulting in everything else working (as you say it does).

Let us know if you can measure these voltages

Regards,

Phil


For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 03:45am 09 Feb 2014
Copy link to clipboard 
Print this post

I don't have a schematic but if it is like the color Maximitethere is a diode on the usb power line to protect against connecting a external power source.
The voltage drop of the diode could explain what you see.
If that is the case shorting the diode could solve the problem, but it will remove the safety.
Better is to have a switch to choose between USB and external power.


Edited by TZAdvantage 2014-02-10
Microblocks. Build with logic.
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2817
Posted: 04:43am 09 Feb 2014
Copy link to clipboard 
Print this post

  TZAdvantage said   I don't have a schematic but if it is like the color Maximitethere is a diode on the usb power line to protect against connecting a external power source.
The voltage drop of the diode could explain what you see.
If that is the case shorting the diode could solve the problem, but it will remove the safety.
Better is to have a switch to choose between USB and external power.
On the circuit diagram there is a diode between 'Vusb In' and the onboard regulator. This has a .32V (typical) voltage drop which is enough to still power the 3v3 regulator even if Vusb is as low as 3.7v.

However, between 'Vusb In' and VBus (PIC Pin 54) there is only a 1K resistor.

We need to know the minimum voltage on VBus for USB coms to be reliable. But like I already said, assuming this is the same as the USB specification, then we need a minimum of 4.75V on 'Vusb In' capable of delivering at least 250mA.

Lets see if he can measure the 'unloaded' voltages on the USB ports on his computers. . .

For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
raketenbuggy
Newbie

Joined: 08/02/2014
Location: Germany
Posts: 21
Posted: 06:47am 09 Feb 2014
Copy link to clipboard 
Print this post

Thanks for your replies. I used the rainy day and got some results:

  WhiteWizzard said  Just to clarify, do you have working Coms when using just an active usb hub (i.e. with no external power applied to the Maximite's Power Input header)?

I'm sorry, I don't have an active USB hub at the moment. It was only a suggestion from my side. As soon as I have one I'll try this one out.

  WhiteWizzard said  Also, can you measure the voltage on your USBs on all three computers WITHOUT a Maximite connected. This should be above 4.75V to meet USB specifications.


I have to mention that at nearly all my computers I have to use USB extension cables. If so, I did two measurements, with extension (we) and without (wo).
The first number is the open circuit voltage without the Maximite, the second the voltage with the Maximite and the third the voltage on the 5V rail on the Maximite. Last comes the status if I got USB communication running or not.

Computer 1 (we): 4.95 / 4.70 / 4.45 / no com
Computer 1 (wo): 4.98 / 4.76 / 4.52 / no com
Computer 2 (we): 5.07 / 4.09 / 3.83 / no com (I have to replace this crappy extension cable)
Computer 2 (wo): 5.05 / 4.88 / 4.64 / com
Computer 3 (wo): 5.00 / 4.76 / 4.53 / com

The voltage on the 3V3 rail was always 3.33V, the voltage drop over the diode D4 is about 0.25V, over the 1k resistor R1 0.065V. My TFT Maximite consumes 276mA at 5.00V idling.

I hope that helps.

Michael
Edited by raketenbuggy 2014-02-10
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2817
Posted: 07:57am 09 Feb 2014
Copy link to clipboard 
Print this post

Thanks for those numbers.

From what you describe and report it is fairly safe to summarise the following:

1> The drop in the second column from the first column is exaggerated by the extension cable - as would be expected.
2> The second column is lower than the first due to the 270ma load requirement.
3> The third column should be about .25v lower than the second column due to the drop across the diode - your figures show this to be the case.

IMHO, the logical conclusion drawn from these voltages is that you are operating right on the boundary of the USB minimum voltage specification and this is your issue with the coms. Use a dedicated 5v input capable of 300mA minimum and all your coms issues will vanish!

As already mentioned, the 3v3 regulator will work as it should do down to an input voltage as low as around 3.7v (from the circuit diagram, the Voltage Regulator input voltage is the value in the third column).

Remember that the readings you gave may also be subject to tolerances in your measuring equipment too!


For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
raketenbuggy
Newbie

Joined: 08/02/2014
Location: Germany
Posts: 21
Posted: 09:50am 09 Feb 2014
Copy link to clipboard 
Print this post

Hi Phil,

thanks for your answer. Your summary is absolutly right. And I didn't consider that there's already a voltage drop in the USB cable that is plugged right into the TFT Maximite. It's already about 0.25V which means the cable has about 0.9 Ohms. That's too much in my opinion! So I will try to decrease this loss by using a different (higher-grade) cable. If this doesn't help I will have to use one of the other computers or an additional 5V supply.

If the TFT Maximite is operating right at the boundary when powered via USB, I wonder that I am the only one with this problem.

Best regards,
MichaelEdited by raketenbuggy 2014-02-10
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2817
Posted: 10:43am 09 Feb 2014
Copy link to clipboard 
Print this post

Hi Michael,

Rather than be constrained by the limitations of a USB cable (i.e. a short max length, limited available power, potential borderline supply voltage) why not simply use an external PSU? Or do you have a genuine reason you wish to power the Maximite purely from USB?

I have built several TFT Maximites from scratch based upon the standard circuit diagram but have never powered one via USB. I always use a 9v 550mA dedicated PSU and have never had any problems.

Bear in mind that if you do get it all working from a USB connection, then you may run into issues again as soon as you load any I/O pins with additional power requirements. This can be just a few LEDs for example and your back to needing an external psu.

Let us know how you get on!


Phil
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 12:24pm 09 Feb 2014
Copy link to clipboard 
Print this post

I have to agree with the Wizard here - I only use external PSU's for my MM work, including the MM chip, although in it's case, it will be perfectly happy being powered from the USB, as it's current requirements are much less.

However, the Mono MM or the colour MM are a bit more thirsty, and voltage-drop starts to be a real issue. That is not to say that you CAN'T run it from USB, but I simply prefer the external power pack, and then you don't have any problems.
Smoke makes things work. When the smoke gets out, it stops!
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 07:35pm 09 Feb 2014
Copy link to clipboard 
Print this post

This also means that without the diode(D4) four of the five cases would work.
It seems that 4.53 is the lowest voltage that works.

I maintain that having a diode, however small the voltage drop is, does not belong on a USB powered device. USB voltages are already on the minimum, you not even want to drop 0.1v and certainly not 0.2-0.3.

There is no need for reverse polarity protection and when it is designed for simple dual power just use a SPDT switch or a three pin header with a power select jumper.



Microblocks. Build with logic.
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2817
Posted: 08:17pm 09 Feb 2014
Copy link to clipboard 
Print this post

Hi,

  TZAdvantage said   This also means that without the diode(D4) four of the five cases would work.
It seems that 4.53 is the lowest voltage that works.
But the diode is only protecting the regulator that in turn supplies the circuit with 3v3.

  TZAdvantage said   I maintain that having a diode, however small the voltage drop is, does not belong on a USB powered device. USB voltages are already on the minimum, you not even want to drop 0.1v and certainly not 0.2-0.3.
I agree but the diode isn't affecting USB circuit (I am looking at v1.3 circuit diagram so apologies if this has been modified since!)

Regards,

Phil
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 10:12pm 09 Feb 2014
Copy link to clipboard 
Print this post

There seems to be a correlation between the 5v rail and if usb communication is working or not.
that 5v rail is after the diode although i agree it should not really matter.
The 3.3v should not be affected and is according to measurements always correct as is to be expected as 3.7v is enough to get the regulator doing its job.
Deducting from that it looks like the 5v rail having a too low voltage is one of the symptoms of the problem in this specific case.
The reason why a lower voltage on the 5v rail is causing usb communications problem is however not clear.
Maybe a scope can help find the problem, the regulator could be having a unstable output, something that can not be seen on a multimeter.

Another observation is that on the Vcc5 net there is a 100uF(C7) and a 22uF(C20) capacitor. This can cause problems for USB as its specification allows a maximum of 10uF to prevent a large inrush current.
The values now add up to 12 times the maximum capacitance.
There are others 100uF(C11), 22uF(C1), 4.7(C4) and 4.7(C12) that add another 131.4uF capacitance. Add to that the LCD which probably also has capacitance and you are looking at around 25 times maximum capacitance.
If this much capacitance is needed then using a chip that controls the inrush current and supervisors the power/voltage would be better.
This could also influence the delivered power by the USB giving only 100mA instead of the 500mA that is needed for this circuit.
Also there is a tps61041 that boosts the voltage for the backlight that can introduce noise that can influence the working of the PIC and disturb the signals on D+ and D-.


Edited by TZAdvantage 2014-02-11
Microblocks. Build with logic.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3805
Posted: 06:28am 10 Feb 2014
Copy link to clipboard 
Print this post

I am under the impression that min USB voltage is 4.4V

John
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2817
Posted: 08:16am 10 Feb 2014
Copy link to clipboard 
Print this post

From endless USB projects I have built, I always use the general 'rule of thumb' when unusual and/or unexpected behaviour is observed:

- If the measured voltage on Vusb is ABOVE 4.75v while powering the required device (i.e. MaxiMite) then the issue is 99% likely to be with the device itself

- If the measured voltage on Vusb is BELOW 4.75v while powering the required device then you need to sort out the power source to ensure Vusb is above 4.75v before wasting lots of time searching for potentially non-existant issues. Resolving Vusb to be above 4.75v then fixes the issue 99% of the time.

Note: If you measure Vusb close to 4.75v (i.e. 4.76v) then you need to clearly understand the tolerances of your equipment otherwise you can waste a lot of time searching in the wrong place!

Also you need to understand if your issue could be software related. In the case of the MaxiMite this is unlikely due to all the people successfully using it on USB.

Moral of this story - always use a powered active hub OR preferably an external power supply to the device.

For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
raketenbuggy
Newbie

Joined: 08/02/2014
Location: Germany
Posts: 21
Posted: 11:21am 10 Feb 2014
Copy link to clipboard 
Print this post

  WhiteWizzard said  Rather than be constrained by the limitations of a USB cable (i.e. a short max length, limited available power, potential borderline supply voltage) why not simply use an external PSU? Or do you have a genuine reason you wish to power the Maximite purely from USB?


Hi Phil,

the only reason for me not to use an external PSU is that I do not want to have another cable lying around with another wallwart clogging another socket. And that only for programing the Maximite.

For "normal operation" I will use a PSU or a rechargeable battery pack.

Today I tried an active USB hub and I got USB communication running with all computers. I had 4.91V on the 5V rail because the hub has an output of about 5.15V.

So in the future I'm free to choose if I
- take the USB only for power and do the programming with a PS/2 keyboard
- use only ceratain computers
- use an active hub
- use an additional power supply
- write the programs completely offline

Best regards,
Michael
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024