Instrumentation Amplifier and PIC ADC

Status
Not open for further replies.
hi vne,
Look thru these two pdf's about load cell usage.

I had already stumbled across the load cell primer document whilst surfing the interwebs. I suspect that's where I originally read the statement about never cutting a 4-wire load cell cable. The other document was new to me. I'm not sure if I'm interpreting it correctly but can I cut the cable for my 4-wire load cell and then convert it into a 6-wire one by splicing a -Sense line into the +Excitation and +Sense into the -Excitation?

I already did some preliminary digging on interface circuits for 6-wire load cells and that info seems to be less readily available compared to 4-wire interface circuits. I did find 2 ICs with 6-wire interface examples but they look pretty complicated. They were the ADS1232 and AD7192.

If I went that route, I'd likely spend a lot of time learning to use the IC and while I'm not apprehensive about putting in the time to learn something new, the schedule I've been given to finish this project may not allow for that. What a bummer, I was just starting to understand the 4-wire circuit.

Or, maybe I misinterpreted the document and I'm stuck with my 4-wire load cell.

Thoughts?

EDIT: I just found this IC and despite the fact that Digikey want about $300 for one of them, it looks promising. 1B32
 
Last edited:
hi vne,
I dont wish to sound downbeat, but its getting into a very spec project for only a 10bit adc resolution.??

I know that you want to measure 'force', can you say what the project will be used on.?
 
hi vne,
I dont wish to sound downbeat, but its getting into a very spec project for only a 10bit adc resolution.??

I know that you want to measure 'force', can you say what the project will be used on.?


I can't give specifics but basically I'm trying to build a device that will measure forces imparted onto the control stick of an aircraft. The device will be used to push on the control stick until a corresponding control linkage in the aft of the aircraft moves. This test gives a rough idea of how much slop and dead space there is in the mechanical control system. It will also indicate where any adjustments should be made if needed. There are two ranges of force I need the device to operate in. The first range is 0 - 50lbs with ±.1 lb accuracy and the second range is 0 - 5 lbs with ±.05 lb accuracy.

Think I bit off more than I can chew?
 

hi vne,
I understand that you dont wish to disclose a commercial application.
For a 50lbs FSD, thats 50/1023 = ~0.05lbs for the LSB.
So thats roughly ~ +/- 0.1 dither on the display resolution for the LSB.

How many adc samples are you going to take at the 'moment' of measurement.???

As with most jobs, break it down into bite sized chunks...
 
In my micro code I was planning to sample the ADC at 20 Hz and average the 5 most recent measurements. Admittedly, I hadn't given this bit all that much thought yet so that plan may change. I'm also not adverse to using one of them new fancy dsPICs with a 12-bit ADC.

Mmmmmm...bite sized chunks.
 

hi,
Have you seen the datasheet for the MCP3202 dual 12bit adc.? thats if you decide on a 12bit system.
 
hi,
Have you seen the datasheet for the MCP3202 dual 12bit adc.? thats if you decide on a 12bit system.

I haven't spent any appreciable time looking at external ADC ICs but I'll check out the MCP3202. In my mind the digital portion is the easy part. Maybe this is optimistic on my part but I do have more experience with that and more confidence in resolving any issues that may arise. The analog part is what I need hand holding for. I contacted the manufacturer of the load cell about my 4/6-wire conundrum. Maybe I can cut the cable with the right workarounds, maybe not. I'll let you know what they say. Also, I just thought of something. I wonder if there is a reason I can't just apply a correction in the software to make up for the loss of temperature compensation by cutting the cable. One of the ICs I'm using already had a temp sensor built into it.
 
Hello again everyone. I finally got around to sourcing all the parts and have started to put this circuit together. I decided to go with the IN118P instrumentation amplifier and an OPA227 op amp to buffer the reference input of the IN118P. The output from the IN118P will go into an MCP3204 12-bit ADC IC that communicates with the PIC via SPI. The IN118P, OPA227, the VREF input of the MCP3204, and the load cell are all powered by a precision 5V voltage reference, the MAX6143. The rest of the 5V devices (PIC, LCD, VDD of the MCP3204 ADC IC, etc) are powered by a non-precision 5V source, the KF50B.

