Hat is not detected - Suggested Steps for debugging

I’m trying to get the Pioreactor set-up for the first time. I’ve followed the suggested steps in the hardware & software tutorials, but get the “HAT not detected” error when I run the self-test. The tutorial suggests the problem may be “a problem connection between the HAT and the RPi, a failure with the i2c channel, or a failure with the RP2040 chip on the HAT”. Is there a good way to diagnose/fix these problems? What would a sensible next step be?

Time Source Message
15:11:24 self test test positive correlation between rpm and stirring: HAT was not detected.
15:11:24 self test test PD is near 0 volts for blank: HAT is not detected.
15:11:24 self test test REF is in correct position: Hat is not detected.
15:11:24 self test test REF is lower than 0 dot 256 volts: HAT is not detected.
15:11:24 self test test ambient light interference: HAT is not detected.
15:11:24 self test test all positive correlations between pds and leds: HAT is not detected.
15:11:24 self test test pioreactor HAT present: HAT is not connected
15:11:24 self test Starting self-test. Running 11 tests.
15:11:25 stirring calibration Starting stirring calibration.
15:11:28 self test test run stirring calibration: Pioreactor HAT must be present.
15:11:45 self test 9 failed tests :x:
15:11:45 self test test aux power is not too high: HAT was not detected.

Hi @TomWVi,

So technical jargon: a “HAT is not detected” bug is caused by the HAT’s EEPOM not being read correctly. This can happen if there is a long cable separating the HAT from the Pi (not so in your case), or the EEPROM is not written (unlikely, since we write them in our HQ, but maybe something slipped through), or multiple HATs on the device (not so in your case).

Can you try the following:

  1. SSH into your Pioreactor
  2. type and enter:
    cat /proc/device-tree/hat/vendor
    
  3. Do you see an error or output?

Hi @CamDavidsonPilon,

Thanks for your suggestion. I get the following output:
pioreactor@pioreactor01:~ $ cat /proc/device-tree/hat/vendor
cat: /proc/device-tree/hat/vendor: No such file or directory.

So, yea, that’s weird. It like the EEPROM wasn’t written. That’s okay (I believe), there is a solution:

while your SSH’d in:

  1. sudo nano /etc/environment
  2. Add the line: HAT_PRESENT=1 to the bottom of that file.
  3. Save and exit with ctrl-x
  4. Reboot the pioreactor with sudo reboot
  5. Once it’s back online, try the tests again.

I’m not sure why the original error is occurring, but we will investigate on our end!

Thanks very much! The solution worked to an extent, but the stirrer and the LEDs are still not working. I’m not sure if this is related to the previous problem, or is a separate problem, but any advice would be appreciated.

Those may be unrelated. Are you adding water (ideally slightly turbid water, using milk or coffee, or something) to the vial?

The Stirring problems may be resolved here: Stirring | Pioreactor Docs