As much loved are I2C IO devices such as the venerable Phillips PCF8574 and TITCA9534, they are arguably one-trick ponies. What if there was a smart I2C IO controller that could emulate these devices - or be it's own?
So many QWIIC devices are dedicated unto themselves and compute emphasis is placed on a single central processing node. The I2C-IO leverages the familiar Arduino platform and puts real-world interfacing using Molex connectors front and center.
The main purpose of the I2C-IO is to efficiently offload sensor and control computing tasks from the host.
* Utilizes the economical ATMega 328PB @ 8MHz
* 8 bits of digital I/O on two separate Molex KK series connectors
* QWIIC I2C bus connection
* Can be programmed for controller, receiver or hybrid (controller/receiver) roles
* Can be powered by FTDI serial connection or I2C bus
* Accepts M3 standoffs
* Same footprint as many L298N motor drive controller boards for DC and stepper mot
This example code will use the I2CIO to emulate an 8-bit I2C digital I/O expander. Other I/O expanders, such as the TITCA9534.
The main idea with this code was to show how to set up a basic I2C receiver device. Other device possibilities are a sensor preprocessor to reduce raw data to a usable form, offloading that task from the controller device. How about an I2C connected fault tolerant co-processor array. Or maybe an SD card storage system accessible through I2C. The possibilities are endless.
With the success of the first build, I finished stuffing and IR soldering two more I2C-IO. After programming and verifying the setup for Arduino, I'll hand solder the MOLEX right angle connectors and the terminal block used as a the external ground connection.
Notes to self on future builds:
Use the black version of the JST (SM04B-SRSS-TB) "SH" series connectors used for the QWIIC I2C. The natural color tends to age and look a bit "roasty" from the exposure to IR in my SMD oven - even with Kapton tape. It's purely a cosmetic issue.
Re-source and continue using the SAMTEC 6-position right-angle SMD connection headers with PCB locator pins. I used the last of those I had on-hand for the unit shown on the right in the above photo. The Harwin version (M20-8890645) without the locator pins will work in a pinch, however I like the finish I get by being able to solder in the oven. Takes the variability away from having to hand-solder.
I used an Atmel JTAG ICE-3 to program the 328PB's with the Arduino bootloader using Atmel Studio 7.
Fuse settings are those used for the LilyPad Arduino board: low_fuses=0xFF high_fuses=0xDA extended_fuses=0x05
Bootloader (Found in the Arduino hardware files --> \hardware\arduino\avr\bootloaders\atmega) ATmegaBOOT_168_atmega328_pro_8MHz.hex
That pretty well does it to program the board in Arduino.