Variable Gain in the AVR UC3 ADC

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello Freaks,

 

I have been working with a AT32UC3A1512's  ADC but since my analog is in some instances very low voltage and some instances quite high, a 1.6V was added to it before sending to the ADC. The problem now is that it is some times still difficult to detect this low voltage at some instances.

 

I would love to have a automatic gain control on the low signals before digitizing but looks like the AT32UC3A1512 does not have an inbuilt variable gain like the ATMEGA16/32 does. Can anyone confirm this?

 

On the other hand, kindly suggest a variable gain chip that I may use for this purpose.

 

Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

obabarin wrote:
a variable gain chip that I may use for this purpose

Perhaps you need something with a logarithmic response ... ?

 

You could also search for "dynamic range compression" - or just "compression" ...

 

Or "compander"

 

https://en.wikipedia.org/wiki/Companding

https://en.wikipedia.org/wiki/A-law_algorithm

https://en.wikipedia.org/wiki/%CE%9C-law_algorithm

 

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks @awneil.

 

Dynamic range compression may be what I want to achieve, but I am looking into using/doing that like how the ATMEGA16/32 and National Instrument DAQ does it using differential inputs. Please see attachment.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Or simply use a higher resolution ADC.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi @Kartman,

 

This micro-controller supports 8- and 10-bits resolution only. I am using 10-bit already. Can't go higher than this. And it is almost impossible for me to consider a new micro-controller at this stage.

 

What else would you suggest please?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm not familiar with the UC3, do you have a choice in ADC ref's?   Most AVR's can use VCC, Vbg (either 1.1 or 2.5v) to vary the range and resolution of the ADC? 

If you also have the option of an external reference, then perhaps one or more external refs would help.

 

Jim

 

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi @ki0bk,

 

Indeed the adc of the micro-controller uses/allows an external Vref between 2.6 and 3.6V, so 3.3V was used a reference from a voltage  regulator. It was known beforehand that the analog signal will be quite low, hence a 1.6 V DC level is added to the signal to center it in the ADC’s dynamic range.

 

 

 

PS- For the initial application this custom board (on which this micro-controller is on), the adc with centre 1.6V can be said to be sufficient. But now, the board is being considered for a similar application but of lower signal levels, hence the need for the considered amplification.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, you did request suggestions for a chip to do this - so I gave some keyword suggestions to help your search for such a device ...

 

Note that it's a whole lot easier if you embed the image - so we can see it:

 

 

instructions in Tip #1

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The UC3Cxxx has an ADCIF that can do 8,10 or 12 bit conversions, with gain of upto x64.
Not a simple-device, and the UC3C might not have the all of the peripherals that your project requires.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you @mikech. I may not be able to change the microcontroller at this time.