Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

TL084 - Variable Gain Instr.Amp

Status
Not open for further replies.

mrfunkyjay

New Member
Hi guys,

anyone has been playing with TL084, the quad op-amps chip for a while?

I have my schematics attached in this post. Please take a look. The idea is to create:

Instrumentation Amplifier with variable gain of 3, 5, 10, 15, 20, 30, 40, and 50. The RGain is then controlled by a switching arrays of eight SPDT Relays. The Relays are driven with ULN2803 darlington and connected to microcontroller for a shift bit simulation via software. Thus, the RGain will decrease in value, in such a way to give the increasing gain from this instr.amp.

The fourth op-amp is used as a voltage comparator, before connected to ADC, the voltage comparator only accepts voltage above 1V. What below will not be fed up to the ADC in my microcontroller.

This is what I get:

-The chip is warm, temperature might be around 30 degrees Celcius.

-The output to ADC reads 11.75V at all times!

-The output from 8th pin of TL084 which is the output of my instrumentation amplifier reads 5V >> this is weird since my input voltage is around 20mV, gained voltage should be 60mV (gain = 3x).

Does anyone know what is wrong with my schematics?

The relay board is perfectly tuned to remove contact debouncing effect. The pin headers are connected to the relay board via cables and the resistors are properly installed (values). Please kindly give me some advice. Thank you!

PS: The resistance of my resistors are all tested by protoboard before etching the layout onto the PCB. I thought it should be working but I dont get it why it is not working!!!

Best regards,

Kelvin
 

Attachments

  • Instr Amp with Relay Adapter.pdf
    13.5 KB · Views: 641
Two things spring to mind for it getting warm, which it shouldn't - you've either wired it wrong, or put the IC in the wrong way round. Are you using a split supply?, the diagram doesn't make that clear.

However, your entire premise is at fault, the ouput of a comparator can be either HIGH or LOW, nothing in between - so it won't ever pass the analogue voltage through.
 
Two things spring to mind for it getting warm, which it shouldn't - you've either wired it wrong, or put the IC in the wrong way round. Are you using a split supply?, the diagram doesn't make that clear.

However, your entire premise is at fault, the ouput of a comparator can be either HIGH or LOW, nothing in between - so it won't ever pass the analogue voltage through.

If you mean that a split supply is the VCC+ and VCC-, then I used +12V for VCC+ and -12V for VCC-. These things are stated in the schematics as U1P.

You are correct about the output of the voltage comparator, thanks for reminding me. Then, the analog voltage output will be sent from 8th pin of the TL084. The voltage comparator is used only as a trigger to the ADC inside my micro so that if the voltage is above 1V, the ADC starts to convert the analog voltage reading to digital. The schematics might need some modifications, though it is still not working yet.

PS: I put the chip in a correct way.
 
Last edited:
If you mean that a split supply is the VCC+ and VCC-, then I used +12V for VCC+ and -12V for VCC-. These things are stated in the schematics as U1P.

Which never mentions -12V, only +12V.

You are correct about the output of the voltage comparator, thanks for reminding me. Then, the analog voltage output will be sent from 8th pin of the TL084. The voltage comparator is used only as a trigger to the ADC inside my micro so that if the voltage is above 1V, the ADC starts to convert the analog voltage reading to digital. The schematics might need some modifications, though it is still not working yet.

Why are the feedback resistors so low?, that certainly won't be helping, nor will the lack of any biasing resistors on the input - although as long as it's plugged in to where ever it goes, they might supply it?.

What is the reasoning behind the comparator?, I can see no use or reason for it - simply write your program to ignore any readings under your required threshold.
 
Which never mentions -12V, only +12V.

Okay, I wrote +-12V in my schematics. The 4th and 11th pin of TL084 are fed with +12V and -12V respectively.

Why are the feedback resistors so low?, that certainly won't be helping, nor will the lack of any biasing resistors on the input - although as long as it's plugged in to where ever it goes, they might supply it?.

What is the reasoning behind the comparator?, I can see no use or reason for it - simply write your program to ignore any readings under your required threshold.

You mean the RGain? This is obtained through calculations. I did it before, even I tried my schematics before with my project board. It works nicely.

I had no idea in the first place to use what you proposed, since I am still new to this. I am now working on a project for my final thesis. I hope I could get something from this forum. By the way, thanks for reminding me about the voltage comparator and your proposed idea by software approach.

Now back to the TL084, I still don't get it, will the relay board gives side effect to my resistor arrays???
 
Okay, I wrote +-12V in my schematics. The 4th and 11th pin of TL084 are fed with +12V and -12V respectively.



