Cool stuff for Raspberry Pi, Arduino and all electronics hobby projects
Notifications
Clear all

[Solved / Archived] Witty 4 Mini Not Detected

9 Posts
2 Users
0 Likes
725 Views
(@tomjn)
Posts: 8
Active Member
Topic starter
 

I've a Pi Zero W (1) with a Witty Pi 4 Mini attached, but the board is not detected:

  • the board is powered and powering the Pi 4
    • via the onboard USB C
    • both LEDs on the boards have been seen turning on
    • I'm able to power on the Pi initially via the button
  • the wittypi4 software was installed on the Pi and reported no errors
  • there have been multiple reboots and hard power cycles with various GPIO pin headers with no improvement

In my research this was blamed on weak header connections, however:

  • I've been using hammer head GPIO pins with a Pimoroni grow hat prior to this and had no issues
    • The same male GPIO pins on the witty 4 mini result in it not connecting
    • a female GPIO hammerhead header combined with longer male/male pins yielded the same results

 

tomjn@raspberrypi:~ $ ./wittypi/wittyPi.sh 
================================================================================
|                                                                              |
|   Witty Pi - Realtime Clock + Power Management for Raspberry Pi              |
|                                                                              |
|            < Version 4.13 >     by Dun Cat B.V. (UUGear)                     |
|                                                                              |
================================================================================

Seems Witty Pi board is not connected? Quitting...

tomjn@raspberrypi:~ $ ic2detect -y 1
-bash: ic2detect: command not found
tomjn@raspberrypi:~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --               

and:

tomjn@raspberrypi:~/wittypi $ bash -c '. gpio-util.sh; gpio readall'
 +-----+-----+---------+------+---+ Pi ZeroW +---+------+---------+-----+-----+
 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 |     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     |
 |   2 |   8 |   SDA.1 | ALT0 | 1 |  3 || 4  |   |      | 5v      |     |     |
 |   3 |   9 |   SCL.1 | ALT0 | 1 |  5 || 6  |   |      | 0v      |     |     |
 |   4 |   7 | GPIO. 7 |   IN | 1 |  7 || 8  | 1 | OUT  | TxD     | 15  | 14  |
 |     |     |      0v |      |   |  9 || 10 | 1 | ALT0 | RxD     | 16  | 15  |
 |  17 |   0 | GPIO. 0 |   IN | 0 | 11 || 12 | 0 | IN   | GPIO. 1 | 1   | 18  |
 |  27 |   2 | GPIO. 2 |   IN | 0 | 13 || 14 |   |      | 0v      |     |     |
 |  22 |   3 | GPIO. 3 |   IN | 0 | 15 || 16 | 0 | IN   | GPIO. 4 | 4   | 23  |
 |     |     |    3.3v |      |   | 17 || 18 | 0 | IN   | GPIO. 5 | 5   | 24  |
 |  10 |  12 |    MOSI | ALT0 | 0 | 19 || 20 |   |      | 0v      |     |     |
 |   9 |  13 |    MISO |  OUT | 0 | 21 || 22 | 0 | IN   | GPIO. 6 | 6   | 25  |
 |  11 |  14 |    SCLK | ALT0 | 0 | 23 || 24 | 1 | IN   | CE0     | 10  | 8   |
 |     |     |      0v |      |   | 25 || 26 | 1 | OUT  | CE1     | 11  | 7   |
 |   0 |  30 |   SDA.0 |   IN | 1 | 27 || 28 | 1 | IN   | SCL.0   | 31  | 1   |
 |   5 |  21 | GPIO.21 |   IN | 1 | 29 || 30 |   |      | 0v      |     |     |
 |   6 |  22 | GPIO.22 |   IN | 1 | 31 || 32 | 1 | OUT  | GPIO.26 | 26  | 12  |
 |  13 |  23 | GPIO.23 |   IN | 0 | 33 || 34 |   |      | 0v      |     |     |
 |  19 |  24 | GPIO.24 |   IN | 0 | 35 || 36 | 0 | IN   | GPIO.27 | 27  | 16  |
 |  26 |  25 | GPIO.25 |   IN | 0 | 37 || 38 | 0 | IN   | GPIO.28 | 28  | 20  |
 |     |     |      0v |      |   | 39 || 40 | 0 | IN   | GPIO.29 | 29  | 21  |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
 +-----+-----+---------+------+---+ Pi ZeroW +---+------+---------+-----+-----+

