Arduino Dock 2 Analog Read Issue



  • Arduino Dock 2 analog read issue.

    It seams that pins A4 and A5 I have voltage present on them with nothing else plugged in. With those pins in analogRead mode I have 5v on A4, A5 to ground. This is causing false reading in the propgram. Its almost like there is an internal pull up resistor activated on these pins. If I ground the pins it will bring my reading to 0 scale unground and I read full scale.

    Any help or advice would be awsome thanks.



  • @rich-no Yes, pin A4 is I2C SDA and pin A5 is I2C SCL.
    They are hard-wired to Omega's I2C pins via the TXS0108E bi-directional, open drain, 5V-to-3.3V level shifter which has got pull up resistors inside to 5V (at 5V side).



  • So than how can these be used as an analog input 0-5v with that situation. Is there a way to turn off the pull up resistor. I saw that on the data sheet and was puzzled if you can not turn off the pull up resistor to even allow them to be used as an analog input seams useless, the pull up resistor would be over powering your variable input all the time.



  • What also seams kinda odd is a RedBoard from spark fun using the same Atmel megas328p chip does not seam to have this issue.



  • Any ideas how to turn off the pull up resisters for the i2c interface allowing proper analog reading.

    I have confirmed with the spark fun RedBoard using the same micro controller. Using the same code that I used in the omega with no issues.

    I'm thinking there may be an issue in the compiler some how. Is there a way to program them direct using a usb to serial or board like the TI launch pad ware you can get the rx,tx,reset pins from the usb to serial. I have tried both the ti and and older arduino with not much success.



  • @rich-no
    On Arduino Dock 2 a TXS0108E IC provides the connection between Omega's 3.3V world and Arduino's 5V world.
    It has an OE (Output Enable) pin (pin 10).
    On Arduino Dock 2 this pin is High - it's tied to 3.3V with a 1kOhm SMD resistor - so the IC is enabled by default.
    You could disable it by setting the OE pin Low, which places all I/Os in Hi-Z state and disables also the pins' pull-up resistors.

    When TXS0108E is disabled on Arduino Dock 2

    • you can use Arduino's each ADC channel - ATmega328P-AU (32-pin TQFP) has got eight (8) ADC channels
      but
    • you can not program Arduino
    • I2C and/or serial communication is not possible between Omega and Arduino

    So this is not a bug this is a feature of Arduino Dock 2.

    Do you really want to use 6 (8) 10-bit ADC channels at once?



  • Thanks for that information. Yes I actually need to use all 8 of the atmega's analog inputs. I was able to solder some small hookup wire to the un used pins for the other inputs. Is it possible to set the OE pin low via a python script. I already have one running a serial to mqtt for my project.



  • Ok I see now. That OE is hard wired. if you take that off serial will not work ether. essentially you will have no communication between the omega and the atmel. so the only solution it to physically cut the traces that feed the SCL and SDA tracer coming off the TXS0108E IC. Ill get the analog inputs back and still be able to program and communicate via serial the atmel.

    This seams like a weird oversight on the design of the board. with the conversion IC they way it is analog 4 and 5 are useless. mabey those can be omitted from the riser and replaced by 6 and 7 that are not being used.


Log in to reply
 

Looks like your connection to Onion Community was lost, please wait while we try to reconnect.