You mean the RGain? This is obtained through calculations. I did it before, even I tried my schematics before with my project board. It works nicely.

As your project doesn't work, how can it 'work nicely'?.

The gain is set by the ratio of the resistors, NOT their specific value - so while you've calculated the ratio, you haven't calculated the values - you've presumably made a random stab at a starting value, and calculated the ratio from that. I would suggest making each resistor 100 times larger, which would keep the ratio (and the gain) the same.

I had no idea in the first place to use what you proposed, since I am still new to this. I am now working on a project for my final thesis. I hope I could get something from this forum. By the way, thanks for reminding me about the voltage comparator and your proposed idea by software approach.

Now back to the TL084, I still don't get it, will the relay board gives side effect to my resistor arrays???

As long as everything is close together, and wires are short - and resistors are within acceptable values, it shouldn't make any difference.

But your diagram show the inputs floating, this will stop it working as they can float to any value - hopefully whatever is plugged in will prevent this, but we've no idea if that is so.
 
As your project doesn't work, how can it 'work nicely'?.

The gain is set by the ratio of the resistors, NOT their specific value - so while you've calculated the ratio, you haven't calculated the values - you've presumably made a random stab at a starting value, and calculated the ratio from that. I would suggest making each resistor 100 times larger, which would keep the ratio (and the gain) the same.

Hi Nigel Goodwin,

you are absolutely correct. What I did is absolutely the same with what you mentioned. I will work on with the ratio this evening. I don't know if I am right/wrong but the chip is warm maybe because the resistances are too small.

As long as everything is close together, and wires are short - and resistors are within acceptable values, it shouldn't make any difference.

But your diagram show the inputs floating, this will stop it working as they can float to any value - hopefully whatever is plugged in will prevent this, but we've no idea if that is so.

This is the title of my thesis work: "Automatic Resistor Measuring and Sorting Device using Microcontroller". I am now working on the measurement subsystem. The Vin is fed up from a current source of 20mA where a test resistor is attached. The voltage obtained from Ohm's Law will be gained by this instr.amp and forwarded to the ADC. I hope it gives clear understanding about what I am going to do. Any other suggestions? I will try and post up the result after I changed all of the resistances to 100x larger.

Best regards,

Kelvin
 
Why is there a comparator after the amplifier? The comparator will always output a high voltage, so long as the value on it's positive input is above ~-10V, which will be pretty much all the time (except for very large negative (diff.) voltages at the input of the instrumentation amp).

Also, if it did change state, it would output something around -12V, and unless your ADC can handle this, it will get fried. On that note, is your ADC happy getting fed +12V?

EDIT: Oh, excuse me for repeating the obvious... I didn't read the above posts properly...
 
Last edited:
Why is there a comparator after the amplifier? The comparator will always output a high voltage, so long as the value on it's positive input is above ~-10V, which will be pretty much all the time (except for very large negative (diff.) voltages at the input of the instrumentation amp).

Also, if it did change state, it would output something around -12V, and unless your ADC can handle this, it will get fried. On that note, is your ADC happy getting fed +12V?

From what you wrote above, what could be your best suggestion to this problem? I am thinking right now about what Nigel said earlier, via software approach to handle this issue.

I might not use the fourth op-amp so only three op-amps are used for the instrumentation amplifier.
 
you should get a chip named PGA112 or PGA113 or PGA116 or PGA117
by texas instrument
these chips do all the work in a single package ....
and if you're in an educational institution you can get samples for free ...
 
What is the voltage input range of the ADC? You may wish to use the 4th amplifier to shift and scale the voltage into that range.
 
As you've now actually informed us what you're doing, further suggestions can be made.

1) You don't require an instrumentation amplifer, a simple opamp is all that's needed.

2) You don't need to alter the amplifier gain, and shouldn't attempt to do it that way -far easy, and MUCH more accurate, to simply alter the current in the constant current source feeding the resistor under test.

I'm still totally confused by the 'under 1V' thing? - with a constant current source an open circuit reads HIGH voltage, as high as the constant current source can provide.
 
As you've now actually informed us what you're doing, further suggestions can be made.

1) You don't require an instrumentation amplifer, a simple opamp is all that's needed.

2) You don't need to alter the amplifier gain, and shouldn't attempt to do it that way -far easy, and MUCH more accurate, to simply alter the current in the constant current source feeding the resistor under test.

I'm still totally confused by the 'under 1V' thing? - with a constant current source an open circuit reads HIGH voltage, as high as the constant current source can provide.


