​ ​ ​ ​ Minimising cuurent draw
Results 1 to 6 of 6

Thread: Minimising cuurent draw

  1. #1
    New Member
    Join Date
    Feb 2014
    Location
    Perth, Western Australia
    Posts
    5

    Default Minimising cuurent draw

    Hi. I have a project in development that consists of an 08M2 & an 18M2. The 08M2 manages a DS3231 RTC & the 18 has a number of analogue & digital inputs. I have tried researching the PIC datasheets, but the quoted electrical characteristics do not include minimum input current requirements. e.g. for the voltage divider to measure the battery voltage, I am currently using a 3k and 500 ohm resistor ladder. Theoretically that gives me 1.714V at the tap, with a 12V supply. The current in the ladder is (theoretically) 3.42mA. I would like to reduce the current in this (& all other analogue inputs. If I scale the ladder by a factor of 100, i.e 300K & 50K, the voltage drops 0.93V. This tells me the input is drawing more current than the ladder can supply. Does anyone know what the minimum current is that is required by an analogue input on an 18M2. Thanks

  2. #2
    Technical Support
    Join Date
    Jan 1970
    Location
    UK
    Posts
    24,346

    Default

    The maximum input impedance for an ADC source is usually stated at about 10K. Adding a small capacitor on the input pin to 0V can extend that, and undertaking multiple consecutive READADC commands can help compensate for the ADC sample and hold capacitor not fully charging the first time.

    If you want high resistance low-current drain on the battery while still being able to directly drive a PICAXE input you could likely achieve that with an op-amp.

  3. #3
    New Member
    Join Date
    Feb 2014
    Location
    Perth, Western Australia
    Posts
    5

    Default

    Thanks hippy. I guessed the input impedance was pretty low. I'm already using the cap & multiple reads. I'll play with the op-amp suggestion, but I don't think there will be much overall reduction in current draw. May have to beef up the battery. Anyway, thanks again.

  4. #4
    Technical Support
    Join Date
    Jan 1970
    Location
    UK
    Posts
    24,346

    Default

    You could always add a relay so you can disconnect the battery from the ADC input; zero current draw when not enabled.

    There is probably a solid-state solution which someone with more analogue experience than me may be able to help with.

  5. #5
    Senior Member
    Join Date
    Feb 2012
    Location
    London
    Posts
    2,872

    Default

    Hi,

    Quote Originally Posted by tonymillar View Post
    Thanks hippy. I guessed the input impedance was pretty low.
    The input impedance is actually very high, but the ADC takes a brief "gulp" of current which is why a (non-electrolytic) capacitor from the ADC input to ground is suggested. It is the source resistance that is recommended to be no higher than 10k (unless a capacitor is fitted) so you could use a divider of (say) 62k + 10k to give about 1.7 volts input to the ADC.

    But do you need 0.1% resolution? For example you could use a 560k + 10k divider with FVR_2048 as the internal reference, which will drain only about 20 uA from 12 volts and still give 1% resolution, even with a single READADC10 (i.e. an integer value of around 100). You'd need to choose quite a good CMOS Op-Amp in a unity gain configuration to do much better than that (and have you checked for all other sources of unwanted current drain, such as the voltage regulator?).

    Cheers, Alan.

  6. #6

    Default

    Hi tonymillar,
    really you should be able to get resonable results with a 300k/50k divider but full scale voltage is only 14.3v
    the adc pin should not load this result at all ,so look for a problem there maybe try another pin.

    shortly when i get on with a project myself lol, i will proberly use a 180k/20k divider giving 20v fullscale .02 resolution steps.
    may need some software filtering but just displaying 0.1 steps so shouldn't be that noticable.
    usually when you get a pack of 10 resistors of each, you can usually match 3 accurate sets with your ohm meter
    because this divider is a 10 to 1 ratio 12.9v you will be able to measure 1.29 volts across the 20k resistor makes checking easy.
    Code:
    #picaxe 18M2
    #terminal 19200
    SETFREQ M16
    SYMBOL ADCvalue      = W3 : SYMBOL Decimal      = W3
    SYMBOL Volts         = W4
    
    Main:
    FVRsetup FVR2048      ' internal Fixed Voltage Reference 2.048V
    ADCconfig   %011        ' VRef- is 0V ,  VRef+ is FVR
        
    ReadADC10  C.0,ADCvalue
     ReadADC10 C.0,Volts
     IF ADCvalue = Volts THEN ConvertV ' display equal ADCvalues
    GOTO main
    
    ConvertV:
     Volts = Volts *14         ' Multiply by Vin (Fullscale 14.3v)(R1 300K)(R2 50K)  014 resolution
     'Volts = Volts *20           ' Multiply by Vin (Fullscale 20v)(R1 180K)(R2 20K)  020 resolution   0.47uf
    
    'Displaytest:
    Sertxd (13,10,"ADCvalue ",#ADCvalue,"    ",#Volts)' 
    
      DisplayV:
      Decimal = Volts //1000/100
      Volts = Volts /1000 
      Sertxd ("    ",#Volts,".",#Decimal," Volts")  ' 0.1 resolution
      
    PAUSE 4000
    
    GOTO main

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •