MCU ADC and power supply problems

Discussion in 'The Projects Forum' started by gankoji, Jul 11, 2011.

  1. gankoji

    Thread Starter New Member

    Jul 11, 2011
    3
    0
    Hi Everyone!

    I'm brand new here, but so far this forum looks like a great place to find out plenty about electronics, which is great for a newbie like me :). Anyhow, on to business:

    I'm currently working on a project at work, which involves using an ATmega168p microcontroller (which has an on-chip ADC) to read the pressure from a standard Omega PX615 pressure transducer and output the pressure to an LCD. This is part of a larger project where I will use the pressure information as part of a closed-loop feedback control system, in conjuction with a stepper motor and some fancy valves we have here at the shop.

    The problem I've run into while trying to get my sensing loop down is this: I have the transducer set up in a relatively simple circuit. It outputs 4-20ma which varies with pressure. My MCU's ADC needs 0-5v single ended, so I'm using a 33 ohm resistor in series withe the transducer and a INA126P instrumentation amp from TI to amplify the voltage drop across the resistor to a range of about 1.1-4.8VDC. I've already gotten this to work well on it's own, but when combining the MCU and this circuit things get funny. Here's a rough schematic of my circuit so far: http://i1111.photobucket.com/albums/h473/gankoji/IMG_20110702_142208.jpg

    When the amp circuit is working, I'm measuring the right voltage range compared to the reference pin on the amp. However, the ADC is getting very strange values when the sensing output is connected and MCU is running. I've tried connecting the amp's reference to MCU ground, and that gave me a really wonky output where it was stuck at about 220mv regardless of pressure. The output also changes when I connect the amp reference to the sensing circuit ground, or to the amp's PS ground. This tells me I have vastly different ground voltages and I suspect that's the big problem here.

    So here's the question: How do I go about fixing the problem of grounding these separate circuits? I have three different voltages into the circuit: 12VDC for the transducer (limited by common mode input of the amplifier), ~18 VDC for the amplifier (actually two 9v batteries in series), and 5VDC for the MCU (which currently is being supplied by a USB port on my PC). I know there are issues to be dealt with when combining digital circuits and analog circuits, especially with keeping their power rails separate, but to be honest I'm not really educated on the subject. Can any of you guys at least point me in the right direction? I'd much appreciate it. Thanks!
     
  2. gankoji

    Thread Starter New Member

    Jul 11, 2011
    3
    0
    I realized I left out something that might be really important here: each portion of the circuit is connected to positive and negative of it's respective power supply. I don't have a grounding tab or anything of the sort where things can actually be connected there. Maybe this is the big issue?
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Just something important that you don't show on your schematic:
    Your INA126 supply is two 9v batteries, which is OK, but...
    Do you have the negative of the +V supply connected to the ground pin, and the positive of the -V supply also connected to the ground pin?

    Are you using bypass capacitors between the GND pin and -V, and GND and +V?

    You're using separate supplies. That could be a big problem, as you can wind up with a "ground loop" through the building wiring. Even though they are electrically connected, you can get inductive coupling from other wires running in parallel with the ground.
     
  4. gankoji

    Thread Starter New Member

    Jul 11, 2011
    3
    0
    The 18v applied to the INA126 is wired as such: Battery 1 - : Vs(-) on INA126P. Batt 1 +: Batt 2 -. Batt 2 + : Vs(+) on INA126p.
     
Loading...