Hi Jan
Yes, if it is a host, it will power up the Meter (device / slave).
However, if a flash drive is attached, the power will need to be supplied by the Meter (Host). In that case, should the Meter not initiate the enumeration request? Since I think the flash drive itself cannot initiate any request (I assume).
but I think I shall know more once I study your books further and understand the whole process of enumeration etc and who should send the first command, host or device.
In addition, I have a problem in the Meter powering up VBUS when acting as a host.
I cannot supply more than 100mA current since the power supply in the Meter is small size due to very compact size of the Meter.
I tested some Pen drives that I have collected over the years by inserting them into a Windows PC and measuring the current drawn by using Device Manager and examining the Power Tab of the properites of the USB Generic hub.
Most, except on Data Traveler 8GB flash drive showed 200 or more mA. The Data Traveler one showed 100mA but similar other Data Traveler flash drives, including a 1GB once show more current.
I don't know if this method of measuring power (really load on the USB port is correct or not. It may be just reading this data from the file read from the flash drive and displaying that value.
I have ordered a device that measures the voltage and current drawn by a device. Hope this will help.
I have also asked a question to Kingston and San Disk if they can supply a USB 2.0 flash drive that would draw 100ma or less, like an HID device.
Kingston have replied NO. San Disk have not yet replied.
In the mean time I got an idea:
What if I attached an 'externally powered' flash drive to the OTG port by using A plug?
I believe there are Y type OTG cables and other combination cable where on cable supplies power and the other supplies Data.
I could then supply power to the VBUS line from say a Power Pack used for charging the mobile phone and connect the D+, D- lines to the OTG socket on the Meter.
This way, VBUS and GND will always have power supplied by the Power pack. I then don't have to power up the VBUS line from the Meter.
In this case, the power from the Power pack will power up and 'wake up' the Meter when voltage input to it is absent.
I was thinking of doing this to power up the Meter in such cases to enable the user to read the data in the Meter on the screen.
However, if I use this solution of plugging in externally powered flash drive, then there should be no need for the Meter to supply power.
In fact then in case of any of the three ways, VBUS line will be powered up by:
External Power pack, Powered Flash drive or a host (PC, Laptop or a mobile phone).
My meter would not need more than 50mA. So, even an OTG port on a mobile can address it as a device.
Then, I do not have to add ckt to convert 3.3V bus in the Meter to 5V for USB port.
Just add an LDO to convert VbUS 5V to 3.3V to drive Vdd of the Meter ckt through ORRING diodes.
What is your opinion on the above solution?
Also is it possible if I do the data transfer at Low Speed, would this reduce the current drawn by the USB Pen drive.
the problem is that there are so many makes of Pen drives and their characteristics (and quality) vary quite a lot.
No manufacturer seems to indicate correctly what current it would require: Idle, Read and Write.
Regards