Shop OBEX P1 Docs P2 Docs Learn Events
New project using Propeller. Need recommendation for ADC chip — Parallax Forums

New project using Propeller. Need recommendation for ADC chip

Don MDon M Posts: 1,654
edited 2011-09-20 07:03 in Propeller 1
I am starting a new project and one of the features will be to measure the voltage of the 18V battery pack. What I am looking for is recommendations for an ADC chip. Which one is popular, simple to use? Accuracy to .1 volt would be sufficient.

I haven't messed with any ADC chips as of yet so this is a new area for me to delve into.

Thanks.

Comments

  • JonnyMacJonnyMac Posts: 9,235
    edited 2011-09-19 19:15
    MCP320x series works well and there's lots of code in ObEx. It has a 5v limit so you'll use a precision divider to scale down your battery voltage.
  • frank freedmanfrank freedman Posts: 1,983
    edited 2011-09-19 19:38
    8 bit device should do fine giving 70mV per step, but the mcp320x or ltc1286 are 12 bit serial interface. The ltc device will do about 11ks/s and the mcp3201 tops out at about 100ks/s. The microchip devices are well represented in the OBEX. I have used the ltc1286 as drop in equivalent under spin; probably could only do that under PASM at the lower sample rate of the ltc chip. If you have i/o pins to spare you can go parallel interface.

    Check out TIs offerings as well. They sometimes have interesting devices.

    Frank
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-19 20:22
    Dedicated ADC chips are overpriced compared with the Atmel ATTINY13 MCU, which has multiple 10-bit ADC channels and a built-in voltage reference. You can easily program this chip to be the ADC of your dreams, at a fraction of what you'd pay for single-purpose ADC ICs. Moreover, it has only eight pins and a tiny footprint. Check it out!

    -Phil
  • jmgjmg Posts: 15,189
    edited 2011-09-19 23:27
    Don M wrote: »
    I am starting a new project and one of the features will be to measure the voltage of the 18V battery pack. What I am looking for is recommendations for an ADC chip. Which one is popular, simple to use? Accuracy to .1 volt would be sufficient.

    I haven't messed with any ADC chips as of yet so this is a new area for me to delve into.

    Thanks.

    If you want smart and flexible, this one appeals to me :

    http://www.ti.com/product/ina226

    with 0.1% precision, and 36V rating, you can measure Voltage, Current and power, with no additional precision parts needed.
  • ManAtWorkManAtWork Posts: 2,183
    edited 2011-09-20 03:36
    In my current servo project I had a (quarter) LM339 comperator left over. I decided to use it to measure the supply voltage. I simple used the sigma delta method (see prop timer tutotial) but not with the timers but by polling the comperator input and toggling the feedback output pin with software. My loop runs at 24kHz so I get an 8 bit result every 11ms. It doesn't even use up a cog because the current control loop cog runs it as side task.
  • Don MDon M Posts: 1,654
    edited 2011-09-20 05:20
    Thanks everyone for some great ideas. The requirements are not stringent at all. The battery voltage will only be read occasionally on demand. I had a look at the OBEX and did find some good code examples for the MCP320x series. I went ahead and ordered some free "samples" from Microchip.

    @Phil- I like your thinking in terms of saving money. And it looks like it would be an interesting alternative however it ends up being a learning curve for me with another micro.
  • RS_JimRS_Jim Posts: 1,773
    edited 2011-09-20 06:12
    @Phil.








    Dedicated ADC chips are overpriced compared with the Atmel ATTINY13 MCU, which has multiple 10-bit ADC channels and a built-in voltage reference. You can easily program this chip to be the ADC of your dreams, at a fraction of what you'd pay for single-purpose ADC ICs. Moreover, it has only eight pins and a tiny footprint. Check it out!
    My question is what the entry cost for a one off?
    Jim
  • Martin_HMartin_H Posts: 4,051
    edited 2011-09-20 07:03
    I've been curious about the Atmel ATTINY13 MCU as well as my only experience with Atmel chips is using them via the Arduino tool chain.

    If you're not concerned about size then a DorkBoard (http://www.wulfden.org/TheShoppe/freeduino/dorkboard.shtml) might work for you. It is basically an Atmel 328P with an Arduino bootloader. The cost of entry is low as the development tools are free and the P4 programmer is cheap also. You might even be able to use your propeller programmer with some fiddling.

    It should be a piece of cake to write a program which does an analog read and then a serial out. The propeller can then serial read on a pin connected to the DorkBoard's Tx pin. You could also use I2C as well. You would need to make sure you handle the usual 5 volt to 3.3 voltage issue, although reading the 328p's data sheet you may be able to run it off 3.3 volts also.
Sign In or Register to comment.