Author Topic: I2C communication USB to I2C converter  (Read 1334 times)

0 Members and 1 Guest are viewing this topic.

Offline Nikos A.Topic starter

  • Regular Contributor
  • *
  • Posts: 240
  • Country: cy
I2C communication USB to I2C converter
« on: September 01, 2020, 12:43:24 pm »
Hi everyone,

I am designing a board that incorporates the bq27421 battery gauge. Reading this Application Report https://www.ti.com/lit/an/slua790/slua790.pdf?ts=1598963347236&ref_url=https%253A%252F%252Fwww.google.com%252F, the author uses an I2C master control panel (see pg3) to communicate with the slave.



 That seems really convinient before starting developing the firmware.

I suppose that this requires a USB to I2C converter something like this https://learn.adafruit.com/adafruit-ft232h-breakout/overview isn't it? Also, I believe is required some kind of software to run the I2C control panel.. So I want to ask if someone has to recommend any PC based I2C master tool to interact with I2C slaves.

Thanks
Nick
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: I2C communication USB to I2C converter
« Reply #1 on: September 01, 2020, 01:15:07 pm »
https://github.com/harbaum/I2C-Tiny-USB

works reliably but not very fast

otherwise: MCP2221

simple to use and faster; a plus is, that it doesn't require any external components like a crystal; although I haven't done any longtime test so far;
 

Offline jhenderson0107

  • Regular Contributor
  • *
  • Posts: 134
  • Country: us
    • Elk Engineering
Re: I2C communication USB to I2C converter
« Reply #2 on: September 01, 2020, 01:23:08 pm »
I have this one and it works well:  https://www.crowdsupply.com/excamera/i2cdriver
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8276
  • Country: de
  • A qualified hobbyist ;)
Re: I2C communication USB to I2C converter
« Reply #3 on: September 01, 2020, 01:39:01 pm »
Arduino, BusPirate, RasPi, ... anything with an MCU and an USB port.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7458
  • Country: pl
Re: I2C communication USB to I2C converter
« Reply #4 on: September 01, 2020, 01:47:04 pm »
Any VGA/DVI/HDMI output contains an I2C master but it takes software to use it.

Very easy on Linux.
 

Offline rvalente

  • Frequent Contributor
  • **
  • Posts: 736
  • Country: br
Re: I2C communication USB to I2C converter
« Reply #5 on: September 01, 2020, 04:09:40 pm »
Bus pirate, can't think of anything easier.

Plug it, open a terminal, done!
 


Offline Scrts

  • Frequent Contributor
  • **
  • Posts: 800
  • Country: lt
Re: I2C communication USB to I2C converter
« Reply #7 on: September 02, 2020, 12:43:34 am »
I've used Bus Pirate for hobby use, which is great if you send a single command here and there.
And we use TotalPhase stuff for work: https://www.totalphase.com/products/aardvark-i2cspi/, which has single/group command mode as well as bulk/script send/receive plus EEPROM read/write app.
 

Offline Nikos A.Topic starter

  • Regular Contributor
  • *
  • Posts: 240
  • Country: cy
Re: I2C communication USB to I2C converter
« Reply #8 on: September 02, 2020, 09:00:20 am »
Thank you all for your inputs!! Bus Pirate looks like a great option, that was exactly what I was lookign for!!!!

Thanks!!

 

Offline evac

  • Contributor
  • Posts: 28
  • Country: pt
Re: I2C communication USB to I2C converter
« Reply #9 on: September 02, 2020, 09:24:34 am »
https://github.com/harbaum/I2C-Tiny-USB

works reliably but not very fast

The I2C-tiny has worked pretty well for me.

Perhaps not the best suited for your specific application, but one big advantage at least for me is that there is Linux kernel module for it which creates a new bus in the kernel I2C subsystem.
This means that you can leverage existing kernel modules for I2C devices instead of having to write your own.
E.g. if you connect say an LM45 sensor to the I2C-tiny, it will be natively recognized in Linux and show up in lm_sensors and other monitoring utilities.
Even the bq27421 has a Linux driver, so you could connect it and it should show up as a battery.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf