Shop OBEX P1 Docs P2 Docs Learn Events
MCP3204 Questions — Parallax Forums

MCP3204 Questions

PThompson509PThompson509 Posts: 6
edited 2011-03-02 09:46 in Accessories
Hi Folks,

I've got the Propeller Pro Dev Board, and the MCP3204 (4 channel) ADC (among other things). This is going to go into my electric car as a display.

What I want to measure is:
a) 0v to 400v (yes, this is dangerous, and will require a voltage divider)
b) -5v to +5v (this is the output of a hall-effect current sensor)
c) 0v to +15v (car switched voltage)

For part a), I'm using a voltage bridge with R1=1M, and R2=12.7K ohms. I will try that out in the open so if it melts, I'll know to try something else. :)

For part b), though, I'm unsure how to do this, as I am under the impression that the ADC only handles 0-5v. Thoughts?

For part c), this will also use a voltage bridge (R1=10K, R2=3.33K).

I'd appreciate a sanity check as well as thoughts on how to deal with the -5v to +5v range.

Cheers,
Peter Thompson

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-02-27 16:06
    You need to convert the -5 to +5V range to 0 to 5V. For that you'll need a power supply with a range of at least -5V and +5V. Presumably you already have a regulated +5V supply. You could use a MAX1044 to convert the +5V to -5V. The output isn't regulated, but should be pretty stable with the minimal load you'd use. You'd want to use a low power op amp like the ICL7611 that can handle the supply range. Effectively you'd have a differential amplifier with one input being the -5V supply and a gain of 1/2 (see here).
  • PThompson509PThompson509 Posts: 6
    edited 2011-02-27 16:59
    Hi Mike,

    Thanks for responding on a Sunday (wasn't expecting anything so soon). :)

    I'll read up on the MAX1044 some more, as that looks promising.

    Another thought I had was to add 5v to the output of the hall effect (thus creating 0v to 10v) and then halving that voltage. That might be easier for me :)

    Do the parts a) and c) make sense?

    Cheers,
    Peter
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-02-27 19:00
    a) & c):
    it's voltage dividers (not "voltage bridges")

    a) Is the range down to 0 important? Or is your actual interest in a range of 10-15V?

    c) Is the range down to 0 important? Or is your actual interest in a range of 300-400V?
  • PThompson509PThompson509 Posts: 6
    edited 2011-02-27 19:16
    Hi PJ,

    Right, voltage divider. I was going by the calculators on the web.

    For a), the range is more important from 300-400v. (this is a lithion-iron-phosphate-iron pack)
    For c), the range is 12-18v. (auto 12v system)

    Cheers,
    Peter
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2011-02-28 07:47
    A simple voltage divider could work for the -5 to +5 signal too.
    10k          10k
    signal ------/\/\/\---o--/\/\/\-----+5
    
    The resistor on the right is tied to 5V. The output at "o" to the ADC is linear:
    0V when the input is -5,
    2.5V when the input is 0V,
    5V when the input is +5V.

    Choose the two resistors so that they don't load down the Hall effect sensor.
  • PThompson509PThompson509 Posts: 6
    edited 2011-02-28 08:45
    Excellent. Thanks for the replies!
  • train nuttrain nut Posts: 70
    edited 2011-03-02 08:55
    Since you are using the propeller to communicate with the 3204 it may be benificial for you to use 3.3V to power the 3204 so no matching circuit or resistors are necessary. However, this will limit the input to the 3204 to 3.3V max or whatever the external reference is set to. Just modify your voltage dividers to limit their output to 3.3V. If the external ref is set to 3.3v I would suggest the output of your voltage dividers not exceed 3V to allow for overshoots of the circuits. Been working with ADCs since they were hugh descreet devices with sampling rates measured in samples per minute.

    Hope this has been helpful.

    Ben
  • PThompson509PThompson509 Posts: 6
    edited 2011-03-02 09:46
    Thanks Ben,

    The board has both 3.3v and 5v on it, so that was why I was going for the 5v solution. Is the 3.3v solution better?

    Cheers,
    Peter
Sign In or Register to comment.