ADC Pi and ADC Pi Plus on a BeagleBone Black

Created 02/10/2015 | ADC Pi and ADC Pi Plus on a BeagleBone Black

ADC Pi and Beaglebone BlackYou to use the ADC Pi board on a BeagleBone Black board. We have a new folder on our GitHub account for BeagleBone Black files at https://github.com/abelectronicsuk/bbb

These instructions are based on the default installation of Angstrom which is supplied with the BeagleBone Black.

All commands below in code boxes are to be typed into either a terminal on the desktop or ssh terminal connected to the BeagleBone Black.

Setup static IP and Nameservers:

First we need to setup a static IP address on the board and setup your nameservers and default gateway

cd /var/lib/connman/

ls

to get ethernet_xxxxxx folder name

cd /usr/lib/connman/test

./set-nameservers ethernet_9059af580d34_cable 208.67.222.222 208.67.220.220

(these are www.opendns.com free DNS servers)

echo "nameserver 208.67.222.222" >> /etc/resolv.conf

Now we will set the IP address to be 10.0.0.0.38, the net mask 255.255.255.0 and default gateway to 10.0.0.1 You should change this to work with your local network IP range.

./set-ipv4-method ethernet_9059af580d34_cable manual 10.0.0.38 255.255.255.0 10.0.0.1

Restart ssh session on new ip address

reboot  

Once the BeagleBone Black has restarted ssh back into the board or open a terminal window if on the desktop and continue to update the distribution.

opkg update

Now upgrade the system, this can take some time.

opkg upgrade

reboot

Once the BeagleBone Black has restarted ssh back into the board or open a terminal window if on the desktop and install python libs and tools.

opkg install python-pip python-setuptools python-smbus

You will now have python support for I2C tools and associated libs installed.

Connecting the ADC Pi to the BeagleBone Black

Turn off and unplug your BeagleBone Black

ADC Pi   BeagleBone Black P9
1 3.3V 3
2 5V 5*
6 GND 1
3 SDA 20
5 SCL 19

You also need to add a 2K resistor between the SDA to 3.3V and SCL to 3.3V. The Beaglebone Black needs a lower pullup resistance than the Raspberry Pi.

* If you are powering your BeagleBone Black via the USB lead this will need to be connected to pin 7 as pin 5 is only powered via the power socket.

Checking the i2c connections are working:

To test the i2c connection to your connected board type in a terminal window:

i2cdetect -y -r 1

This should return the following:

root@beaglebone:~# i2cdetect -y -r 1
0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 69 -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

68 and 69 are the connected ADC Pi board.

To run the demo code to use the attached ADC Pi board

Download sample code from AB Electronics GitHub account.

cd Desktop

git clone git://github.com/abelectronicsuk/bbb.git

cd bbb

cd adcpiv2

python adc.py

the output values will scroll down the terminal window

Quit with ctrl+c

Reading the ADC Pi on a BeagleBone Black

Optional:

You can install VNC server if needed to allow remote desktop access with the following commands.

opkg install angstrom-x11vnc-xinit

reboot

From a vnc-client (vnc viewer), access 10.0.0.38:5900

bbb desktop will load

Shop

Support

Click to contact us.
X

Have any Questions?

Send us any questions about this page or product and we will reply within 24 hours.

Submit your Message

X

Have any Questions?

Thank you for contacting us.

We will respond to your enquiry in the next 24 hours.

You can find answers to many questions and additional product support in our Knowledge Base and the Community Forum.