And wittypi.log:

tomjn@raspberrypi:~ $ cd wittypi/
tomjn@raspberrypi:~/wittypi $ cat wittyPi.log 
[2023-09-16 12:16:47] Seems Witty Pi board is not connected? Quitting...
[xxxx-xx-xx xx:xx:xx] Witty Pi daemon (v4.13) is started.
[xxxx-xx-xx xx:xx:xx] Running on Raspberry Pi Zero W Rev 1.1
[xxxx-xx-xx xx:xx:xx] Witty Pi is not detected, retry in one second...
[xxxx-xx-xx xx:xx:xx] Witty Pi is not detected, retry in one second...
[xxxx-xx-xx xx:xx:xx] Witty Pi is not detected, retry in one second...
[xxxx-xx-xx xx:xx:xx] Witty Pi is not detected, retry in one second...
[xxxx-xx-xx xx:xx:xx] Witty Pi is not detected, retry in one second...
[xxxx-xx-xx xx:xx:xx] Witty Pi is not connected, skip I2C communications...
<2023-09-16 12:18:01> Witty Pi is not connected, skip schedule script...
<2023-09-16 12:18:01> Send out the SYS_UP signal via GPIO-17 pin.
<2023-09-16 12:18:02> Pending for incoming shutdown command...
[2023-09-16 12:19:14] Seems Witty Pi board is not connected? Quitting...

I'd note that the Pi Grow hat uses ic2, and I did attempt to use it with both boards initially, but have since disabled the grow monitor service and removed the grow hat board to eliminate it as a cause, followed by soft and hard reboots and power cycles to flush any state

 
Posted : 16/09/2023 2:13 pm
Topic Tags
(@tomjn)
Posts: 8
Active Member
Topic starter
 

Some photos for reference:

 

 
Posted : 16/09/2023 2:19 pm
(@tomjn)
Posts: 8
Active Member
Topic starter
 

Also happy to use an Ammeter to confirm continuity between the pins jutting out the bottom of the pi and the contacts on the witty board if anyone can point out which ones to test if the connection is still in doubt

 
Posted : 16/09/2023 2:20 pm
(@tomjn)
Posts: 8
Active Member
Topic starter
 

Noting that I've written a PR to improve the error message so that it's clearer at https://github.com/uugear/Witty-Pi-4/pull/13

 
Posted : 17/09/2023 9:09 pm
(@tomjn)
Posts: 8
Active Member
Topic starter
 

I ran the pintest command in wiringpi and it reported success however my pi + grow hat no longer works once i remove the witty board. So I ran the gpiotest script which gives me:

tomjn@raspberrypi:~ $ ./gpiotest 
This program checks the Pi's (user) gpios.

The program reads and writes all the gpios.  Make sure NOTHING
is connected to the gpios during this test.

The program uses the pigpio daemon which must be running.

To start the daemon use the command sudo pigpiod.

Press the ENTER key to continue or ctrl-C to abort...

Testing...
Write 0 to gpio 3 failed.
Skipped non-user gpios: 0 1 28 29 30 31 
Tested user gpios: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 
Failed user gpios: 3 

