Ocena wątku:
  • 0 głosów - średnia: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Unsupported I2C Devices
#1
Hello,

Is there any way to connect an unsupported device to the I2C port? I am looking for a way to connect the Texas Instruments FDC2214 capacitance converter to a TinyControl LAN controller. Thanks.

-Jan
Odpowiedz
#2
No, we'd have to add support for it.
Which version LK you use?
pozdrawiam
tomek
Odpowiedz
#3
Hello,

I think there are so many i2c capable devices, that it would make sense to allow some custom settings, so you wouldn't have to add specific support manually. If the custom sensor setup is too complicated to be configured via a web form, you could allow to import the config file and provide some template for it. And if you are using some public version control system, like github, you could create a device library there - the community would gladly give you their config files, like they do for other projects.

I joined this thread, because we are using several LK3.8 with 1.49.d as environmental sensors and powermeters in our server rooms, and we would like to read data from our MPPT solar inverters via i2c bus.
It uses i2c address 8 as a slave, data packet has following structure:

struct {
int  uin;   //input voltage 0.01V
int  iin;   //input current 0.01A
int  uout;   //output voltage 0.01V
int  ibat;   //battery current 0.01A
char temp;   //battery temperature 1C
char almf;   //alarm flag
char crc8;   //checksum (smbus poly=0x07)
};

//almf - bits explanation
#define ALMLV 0x01 //alarm low voltage
#define ALMLVD 0x02 //alarm LVD
#define ALMDCS 0x04 //alarm dc/dc stop
#define ALMCHF 0x08 //charge full
#define ALM12V 0x10 //set 12V else 24V


Any chance to make that possible?

Anyways, thanks for a very interesting piece of HW.
Regards,

Lobo
Odpowiedz
#4
yes, we are considering introducing such a functionality. Rather as parameter setting via www.

How does the data reading look like in your device?
1.Device address is 8 with or without R/W bit?
2. Is it necessary to first issue the write command by setting the appropriate register(to read it next), or is it possible to read successive registers immediately, always starting from the register 0x0 for the variable uin (input voltage)?

Ideally, you would provide the reading sequences on the I2C bus for your device
pozdrawiam
tomek
Odpowiedz
#5
That's great to hear, I am looking forward to see it implemented.

Based on the inverter documentation, there is only READ function implemented. Command looks like
   
with content like "17(=8<<1+1), uinH, uinL, iinH, iinL, uoutH, uoutL, ibatH, ibatL, temp, almf, crc8"

To get some real data readings I will have to setup some device, it will take me some time. I will return, when I get some.

Regards,
Lobo
Odpowiedz


Skocz do:


Użytkownicy przeglądający ten wątek: 3 gości