Page 1 of 1

support of INA219 and ADS1115

Posted: 25 Mar 2018, 21:53
by karl222
Hi,

1. for one of my projects I would need support of INA219 (voltage and current) as well as ADS1115 (ADC).

2. As the ADS1115 is limited on 4 addresses it also would be helpful if i could Setup 2 or 3 separate i2c Interfaces instead of just one - is this anyhow possible. It would make life easier, because I don't know how to use upyeasy/espeasy with an i2c multiplexer...

Can someone help on that?

best regards and thanks
Karl

Re: support of INA219 and ADS1115

Posted: 31 Mar 2018, 08:05
by karl222
Hi,

I have no clue how to get these sensors supported... can anyone help?

regards
karl

Re: support of INA219 and ADS1115

Posted: 31 Mar 2018, 09:19
by toffel969
karl222 wrote: 31 Mar 2018, 08:05 Hi,

I have no clue how to get these sensors supported... can anyone help?

regards
karl
I think its not easily possible, but has been discussed on github. https://github.com/letscontrolit/ESPEas ... =multiplex

time beeing, I would go with multiple ESPs to achieve funciontality

Re: support of INA219 and ADS1115

Posted: 31 Mar 2018, 10:52
by karl222
hi
You are talking just about the multiplexer...

isn’t upyeasy different to espeasy in general?

Regards
Karl

Re: support of INA219 and ADS1115

Posted: 31 Mar 2018, 12:12
by toffel969
karl222 wrote: 31 Mar 2018, 10:52 hi
You are talking just about the multiplexer...

isn’t upyeasy different to espeasy in general?

Regards
Karl
Yes, sorry I got here by "active toics" and didn't see its about upyeasy. Haven't had time to try that yet... so nerver mind :)

Re: support of INA219 and ADS1115

Posted: 31 Mar 2018, 13:00
by karl222
:D

Re: support of INA219 and ADS1115

Posted: 18 Apr 2018, 01:34
by LisaM
karl222 wrote: 25 Mar 2018, 21:53 Hi,

1. for one of my projects I would need support of INA219 (voltage and current) as well as ADS1115 (ADC).

2. As the ADS1115 is limited on 4 addresses it also would be helpful if i could Setup 2 or 3 separate i2c Interfaces instead of just one - is this anyhow possible. It would make life easier, because I don't know how to use upyeasy/espeasy with an i2c multiplexer...

Can someone help on that?

best regards and thanks
Karl
The ESP32 micropython has 1 hardware i2c bus (d21/d22, who don't need pullups) and as many software i2c busses as you have dx ports. The difference between the two is the maximum speed at which the i2c can operate, the hardware one is capable of going much faster (unless you do a hardware remap).

But... why the need for two i2c busses? Looks to me like overhead! The i2c address for the ADS1115 is 0x72 + 0x73 and the address for the INA219 is 0x40 so there should be only need for one i2c bus.

Both have micropython libs:
https://github.com/chrisb2/pyb_ina219
https://github.com/robert-hh/ads1x15

Cheers,

Lisa

Re: support of INA219 and ADS1115

Posted: 18 Apr 2018, 10:51
by karl222
Hi lisa,
Thx for your input!

I am thinking of an application where I need more than 16 adc‘s but I can split up in two or more esp32.

Sorry for the dumb question but How do I get upyeasy running with those libs? Just copy paste (to where) or do I have to compile something (which I’m not capable of :? )

Best
Karl

Re: support of INA219 and ADS1115

Posted: 18 Apr 2018, 16:21
by LisaM
karl222 wrote: 18 Apr 2018, 10:51 Hi lisa,
Thx for your input!

I am thinking of an application where I need more than 16 adc‘s but I can split up in two or more esp32.

Sorry for the dumb question but How do I get upyeasy running with those libs? Just copy paste (to where) or do I have to compile something (which I’m not capable of :? )

Best
Karl
You could just buy/build this, https://www.raspberrypi.org/forums/view ... hp?t=64503, since the MCP23017 has a standard ESPEasy plugin...

Re: support of INA219 and ADS1115

Posted: 20 Apr 2018, 11:49
by karl222
But is the ltc2499 supported by espeasy either...?

Ltc2499 is really cool but it also lacking in nodered support...

Reards
Karl

Re: support of INA219 and ADS1115

Posted: 20 Apr 2018, 18:48
by LisaM
karl222 wrote: 20 Apr 2018, 11:49 But is the ltc2499 supported by espeasy either...?

Ltc2499 is really cool but it also lacking in nodered support...

Reards
Karl
It is a single PCB containing an 8/16 channel 24-bit ADC (LTC2499) coupled with a 16 channel digital I/O (MCP23017).
;)

