Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 27, 2024, 06:16:36 06:16


Login with username, password and session length


Pages: [1]
Print
Author Topic: Need help for interfacing 5V analog input with 3.3V system  (Read 5228 times)
0 Members and 1 Guest are viewing this topic.
andy911
Guest
« on: April 06, 2006, 04:06:45 04:06 »

Dear all,
 This is my first time post. I need some help on the interfacing issue. Currently I have my working 3.3V  PIC18F458 microcontroller system. Now I need to take input signal into ADC channel. However, the input signal range could be 0-3.3V or 0-5V.  I knew that I could actually scale the input down to 0-3.3V  range using some op-amp but I 'm  looking for  alternative way for that.  Any design hints is appreciate sir.

Thank you for any comment

Andy
Logged
ramesh_rahu
Guest
« Reply #1 on: April 06, 2006, 06:58:30 06:58 »

hi
i think ur ADC ref voltage (ext pin Vref)can be set to 5 v so the ADC will measure from 0-5v but the system will be running on 3.3v .dont forget to configure that pin to the ADC ref voltage ....
Hope this helps. Smiley
Ramesh
Logged
evc
Guest
« Reply #2 on: April 06, 2006, 07:38:17 07:38 »

It would not work! Due to build-in diodes on every I/O pin, if you put +5V on Vref pin, the microprocessor will work on 5V! Btw this is written in the datasheet too. The voltage applyed on Vref pin can NOT be higher than Vdd+0,6V!
I think in this case, you can use a simple divider network with two resistors. It depends on    ADC speed you want to achieve.
Logged
picstudent
Active Member
***
Offline Offline

Posts: 169

Thank You
-Given: 0
-Receive: 3


« Reply #3 on: April 06, 2006, 04:32:35 16:32 »

or use an opamp to rescale your max voltage
Logged

... rego ... who are are you really ?
andy911
Guest
« Reply #4 on: April 07, 2006, 05:38:40 17:38 »

Thank you for all help sir. I'm thinking about having voltage divider to scale the voltage down . At first I thought I need 2 resistors to scale down; R1 could be anything and R2 = 25K , but I completely have no idea about the issue of resistor selection respect to the speed to ADC. Actually my design need to take 3 inputs from accelerometer sensor (0- 3.3V) and 3 inputs from gyro sensor(0-5V). The sampling frequency for both of them are limited to 1KHz only. From nyquiest theory, this should be good enough to measure my mechanical system having dynamic less than 100 Hz.  Thank for any helps again sir.

Andy
Logged
evc
Guest
« Reply #5 on: April 10, 2006, 10:36:11 10:36 »

In Microchip's datasheet they said "The maximum recommended impedance for analog sources is 2.5 kΩ". So, the value of your divider's resistor can NOT be more than 2,5k. In this case upper resistor must be ~1,29k. Best solution is between the divider and the ADC input to implement an OpAmp based buffer. But i want to suggest you to reverse the problem. Why don't you power up your device with 5V? You can power up only accelerometer sensor with +3,3V, and this way to achieve 675 significant ADC stages from it. If this is acceptable accuracy for you, i think would be better and easier!
« Last Edit: April 10, 2006, 10:40:03 10:40 by evc » Logged
andy911
Guest
« Reply #6 on: April 10, 2006, 07:13:32 19:13 »

Dear Mr. evc,
 Thank for help sir. I myself now end up having to use 3.3V to power system due to my wireless module(TRW-24G). This module require 3.3V and 3.3V data interface. Therefore, I think i need to have 3.3V at my processor side as well. I don't know much about having to interface different voltage with external device concurrently sir.
I appreicate your help sir

Andy:)
Logged
lillbear
Senior Member
****
Offline Offline

Posts: 276

Thank You
-Given: 223
-Receive: 182



« Reply #7 on: May 11, 2006, 06:38:12 18:38 »

Humm maybe this will help u Smiley
Logged
lucicop
Newbie
*
Offline Offline

Posts: 10

Thank You
-Given: 5
-Receive: 1


« Reply #8 on: September 28, 2007, 12:06:50 12:06 »

You can have a translator between your micro at 5V and your RF module at 3.3V. 74LVC4245A will do that.
Logged
Trishool
Active Member
***
Offline Offline

Posts: 113

Thank You
-Given: 9
-Receive: 9



« Reply #9 on: October 28, 2007, 02:47:44 14:47 »

Your analog signal os varying from 0-5V  and you want to scale it down to 0-3.3V , this is what I understand from yor post. Its simple , just use a potential divider nothing else is needed , usually ADC input pins are sensitive enough to sink small amount of currents , I dont feel you use any OPAMP for this we do this on 8051 and never used OPAMPS , just a potential divider .

Hope this helps

Trishool
Logged
frasenci
Translator
Active Member
***
Offline Offline

Posts: 171

Thank You
-Given: 142
-Receive: 84


« Reply #10 on: October 28, 2007, 06:19:26 18:19 »

Another interesting source

Code:
http://cq.cx/interface.pl

greetings
Logged
twonuts
Active Member
***
Offline Offline

Posts: 118

Thank You
-Given: 55
-Receive: 42


« Reply #11 on: November 01, 2007, 02:04:12 14:04 »

Dear Mr. evc,
 Thank for help sir. I myself now end up having to use 3.3V to power system due to my wireless module(TRW-24G). This module require 3.3V and 3.3V data interface. Therefore, I think i need to have 3.3V at my processor side as well. I don't know much about having to interface different voltage with external device concurrently sir.
I appreicate your help sir

Andy:)

You may be able to do this simply by putting a high value resistor, >10K, in series with your data line to the RF module. This limits the current into the RF unit on the data lines and allows use of TTL at 5V to drive the data input on the RF unit.

Check some of the FM transmitter datasheets on RF Solutions web site, English company
Logged
localcrack
Active Member
***
 Muted
Offline Offline

Posts: 173

Thank You
-Given: 64
-Receive: 21



« Reply #12 on: November 18, 2007, 07:14:42 19:14 »

You may use Simple resistor devider

______ Voltage Input
|
/
\  R1
/
|____ To ADC Pin
|
/
\  R2
/
\
|
---Gnd
Logged
titi
Active Member
***
Offline Offline

Posts: 229

Thank You
-Given: 3703
-Receive: 834



« Reply #13 on: November 19, 2007, 07:11:56 19:11 »

Hello,

 As tell localcrack, the resistor devider is the simpless way.

The first thing is to fixe R1 by exemple 1000 Ohms.

The current in resistors is I=5v/(R1+R2) but the current in resistors is also I=3.3v/R2
so 5/(R1+R2)=3.3/R2

if you develop the calculus R2=(3.3*R1)/(5-3.3)
With R1=1000 -> R2=1941 Ohm

You can make a 1941 Ohm resistor with 4700 et 3300 in parallele with a precision of 0.116 %

So the drawing become :

______ Voltage Input
|
/
\  R1=1k
/
|_________ To ADC Pin
|         |
/         /
\         \
/ 4.7k   / 3.3k
\         \
|         |  R2 Equiv=1941
|         |
------------------Gnd

The datasheet say no more 2.5k from ADC Input and the source, 1k is a good value.

Bye







 
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC