USB current consumption

USB current consumption

Postby Manoj » Mon May 06, 2019 12:39 pm

Hello. Need your advice again.
I am using pic24fj256gb110 .I am also using a pendrive to store data.
Every thing is working fine. except when I attach the usb, the measured readings from analog pins start to fluctuate.
So I thought addition to the usb is consuming more current than the voltage regulator can provide(i.e. 150 mA).
The entire circuit is consuming 137 mA without usb. And with usb it consumes 170 mA.
So I introduced a 2nd 5v regulator. Two voltage regulators have same battery and same ground.
Then powered the usb socket and Vbus from its output.
I checked ,there are no noise in the supply voltage or system reference voltage.
But the problem still remains.
What should I do?
Manoj
 
Posts: 26
Joined: Mon Apr 09, 2018 8:01 am

Re: USB current consumption

Postby ric » Mon May 06, 2019 9:12 pm

You don't mention what reference voltage you are using, or how your ADC is configured (particularly if you are using enough "acquisition time").
Latest test project, an LED matrix display made from one reel of addressable LEDs. here
User avatar
ric
Verified identity
 
Posts: 475
Joined: Sat May 24, 2014 2:35 pm
Location: Melbourne, Australia
PIC experience: Professional 5+ years with MCHP products

Re: USB current consumption

Postby Manoj » Tue May 07, 2019 5:29 am

+vref= 1.024volt; -veref=gnd;

Measuring code:-

#define AVGCYCLES 1024
ShowMainMast(); //display clock bar

DispL3(0);
Put_String_LCD("Ch1:");

IEC0bits.INT0IE=FALSE; //Disable INT0
SHORTDELAY();
CumRef=0; //
CumQuad=0;
MsrReadings=0;
KEY_PRESSED=0;
PR3=6400; //coresponds to a sampling frequency of 2.5Khz//
MeasureFlag=TRUE;

while (MeasureFlag) //start measuring cycle of 2500 readings..
{
KEY; // to scan if any key is pressed in between
}
Amount1=sqrt(CumRef/AVGCYCLES)*32/ScaleDivider; //print the amount 1

if (KEY_PRESSED==S1)
{
mainstate=MAIN_MENU;
current_option=2;
previous_option=0;
KEY_PRESSED=0;
IEC0bits.INT0IE=TRUE;


sampling:-

if (MeasureFlag)
{
MsrReadings++;
ADC=GETREADINGCH1-BiasValue1;
CumRef+=((float)ADC*(float)ADC);
ADC=GETREADINGCH2-BiasValue2; // bias value is 512 mv dc.it i used to lift the ac signal in the middle of 1.024volt and 0volt
CumQuad+=((float)ADC*(float)ADC);
if (MsrReadings==AVGCYCLES) //takes 1024 readings and then calculate average
{
MeasureFlag=FALSE;
}

}
Manoj
 
Posts: 26
Joined: Mon Apr 09, 2018 8:01 am


Return to USB

Who is online

Users browsing this forum: No registered users and 1 guest