Banana Pi compatibility?
The ADC Pi is an Analogue to Digital converter for the Raspberry Pi
07/08/2020
Posted by:
Manbehindthemadness
Ubuntu 5.3.5 with matching sunxi overlays.
07/08/2020
Posted by:
andrew
I have not tested the ADC Pi with the Banana BPI M2 Zero so I do not know if it is compatible but according to the documentation for the board, the GPIO pinout is the same as the Raspberry Pi so it should work.
Can you check that the ADC Pi is connected in the correct direction? According to the documentation, pin 1 should be next to the micro SD card socket so the ADC Pi should sit on top of the Banana Pi with the connectors and CPU sitting in between the two boards.
I have ordered a Banana BPI M2 Zero, when it arrives I will test it with all of our boards to check if they are compatible.
07/08/2020
Posted by:
Manbehindthemadness
07/08/2020
Posted by:
andrew
07/08/2020
Posted by:
Manbehindthemadness
08/08/2020
Posted by:
Manbehindthemadness
08/08/2020
Posted by:
andrew
By connecting to the SDA and SCL pads on the ADC Pi you are bypassing the MOSFETs but that does mean you are passing 5V into the GPIO header on the Banana Pi. The 5V passes through a 10K resistor first so hopefully, the current is low enough not to damage the I2C bus on the Banana Pi but you may not want to leave it plugged in too long.
When the Banana BPI M2 Zero I have ordered arrives I will connect the I2C port to my logic analyser and oscilloscope which should hopefully tell me why it is not communicating with the ADC Pi.
10/08/2020
Posted by:
andrew
I will let you know as soon as it has arrived and I have worked out why the ADC Pi is not working correctly.
21/08/2020
Posted by:
Manbehindthemadness
21/08/2020
Posted by:
Manbehindthemadness
24/08/2020
Posted by:
andrew
I used the BPI-M2 zero Ubuntu 19.10 Eoan Ermine Mainline Kernel 5.3.5 image.
The following software packages were needed to get I2C working with python.
sudo apt-get install python3-dev python3-smbus i2c-tools git
The first thing I discovered was that on the Banana BPI M2 Zero the I2C bus is on address 0 instead of address 1 so all i2c commands like i2cdetect need to use 0 for the target, for example, sudo i2cdetect -y 0.
With i2ctools installed I ran i2cdetect and the ADC Pi showed up on addresses 0x68 and 0x69.
The I2C bus only appears to be configured to have root access on Ubuntu so you have to use sudo to open any python programs. I also couldn't find the python-smbus package in the apt repositories so you can only access I2C using Python 3.
So far I have successfully tested our python library with the ADC Pi, ADC Differential Pi, IO Pi and RTC Pi. Each of the python classes needed updating to detect it is running on a Banana BPI M2 Zero and use the correct I2C bus. I have uploaded an updated version of the libraries to GitHub.
I haven't managed to get our other boards working yet. The Servo Pi and I2C Switch use the RPi.GPIO package and this doesn't seem to be compatible with the Banana Pi. I haven't tested the SPI bus yet but hopefully, I can find a way to make it work.
02/09/2020
Posted by:
andrew
I couldn't get the SPI bus working under Ubuntu but so I decided to try the Raspbian OS image.
The I2C bus is on port 0 instead of 1 as it was with Ubuntu and SPI only has one port SPI0.0 so it will not work correctly with our ADC DAC Pi or Expander Pi boards as they require SPI0.1 to access the DAC chip.
I have found the following boards work with Raspbian.
1 Wire Pi Plus and Zero with OWFS (set the i2c bus to 0 in /etc/owfs.conf)
ADC Pi with Python (Works correctly)
ADC Differential Pi with Python (Works correctly)
Expander Pi with Python (ADC, IO and RTC work but DAC is not available)
IO Pi Plus and Zero with Python (Works correctly)
I2C Switch with Python (Works correctly but needs sudo to run the python demos)
RTC Pi with Python (Works correctly)
Servo PWM Pi with Python (Works correctly but needs sudo to run the python demos)
I have only tested the boards with Python but our other libraries should work if the I2C bus is set to target I2C 0.
It is a shame the SPI port does not work fully but at least most of our boards are working.
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.