Is there any way to read analogue input with the omega?



  • I already figured out that the omega itself has digital pins only. I also know about the two ways to simulate analogue output with the omega (digital PWM and PWM via the Servo Extension).
    But how about a analogue input to read data as coming from potentiometers, microphones, photocells and many other sensors? I wonder how you guys thought of using sensors at all and connect them with IoT applications via the omega.

    The only way to use analogue input I found so far is with the Arduino Dock. But since I need to write my code for the Arduino then as well, there is no point in using an Omega on an Arduino Dock instead of a regular Arduino, is there?

    I'm grateful for any help or explanation :)


  • administrators

    @Peter-Harrald Yep, the only way to get analog input would be to use an Arduino Dock or to connect an external ADC chip to the Omega GPIOs.

    We're considering adding an ADC/DAC to a future Dock or Expansion, but no concrete plans yet, so stay tuned!
    We're also thinking of/working on ways to make the Arduino Dock usable without having to write a bunch of Arduino code as well.



  • @Lazar-Demin @Peter-Harrald I think the idea of using an external ADC chip is a good idea. In particular there are quite a few I2C ADC chips available that would be suitable (both for A->D and D->A) which would allow control without taking up usage of other GPIO pins. In fact having an Omega Expansion that did A->D and D->A via I2C could be a valuable addition to the Omega offerings.

    @Lazar-Demin I would be most interested in ways to make the Arduino Dock usable with writing additional Arduino code - I will definitely keep my eye open for that one :-)



  • You can also consider a hack to sample an Analog value with a digital pin - thought it isn't very fast, and can take a bunch of CPU, and open the potential to burn out the pin or chip, yet, it may give you a simple solution:
    http://www.raspberrypi-spy.co.uk/2012/08/reading-analogue-sensors-with-one-gpio-pin/



  • Further to my earlier comment relating to I2C chips for analog conversion, I have been doing a bit of research and think the following chips could be interesting candidates (in particular the third one):

    1. AD7997/AD7998 - these provide I2C access to 8 channels of ADC
    2. AD5629R/AD5669R - these provide I2C access to 8 channels of DAC
    3. AD5593R - this provides I2C access to 8 channels of analog or digital input or output. Each of the 8 channels can be configured independently via I2C as one of:
      • Analog input
      • Analog output
      • Digital input
      • Digital output

  • administrators

    @Kit-Bishop Thanks for finding these for us! We will do some research and play around to see which one would be the best choice for the new dock.



  • @Boken-Lin Look forward to seeing an A/D or D/A (or both) dock that uses I2C. If it is of any assistance, I could probably assist by writing C/C++ code to access such a dock.



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