Wheatstone Bridge output to RS232

Thread Starter

Wavelength

Joined Mar 2, 2006
13
Hello guys :)

I'm trying to convert the analogue signal from a load sensor to digital and send the digital signal to a rs232. I'm planing to use 10v for the excitation.

Rated Load capacity is 10t
Rated Output 2mV/V

From previous thread I got the idea of using and op-amp to enlarge the output signal and from there connect it the ADC.

How I determined what resolution of ADC I should use?
Any advice on what op-amp should I be using?
Are they any parameter I need to know?

Thank you in advance...
 

t06afre

Joined May 11, 2009
5,934
Hello guys :)
I'm trying to convert the analogue signal from a load sensor to digital and send the digital signal to a rs232. I'm planing to use 10v for the excitation.
Rated Load capacity is 10t
Rated Output 2mV/V
From previous thread I got the idea of using and op-amp to enlarge the output signal and from there connect it the ADC.
How I determined what resolution of ADC I should use?
Any advice on what op-amp should I be using?
Are they any parameter I need to know?
Then reading your bridge you should use an instrumentation amplifier(google is your friend). The resolution will depend on needed range and accuracy. Do you have any specs on this? Post these specifications so we can help you. And if you have a schematic post this also :)
 

Thread Starter

Wavelength

Joined Mar 2, 2006
13
Thank you for the response :)

Sorry I don't have any exact specs just wanted to learn how to build it by hand. Been reading and googling but information that I have is in pieces. I need some guidelines to help me for this project.

Project roughly to take the analogue output of the Wheatstone bridge and convert it to digital.

About the range and accuracy. The load sensor max load is 10t so if making it around .1% error should be roughly ±10Kg. Would that be difficult? I'm not sure if this what you mean by range or accuracy?:confused:

I will google the in-amp AD623. thanks.

Btw which is easier using a UC for ADC conversion or separate ADC ic for conversion?
 
Last edited:

t06afre

Joined May 11, 2009
5,934
If you want to have a range equal to 10 tonne and a 0.1% resolution you may get away with a 10 bit ADC that is found onboard in many micro-controllers. For simplicity say your system is tuned so 5 volt from the preamp equal 10 tonne and 0 volt is zero weight. If you use a 10 bit ADC you will have a resolution equal to (10000/(2^10))=9.76 Kg pr bit. And your range will be 0 to (10-0.00976) tonne. The specification will be tight but inside the specs. Perhaps you will be better of with a 12 bit ADC. As this will enable you to better control things like calibration
 
I would like to add a few points.

You must consider:

1. The voltage reference accuracy -- the ones built in to many microcontrollers have horrible accuracy. I like the ISL60002 and others are available with 1 mV accuracy. A great ADC with a poor reference will have an absolute error in the output that may be outside your tolerance. So invest in the external voltage reference.

2. The ADC accuracy -- most are +/- 2 LSB (least significant bits) so a 10-bit gives you really 9 bits of resolution. This can be sort of fixed by oversampling -- doing multiple readings and then taking the average -- but it's not the best way. Many microcontrollers now have 12 bit ADCs that are great. MSP430 has it, PIC and AVR have them. You just have to choose the right microcontroller for it. Not much extra cost.

3. The offset error of the op amps that you use for the differential amplification. You want to choose op amps with very low offset errors, for sure under 10 uV -- yes that's micro-volts. They are available for low cost, just have to look for them.

4. Stability and accuracy of your excitation voltage. I think the accuracy of your reading also depends on a stable and accurate excitation into the Wheatstone bridge.

Hope this is helpful. My typical method is to aim for 4 times higher accuracy and resolution than needed, and then I have a little margin. Unless it's a cheapo consumer product that you are going to make 50,000 pieces, there should be no problem with $5 extra parts for a good reference and ADC.

PS -- watch out for instrumentation amplifiers like AD623 -- sometimes they have pretty bad offset errors -- I did a project with that chip and had issues with that, trying to measure very small voltages they got lost in the noise. I like to use a high-quality op-amp and build my own 3 op amp differential amplifier. Check it out here.
 
Last edited:

t06afre

