Max amount of devices able to connect to M5Core2
-
Hello,
I already have all the parts I need for my hydroponic system but it's all in individual parts and while I don't mind doing it, it will take me some time.
I am looking at purchasing the following stack:
M5Core2
DC Motor Drive
2-Relay 13.2 Module
2-Relay 13.2 Module
EXTENSION-PORT-MODULE-FOR-CORE2
IC2 to Grove Sensor
Ultrasonic Distance Unit I2C
NCIR Non-Contact Infrared Thermometer Sensor Unit
Scales Unit with 20kgs RangeIs all the above too much for the M5Core2?
Many thanks
-
@hopscotch123 What programming language will you be using?
There is a 4 relay module.
I would sketch the system out on paper all the I2C addresses to look for conflicts.
Otherwise it looks good. -
Many thanks!
I will do that first, I'm hoping it will work.
Regarding the Scales Unit with 20kgs Range: if I wanted to weight a large box could I use 4 and take the average?
-
@teastain Just found the 4 relay module cheers. This is looking great so far, no soldering etc!
I have found two devices with the same I2C address, is there a way around that?
I also have a BLE BME280 in a little plastic case called a Ruvvitag. With ESPHome I can easily get one of my ESP32's to search for the device and take the readings which in Ardino IDE. Is this possible with Flow I think its called (the M5Stack Language) or would I have to compile everything in Ardino IDE which replays the information to Home Assistant for date and automation is done inside Home Assistant?
With the DC Motor Drive I will be using that for my peristaltic pumps but I require 6 pumps in total. IS it just a case of buying an extra DC Motor Drive and stack them together?
heers, I ready want to get the stack of items ordered!
-
@hopscotch123 There is an easy way around I2C address conflicts, M5Stack PaHub 1 to 6 I2C multiplexer:
https://docs.m5stack.com/en/unit/pahub2I made a test program/example using two ENVII sensors, as examples:
https://github.com/teastainGit/Simple-PaHub-exampleI only program in C, C++ (like Arduino), because you can do ANYTHING you want and not limited to what is currently available in Python/UIFlow. Hope that is OK !
-
You're a champ teastain! Thank ou for letting me know about the M5Stack PaHub 1 to 6 I2C multiplexer!
So the plan is to buy the following instead of finishing my big box of esp32's, sensors, pumps etc etc. This is going to be the stack so any problems please let me know.
-
M5Core2
-
DC Encoder Motor Module 4 Channels (for pumps) (0x56)
-
DC Encoder Motor Module 4 Channels (for pumps) (0x56)
-
4-Relay Module
-
Extension Port Module for Core2 (for Grove Sensors)
-
M5Stack AC Power Base
-
Ultrasonic Distance Unit I2C (0x57)
-
NCIR Non-Contact Infrared Thermometer Sensor Unit (0x5A)
-
ENV III Unit with Temperature Humidity Air Pressure Sensor (0x34)
-
CO2L Unit with Temperature and Humidity Sensor (0x62)
-
Scales Unit with 20kgs Range (this isn't I2C?)
-
Grove - Capacitive Soil Moisture Sensor x 4
I don't think I need an M5Stack PaHub 1 to 6 I2C multiplexer at the moment looking at the above.
What can I do about the two DC Encoder Motor Module 4 Channels as they are both on the same bus (0x56)
I already have Altas Scientific PH, EC & OCP sensors (not cheap!),. Now could I add them to this or should I just use a separate ESP32 and solder them in place as they need isolators etc.
I don't suppose M5Stack is supported by ESPHome?
-
-
@hopscotch123 Well done!
M5Stack also make a 200kg scale kit:
https://shop.m5stack.com/products/scale-kit-with-weight-unit
This one is not i2C and is a serial input to the core, using Port B, which does not physically exist on the Core or Core2, but use Core GPIOs 26, 36!There is another newer scale @ only 20kg capacity, that is I2C, addr 0x26:
https://shop.m5stack.com/products/scales-unit-with-20kgs-range-hx711Hope this helps, Terry
-
Cheers, will deffo go for the 200kg and its cheaper. It's for weighing tubs of water so perfect.
For the scale could I not just use the Extension Port Module for Core2 as I have a few other things to plug in.
Also decided to pick up a Stick separately as that will have IR temp sensors and ambient temp/humidity so I can measure leaf VPD without running long wires from the Core2.
Lastly, if I'm using 2 x DC Encoder Motor Module 4 Channels which use the same I2C (0x56) what can I do about that as the modules fit together?
Thanks again champ
-
@hopscotch123
For the duplicate addresses, you can use a Pa.hub as it is a multiplexer and allows you to use multiple devices with the same addr.
And if you use this, you can use the 4 spare ports for other i2c devices as it has 6 ports.
This saves some i2c ports.
You can afaik also cascade these pa.hubs (Plug one into another to get even more Ports) if you run out of ports.
There is the same thing available for i/o ports, which is called Pb.hub.
The pb.hub is plugged into one i2c port (can also be in a pa.hub) and adds 6 I/O connectors (The ones that are used with units with black grove ports, red ports are I2C and blue ones (rarely used) are serial ports)Best regards
Aaron -
A) The DC Encoder Motor Module 4 Channels communicate on I2C but through the internal Core2 M-bus and therefore cannot be broken out and multiplexed, sorry!
B) Extension Port Module for Core2 is a great solution
Cheers -
The limit to what can physically be connected is defined by how much power can be drawn from the Grove ports however there are adapters that will allow you to add additional power to the grove ports to help power devices.
https://shop.m5stack.com/products/usb-typec2grove-unit
https://shop.m5stack.com/products/grove2grove-expansion-unit