monitoring milliamps with 16f877


Closed Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2008
    Location
    Pennsylvania
    Posts
    113

    Default monitoring milliamps with 16f877

    Can anyone tell me if it's possible to monitor the ma output of a pressure transducer or any other sensor for that matter. I'm working on replacing my older style electromechanical well controls and controlling them via a pic and heavy duty 220amp relays. I have 2 wells and they don't always stay in sync.

    I have access to a cheap pressure transducer 0-150psi and the output is 4 to 20ma. I can get one for a couple of dollars but I didn't see a post anywhere that anyone has written any code or has any example of reading milliamps.

    If anyone has an example I would appreciate it.
    thanks
    David

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Convert to voltage.
    http://www.omega.com/techref/das/4-20ma.html
    Then use the ADC on chip
    http://rentron.com/PICX2.htm
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    Put a resistor from the current supply to ground. Calculate the value so 20mA works out to 5v (or your PIC operating voltage). This will work for a hobbyist ... if you need high "product"quality, then use an op amp to buffer it.

  4. #4
    Join Date
    Jan 2008
    Location
    Pennsylvania
    Posts
    113


    Did you find this post helpful? Yes | No

    Default Thanks for the help

    Thank you for the great examples and links I appreciate the help this is just what I am looking for.

    David

  5. #5
    Join Date
    Feb 2009
    Location
    Southern California
    Posts
    86


    Did you find this post helpful? Yes | No

    Unhappy Get rid of this guy

    Does anyone have the power/inclination to get rid of this guy from the forum. He has 15 posts so far and of the 6 or 7 I've come across so far not one is related to ... well anything. Maybe he has a real post in here somewhere that I missed, but it seems like he is only trying to get hits to his website. Also, in a related note I've come across the ignore user option, does anyone know will this prevent posts from appearing as new if the ignored person is the only one to post a new reply, or will I still be clicking on his quotes just to see his name and
    "This user is on your Ignore List."?

    As for the 4-20 ma converter. I've been wanting to try this for a while, does anyone know if I use a 1% resistor as suggested and an op amp, is this pretty much commercial ready or is there a lot of other supporting circuitry. We occasionally purchase a 4-20 ma to serial converter for like $280. It works well and has a lot of unused features, but it seems like I could make a good sized batch of them for under 200 and that would be paying more than I should. I I would just hate to hear complaints from the field that there 0 to 60,000 pound application sits at -3 instead of 0.

    David

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


    Did you find this post helpful? Yes | No

    Wink

    Hi, Lucky

    The most upper right symbol on the post border ... ( exclamation mark in a red triangle )

    is the Warning for moderators ... just click it and write " SPAM " or Whatever you want ...

    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
    Join Date
    Jan 2008
    Location
    Pennsylvania
    Posts
    113


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Luckyborg View Post
    Does anyone have the power/inclination to get rid of this guy from the forum. He has 15 posts so far and of the 6 or 7 I've come across so far not one is related to ... well anything. Maybe he has a real post in here somewhere that I missed, but it seems like he is only trying to get hits to his website.
    David
    Are you talking about me?

  8. #8
    Join Date
    Feb 2009
    Location
    Southern California
    Posts
    86


    Did you find this post helpful? Yes | No

    Smile

    No, it was about someone else, it looks like the moderators took care of the person and deleted his posts. Your posts are all valid.

  9. #9
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Wink

    Quote Originally Posted by DavyJones View Post
    Are you talking about me?
    Hi, David

    Keep cool ... this thread ( between others ) was spammed and our moderators have wiped out this junk ...

    "this guy" is , of course, not you : I've counted 15+ spams on the whole forum ...

    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 " !!!
    *****************************************

  10. #10
    Join Date
    Jan 2008
    Location
    Pennsylvania
    Posts
    113


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Hi, David

    Keep cool ... this thread ( between others ) was spammed and our moderators have wiped out this junk ...

    "this guy" is , of course, not you : I've counted 15+ spams on the whole forum ...

    Alain
    hehehe ok sorry about that I thought I was doing something wrong or asking the questions the wrong way. I didn't want to get booted if I wasn't following the rules. The people here are great and I could not have completed one project without them.
    Thanks

Similar Threads

  1. 16f877 and ps/2 keyboard error???
    By boraciner in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th July 2009, 08:14
  2. serial communication between CMUcam and PIC 16F877
    By gengkeys in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th March 2007, 06:43
  3. 4 Quadrant dc drive with 16F877
    By mns45 in forum mel PIC BASIC
    Replies: 2
    Last Post: - 23rd February 2006, 13:05
  4. problem using 16f877
    By yrch in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 20th February 2006, 18:58
  5. Interrupts using a 16F877
    By Niall in forum General
    Replies: 1
    Last Post: - 6th August 2003, 01:33

Members who have read this thread : 1

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

Tags for this Thread

Posting Permissions

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