Shop OBEX P1 Docs P2 Docs Learn Events
Analog-to-Digital Converter problem on Propstick Board — Parallax Forums

Analog-to-Digital Converter problem on Propstick Board

Hello.
Im totally new in using propeller board. Currently still learning how to read an analog input in this board and display in serial terminal.

Previously, i already try the the simple analog to digital test instruction i've got here, using potentiometer, but when I turn the knob both way it always displaying "-1" value, instead of displaying actual voltage of potentio output.

Anybody can help me fix this problem? Could I use the PropBOE ADC object on my propstick?

Im using SPIN with PropStick board by the way.

Comments

  • PublisonPublison Posts: 12,366
    edited 2016-11-23 15:21
    Welcome to the forums!

    The PropStick USB does not have an Analog to Digital converter on board. There is a converter on the Board of Education that is used with the example code that you linked to.

    You would have to add an A/D converter to the PropStick in order to use that code.

  • dgatelydgately Posts: 1,621
    edited 2016-11-23 15:26
    The PropStick does not itself have an Analog-to-Digital interface as does the PropBOE or Activity Board. To use the PropBOE ADC object, you will need to use the same chip (AD7993 or a compatible chip) to the ADC chip on the PropBOE. It is a 10-bit I2C analog to digital convertor, though I'm not sure which one (it's not specified in the PropBOE docs).


    Analog Devices AD7993 data sheet: mouser.com/ds/2/609/AD7993_7994-877598.pdf

    dgately
  • As a side note:

    The A-D converter on the BOE
    http://www.analog.com/en/products/analog-to-digital-converters/ad-converters/ad7993.html#product-overview
    Is capable of accepting 0-5 volts. The Propeller can only accept up to 3.3 volts. That means the pin that you had connected to the wiper, (center pin of the pot), may have introduced 5 volts to the pin, and may now be unusable. AD1 will always be ground, so that's OK. AD2 will always be 3.3 volts, so that's OK. So that only leaves one pin that might have been damaged.


    Hope that helps.

  • dgately wrote: »
    It is a 10-bit I2C analog to digital convertor, though I'm not sure which one (it's not specified in the PropBOE docs).

    This is the one called out in the Bill of Materials sheet:

    http://www.digikey.com/product-search/en?keywords=AD7993BRUZ-1-ND
  • Thanks Publison! I was researching & typing while you were posting :-)

    Good advice about 3.3v vs 5v...

    dgately
  • PublisonPublison Posts: 12,366
    edited 2016-11-23 15:48
    Of course the A/D used on the BOE is surface mount. This is the closest I could find for Bread Board friendly:

    http://www.analog.com/en/products/analog-to-digital-converters/ad-converters/ad7811.html#product-overview
  • Publison wrote: »
    Welcome to the forums!

    The PropStick USB does not have an Analog to Digital converter on board. There is a converter on the Board of Education that is used with the example code that you linked to.

    You would have to add an A/D converter to the PropStick in order to use that code.

    Thanks Publison! So thats why the PropBOE ADC object not working on my board right?

    Could I read analog input in my propstick without any ADC external chip?

    I've read the AN008 document which is explain about sigma delta ADC here, it only need a couple of capacitors and resistors which connect to counter input and counter output, is it work on my propstick?

    Nico
  • dgately wrote: »
    The PropStick does not itself have an Analog-to-Digital interface as does the PropBOE or Activity Board. To use the PropBOE ADC object, you will need to use the same chip (AD7993 or a compatible chip) to the ADC chip on the PropBOE. It is a 10-bit I2C analog to digital convertor, though I'm not sure which one (it's not specified in the PropBOE docs).


    Analog Devices AD7993 data sheet: mouser.com/ds/2/609/AD7993_7994-877598.pdf

    dgately

    Thanks for the response dgately!
    Ya, just now I considered that the PropBOE ADC object cant be implemented on my board because Propeller BOE have an ADC circuit on board (from here) while my PropStick not.

    Currently I'm trying to read analog input from potentio without any external ADC chip, do you think this is possible?

    Nico
  • kwinnkwinn Posts: 8,697

    dgately wrote: »
    The PropStick does not itself have an Analog-to-Digital interface as does the PropBOE or Activity Board. To use the PropBOE ADC object, you will need to use the same chip (AD7993 or a compatible chip) to the ADC chip on the PropBOE. It is a 10-bit I2C analog to digital convertor, though I'm not sure which one (it's not specified in the PropBOE docs).


    Analog Devices AD7993 data sheet: mouser.com/ds/2/609/AD7993_7994-877598.pdf

    dgately

    Thanks for the response dgately!
    Ya, just now I considered that the PropBOE ADC object cant be implemented on my board because Propeller BOE have an ADC circuit on board (from here) while my PropStick not.

    Currently I'm trying to read analog input from potentio without any external ADC chip, do you think this is possible?

    Nico

    Could possibly be done using an RC circuit.
  • kwinn wrote: »

    Could possibly be done using an RC circuit.

    Thanks for the info kwinn,
    Could you please attach me the document (link or something) refer to RC circuit for ADC in propeller?

    Nico
  • Nico,

    It may help to look at the Propeller Application Note #1 for an example of a Sigma-Delta Analog to Digital Convertor, with code...

    The URL: https://parallax.com/sites/default/files/downloads/AN001-P8X32ACounters-v2.0.pdf

    And there are several threads here on the forum that discuss ADC circuits, using RC circuits. Here's one: forums.parallax.com/discussion/119651/how-to-make-adc-with-rctime

    dgately
  • dgately wrote: »
    Nico,

    It may help to look at the Propeller Application Note #1 for an example of a Sigma-Delta Analog to Digital Convertor, with code...

    The URL: https://parallax.com/sites/default/files/downloads/AN001-P8X32ACounters-v2.0.pdf

    And there are several threads here on the forum that discuss ADC circuits, using RC circuits. Here's one: forums.parallax.com/discussion/119651/how-to-make-adc-with-rctime

    dgately

    Thanks mate!
  • Publison wrote: »

    I've read the AN008 document which is explain about sigma delta ADC here, it only need a couple of capacitors and resistors which connect to counter input and counter output, is it work on my propstick?

    Nico

    Nico,
    The circuit in AN008 requires a very close connections to the pins. It would be very hard to do it on a breadboard, due the increased capacitance of the breadboard connectors. You may get a reading, but it may not be accurate. Best to use an A/D converter.

  • Publison wrote: »
    Publison wrote: »

    I've read the AN008 document which is explain about sigma delta ADC here, it only need a couple of capacitors and resistors which connect to counter input and counter output, is it work on my propstick?

    Nico

    Nico,
    The circuit in AN008 requires a very close connections to the pins. It would be very hard to do it on a breadboard, due the increased capacitance of the breadboard connectors. You may get a reading, but it may not be accurate. Best to use an A/D converter.


    I think i'm going to buy external ADC then, thanks Publison, really help!
Sign In or Register to comment.