lilzz
Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

Pi interfaced with board with 5V ADC.

Mon Apr 21, 2014 6:34 am

2 ways to handle this

1)change the ADC Vref and VDD to 3.3V instead of 5V. But the channels going into the ch0-ch7 still 5V signals.

or
2) Dout of the ADC with resistor divider to scale to 3.3V compatible to interface with Pi.But Pi is 3.3V and it goes to Din of the ADC. Would the 3.3V signal going into the 5V ADC mess up the logic?

which way is better?

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Pi interfaced with board with 5V ADC.

Mon Apr 21, 2014 12:25 pm

Hi,
lilzz wrote:1)change the ADC Vref and VDD to 3.3V instead of 5V. But the channels going into the ch0-ch7 still 5V signals.
Check the ADC's datasheet if you can measure 5V signals when the ADC is supplied with 3.3V (most likely not - you might think here about voltage divider on each ch input).
lilzz wrote:2) Dout of the ADC with resistor divider to scale to 3.3V compatible to interface with Pi.But Pi is 3.3V and it goes to Din of the ADC. Would the 3.3V signal going into the 5V ADC mess up the logic?
Check the ADC's datasheet.
Most likely, you're out of specifications for high level voltages.

P.S. Datasheets contain valuable information related to applicable component. They're worth reading.


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

User avatar
mikronauts
Posts: 2783
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: Pi interfaced with board with 5V ADC.

Mon Apr 21, 2014 12:31 pm

If you are using an SPI based ADC, (2) will work fine, I've been using such a setup for years (not Pi)

3v3 for /CS, CLK, and Din works

Just need to divide Dout to 3v3 (I tend to use 2k4/4k7 resistors)
lilzz wrote: 2) Dout of the ADC with resistor divider to scale to 3.3V compatible to interface with Pi.But Pi is 3.3V and it goes to Din of the ADC. Would the 3.3V signal going into the 5V ADC mess up the logic?

which way is better?
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Pi interfaced with board with 5V ADC.

Mon Apr 21, 2014 12:56 pm

The PCF8591 (8 bit I2C dip 4xADC/DAC) has the following specs:

AIN max voltage is VDD + 0.5 volts
VDD can be either +3.3 or +5.0 volts.
The I2C lines have no internal pullups so the chip can be safely interfaced directly the the Rpi's I2c lines even when powered by +5 volts. While the I2C logic levels are outside of stated spec when VDD == 5 volts, it works.
AGND can be at most VDD - 0.8 volts
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Pi interfaced with board with 5V ADC.

Mon Apr 21, 2014 1:06 pm

3.3 volts into 5V input will work fine in most cases, a 5 V input will typically have a changeover (hi/lo) at about half way (~2.5v) and since 3.3v is well above 2.5v it will register as a high. Do not put 5v onto a 3.3v input as that will damage something. I use a voltage divider to reduce it, but there are other ways of doing it.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

plugwash
Forum Moderator
Forum Moderator
Posts: 3614
Joined: Wed Dec 28, 2011 11:45 pm

Re: Pi interfaced with board with 5V ADC.

Mon Apr 21, 2014 5:51 pm

pluggy wrote:3.3 volts into 5V input will work fine in most cases
This is mostly true but to clarify

3.3V into a "TTL compatible" 5V input is fine.
3.3V into a regular classic CMOS 5V input is generally slightly out of spec. It will usually work in practice but I wouldn't want to rely on it in anything more than a "quick hack on the bench".
3.3V into a classic CMOS schmitt trigger input generally will not work.

You especially have to watch out with 5V PICs as they have a mixture of TTL compatible inputs and classic CMOS schmitt trigger inputs.

Return to “General discussion”