ammeter with the pic16f876A


Closed Thread
Results 1 to 10 of 10
  1. #1

    Default ammeter with the pic16f876A

    i want built a ammeter with the analogic ports of the pic16f876A,i found this schematic from a commercial kit but i dont know how it work,somebody can help me?
    Attached Images Attached Images  

  2. #2
    Join Date
    Nov 2005
    Posts
    51


    Did you find this post helpful? Yes | No

    Default

    I've had a quick look at it and basically the op-amp is acting has an amplifier, the voltage drop across the resistor is only milli-volts and the pic will not see this hence the op-amp.

    example: say it was in a power supply and it had a load of 5amps then the voltage drop across the resistor was 120MV then op-amp would say have a gain of say 10 so you times the .120Mv by 10 and this would give you an output voltage of 1.2V you then scale it in your software so your display reads 5amps.

    the other part for reading the voltage is not the best way the zener diode can cause problems with readings. The best way is similar to other part of the op-amp but this time has divider, so if you put 25 volts in you divide it by 10 and the output to the PIC is 2.5V same thing again you scale it to read 25 volts on your display.

    The voltage reading I gave above is only has a sample I have not gone that far into detail working out the calculations but it should give you a rough idea how it works

    You can do a search on op-amps set up has amplifier or divider, the pots on there are used has a calibration part or you can use it so that the output voltage never exceeds 5 volts

    Hope that helps

  3. #3
    Join Date
    Jun 2007
    Location
    Merango, IL
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Someone please correct me if I'm wrong on any of this.

    Your ammeter is used to measure electric current flowing through a circuit. This can be done a lot of different ways. The way your schematic is set up is using a shunt to provide an very small voltage drop which you can measure. A shunt is just a very low resistance resistor with a high power level as all of the current to your outside system has to flow through this. You want to pick a very small resistor (Typically 0.01 ohms) so you ensure the drop is small enough to not take away power from anything you are trying to run. Now you have to read the drop across this known resistance. Typically the drop is very small, in the mV range. That is why you see operational amplifier on the output of the shunt otherwise your pic will never be able to read the voltage. All of these parts really depend the upper limit you are trying to read current to, but the sch you have should work out ok.

    Wiring it up-

    +Vin/Vout is the plus side of the power supply
    -Vin is the negative terminal from the extrnal item you are trying to read current from
    -Vout is the negative termial of the power supply

    It looks this the schematic you are using is also used measure the voltage, which is maybe what "tensione" means. I agree with chuck on the voltage reading though, as those zeners get closer to thier max voltage the output becomes less linear giving you a not so perfect reading. I didn't actually go through all of the circuit and figure out each of the points, but this is a typical design for reading current. They do have IC's now that you can place over a trace or run the current through that do everything for you. Maybe look at those if it's low currents your looking for. I hope this helps.

    Anthony

  4. #4
    Join Date
    Jul 2005
    Posts
    93


    Did you find this post helpful? Yes | No

    Default PIC A/D Current reading..

    I've used a Maxim 4172 to read various ranges of current. This IC uses a sense resistor to measure various ranges of current.

  5. #5
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Default

    This does not appear to me to be a conventional metering circuit; it looks instead like a monitor for device voltage and current. U2 likely provides a reference voltage (it's a 3-terminal device, though, but is not used in any typical configuration).

    I suspect that the two variable resistors are used to calibrate the circuit, and the zener diode (DZ1) provides overvoltage protection on RA0.

    If you seek only to measure current, there are simpler circuits.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Talking

    Hi,

    All details can be found here :

    http://www.gpekit.com/pdf/mk3980.pdf

    This is lots easier to understand how it works !!! ... an if reading Italian, ... The Nirvanna

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7


    Did you find this post helpful? Yes | No

    Default

    and what is the easier way to measure the current with the analogic ports of the 16f876?

  8. #8
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Question

    Quote Originally Posted by lutherblisset View Post
    and what is the easier way to measure the current with the analogic ports of the 16f876?
    You have the whole schematics ... and the kit explanations.

    What further do you need ??? the program for free ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  9. #9
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Cool

    Where is the problem ?

    1. You must know the maximum current.
    2. You can choose your shunt (don't forget the heat!!!!)
    3. You use a OPAMP as an amplifier for the voltage to maximum 5V for maximum current trough the shunt. I use an LT1490 (rail-to-rail) for 5V-supply and good quality.
    4. Measure the voltage !
    (I use the lm385-2.5 as a reference. I measure the voltage of one port an the voltage of a port with the lm385 on it to calculate the correct voltage, because the supply-voltage may be incorrect or spread widely. The normal 7805 is worse, I use a 78M05CDT instead.)
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

  10. #10


    Did you find this post helpful? Yes | No

    Default

    can be the INA138 a good idea instead of the operational?it is a "High-Side Measurement Current Shunt Monitor, Current Output",it directly convert voltage to current

Similar Threads

  1. A2D issues on PIC16F876A
    By earltyso in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 31st July 2008, 14:06
  2. Bit Banging input to output on PIC16F876A
    By Bronurstomp in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 26th June 2008, 19:50
  3. Runing a PIc16F876A
    By lerameur in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 7th January 2007, 12:54
  4. PLEASE HELP ME! pic16f876a and AD tlc4541
    By luca_sheva in forum mel PIC BASIC
    Replies: 1
    Last Post: - 1st February 2005, 17:32
  5. how to get PCF8574 and PIC16F876A work together
    By nomada in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th December 2004, 02:07

Members who have read this thread : 0

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