Some recommendations for UUGear:

  • The PR I wrote above should help in the future as well as minimising the number of questions needed to ask on this board
  • the documentation makes it very clear that you shouldn't put the board on upside down, BUT Tit then never shows a clear photo showing the orientation unambiguously. A photo of a Pi zero from the front would be enormously helpful, but instead the photo shows bare sides of the board so it's ultra difficult to figure out wether the ports are on top or below the board when it's mounted correctly.
  • similarly how to mount a hat on top of the Witty board would be ultra useful too, I'm not super experienced and when putting standard GPIO pins through the witty board they barely poke out the top. Luckily I had bought extra long pin headers by accident but if I hadn't done that I would have been super confused
  • Links to tests such as gpiotest or pintest, as well as mentioning them in the software would be super helpful and very easy to do

 

 
Posted : 17/09/2023 10:10 pm
(@admin)
Posts: 479
Member Admin
 

Unreliable or even wrong connection is not the only reason that could make Witty Pi not get recognized. I2C devices may affect each other if they do not pull up the I2C bus properly. We also saw some cases that the I2C bus on Raspberry Pi is faulty.

The software can not see the expected I2C address in use, that's all it knows and it can not assume where the problem is. There is situation that the software can not do troubleshooting for the user.

 
Posted : 18/09/2023 12:06 pm
(@tomjn)
Posts: 8
Active Member
Topic starter
 

I2C devices may affect each other if they do not pull up the I2C bus properly.

This is why I physically disconnected other hats, disabled their services, and did both soft and hard reboots.

My current suspicion based on what I've seen and the output of commands is that the I2C bus may be dead on this Pi, most likely I suspect the header was attached offset by 1 pin horizontally without realising. I've a Pi zero w 2 on its way that should help confirm if this is the case.

it can not assume where the problem is

I never said it should, as the user I would prefer to be given information so I can make an informed decision. I'd rather it wasn't concealed from me because suggesting I run a useful command might be interpreted as a cast iron guarantee it's definitely caused by this, I'm not that stupid.

I've several open source projects that have a lot of support burden and documentation has been a huge help. Not specifically that documentation exists, but in pre-emptively putting commonly asked for information in the output, being very careful about how error messages are worded to avoid them being assertive or unclear unless it can detect with certainty, and providing links to tools so that users can do their own debugging while I'm asleep.

While I'm not super experienced with electronics and Pi's, I am a programmer and was able to figure out a lot on my own, I could have saved myself hours of digging if I'd been pointed towards tools and resources.

For example, I found reports here about people installing the wrong version of the WittyPi install script for their board, so I double checked i hadn't done that too only to find the software doesn't say which version it's intended for, and i had to go through several hours of terminal backscroll to find where I had copied the wget command. If the script stated it was for v4 instead of having to search the terminal history I would have saved 30 minutes of my weekend.

 
Posted : 18/09/2023 1:45 pm
(@tomjn)
Posts: 8
Active Member
Topic starter
 

To clarify further, re-attaching the grow hat minus the witty 4 mini board, it has a display that runs over i2c which now shows RGB static when running the associated software which implies some form of physical damage to the i2c bus.

Also, I'm happy to help update documentation and tooling on Github, I know the bash scripts can never give definitive output for some issues, nor should it. But it can state things we know for a fact, e.g. that the witty pi 4 github repo is for witty pi 4 boards, or to run i2cdetect -y 1 and that you should expect to see something on 08 if all is good (but not being presumptive to explain why if it isn't there)

 
Posted : 18/09/2023 1:52 pm
(@tomjn)
Posts: 8
Active Member
Topic starter
 

My suspicions have been confirmed. I took the SD card out and put it in a fresh Pi zero 2 W, and attached the witty pi 4 board. Success! It's now detected by the script and shows up in i2cdetect -y 1, the power button also works as intended. I also attached the grow hat and it behaves as it's meant to rather than showing RGB static. Same GPIO hammer pin headers as before. My conclusion is I incorrectly attached the board off by one pin and killed the i2c bus, perhaps I'll use that pi zero for another project eventually.

 

1695121733-IMG_9371.jpeg
 
Posted : 19/09/2023 1:08 pm
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.