support of INA219 and ADS1115

Moderators: Voyager, BertB, grovkillen, Stuntteam, LisaM

Post Reply
Message
Author
karl222
Normal user
Posts: 90
Joined: 23 Aug 2017, 17:18
Location: Vienna

support of INA219 and ADS1115

#1 Post by karl222 » 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

karl222
Normal user
Posts: 90
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: support of INA219 and ADS1115

#2 Post by karl222 » 31 Mar 2018, 08:05

Hi,

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

regards
karl

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: support of INA219 and ADS1115

#3 Post by toffel969 » 31 Mar 2018, 09:19

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
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

karl222
Normal user
Posts: 90
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: support of INA219 and ADS1115

#4 Post by karl222 » 31 Mar 2018, 10:52

hi
You are talking just about the multiplexer...

isn’t upyeasy different to espeasy in general?

Regards
Karl

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: support of INA219 and ADS1115

#5 Post by toffel969 » 31 Mar 2018, 12:12

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 :)
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

karl222
Normal user
Posts: 90
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: support of INA219 and ADS1115

#6 Post by karl222 » 31 Mar 2018, 13:00

:D

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: support of INA219 and ADS1115

#7 Post by LisaM » 18 Apr 2018, 01:34

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

karl222
Normal user
Posts: 90
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: support of INA219 and ADS1115

#8 Post by karl222 » 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

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: support of INA219 and ADS1115

#9 Post by LisaM » 18 Apr 2018, 16:21

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...

karl222
Normal user
Posts: 90
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: support of INA219 and ADS1115

#10 Post by karl222 » 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

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: support of INA219 and ADS1115

#11 Post by LisaM » 20 Apr 2018, 18:48

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).
;)

karl222
Normal user
Posts: 90
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: support of INA219 and ADS1115

#12 Post by karl222 » 20 Apr 2018, 20:20

But is the LTC2499 supported by espeasy? Haven’t seen that in the wiki...

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: support of INA219 and ADS1115

#13 Post by LisaM » 23 Apr 2018, 19:33

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
Attachments
TempController.zip
(48.71 KiB) Downloaded 601 times

karl222
Normal user
Posts: 90
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: support of INA219 and ADS1115

#14 Post by karl222 » 23 Apr 2018, 22:38

Oh 😮

Thx for that!

karl222
Normal user
Posts: 90
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: support of INA219 and ADS1115

#15 Post by karl222 » 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

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: support of INA219 and ADS1115

#16 Post by LisaM » 24 Apr 2018, 20:29

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...

karl222
Normal user
Posts: 90
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: support of INA219 and ADS1115

#17 Post by karl222 » 25 Apr 2018, 13:10

Hahahahahahahaha, you are funny. I‘d rather climb the mounteverest as I do the programming of a plugin :D

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: support of INA219 and ADS1115

#18 Post by LisaM » 28 Apr 2018, 13:56

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.

karl222
Normal user
Posts: 90
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: support of INA219 and ADS1115

#19 Post by karl222 » 28 Apr 2018, 14:21

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 :)

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests