I2C master mode emulator

I2C is a popular data bus to communicate with inter-board peripherals. Today I2C based chips and modules are widely available in many categories, including data storage, ADC/DAC, I/O Expanders, sensors, etc.

The I2C master mode emulator allows communication with I2C devices by sending or receiving data to/from the I2C bus. To issue the I2C commands, the emulator should connect to a PC over the USB port. After initializing the emulator, the PC and directly control the I2C slave chip/module.

Finished prototype of the I2C Terminal

This emulator is base on ATmega16A MCU. The USB communication channel is develop using the V-USB firmware.

Initially, we develop this emulator to work with 5V I2C devices, but later it has extended to work with 3.3V I2C devices. The 3.3V design is still under testing, and at the prototyping stage, we found a couple of issues in 3.3V mode. 

In 3.3V mode, the required output level is available only if the emulator is in a "ready" state. In all the other states, it provides 5V output. Therefore in 3.3V mode, necessary precautions need to be taken to protect the slave device from over-voltage damages. 

To build the prototype, we use single side home-made PCB. The dimensions of the PCB are 96.77mm × 110.73mm.

Internal view of the finished prototype.

This emulator needs an external power supply, and the recommended supply voltage is between 12V - 15V. 

The control software of the emulator is developed using libusb and tested only with Linux operating systems. 

The control software source code, PCB design, schematics, firmware source code, and compiled binaries of this emulator are available at my GitHub repository. The complete documentation is also available in the wiki section of the GitHub repository.

Comments