Joined May 11, 2009
5,934
You had some good pointers sage.radachowsky. Using averaging is essential. You do not base your result on 1 measurement. But perhaps 100 during a second(s).
What I do not agree in is your tip to build a instrumentation amplifier(IA) your self. You can use a very good opamp. But you can not match the resistors in the same way that they do in the production of IAs. Most of the posters in this forum do not recommend building your own IA if precision is needed. Put your money in a good commercial IA. Quality cost more money
 

Thread Starter

Wavelength

Joined Mar 2, 2006
13
Thank you guys.

I'm searching for Uc, Ins Op-amp and the Vref IC at the moment.

For Uc I will go for the PIC16C774 which has 12 bit ADC.

Still looking for Ins Op-amp adn Vref Ic.

I didn't notice about that offset voltage

My plan now to increase the signal from the Wheatstone bridge of 20mV max to 5 volt. Thus a gain of 250. With a 10uV offset it will be 2.5mV.

With a 12bit ADC (10000/(2^12))= 2.4414Kg per bit.
voltage resolution (5/(2^12)) = 1.2207mV



Guess there will be 2 step wasted for the offset voltage. Correct me if I'm wrong. Anyway to reduce this error?

Anyway will start soon and will do it by trial and error. I will try to keep this post updated =)
 

t06afre

Joined May 11, 2009
5,934
I would NOT go for a 16C774 as this is a OTP device. It can only be programmed one time. No room for debugging :eek:
What kind of programmer do you have?
 

Thread Starter

Wavelength

Joined Mar 2, 2006
13
Wow 1 time dam didn't look into that I thought it was like a normal PIC which I can programmed several times. Can u tell me where in the datasheet it said its a OTP device =)
I'm using MPLAB IDE for programming. I prefer to stick to PIC if possible =)
 
Last edited:

t06afre

Joined May 11, 2009
5,934
Wow 1 time dam didn't look into that I thought it was like a normal PIC which I can programmed several times.
I'm using MPLAB IDE for programming.
It is also important that your programmer support your chip. By programmer I mean the hardware device used to program the chip. Not the MPlab software
 

t06afre

Joined May 11, 2009
5,934
Wow 1 time dam didn't look into that I thought it was like a normal PIC which I can programmed several times. Can u tell me where in the datasheet it said its a OTP device =)
I'm using MPLAB IDE for programming. I prefer to stick to PIC if possible =)
It is in the name if you want a PIC with flash program memory. You should look for a device with a F after the two first digits, not a C. I think this is true for the 8 and 16 bit types. But not sure for the DSP series and the 32 bit series. A OTP microchip has EPROM type program memory. But no window on the chip so you can not erase it. You can get a C type microchip in CERDIP package with a window. So you can erase them with UV light. But this take time and is a pain in the a** to work with. such chips has a JW at the end of the name. Like 16c774JW. A JW chip cost much more money.
Microchip recommend using the PIC18F4423 on this page http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010177#1
 
Wow, that was a good catch, t06afre.

According to the Microchip website, the recommended replacement is PIC18F4423.

For oversampling, with a 12-bit ADC, it is handy to sample 16 times and add each time the result to an accumulator, then bit-**** 4 to the right and it's the averaged result.

Also, I think I agree with t06afre that there should be some good instrumentation amps off-the-shelf. I did some searching. The MAX4208 and MAX4209 look reasonable, with 20 uV max input offset error, typical 3 uV. MAX4209 has preset gain of 100.

I think you don't want to aim for the output to be the full 0 to 5V, as you want to constrain it below the rail and fit inside the voltage reference. If you use a gain of 100, and then your 20 mV goes up to 2.0V, you can then use a 2.048V voltage reference for simplicity of math.

One more thing -- you must make sure the outputs of the Wheatstone bridge fall in the 0 to 5V range for the instrumentation amp inputs, if you power that from 0 to 5V rail. It's better to have the inputs somewhere in the middle, not near the 0V rail, for good amplification. How will you clamp the 10V input to the Wheatstone to your 0 to 5V logic power supply?
 

Thread Starter

Wavelength

Joined Mar 2, 2006
13
PIC18FlF2553-I/SP - abit expensive then PIC18F4423-I/P
LT1027 - Vref -
INA101HP - Ins Op-Amp - will review again