1) Let me guess, you want me to build a "buffer" is it? (Correct me If I'm wrong).

2) I will explain to you how do I make the constant current. I used LM317, the regulator which has 1.25V as its Vref. The resistance used was calculated so that it gives constant current of 20mA throughout the scope of my thesis work which is two decades of E12 5% resistors ranging from 1 Ohm to 8.2 Ohm and 10 Ohm to 82 Ohm. The current source is capable up to 87 Ohm.

Now my question to you is, how do I alter the current? If my simulation goes with LM317 and the same concept like I had in my etched PCB of 20mA constant current source, I will alter the current with relays (such eight relays in an array) and switch the coils by microcontroller.

As you stated above, it is easy, so I really want to know how. The time is running and almost up, so I need to find the quickest, easiest, probably bigger than 90% chance of success electrical design.

I am really open to any suggestions...
 
More explanation regarding what I want to achieve in my project

Hello all,

this might be a little bit messy and long, but I think I need to brainstorm here what are actually inside my head. Tell me, please, if I am doing wrong or stupid. Just point out where my mistakes are, give me clues, suggestions, or even more, answer/solution to my problem. Six weeks to go and I need to settle both electrical and programming. The mechanical design was finished with some touch-up at the end then I can go for my thesis defense. I will only post things that I have done so far, I am not a person that don't try anything out and post here, I am trying everything everyone said and found failures upon failures. I am thinking straight, but when it comes to six hours of sleeping I cannot think that straight, so I need you guys. So enough for the junk, let's go to the project.

First phase: CURRENT SOURCE

In order for my device to know how big the resistance of the test resistor, there should be a signal, which is in general known by all of my electronics, including my microcontroller. Voltage is what I need. By doing some calculations and looking back to the first chapter of electrical engineering books, Ohm's Law states V = I x R where R is not the fixed one. By supplying the constant current I, the voltage output will be constant when R is changed from one value to the other. The voltage obtained from the current source will be processed further.

Second phase: INSTRUMENTATION AMPLIFIER

The reason why I used an instrumentation amplifier is because I don't want the current flowing through the test resistor is divided in such a way it meets a branch! We know that current divides up when it meets a branch while voltage remains constant. The buffer in the first two op-amps in an instrumentation amplifier is working to ensure that the current flowing through the instrumentation amplifier is almost zero. Such thing will increase the accuracy of voltage reading on the test resistor!

The output of gained voltage may vary from 20mV up to 1640mV where 1 Ohm is the minimum value of resistor being measured and 82 Ohm is the maximum one. These values are used as an input to the microcontroller to process the work of sorting the resistor itself. Based on 10-bit ADC (I used atmel AVR ATMega8535), the resolution is around 5V:1024 = 4.88mV ~ 5mV. If we don't amplify the measured 1 Ohm resistor, it will clash with the next resistor which is 1.2 Ohm. By calculation it gives 24mV (0.020A x 1.2 Ohm). Between 20mV and 24mV there is no even one bit difference! Such things should be avoided by amplify the voltage. If we amplify by 10, then 200mV and 240mV will have around 40mV difference. This leads to 8 bits difference. Such thing, will give more precise in software approach, where I can use for example, RANGE, in which to increase the accuracy of my microcontroller reading the resistance of the test resistor.

Now I am working on this piece, because it will give me such a nice (even though it is complex) design. The relay board is bought, the coil voltage is 12VDC where eight relays are attached on a single sided PCB. I connect them with my schematics given at the beginning of my post and some problems came out. I really want to stick to my idea here, but if you guys find something strange or stupid, just tell me so. I am so open to any suggestions, but I prefer to stand on my idea, if I still could use it, with some modifications.

@Nigel:
to change a lot (by design) is a waste of time, I cannot do much in redesigning all, so please do give me humble and wise advice, please understand my position. Thank you.

To all:

thank you for reading...

Best regards,

Kelvin
Indonesia - I am sorry for my English. I am not living in such an English-Speaking-Country.
 
Last edited:
Now my question to you is, how do I alter the current? If my simulation goes with LM317 and the same concept like I had in my etched PCB of 20mA constant current source, I will alter the current with relays (such eight relays in an array) and switch the coils by microcontroller.

Don't use an LM317, you're not building a power supply, so why use a power supply IC?.

An opamp and a transistor can be used to make a constant current source, with the current easily controlled by either a pot, or switched resistors.

Current source - Wikipedia, the free encyclopedia

Altering the current for each range makes each range equally accurate, doing it by altering the gain of the amplifer makes only one range that accurate, with all other ranges getting less and less accurate.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top