EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Connecting Sensors to MSP430

Started by elcoqui00 May 15, 2005
Hi

I need to sample two accelerometers and two gyroscopes with the 
MSP430F149's ADC. However, they output an analog signal in the 0-5V 
range. So I have to lower it to a 0-2.8V range in order to interface 
it with the MCU. I was wondering if it was safe to use a voltage 
divisor to do this (2 resistors), or should I use something more 
complicated like some kind of amplifier with 0.56 (2.8/5) voltage gain 
in order to isolate the MCU load. I was thinking that since the MCU 
has a very high input impedance the voltage divisor should be ok, but 
I'm not sure.

Any suggestions?

Thanks,
Carlos.



Beginning Microcontrollers with the MSP430

Voltage divider is ok. 10k impedance is a good choice. With higher
impedance
you need to make your sample interval larger. (there is a formula in the
datasheet to calculate the sample timing for different input impedances.)

Matthias

On Sun, May 15, 2005 at 08:34:35PM -0000, elcoqui00
wrote:
> Hi
> 
> I need to sample two accelerometers and two gyroscopes with the 
> MSP430F149's ADC. However, they output an analog signal in the 0-5V 
> range. So I have to lower it to a 0-2.8V range in order to interface 
> it with the MCU. I was wondering if it was safe to use a voltage 
> divisor to do this (2 resistors), or should I use something more 
> complicated like some kind of amplifier with 0.56 (2.8/5) voltage gain 
> in order to isolate the MCU load. I was thinking that since the MCU 
> has a very high input impedance the voltage divisor should be ok, but 
> I'm not sure.
> 
> Any suggestions?
> 
> Thanks,
> Carlos.
> 
> 
> 
> 
> .
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
        Matthias

By 10k do you mean the parallel of the two resistors in the voltage 
divider?

--- In msp430@msp4..., Matthias Weingart <msp430@p...> wrote:
> Voltage divider is ok. 10k impedance is a good
choice. With higher 
impedance
> you need to make your sample interval larger.
(there is a formula 
in the
> datasheet to calculate the sample timing for
different input 
impedances.)
> 
> Matthias
> 
> On Sun, May 15, 2005 at 08:34:35PM -0000, elcoqui00 wrote:
> > Hi
> > 
> > I need to sample two accelerometers and two gyroscopes with the 
> > MSP430F149's ADC. However, they output an analog signal in the 0-
5V 
> > range. So I have to lower it to a 0-2.8V
range in order to 
interface 
> > it with the MCU. I was wondering if it was
safe to use a voltage 
> > divisor to do this (2 resistors), or should I use something more 
> > complicated like some kind of amplifier with 0.56 (2.8/5) 
voltage gain 
> > in order to isolate the MCU load. I was
thinking that since the 
MCU 
> > has a very high input impedance the voltage
divisor should be 
ok, but 
> > I'm not sure.
> > 
> > Any suggestions?
> > 
> > Thanks,
> > Carlos.
> > 
> > 
> > 
> > 
> > .
> > 
> >  
> > Yahoo! Groups Links
> > 
> > 
> > 
> >  
> > 
> > 
>         Matthias



10k resistors (2 of them) to divide the voltage down. Keeps the source
impedance low for the ADC, whose input impedance is not high, only about 2k.
Note, this should be compared against the output drive capability of the sensor.
Some sensors are only capable of driving loads of 100k or more which would
require a voltage divider and an op-amp.

Be careful with your op-amp idea, input voltage range is usually about 1V below
rail. So, if your op-amp has the same supply as your sensors you'll lose
the high end portion to input clipping on the op-amp. Attenuate before op-amp
then gain back up to unity.

Alan

  ----- Original Message ----- 
  From: elcoqui00 
  To: msp430@msp4... 
  Sent: Sunday, May 15, 2005 5:31 PM
  Subject: [msp430] Re: Connecting Sensors to MSP430



  By 10k do you mean the parallel of the two resistors in the voltage 
  divider?

  --- In msp430@msp4..., Matthias Weingart <msp430@p...> wrote:
  > Voltage divider is ok. 10k impedance is a good choice. With higher 
  impedance
  > you need to make your sample interval larger. (there is a formula 
  in the
  > datasheet to calculate the sample timing for different input 
  impedances.)
  > 
  > Matthias
  > 
  > On Sun, May 15, 2005 at 08:34:35PM -0000, elcoqui00 wrote:
  > > Hi
  > > 
  > > I need to sample two accelerometers and two gyroscopes with the 
  > > MSP430F149's ADC. However, they output an analog signal in the
