SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By danny136631
#180876
Hi There,

I would like to know if someone has successfully integrated the ADC Block to Edison.
Any input would be greatly appreciated.

Thank you in advance.
By MarkHaysHarris777
#180891
Its arriving in the mail, tomorrow, I hope. I'll let you know after I hook it up and take a couple of readings...

... I'm actually excited to be getting the block; frankly, I was a little disappointed that the Intel mini breakout board did not come with the ADC chip on-board... this was an oversight on Intel's part, me thinks.

Anyway, let you know...
By danny136631
#180899
Thank you for your comments @ MarkHaysHarris777

Same here, it would have been much easier to have ADC on the mini breakout board.

At first, I focused on the Arduino board and it has ADC and started working on it, didn't know at first that the mini breakout board has no ADC chip. Then I bought a couple of the mini breakout boards and now it is quite useless because it is much easier to use the ADC Block with the Base Block.

Can't wait to hear updates from you once you finished setting up your modules.
By MarkHaysHarris777
#180956
danny136631 wrote:Can't wait to hear updates from you once you finished setting up your modules.
hi Danny, I received my 'blocks' today from Sparkfun, including the ADC block. I got my ADC block to successfully 'read' my nine push-botton analog keyboard (simple resistor voltage divider) and I have updated my Intel Edison photo journal on MoHPC with the details; some of which I will post here, but here is the link:

http://www.hpmuseum.org/forum/thread-34 ... l#pid32230

Read through that post. There are two hi-res pics (just click the pic to get a much larger image).

Basically, you will want to read the I2C tutorial posted by Sparkfun (the link is highlighted above). Also, you will want to carefully review the datasheet for the TI ADS1015 chip, which is on the Sparkfun ADC.

You can read the ADC with on-board tools, without any programming, to make sure things work. The tools are already installed on yocto linux on the Edison: i2cdetect, i2cset, i2cget, and i2cdump. My post
on the link above will tell you how to use them.

The ADC is first configured with a write (i2cset) to the configuration register (two bytes, little-endian)... see my post on the link above. Then, you read the ADC (i2cget) to get the value register back (also little-endian) again, see my post on the link above.

You can detect your board before you do anything with i2cdetect -r -y 1

The ADC can be configured (see the datasheet pages 15 and 16) to read continuous, voltage maximum, AinX, or it can be configured as a dual differential analog to digital. You probably want to try my setup from the link above (from the terminal first) before you try differential reads, or before you try programming.

Good luck... and feel free to contact me if you have any questions or need some help|advice.

Cheers,
marcus
:ugeek:
By danny136631
#180957
Hi Marcus,

Thank you for the details. Very nice of you doing all these things. Please allow me to comment also at your Intel Edison photo journal.
Yes, we almost did the same things. I made sure at first if the ADC Block can be detected using the on-board tools.

Just want to let you know that I was able to make it work yesterday. I used as reference for my project, Adafruit's driver for TI's ADS1015 (https://github.com/adafruit/Adafruit_ADS1X15). I can now get readings from the 4 channels and will integrate 1 more ADC Block because I need at least 8 channels for my project.

I am now playing with the ADC channels trying to connect various resistor values and check the ADC readings.

If you don't mind asking, have to tried sending out data to smartphone using Edison? I need to send out the ADC readings to an iPhone app but it seems available samples online are more focus on Andriod.

Let me know your comments.

Thanks and best regards,
Danny