Pic Ammeter


Closed Thread
Results 1 to 15 of 15

Thread: Pic Ammeter

  1. #1
    Join Date
    Jul 2005
    Posts
    93

    Default Pic Ammeter

    I'm interested to know how much current my project consumes... is it possible to rig one of my other anolog inputs with some kind of shunt and opamp to do just this? can someone post a schematic?

  2. #2
    Join Date
    Jul 2005
    Posts
    93


    Did you find this post helpful? Yes | No

    Exclamation

    specifically I'd like to monitor the total current consumed of the 12v source, i'm already monitoring the voltage of the 12v source using a voltage divider and my pic's a/d module

    Can somebody post a configuration for me to get the current consumption data? ... PIC16F872, 12v's wants to meter power into 7805, also if this is "easy" i wouldnt mind metering the current in from my solar cells which are connected... so i get Current in and out...

    thanks please tell me how or point me to a working example (i've googled.. but nothing helpful besides the info i need a shunt and op amp)

  3. #3
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237


    Did you find this post helpful? Yes | No

    Post

    Maxim have several "current sensors", one that springs to mind is MAX4172.

  4. #4
    Join Date
    Aug 2004
    Posts
    34


    Did you find this post helpful? Yes | No

    Default

    @rytech,
    I have made similar system by using a pic. I explain you how it can be done.
    The components;
    1 pce. LM358 opamp
    2 pcs. res. 1K 1/8 watt
    1 pce res. 0R1 (0,1 Ohm) 5 watt or bigger.
    1 pce. res. 6k8 1/8 watt.
    1 pce variable trimpot 4k7

    The schema can be loaded from following link.

    http://rapidshare.de/files/10143993/ampoku.EMF.html

    The output of the LM358 will be connected to ADC input of the pic.
    The max. current which is the total capacity of your power supply, will be regulated by 4K7 trimpot. This circuit is arranged for measuring max. 5A current.
    You can connect one ammeter serially to the circuit and connect also one current source (can be one auto-lamp) and regulate the total current by trimpot.

    ERO

  5. #5
    Join Date
    Jul 2005
    Posts
    93


    Did you find this post helpful? Yes | No

    Default

    Thanks for your prompt suggestions, i will investigate both options and post if any trouble in implementation.

  6. #6
    Join Date
    Jul 2005
    Posts
    93


    Did you find this post helpful? Yes | No

    Default Schematic for max4172 to pic 16F872

    I've obtained several max4172 SOIC IC's. Could somebody help me get started with the current sense of my 12v source. The mesurable range should be between 0 and 1 amp (lets start with just metering the logic part of my project).

    I will be using the 2nd A/D channel on my pic as the first is used to sense battery voltage.

    what i need is a schematic with some explanations, the datasheet seems compllicated and doesnt explain how to interface to the pic.

    Thanks

  7. #7
    Join Date
    Aug 2005
    Location
    Houston, TX
    Posts
    43


    Did you find this post helpful? Yes | No

    Default Ammeter

    If you just want to measure the current, get 1% .1, 1 and 10 ohm precision resistors, put them in the circuit one at a time, and measure the voltage drop.

    If you want a permament meter, use the .1 ohm, and get one of the cheap volt meters which run on a 9v battery. Set it accross the resistor, and set it to one of the low ranges.

    Resistors are available from Mouser 71-RS5-.1 etc. I think Circuit Specialists has the best deal on Meters.

    Good luck

  8. #8
    Join Date
    Jul 2005
    Posts
    93


    Did you find this post helpful? Yes | No

    Default

    can i get some more help interfacing the max4172 ic's... i'm having a hard time with figuring out what resistor values to use in my circuit

    the input source voltage is 5v's the ammeter should be able to monitor between 0 and 2 amps.

  9. #9
    Join Date
    Oct 2006
    Location
    WEST VIRGINIA, USA
    Posts
    5


    Did you find this post helpful? Yes | No

    Thumbs up max4172 example

    THIS CIRCUIT SHOULD DO WHAT YOU WANT. NOTICE THE INACCURACIES BELOW 40-50mA LOAD CURRENT. THIS COULD BE COMPENSATED FOR, BUT WOULD ALLOW LESS VOLTAGE FOR THE LOAD.






    http://rapidshare.com/files/312322/MAX4172_EX.TIF

  10. #10
    Join Date
    Jul 2010
    Posts
    4


    Did you find this post helpful? Yes | No

    Default ammeter using pic

    hi ero
    i see ur reply on pic ammeter page

    The schema can be loaded from following link.

    http://rapidshare.de/files/10143993/ampoku.EMF.html

    but this link is dead nw
    can u provide the new link please or any one can provide who have this schmetic

  11. #11
    Join Date
    Aug 2004
    Posts
    34


    Did you find this post helpful? Yes | No

    Default Ampoku (amper-reading)

    I do not remember what was in the file but I collected some of similar files which I had worked before . Pls. check the file in following link. I hope it helps you.

    Ero

    http://www.4shared.com/file/2cBbcmL7/ampoku.html

  12. #12
    Join Date
    Jul 2010
    Posts
    4


    Did you find this post helpful? Yes | No

    Default pic ammeter

    thank u so so much it solve my problem greatly

  13. #13
    Join Date
    Jul 2010
    Posts
    4


    Did you find this post helpful? Yes | No

    Default pic ammeter

    @ ero
    it work gud for me but can u tell or provide some calculations for resistors that how u choose these values becoz i also spent one week to use op amp LM358 as a non inverting amplifier with its gain almost 500. but its behavior was non linear but in ur case its behaviour is linear
    kindly tell me about calculations it will be useful for me in future designing

  14. #14
    Join Date
    Aug 2004
    Posts
    34


    Did you find this post helpful? Yes | No

    Default calculation

    Dear Majoka,

    Normally I do not make a lot of calculation in that cases. I use simulator (isis) and I change the resistance value until I find the right output. If you need to make the calculation here are the formulas which I use time by time for rough figures.
    In order to findout (Vin ) voltage I use V=I*R which is basic Ohm rule.
    For instance one of our cases I had use the current resistor 0,05 Ohm and it has created about 5 Amp. current on the entrance of the circuit.
    V=0,05 x 5 A=0,25 V. Using this figure on Opm-amp formula ;
    Voutput= Vin *(1+Rgain/Rin)
    Vo=0,25 *(1+19K/1K)=0,25 * 20K = 5V and the circuit produce 5V which is right voltage for Pic measuring.

    If you look the case from opposite side you need 5V on the output and you need to find the value of Gain-resistor. You put the values to the formula and you pull and find the value of Gain resistor from same formula.
    5V=0,25V (1+Rg/1k)
    5V=0,25 * (1+Rg)
    5V=0,25+0,25 Rg
    Rg=(5-0,25)/0,25 = 19K

    İt is better to use one fixed resistor and serially one variable resistor all the time. The value of the variable resistor must be as much as small in order to make a precision regulation.

    I have to tell you I am an amateur not electronic educated person. But I read a lot about the electronic.
    Rgds
    Ero

  15. #15
    Join Date
    Jul 2010
    Posts
    4


    Did you find this post helpful? Yes | No

    Default pic ammeter

    thank u so much ero i also use isis but i was doing a mistake that my input was too low as compare to your case i was multiplaying a 0.02m volt to gain then 0.04 ,0.06 and so that why its behaviour was non linear becoz op amp can not significant difference at output for such low input
    even i use same formulas for calculation
    i adjust Rf=1k ,Ri=1k nw according to formula
    Vout=vin*(1+(Rf/Rin))
    vout=0.02mv*2=0.04mv
    nw i was expecting to 0.04 but it was the limitation of the op amp nw i understand
    thank u again dear i understand it

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  2. Replies: 67
    Last Post: - 8th December 2009, 02:27
  3. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 14:46
  4. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

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