Anyway, I ran into a problem right away that I can use some help with. I started by setting up a test circuit for the amplifier portion just to check that everything was working correctly. I put the IN118P in a breadboard and connected the inverting, non-inverting, and reference pins to ground. I should mention that this test circuit was powered by a standard 7805 and my bench power supply. There is also a 100nF cap no shown that I placed between V+ and V-. Here’s a schematic:

**broken link removed**

In this configuration, I would have expected the output to be 0V ± any offset. Well, I measured about 35 mV. I have 2 IN118Ps and both of them output the same 35 mV. I also know it's not my multimeter because it reads 0 V when I touch the positive lead to ground.

The data sheet quotes an offset voltage of 50 µV max so I'm not sure why I'm seeing 35 mV. If the 35 mV is just the input offset getting amplified, then I would have expected the output to change when I adjusted the gain pot but nothing happened.

Is there something wrong with my test set up or my understanding of how this circuit is supposed to work? Any guidance you can offer is much appreciated.

Thank you.

P.S. I also attached the most recent schematic of the entire project for reference just in case anyone wants to see it.
 

Attachments

  • Force Meter Circuit.PNG
    254 KB · Views: 333
I think I may have just answered my own question. The datasheet says that the single supply output voltage low is 35 mV. That seems consistent with what I'm measuring. Is the 35 mV because the IN118P is not rail to rail? At least I can't find anywhere in the data sheet that says it is.
 

hi,
I am having a problem getting IN118P datasheet.?

The MCP3204 Vref should be powered by the same +V as the Bridge.
 
Hey Eric. Thanks for your reply.

I am having a problem getting IN118P datasheet.

I'm not sure why, the link is working for me. Regardless, I attached the datasheet to this post. Hope that works.

The MCP3204 Vref should be powered by the same +V as the Bridge.

It will be. The MAX6143 powers the bridge of the load cell, the INA118P, the OP227 and the VREF input of the MCP3204. I haven't put any of that together yet but that's the ultimate plan. Just for testing the INA118P by itself, I am using a 7805 because the MAX6143 is a surface mount device.
 

Attachments

  • INA118.pdf
    387 KB · Views: 286
hi,
I see why I had a problem with the d/s, you posted IN118P, instead of INA118P.

I'll look thru the d/s.

EDIT:
The d/s shows 35mV for Vlow with a single supply.
 

Attachments

  • AAesp05.gif
    19 KB · Views: 217
Last edited:
hi,
I see why I had a problem with the d/s, you posted IN118P, instead of INA118P.

I'll look thru the d/s.

EDIT:
The d/s shows 35mV for Vlow with a single supply.

Yeah, it's starting to make sense now why I got the results I did. Also this excerpt from the paragraph titled "Single Supply Operation" on page 10 basically explains all my problems.

"With single supply operation, VIN+ and VIN- must both be 0.98V above ground for linear operation. You cannot, for instance, connect the inverting input to ground and measure a voltage connected to the non-inverting input."

I feel silly because I'm usually the first one to point people to the datasheet when they ask questions like mine and even sillier yet because I've read this entire datasheet before. I guess that's what happens when you get distracted for a few months.

I'll try a new test setup when I get home tonight and report back. Thanks!
 
So when I got home I threw together another circuit using my new "understanding" of how this thing is supposed to work. The results were promising. I'm much closer to my goal but things still arent working as I would expect. Here is my second test circuit:

**broken link removed**

I'm using R1 and R2 as a voltage divider that sets ~2.5V at the inverting input. Then I adjusted the pot R4 until the voltage at its wiper was ~2.515V. So the ΔV between the inverting and non-inverting inputs is ~15 mV. I checked this with a multimeter.

RG is the gain resistor. According to the data sheet, an RG of 150Ω should set the gain to around 330. With that gain and a 15mV input, the output should be saturated on the high end at about 4.2V. Well, the output was only 3.3V. In fact, if I swapped out RG for a lower value, it had no effect on the output voltage. I even tried a .22Ω power resistor I had laying around but the output didn't budge from 3.3V.

I could only get the output to go above 3.3V by increasing the input voltage differential. With the input differential at around .4V, the output would saturate at 4.2V.

Any ideas what I'm doing wrong or what I should troubleshoot next?

Thanks!
 
hi vne,
The INA118 with a single 5V supply will limit at about 1V to 2V below the 5Vsupply, its also effected by the value of the load resistor R5.
When I use the AD623 [IA] I have the same problem, I get round this by following the IA with a MCP6002 rail to rail OPA, set for a non inverting gain of 2. This means I can adjust the gain of the IA to give a +2.5V max out. I use the other half of the MCP6002 as a buffer amp for the Vref to the IA.
OK.?

EDIT:
Another option would be to use Vref/2 on the MCP3204 and set the IA gain to give +2.5V at max bridge input.

Look at page #4 of the d/s to see the effect on the Vout with different Vbias voltages. ie Common Mode voltage.
 

Attachments

  • AAesp04.gif
    33.3 KB · Views: 193
Last edited:
hi vne,
Look at these sim images.
The 1st is the circuit you posted, gain about 330 with Vref=0
the 2nd is gain ~200 with Vref = 0.5V [ just starting to limit on the output]

Both with a 0 to 15mV input signal swing
 

Attachments

  • OrgVref0.gif
    34.9 KB · Views: 222
  • ModVref500.gif
    34.7 KB · Views: 218

Ah OK. The fog is starting to lift now. I noticed those plots you attached while I was reading the datasheet but in all honesty, I didn't know how to interpret them. Just to make sure I'm understanding them now, the common mode voltage is the voltage at the inputs with respect to the reference pin (in this case ground). Is that correct? So in my latest circuit, the common mode voltage would be about 2.5V, correct? If that is the case, couldn't I just add an additional series resistor between the bridge and ground to bump the common mode voltage coming from the bridge and gain a little more output voltage from the INA118P?

I also like your suggestion of using half the supply voltage at the VREF pin of the MCP3204. I have some 1KΩ/1% resistors that should do a pretty good job unless you think there is a better way to tackle that.

I was aware of output current effect on output voltage swing. That plot is on page 6. To minimize this effect, I was planning on buffering the output of the INA118P with an MCP6002 (your favorite) before going into the MCP3204. I happen to have quite a few MCP6002s around because I belive you suggested them to me some time ago while I was working on an earlier project. I always buy more than I need becuase I fry stuff all the time.

hi vne,
Look at these sim images.
The 1st is the circuit you posted, gain about 330 with Vref=0
the 2nd is gain ~200 with Vref = 0.5V [ just starting to limit on the output]

Both with a 0 to 15mV input signal swing

These plots really drive home the effect you're talking about. Just out of curiosity, why does the plot start around 200 mV, not 35mV?


I'm going to do a little more tinkering and report back afterwards. Thanks again for all your help. Take care and enjoy your weekend.

EDIT: I was just rummaging around through my stockpile and I came across an NTE952 Precision 2.5V Shunt. Do you think that would be better than a voltage divider to set VREF of the MCP3204? I think I could hook it up like this:

**broken link removed**

Although, I'm not sure what to do with the adjust pin. NTE datasheets are really terrible.
 
Last edited:
hi,
I'll look at the Vcm input voltage idea.

The starting at 0.2v on the plot I believe is related the point you made in post #33, ref the d/s note about a single supply effect on grounding an input pin.?
 
hi,
The sim shows the optimum around 3V for the Vbias, gain is ~260, the output voltage is just starting to limit.
This will need to be proved in an actual circuit.

I would be careful in optimising the circuit too much, it can lead to problems when repairs are made to the circuit.
 

Attachments

  • AAesp11.gif
    36.3 KB · Views: 205

OK, maybe I'll just ditch that idea and go with VREF = VCC/2. Did you see my edit to post #37?

Also, I was mistaken about having a bunch of MCP6002s. I have MCP619s. I think they should work just as well for my purposes though. Thoughts?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…