Will the clusterHAT work properly with the PIJuice HAT fitted to a 3B+?

123 views
Skip to first unread message

Daz Ryan

unread,
Sep 2, 2018, 4:24:03 PM9/2/18
to ClusterHAT
I'm trying to get everything mounted correctly so I can use a Pi 3B+ with clusterHAT and 4 zeroWs fitted using the GPIO pins off the zeros to monitor sensors. I need the Pi to be battery powered for mobile use so need to know if I fit a PiJuice to the 3B+ and a clusterHAT on top is it going to work and/or affect the GPIO addressing.

Chris Burton

unread,
Sep 2, 2018, 10:26:04 PM9/2/18
to ClusterHAT
Hi,

I'm trying to get everything mounted correctly so I can use a Pi 3B+ with clusterHAT and 4 zeroWs fitted using the GPIO pins off the zeros to monitor sensors. I need the Pi to be battery powered for mobile use so need to know if I fit a PiJuice to the 3B+ and a clusterHAT on top is it going to work and/or affect the GPIO addressing.

I looked at this a while ago and as I remember you'd just need to change the address of the "EEPROM" on the PiJuice (which you can do with their software).

Chris.

Wilm Boerhout

unread,
Nov 5, 2018, 9:03:59 AM11/5/18
to ClusterHAT
There must be more to it. I am currently using this config (ClusterHAT on top of Pijuice HAT), and the ClusterHAT script fails because it looks for a Z4C:ClusterHAT and finds a PiJuice HAT instead in the "/proc/device-tree/hat/product" file, etc.

So how do we get access to the ClusterHAT structures that the /sbin/clusterhat script expects ?



Op maandag 3 september 2018 04:26:04 UTC+2 schreef Chris Burton:

Chris Burton

unread,
Nov 5, 2018, 10:30:58 AM11/5/18
to ClusterHAT
Hi, 
There must be more to it. I am currently using this config (ClusterHAT on top of Pijuice HAT), and the ClusterHAT script fails because it looks for a Z4C:ClusterHAT and finds a PiJuice HAT instead in the "/proc/device-tree/hat/product" file, etc.

