Part Number Hot Search : 
ZC8150 74AC00 4FCT2 S2000 SMBJ17A SI112010 SC102 S2000
Product Description
Full Text Search
 

To Download AN839 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  rev. 1.0 7/14 copyright ? 2014 by silicon laboratories AN839 AN839 novel current-sense measurement with automatic offset correction operates at 0.8 v and runs on a fe w microamps and is accurate to 1 a 1. introduction pairing a simple circuit using nanopower analog op amps with a microcontroller can monitor single battery cells and solar harvesters. pairing up a 0.65 v/1a nanopower op amp with the low-power cypress psoc3 microcontroller and some simple external circuitry can yield a very low current measurement system, suitable for monitoring miniature power harvesting solar cells or a single-cell battery. the circuit operates on a few microamps at 1.8 v; optionally, the whole circuit can be self-powered from the source being measured. the op amps operate from voltages as low as 0.65 v and are connected directly to the cells ; the psoc3 microcontroller utilizes an internal boost regulator which operates from sources as low as 0.5 v. figure 1. current-sense amplifier with input offset voltage correction the current sense amplifier is shown in figure 1. the anal og portion of the circuit operates from as low as 0.65v and draws 860na at no load. the circuit provides a 0-500m v output for measured currents of 0-100a, though the scale can be adjusted by changing the values of a few re sistors. with its extremely low power, the circuit can simply remain ?always on,? providin g a continuously monitored, averaged indication of current. the cy8c38 subsequently reads the value periodically, remain ing in sleep mode and consuming less than 8 a. the analog circuit features the ts1001, a nanopower op amp capable of supply voltage operation to 0.65v configured to servo p-channel mosfet q1 in a current source configuration. the current source, draws current through r1 to compensate for the voltage drop across r2 caused by th e current flow from the in terminal to the load. resistor r3 converts the current to a voltage and c1 pr ovides filtering. the filteri ng is critical in allowing the current sense amplifier to continuously provide an avera ged current output, enabling the microcontroller to sleep for long periods and save power, waking only periodically to read this mean current level.
AN839 2 rev. 1.0 the accuracy of the circuit is extremely good and is genera lly limited only by the accuracy of the resistors used. 1% resistors yielded an error of no more than 1 a. op amp input offset voltages need to be considered carefully in this circuit. the ts1001 op amp is specified with +/ -3mv maximum input offset voltage at 25oc, which correspo nds to +/-3ma of error. another consideration is that q1 exhibits drain-source leakage current of a few 10s of nanoamps at 25c, but this can approach 1a over the commercial temperature range. since the current through q1 is effectively controlled by the op amp loop; therefore, any drain-source leakage from q1 appears as a current floor and this generates a corresponding minimum voltage output across r3 below which current cannot be measured until the op amp ?takes over? at higher measured currents. therefore, normal methods of remo ving the current sense amplifier offset by subtracting the zero-load voltage at v_iload will not work, since the offset voltage due to the op amp?s vos and the current floor from q1?s drain-source leakage cannot be separated. therefore, the of fset correction scheme utilizing q1 and r7 is im plemented. amplif ier input offset voltage may be calibrated out using the principal of making two measuremen ts of the same parameter at the two gain settings. the offset voltage then can be found as: where viload_g1 and viload_g2 are the measurements made with low range and high range mode, respectively, and where: in this case, rg1 = 500 and rg2 = 100, effectively providing two scales of 100 a and 500 a full scale, respectively. the cy8c38 microcontroller code for offs et-voltage-corrected current -sense amplifier follows: current used by cypress cy8c38 current used by the current sense amplifier 8a (average, polling) 860 na /******************************************************************************* * file name: main.c * * version: 1.0 * * description: * this is source code for the current sense amplifier * * *******************************************************************************/ #include #include /******************************************************************************* * function name: main ******************************************************************************** * target device: * cy8c38 processor * *******************************************************************************/ void main() { int32 adcresult; float iin; float iin_corrected; char outputstring[32];
AN839 rev. 1.0 3 float offset; int16 offsetcounter; offsetcounter= (int16) 0; offset= (float) 0; led_p1_2_write(0xffu); // indicates active mode. remove led for icc. gainswitch_p1_6_write(0xffu); // gainswitch to mode 1 cyglobalintenable; // global interrupts //lcd_start(); // start components (lcd optional) isr_start(); adc_start(); sleeptimer_start(); // sleep timer params set in the gui for(;;) { adc_startconvert(); // make a conversion and wait while (adc_isendconversion(adc_return_status) == 0) {} adcresult = adc_countsto_mvolts(adc_getresult32()); // math iin= (float) adcresult/5 ; // units microamps iin_corrected= (float) iin - offset; // optional lcd display /* sprintf(outputstring, "%5.3f",iin_corrected); // 300usecs lcd_position(0,0); // write to l cd; 700usecs lcd_printstring("i load="); lcd_position(0,8); lcd_printstring(outputstring); */ adc_stopconvert(); if (offsetcounter==32) { if ((iin> 50) && (iin<100)) { gainswitch_p1_6_write(0x00u); // switch gain to m ode 2 cydelay(50u); // delay adc_startconvert(); // make a conversio n and wait while (adc_isendconversion(adc_return_status) == 0) {} adcresult = adc_countsto_mvolts(adc_getresult32()); offset= (float) adcresult/5*1.25 - iin*0.25; // optional lcd display /* lcd_position(1,0); lcd_printstring("offset= "); sprintf(outputstring, "%5.3f",offset); lcd_position(1,8); lcd_printstring(outputstring); */ offsetcounter= (int16) 0; adc_stopconvert(); gainswitch_p1_6_write(0xffu); // switch gain to m ode 1 } else {} } else offsetcounter= (int16) offsetcounter+1; adc_sleep(); led_p1_2_write(0x00u); // led off for sleep mode. cypmsaveclocks(); // sleep mode cypmsleep(pm_sleep_time_none, pm_sleep_src_ctw); cypmreadstatus(cy_pm_ctw_int); cypmrestoreclocks(); // wake up adc_wakeup(); } } /* [] end of file */
AN839 4 rev. 1.0 figure 2. lab setup for offset-voltage-corrected current-sense amplifier using the ts1001 and the cy8c38 psoc3 microcontroller figure 2 shows the lab setup. the measured current is shown to match accurately the current estimated by the current sense measurement system. the oscilloscope sh ows wake periods approxim ately every 600 msec, with the offset cal period shown by the green trace (the gate voltage of q1). see the documentation for the ts1001 op amp and cy8c38 psoc3 microcontroller. for additional information, contact silicon labs.
AN839 rev. 1.0 5 c ontact i nformation silicon laboratories inc. 400 west cesar chavez austin, tx 78701 tel: 1+(512) 416-8500 fax: 1+(512) 416-9669 toll free: 1+(877) 444-3032 please visit the silicon labs technical support web page: https://www.siliconlabs.com/support/pages/contacttechnicalsupport.aspx and register to submit a technical support request. patent notice silicon labs invests in research and development to help our cust omers differentiate in the market with innovative low-power, s mall size, analog- intensive mixed-signal soluti ons. silicon labs' extensive patent portfolio is a testament to our unique approach and world-clas s engineering team. silicon laboratories and silicon labs are trademarks of silicon laboratories inc. other products or brandnames mentioned herein are trademarks or registered trademarks of their respective holders. the information in this document is believed to be accurate in all respects at the time of publ ication but is subject to change without notice. silicon laboratories assumes no responsibili ty for errors and omissions, and disclaim s responsibility for any consequences resu lting from the use of information included herein. additionally, silicon laboratories assumes no responsibility for the functioning of und escribed fea- tures or parameters. silicon laboratories reserves the right to make changes without further notice. silicon laboratories makes no warran- ty, representation or guarantee regarding t he suitability of its products for any par ticular purpose, nor does silicon laborato ries assume any liability arising out of the application or use of any product or circuit, and specif ically disclaims any and all liability, in cluding without limitation consequential or incidental damages . silicon laboratories products are not designed, intended, or authorized for use in applica tions intend- ed to support or sustain life, or for any other application in which the failure of the silicon laboratories product could crea te a situation where personal injury or death may occur. should buyer purchase or us e silicon laboratories products for any such unintended or unaut horized application, buyer shall indemnify and hold silicon laboratories harmle ss against all claims and damages.


▲Up To Search▲   

 
Price & Availability of AN839

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X