August 01
Table of Contents 1 Features Technical Specifications Installation Hardware Board Overview GPIO Breakout Pins (K, K) Level Converters (K, K) Analog-to-Digital Converter Software Python AbioCard GUI 6 6 6 Legal Information Disclaimer Trademarks Contact Information Revision History Date Authors 01-0- Peter S'heeren Description Initial release.
1 Features Breakout board for GPIO connector. On-board ADC chip with IC interface. Eight analog-to-digital channels, 0.0 V input range. Four bidirectional. V V level converters. Fits on a breadboard. For use with Raspberry Pi model A+, model B+, and Raspberry Pi. For use with Banana Pi M1+, M, M. For use with Orange Pi, Mini, Mini, Plus. Technical Specifications Dimensions 9 mm x 0 mm x 1 mm (W x D x H) Weight 1 g Installation 0x pin ribbon cable with female connectors
Hardware Board Overview 1 Mark Label Description 1 K1 x0 pin box header for connecting to Raspberry Pi GPIO header K Even-numbered GPIO pins K Odd-numbered GPIO pins K, Level converter. V pins LO[1..] K, Level converter V pins HI[1..] GPIO Breakout Pins (K, K) The pins of K and K are directly connected with the GPIO header on the host computer. Additionally, a number of pins are wired to the on-board ADC chip and voltage level converters. Level Converters (K, K) The board incorporates four bidirectional voltage level converters. Each converter converts between V on HI[1..] and. V on LO[1..].
Analog-to-Digital Converter The board incorporates a Maxim MAX1161EEE+ analog-to-digital converter chip that operates at. V. The chip converts voltages in the range of 0...0 V to 1-bit values. The eight analog inputs are shared with GPIO pins: ADC pin GPIO pin GPIO function PCB Labels AIN0 1 GPIO 1 AD0, #1 AIN1 16 GPIO AD1, # AIN 1 GPIO AD, # AIN GPIO AD, # AIN GPIO 1 AD, #1 AIN 6 GPIO 16 AD, #16 AIN6 GPIO 0 AD6, #0 AIN 0 GPIO 1 AD, #1 The chip is connected to SDA1 (pin ) and SCL1 (pin ) of the GPIO header. The IC slave address is 0110011b / h. The chip supports 00 khz Fast Mode and 1. MHz High-Speed Mode. The chip synchronizes analog-to-digital conversion with IC communication. Conversion and reading of the results happen during a single SLA+R transfer. When the chip has recognized its slave address, analog-to-digital conversion starts at the falling edge of the ninth clock. The chip holds low SCL for the duration of the conversion (this is known as IC clock stretching). After the conversion completes, the chip stores the results in memory and releases SCL. The IC master then reads the values.
Software Python # adccobbler_ex.py import RPi.GPIO as gpio import smbus # Hardware configuration IC_AD_ADC = 0x # Settings - change these if required IC_BUS = 1 GPIO_CH = # Disable GPIO warnings gpio.setwarnings(false) # Use BCM numbering for the GPIO pins gpio.setmode(gpio.bcm) # Use /dev/ic-<n> where <n> is the first parameter bus = smbus.smbus(ic_bus) # Initialize the MAX1161 chip bus.write_ic_block_data(ic_ad_adc,0xd,[0x0f]) # Initialize the GPIO pin gpio.setup(gpio_ch,gpio.in) try: while 1: # Read data. When the ADC recognizes its slave address it will trigger A/D # conversion, so we've to read all data bytes at once. # # The api of smbus has no function for just reading multiple bytes, so # let's write the configuration byte before reading. # adcres = bus.read_ic_block_data(ic_ad_adc,0x0f,16) # Read the GPIO pin input = gpio.input(gpio_ch) # Print results print adcres, input except KeyboardInterrupt: pass Run the program with root permissions: 6
$ sudo python adccobbler_ex.py The example Python program shows how to sample all eight analog inputs whilst reading one of the digital I/O lines. Press CTRL-C to exit the program. The program uses module RPi.GPIO for performing digital I/O, and module smbus for accessing the IC bus. These modules require root permissions. The ADC as a setup byte and a configuration byte. Together these bytes define the behavior of the ADC. The program writes both bytes as detailed next. Setup byte: Bit Name Value Description REG 1b 6.. SEL[..0] 101b CLK 0b Use internal clock. BIP/UNI 0b Unipolar. 1 RST 1b Don't reset configuration register to default. 0 X 0b Don't care. Select setup byte. Use internal reference. Configuration byte: Bit Name Value REG 0b 6.. SCAN[1..0] 00b..1 CS[..0] 0111b 0 SGL/DIF 1b Description Select configuration byte. Scan up from AIN0 to the input selected by CS CS0. Scan AIN0..AIN. Single-ended mode. The API of the smbus module is a bit simplistic in that it can't initiate a SLA+R transfer that reads a number of data bytes. Nevertheless, use of the smbus module is recommended as it is widely known and available. AbioCard GUI You can use the AbioCard GUI program for directly accessing the ADC chip on the board. The ADC chip on the board is compatible with the ADC on the AbioCard and has the same IC slave address. As such, the AbioCard GUI program sees the as an (incomplete) AbioCard and connects to it successfully.
6 Legal Information Disclaimer Axiris products are not designed, authorized or warranted to be suitable for use in space, nautical, space, military, medical, life-critical or safety-critical devices or equipment. Axiris products are not designed, authorized or warranted to be suitable for use in applications where failure or malfunction of an Axiris product can result in personal injury, death, property damage or environmental damage. Axiris accepts no liability for inclusion or use of Axiris products in such applications and such inclusion or use is at the customer's own risk. Should the customer use Axiris products for such application, the customer shall indemnify and hold Axiris harmless against all claims and damages. Trademarks Maxim Integrated is a trademark of Maxim Integrated Products, Inc. Raspberry Pi is a trademark of the Raspberry Pi Foundation. All product names, brands, and trademarks mentioned in this document are the property of their respective owners. Contact Information Official website: http://www.axiris.eu/