Did you change the I2C address of the PiJuice "ID EEPROM" (https://github.com/PiSupply/PiJuice/tree/master/Software#pijuice-hat-general-config-menu)?

Chris.

Wilm Boerhout

unread,
Nov 5, 2018, 10:33:43 AM11/5/18
to ClusterHAT
Yes I did. The default is 50, the only other option is 52, both values give the same results in clusterhat


Op zondag 2 september 2018 22:24:03 UTC+2 schreef Daz Ryan:

Wilm Boerhout

unread,
Nov 5, 2018, 10:35:15 AM11/5/18
to ClusterHAT
Ah now I see. Its the I2C address. I'm not using the GUI, just the base CLI. It has no option for that. Into JSON we will delve...


Op zondag 2 september 2018 22:24:03 UTC+2 schreef Daz Ryan:
I'm trying to get everything mounted correctly so I can use a Pi 3B+ with clusterHAT and 4 zeroWs fitted using the GPIO pins off the zeros to monitor sensors. I need the Pi to be battery powered for mobile use so need to know if I fit a PiJuice to the 3B+ and a clusterHAT on top is it going to work and/or affect the GPIO addressing.

Wilm Boerhout

unread,
Nov 5, 2018, 1:25:16 PM11/5/18
to ClusterHAT
Well, as it turns out a new relase of PiJuice was issued 2 days ago, and it had some unexpected changes.

With the PiJuice, I changed the I2C address to 0x16 (from 0x14), the pijuice I2C address RTC to 70 (from 68) and the EEPROM address to 52 (from 50)
The PiJuice still works, after propagating the new I2C address to the various scripts.

The ClusterHAT however is not visible. The /proc/device-tree/hat/product structure is missing.

i2cdetect output:
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- 16 -- -- -- -- -- -- -- -- --
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --

Op maandag 5 november 2018 16:35:15 UTC+1 schreef Wilm Boerhout:

Chris Burton

unread,
Nov 5, 2018, 3:09:10 PM11/5/18
to ClusterHAT
Hi, 
With the PiJuice, I changed the I2C address to 0x16 (from 0x14), the pijuice I2C address RTC to 70 (from 68) and the EEPROM address to 52 (from 50)
The PiJuice still works, after propagating the new I2C address to the various scripts.

The ClusterHAT however is not visible. The /proc/device-tree/hat/product structure is missing.

The ID EEPROM is on another other I2C bus, you should be able to see it by running these commands.

sudo dtoverlay i2c-gpio i2c_gpio_sda=0 i2c_gpio_scl=1
i2cdetect -y 3


If you plug them in individually and reboot to test each one it show you the Cluster HAT ID EEPROM on 0x50 and the Juice on 0x52 if it has been moved - is that what you're seeing?

Chris.

Wilm Boerhout

unread,
Nov 5, 2018, 3:16:14 PM11/5/18
to ClusterHAT
This shows, with both hats in lace

pi@controller ~ $ sudo dtoverlay i2c-gpio i2c_gpio_sda=0 i2c_gpio_scl=1
pi@controller ~ $ i2cdetect -y 3
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- 52 -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --



Op maandag 5 november 2018 21:09:10 UTC+1 schreef Chris Burton:

Wilm Boerhout

unread,
Nov 5, 2018, 3:31:47 PM11/5/18
to ClusterHAT
with just the pijuice, its

pi@controller ~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- 16 -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --




Op maandag 5 november 2018 21:16:14 UTC+1 schreef Wilm Boerhout:

Wilm Boerhout

unread,
Nov 5, 2018, 3:35:07 PM11/5/18
to ClusterHAT
and the EEPROM at 52 just as I configured it
pi@controller ~ $ sudo dtoverlay i2c-gpio i2c_gpio_sda=0 i2c_gpio_scl=1
pi@controller ~ $ i2cdetect -y 3
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- 52 -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --



Op maandag 5 november 2018 21:31:47 UTC+1 schreef Wilm Boerhout:

Chris Burton

unread,
Nov 5, 2018, 3:40:32 PM11/5/18
to ClusterHAT


On Monday, 5 November 2018 20:35:07 UTC, Wilm Boerhout wrote:
and the EEPROM at 52 just as I configured it

What do you get with just the ClusterHAT on a fresh reboot and running these again?

sudo dtoverlay i2c-gpio i2c_gpio_sda=0 i2c_gpio_scl=1
i2cdetect -y 3

Chris. 

Wilm Boerhout

unread,
Nov 5, 2018, 3:42:12 PM11/5/18
to ClusterHAT
and this is with just the Clusterhat in place

pi@controller ~ $ i2cdetect  -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
pi@controller ~ $ sudo dtoverlay i2c-gpio i2c_gpio_sda=0 i2c_gpio_scl=1
pi@controller ~ $ i2cdetect -y 3
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --



Op maandag 5 november 2018 21:35:07 UTC+1 schreef Wilm Boerhout:

Chris Burton

unread,
Nov 5, 2018, 4:41:27 PM11/5/18
to ClusterHAT
Hi, 
and this is with just the Clusterhat in place

That seems quite strange they're both on the correct I2C address when they're in separately but not when they're both connected.

Looking at their schematic they use the same I2C EEPROM as the Cluster HAT so I'll modify one tomorrow to use address 0x52 and see how it works here but the only thing I can think of at the moment is it not liking two sets of 3k9 pull-up resistors.

Chris.

Wilm Boerhout

unread,
Nov 6, 2018, 2:00:04 AM11/6/18
to ClusterHAT
It may have been a faulty/inappropriate GPIO riser. This morning, I exchanged it for another one with longer pins.The output with both HATs installed is now
pi@controller ~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- 16 -- -- -- -- -- -- -- -- --
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --
pi@controller ~ $ i2cdetect -y 3
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 -- 52 -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

and the clusterhat script finds the ClusterHAT on I2C bus address 20 as expected.
Sorry for the confusion. I learned a lot (again)

Both products seem to work fine together.

Op maandag 5 november 2018 22:41:27 UTC+1 schreef Chris Burton:

Chris Burton

unread,
Nov 6, 2018, 4:52:47 AM11/6/18
to ClusterHAT
Hi, 
and the clusterhat script finds the ClusterHAT on I2C bus address 20 as expected.
Sorry for the confusion. I learned a lot (again)

Both products seem to work fine together.

No problem, glad you got them working together :).

Chris. 
Reply all
Reply to author
Forward
0 new messages