If the PissOff device is running, but the signal LED is blinking or you have some unexpected behaviour, please connect a serial cable to the device. Make sure the cable is using  3.3V levels. Open a console and connect with 112500 baud, 8-N-1, no flow control.

Now if you start the device, you should get some useful messages like this:

Initialize SD card...
Read directory...
File: dog1 size: 3502 start: 0001
Calibrate the sensor...
St: 004c Shr: 0f83

Failure Codes

Here a quick overview, what the letter in the error after “Initialize SD card…” means:

  • B: Time Out = Could not start communication with the SD card at all, or lost the connection. Most likely a connection problem. Best to check if the SD card is properly inserted, then use a tool to measure each connection to the MCU.
  • C: Send If Condition Failed.
  • D: Read OCR Failed.
  • E: Set Block Length Failed.
  • C, D and E: The communication with the SD card works, but the device gets unexpected answers. Make sure the SD card works with another SD card reader, then check the connection. As last resort, try using a SD card from a different brand.
  • F: Single Block Read Failed = Could not read a single block from the SD card. Could be the block does not exist, or there was a timeout.
  • G: Multi Block Read Failed = Same as F, but while a “read multiple block” command.
  • H: Unknown Magic. = The initial “magic” signature of the directory was not found. This means you did not correctly installed the image on the SD card. Simply copying the file onto the SD card will not work.

For all errors from B to G there are these problem candidates:

  • There is a connection problem. Check if the SD card is inserted the right way. Check the traces from the SD card pad back to the MCU.
  • It is a power problem. Despite of clear specifications, microSD cards are really picky about the supply voltage. They like to have 3.3V, stable and nothing else. So, measure the voltage at the SD card – if it is lower than 3.2V, or fluctuating, this will be the source of the problem.

The audio amplifier can drive quite a huge load, if you exceed a certain amplification (replacing resistors, using different speakers), the sound can have an effect to the SD card power supply:

  • Either reduce the amplification until the power is stable again.
  • Solder a large capacitor to the board, near the SD card VCC and ground (10µF should do).

For the “Failed: X” message, after “Read directory…”, it is the same meaning as described above.

Calibration Errors

If you get an error message after “Calibrate the sensor…”, then the head-room for sensing was too small to calibrate the device. This can happen because of the following reasons:

  • The environment light is too bright. E.g. the sensor points directly into a reflection or the sun… Solution: reduce the light.
  • Something is reflecting the signal in a way, no difference can be made. Like the IR LED is pointing to a mirroring object (mirror, glass, polished steel) Solution: remove the mirroring object.
  • The sensor does not work. Solution:
    • Check the traces from the IR transistor to the MCU.
    • Measure the “output” from the IR transistor using a multimeter. You should get a voltage between 0 and 3.3V. Point the sensor to a light source, you should get a higher value. Completely cover the sensor. You should get almost 0V.
    • Check if you soldered the sensor the correct way around into the “head”. The “flat” side on the IR transistor lens has to point to the “nose” of the head.
  • The IR LED does not work. Solution:
    • Check the traces from the IR LED to the MOSFET.
    • Measure the cathode of the IR LED using a multimeter. Compare with the yellow signal LED. If the signal LED lights up, you should measure a voltage around 0V. If the signal LED is dark, you should get something between 2-3V.
    • Check if you soldered the IR LED the wrong way around into the head. The flat side on the lens has to point to the left “ear” of the head.