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