0-
  5V 
  > > range. So I have to lower it to a 0-2.8V range in order to 
  interface 
  > > it with the MCU. I was wondering if it was safe to use a voltage 
  > > divisor to do this (2 resistors), or should I use something more 
  > > complicated like some kind of amplifier with 0.56 (2.8/5) 
  voltage gain 
  > > in order to isolate the MCU load. I was thinking that since the 
  MCU 
  > > has a very high input impedance the voltage divisor should be 
  ok, but 
  > > I'm not sure.
  > > 
  > > Any suggestions?
  > > 
  > > Thanks,
  > > Carlos.
  > > 
  > > 
  > > 
  > > 
  > > .
  > > 
  > >  
  > > . 






Thanks!

The sensors can drive around 2 mA, so they should be ok.

--- In msp430@msp4..., "Alan Zubatch" <zubatch@a...> wrote:
> 10k resistors (2 of them) to divide the voltage
down. Keeps the
source impedance low for the ADC, whose input impedance is not high,
only about 2k. Note, this should be compared against the output drive
capability of the sensor. Some sensors are only capable of driving
loads of 100k or more which would require a voltage divider and an op-amp.
> 
> Be careful with your op-amp idea, input voltage range is usually
about 1V below rail. So, if your op-amp has the same supply as your
sensors you'll lose the high end portion to input clipping on the
op-amp. Attenuate before op-amp then gain back up to unity.
> 
> Alan
> 
>   ----- Original Message ----- 
>   From: elcoqui00 
>   To: msp430@msp4... 
>   Sent: Sunday, May 15, 2005 5:31 PM
>   Subject: [msp430] Re: Connecting Sensors to MSP430
> 
> 
> 
>   By 10k do you mean the parallel of the two resistors in the voltage 
>   divider?
> 
>   --- In msp430@msp4..., Matthias Weingart <msp430@p...> wrote:
>   > Voltage divider is ok. 10k impedance is a good choice. With higher 
>   impedance
>   > you need to make your sample interval larger. (there is a formula 
>   in the
>   > datasheet to calculate the sample timing for different input 
>   impedances.)
>   > 
>   > Matthias
>   > 
>   > On Sun, May 15, 2005 at 08:34:35PM -0000, elcoqui00 wrote:
>   > > Hi
>   > > 
>   > > I need to sample two accelerometers and two gyroscopes with the

>   > > MSP430F149's ADC. However, they output an analog signal in
the 0-
>   5V 
>   > > range. So I have to lower it to a 0-2.8V range in order to 
>   interface 
>   > > it with the MCU. I was wondering if it was safe to use a
voltage 
>   > > divisor to do this (2 resistors), or should I use something
more 
>   > > complicated like some kind of amplifier with 0.56 (2.8/5) 
>   voltage gain 
>   > > in order to isolate the MCU load. I was thinking that since the

>   MCU 
>   > > has a very high input impedance the voltage divisor should be 
>   ok, but 
>   > > I'm not sure.
>   > > 
>   > > Any suggestions?
>   > > 
>   > > Thanks,
>   > > Carlos.
>   > > 
>   > > 
>   > > 
>   > > 
>   > > .
>   > > 
>   > >  
>   > > Yahoo! Groups Links
>   > > 
>   > > 
>   > > 
>   > >  
>   > > 
>   > > 
>   >         Matthias
> 
> 
> 
> 
>   .
> 
> 
> 
> 
> 
>
------
>   Yahoo! Groups Links
> 
>     a.. To visit your group on the web, go to:
>     http://groups.yahoo.com/group/msp430/
>       
>     b.. .
>       
>     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service. 
> 
> 
> 
> 



--- In msp430@msp4..., "elcoqui00" <crperez@g...> wrote:
The voltage divider should be fine.  However, if your concerned about 
protecting the MSP.  You might what to use optoisolators as inputs to 
the MSP.  


> Hi
> 
> I need to sample two accelerometers and two gyroscopes with the 
> MSP430F149's ADC. However, they output an analog signal in the 0-5V 
> range. So I have to lower it to a 0-2.8V range in order to
interface 
> it with the MCU. I was wondering if it was safe to
use a voltage 
> divisor to do this (2 resistors), or should I use something more 
> complicated like some kind of amplifier with 0.56 (2.8/5) voltage 
gain 
> in order to isolate the MCU load. I was thinking
that since the MCU 
> has a very high input impedance the voltage divisor should be ok, 
but 
> I'm not sure.
> 
> Any suggestions?
> 
> Thanks,
> Carlos.






The 2024 Embedded Online Conference