I think this is the main part I will add up other component later.

Sorry didn't notice these new threads.

It is also important that your programmer support your chip. By programmer I mean the hardware device used to program the chip. Not the MPlab software
Oh yeah I have a programmer that support 18, 28 and 40 pins PIC16F and PIC18F MCU.

My idea was to have 10v supply for the Wheatstone and pull another line for that 10v and use a voltage regulator to drop down to 5v for the 5v logic.
 
Last edited:
My idea was to have 10v supply for the Wheatstone and pull another line for that 10v and use a voltage regulator to drop down to 5v for the 5v logic.
I just want to check because usually a Wheatstone bridge will put the voltage outputs close to the middle of the power supply rails.

So if you have the Wheatstone from the 0V to 10V, then you will probably see the outputs around 5V with differential that indicates the weight you are measuring.

But that will not be good for your circuit, if you have an instrumentation amp powered from 5V to 0V. The input will be out of the range... even if it works marginally, it will suffer in the accuracy by being close to the rails.

You should power up the Wheatstone bridge on 10V and verify what I said.

I think it's best to use a +5V and -5V rail for the Wheatstone bridge, and also use op amps or instrumentation amp that work with those supply rails for translating the Wheatstone output to a ground-referenced amplified signal.

I had a similar problem once. I had a +12V supply and I used an inverting charge pump to create a -12V supply from it. Then on each of the positive and negative rail I used a 5V linear regulator to maintain the voltage from the ground. Then, the output from the Wheatstone bridge was near the ground. I used op amps with + and - supplies so I had no issue of amplifying anything near the rails.

It sounds complicated but it's really not too bad, and I think it's the right way to do it. But other people may have simpler suggestions.
 

Thread Starter

Wavelength

Joined Mar 2, 2006
13
I see and thank you for the info sage.radachowsky, making the output of the IA from my Wheatstone Bridge close to the rail increase probability of clipping the output. I noticed op amp have min distance between both rails + and -.

For the Wheatstone bridge I probably using (0-10)v. Having the IA supplied from +5 and -5 so the Wheatstone bridge output can be in range of amplifications nicely even though near the ground.

My idea now is to use a single power supply probably 10V use an inverting regulator (MAX764) for the -5v and 5v regulator for the +5.

Btw I'm wondering what the is lowest detectable voltage for PIC18FlF2553-I/SP
Example if my analogue voltage output from the IA range max 2v and using 12 bit ADC it would be 488.28125uV per step.Can the PIC detect that low?
 
I see and thank you for the info sage.radachowsky, making the output of the IA from my Wheatstone Bridge close to the rail increase probability of clipping the output. I noticed op amp have min distance between both rails + and -.

For the Wheatstone bridge I probably using (0-10)v. Having the IA supplied from +5 and -5 so the Wheatstone bridge output can be in range of amplifications nicely even though near the ground.

My idea now is to use a single power supply probably 10V use an inverting regulator (MAX764) for the -5v and 5v regulator for the +5.

Btw I'm wondering what the is lowest detectable voltage for PIC18FlF2553-I/SP
Example if my analogue voltage output from the IA range max 2v and using 12 bit ADC it would be 488.28125uV per step.Can the PIC detect that low?
I usually use MSP430 microcontrollers, but I looked up the data sheet for the PIC out of curiosity, so I can learn and compare.

Please include a resistor at the input to the ADC of the PIC, to limit current in case it drops below ground or above the Vcc to the microcontroller. It has a clamp diode but it can handle only 20 mA, and it's best to limit it much below that, so you could use a 1K Ohm resistor.

If you read chapter 2 of that data sheet, you will see the input requirements of less than 2.5K Ohms. It also shows the transfer function from the analog input to the digital code. I don't see anything about the accuracy, and it implies that it gives the full 12-bit accuracy if you use it correctly. For the MSP430, there is a +/-2 LSB figure in the data sheet. Maybe someone who uses the PIC can weigh in.

But anyway, yes, it should be able to measure very low voltages. My question is only whether the accuracy is totally good to +/- 1/2 LSB or less.
 
Top