Re: support of INA219 and ADS1115

Posted: 20 Apr 2018, 20:20
by karl222
But is the LTC2499 supported by espeasy? Haven’t seen that in the wiki...

Re: support of INA219 and ADS1115

Posted: 23 Apr 2018, 19:33
by LisaM
karl222 wrote: 20 Apr 2018, 11:49 But is the ltc2499 supported by espeasy either...?

Ltc2499 is really cool but it also lacking in nodered support...

Reards
Karl
The LTC2499 is connected to the MCP23017 and the latter is supported by ESPEasy!
The link above also has the gerber files, so you could simply have the pcb made by an online pcb maker.
I also downloaded and attached the zip file here which also contains the BOM.
Or you can order it here: https://oshpark.com/shared_projects/zHmwP8eC ;)

Cheers,

Lisa

Re: support of INA219 and ADS1115

Posted: 23 Apr 2018, 22:38
by karl222
Oh 😮

Thx for that!

Re: support of INA219 and ADS1115

Posted: 24 Apr 2018, 11:28
by karl222
Maybe I‘m too dumb for that. I checked the espeasy wiki on the mcp23017 https://www.letscontrolit.com/wiki/index.php/MCP23017

How the hell can I read analog values via the mcp23017 when a ltc2499 is connected to it.

I would use udp as a protocoll for sending data. In that case, following schematics of the pcb attached by you, are then analog values pushed to udp... this seems too easy going to me :D

Best
Karl

Re: support of INA219 and ADS1115

Posted: 24 Apr 2018, 20:29
by LisaM
karl222 wrote: 24 Apr 2018, 11:28 Maybe I‘m too dumb for that. I checked the espeasy wiki on the mcp23017 https://www.letscontrolit.com/wiki/index.php/MCP23017

How the hell can I read analog values via the mcp23017 when a ltc2499 is connected to it.

I would use udp as a protocoll for sending data. In that case, following schematics of the pcb attached by you, are then analog values pushed to udp... this seems too easy going to me :D

Best
Karl
At closer look, i can see why it's confusing. The board provides both analog inputs through the ltc2499 AND digital inputs through the mcp23017... :oops:
The ltc2499 can communicate directly using i2c so the mcp23017 is not needed then. That would require you to write a ltc2499 uPyEasy (micropython) plugin using I2C...

Re: support of INA219 and ADS1115

Posted: 25 Apr 2018, 13:10
by karl222
Hahahahahahahaha, you are funny. I‘d rather climb the mounteverest as I do the programming of a plugin :D

Re: support of INA219 and ADS1115

Posted: 28 Apr 2018, 13:56
by LisaM
karl222 wrote: 25 Apr 2018, 13:10 Hahahahahahahaha, you are funny. I‘d rather climb the mounteverest as I do the programming of a plugin :D
Well, in that case you'll need one ESP per 16 channels (4x ADS1115 I2C per ESP). Since it requires switching I2C addresses, essentially building a new communication channel to the ADS115 for retrieving sampled analog data, sampling rate might not be optimal.

Re: support of INA219 and ADS1115

Posted: 28 Apr 2018, 14:21
by karl222
I assume sample rate is set by default?

I don’t mind, I’m happy with a value every second... as i send it from esp to nodered via mqtt, it doesn’t matter.

Regards
Karl

But support of INA219 would make me happy on esp32 still :)