Community
cancel
Showing results for 
Search instead for 
Did you mean: 
APand9
Novice
1,362 Views

How to use the ADC on Arduino Breakout board?

Jump to solution

Hi All

I am using Intel Edison with the Arduino Breakout board, I want to do programming using Arduino IDE. Although I am able to run the blink example from Arduino IDE.

I want to use the ADC A0 - A4 on the breakout board. If I connect any potentiometer to the ADC port and run the ADC example from Arduino, I do not see any change in the ADC value as i move the pot. Is there any configuration that needs to be done to make the ADC work? I understand that the ADC is connected over SPI to Intel Edison and may need some configuration changes.

I went through the article at http://www.emutexlabs.com/project/215-intel-edison-gpio-pin-multiplexing-guide http://www.emutexlabs.com/project/215-intel-edison-gpio-pin-multiplexing-guide but i was not able to make the ADC work.

Any help or pointers in this direction would be helpful.

Final Aim: To use the ADC of the Arduino breakout board through Arduino IDE.

Thanks

Amey

1 Solution
Diego_V_Intel
Employee
112 Views

Hi AmeyPandit,

I recommend you to try with the AnalogInOutSerial example, it is in File>Examples>Analog. The ADC should work only by uploading that example code. There is no need to do additional configurations.

On the other hand, I'd like to know how you are connecting the potentiometer. It would be great if you can post a picture of your hardware to check it.

Regards,

Diego

View solution in original post

4 Replies
Diego_V_Intel
Employee
113 Views

Hi AmeyPandit,

I recommend you to try with the AnalogInOutSerial example, it is in File>Examples>Analog. The ADC should work only by uploading that example code. There is no need to do additional configurations.

On the other hand, I'd like to know how you are connecting the potentiometer. It would be great if you can post a picture of your hardware to check it.

Regards,

Diego

View solution in original post

APand9
Novice
112 Views

Hi @ DiegoV_Intel

Thank you so much for the help . I tried the example you mentioned and it worked for me.

Following is my schematic

I have another query on servo motor interface. I want to drive a servo motor using Edison.

If I power the servo motor using a separate power supply (5V) and connect the PWM pin of the servo to the a digital pin (e.g. pin 3) and

try to control the servo using Arduino servo library. Will it work? Any configuration are needed here?

(Note: The gnd pin of servo is also connected to ground pin of the board).

The above scenario has worked for me on a Arduino Mega and Uno board.

Thanks

Amey

Diego_V_Intel
Employee
112 Views

Hi AmeyPandit,

Yes, if you connect the servo motor that way it should work. There is only a little detail when using the PWM with the Edison Arduino Board. The Edison has 4 PWM pins, so there is something called swizzler on the Arduino Expansion Board that allows re-routing the 4 PWM pins of the Edison module to the 6 possible PWM pins the Arduino footprint has. I recommend you to check the following document (page 15) to get more details about the swizzler: http://www.intel.com/content/www/us/en/support/boards-and-kits/000005583.html Intel® Edison Kit for Arduino* Hardware Guide for Boards and Kits

Regarding the ADC issue, I understood that now it's working fine, right?

Regards,

Diego

APand9
Novice
112 Views

Hi @ DiegoV_Intel

Yes. The ADC is now working. Thanks.

Will test out the PWM part.

Thanks

Amey

Reply