A20 LRADC - Where are the pins? To much input voltage! How much to destroy it?

Started by NewBieGermany, February 10, 2015, 07:28:53 PM

Previous topic - Next topic

NewBieGermany

Hello,

I would like to use the LRADC of the A20 to sample a sensor output. I guess I figured out how to do the C programming, just write or right to the registers via the base address and the offsets, then using e.g. memcpy or pointer arithmetic directly. Maybe somehow could confirm that?

But I can't find the corresponding pin LRADC1. LRADC0 seems to be at position 39 ...

The output voltage of the sensor could be as high as 3,2 V but the LRADC can sample up to 2V. Will it be destroyed by applying 3,2 V?

JohnS


dave-at-axon

Actually John, the A20 datasheets are very poor in respect to the information needed. There is no information in any of the A20 docs I could find that show the LRADC input voltage tolerance.

With that in mind, NewBieGermany, I suggest you limit the input to max 2V just to be safe. I've fried two A20's already with accidental 5V input to a GPIO as it is.

You can use a 100R resistor and a 2V or a 2.2V zener diode to protect the input if your signal will could be more than 2V. 2.2 is likely to be safe if you need the full 2V input range.

By the way, the resolution is only 6 bit (total of 64 bits) so your sensor output is going to be very poor resolution depending on the range of the sensor output. What is the sensor you wish to monitor? Might be better to use an external higher resolution ADC?

JohnS

I believe you but as I put it has the "pin" (ball) details.

I just tried google and even that found it!

John

dave-at-axon

Hey John, no amount of Googling for me is giving any results on max voltage input for the LRADC 0 and 1 inputs. I've tried with the A20 balls or AB23 and AB22 and nothing. The only reference I can find is for 0-2V with the ADC VCC pins being 3.0V to 3.3V max.

Do me a favour will you, post one of the links you seem to have found. I'd be curious to your search terms. Use LMGTFY if you want to?  ;)

JohnS

You're not understanding English :(

"it" means the last thing mentioned, which is the "pin" (ball) details

John

dave-at-axon

I use Google for everything first before asking a question and in this case, I couldn't find what you said you found. AllWinner docs are very poor and they won't reply to emails on the subject so if you or someone knows the answer, it would be appreciated to what that is. If you want to keep it to yourself, fine and maybe you can just stay quiet on the forums for the sake of others who wish to learn and don't want cryptic answers.

JohnS

The question was about A20's LRADC0/1 so into google I stuck
A20 LRADC0
or
A20 LRADC1

and it got me results.  Is that what you tried?  Didn't it work?

The docs are so poor that I expect some projects might not be wise.  I think AW put up an engineer or the like at some point on the linux-sunxi list but I'm not sure whether he (her?) will get doc improvements done if asked.

John

dave-at-axon

Hey John,

Your Google must be different to mine. ;)

I put in your search terms and all I got was stuff from others use of the LRADC but nothing that suggests anything about the max voltage limits other than the 0-2V mentioned in the A20 docs.

Based on this, and without concrete data, I would still exercise caution buy the OP to limit the input to max 2.1 to 2.2V at the very least.

JohnS

As I've posted, this was to find the "pin" details.  I didn't look for voltages but being cautious would be a good idea!

Someone on linux-sunxi may be collecting questions for AW re datasheets - maybe?

John

dave-at-axon

The point is that the OP was looking for advice on the voltage input where he could apply 3.2V from his sensor and wanted to know if this would damage the sensor.

He wasn't asking about the pins to use. :)

JohnS

The point is:

I quote from his post "But I can't find the corresponding pin LRADC1"

That is what I answered.

John

dave-at-axon

Ah, I see your point now John and apologise. Saying that, it might have been clearer if you had quoted the part you responded too, just to clarify your answer  :)

The LRADC1 is on GPIO1 pin 39 and the OP noted that connection (without reference to the GPIO connector) but he mistook it for LRADC0 which is used internally for the buttons.

JohnS

No worries.

OK, you got me wondering, though...  Did some more google stuff, figured A20 & A10 are almost alike and found with:
A10 lradc V
a Chinese (?) post that reads the 6-bit value from the lradc data register then uses
(data + 1) / 64 * 2 as the volts

Which looks like max 2V.  Suspect the formula because it can't return 0.

Not exactly the ideal source!!  It's at http://www.eeboard.com/bbs/thread-38057-1-1.html

John

dave-at-axon

I often wonder why some folks use complex formula to get the result.

A simple data * 0.003125 would get the same result.

:)