-
Notifications
You must be signed in to change notification settings - Fork 87
Fault Finding
As with any DIY project there are always a number of things to get wrong. Some of us have built more than 10 MiniDexed systems of varying designs, shapes and sizes, and it is very rare for a build to work first time around. This page attempts to list some common issues and some common fault-finding tactics that might help.
First and foremost, the HDMI display is your friend. It logs a number of diagnostic messages and can be used to check several things:
- That the Pi is actually booting MiniDexed.
- Various configuration options: audio output, display options, MIDI configuration, buttons, and so on.
- If USB devices get recognised by the system.
- If there are errors that the system has detected.
Note: there are some diagnostic messages that look like problems, but are actually just the system logging what is going on. Any of the following are not usually anything to worry about:
- USB "Function not supported" messages. Only certain USB MIDI functions are supported, but many USB devices present several functions to a host.
- GPIO "Pin X is already assigned" messages. You get this if the same button has different actions (e.g. long press, double-click and click).
- "Directory /sysex/voice is not found". Voice ROMs are not required if using performances, but if you're using them this is where they go.
- "No device connected to root port". This is common for certain Raspberry Pi versions.
- "Serial.Read() error: -1". This is a temporary error meaning that the serial port read some odd data, and can usually be ignored.
The most common source of something not working or not being recognised is due to a configuration issue in MiniDexed.ini. The default configuration assumes a non-I2C 1602 LCD, rotary encoder, and PWM audio.
The most common configuration changes required are:
- I2S audio.
- I2C LCD - either a 1602 LCD or SSD1306 OLED.
- Additional buttons.
There are, of course, many other configuration options - see minidexed.ini.
Many of these changes should be echoed onto the console on boot, but it is always worth checking and double checking your configuration, especially if you've just upgraded your system with a new release.
By far the second most common source of issues, and even having built many, many MiniDexed systems I (Kevin) still make mistakes in my wiring!
Common wiring mistakes include:
- Getting SDA/SCL the wrong way round if using an I2C display. Note that the order of pins on displays varies - especially with OLED displays (some are GND-VCC-SDA-SCL, some swap GND/VCC, some swap SDA/SCL, some swap them all!!)
- Using 3V3 instead of 5V or 5V instead of 3V3.
- Having a missing or loose GND connection - with jumper wires they can look connected, but actually be slightly loose and not connecting properly!
- Thinking you've wired to GND but have mis-counted where the GND pins are.
- Off-by-one errors on the encoder wiring (the default wiring is five consecutive connections from +3V3 through GPIO 10, 9, 11, to GND).
- Not mapping BCK/LCK/DATA on an I2S DAC to PCM CLK, FS, DIN properly.
- Getting MIDI RX/TX the wrong way round (don't get me started on the number of times I've got pins 4 and 5 the wrong way round on DIN sockets, but let's not go there).
If you don't have the means to connect a HDMI display and nothing seems to work, it is worth looking at the status LEDS on the Raspberry Pi. All Pis have an activity status LED that corresponds to SD card access. Some also have power LEDs.
On boot up of MiniDexed, one would expect to see a sequence of SD card activity along the lines of the following:
- Off initially.
- On solid for a second or two as the main systems boots.
- A short flash, probably reading the minidexed.ini file.
- A second or two later, a couple of dimmer flashes depending on what other activity is going on (reading ROM files, performances or whatever).
If there is no sign of SD card activity then maybe the SD card is faulty or missing some key boot files. Try reformatting and copying the files over again, remembering to re-configure your minidexed.ini, performance.ini and any additional voice sysex and performance files.
Note that the LEDs do have specific diagnostic patterns that will flash in the case of problems. Usually this pattern will repeat every couple of seconds or so. For a full list, see: https://www.raspberrypi.com/documentation/computers/configuration.html#led-warning-flash-codes
Here are some common display problems.
- LCD1602 isn't lighting up at all.
- Power not wired up properly, or wires are loose.
- Contrast turned all the way down or not wired up properly.
- LCD1602 only shows solid blocks.
- LCDEnable not set to 1.
- Could mean the contrast needs adjusting. For I2C backpacks there is usually a trim pot; for non-I2C displays, this is the resistor between VSS and V0.
- Incorrect LCD configuration - e.g. no I2C address configured if using I2C backpack. Or an I2C address is configured if not. Or SSD1306LCDI2CAddress is set but it should be LCDI2CAddress.
- Incorrect LCD wiring - i.e. it has power, so the backlight is on, but there is no communication going on to the display. See above tips on wiring.
- Wrong I2C address. The default for a 1602 I2C backpack is 0x27 for a PCF8754 chip and 0x3F for a PCF8754A chip, but if any of the address solder jumpers are set, this will be different (more here)
- Note: I2C addresses are usually specified in HEX and can be either 7-bit or 8-bit addresses when listed in a datasheet. So an address of 0x3C might be listed as either 0x3C or 0x78 (which is 0x3C shifted left by 1 bit!). MiniDexed needs the 7-bit version.
- LCD 1602 display is working but very hard to see.
- Is the backlight on at all? See comments above on wiring/backlight control.
- Does your LCD require an additional I2C link to control the back light? These are NOT supported I'm afraid.
- SSD1306 doesn't light up.
- LCDEnable not set to 1.
- Incorrect LCD configuration - e.g. no I2C address or LCDI2CAddress is configured no SSD1306I2CAddress.
- Incorrect LCD wiring - see above tips about ordering of pins often being different on different displays!
- Incorrect I2C address. The default is 0x3C, but there are usually several options set using solder jumpers (more here). Also see comment above about use of 7-bit HEX addresses.
- Display is squashed, rotated, or not using the full display. LCDColumns should be 20 for the SSD1306, but there are a range of additional options for SSD1306 displays too more here.
- There is no audio output from my DAC. Things to check:
- Wiring (see above). In particular is SCK connected to GND?
- Is there a power LED on the DAC and is it on?
- Check SoundDevice=i2s (should be able to see this in the HDMI console).
- Are you using a known supported DAC?
- Does your DAC need additional I2C setup information? If so, it might not be supported.
- Are you using a stereo 3.5mm jack? A mono jack might short a channel to GND.
- The audio output of the DAC is noisy.
- The quality of the power supply (and maybe the cable) affects the sound quality. With a power bank or a good USB power supply and cable for the Raspberry Pi, there should be no noise at the audio output.
- Encoder seems to work backwards. The A/B or CLK/DT pins can sometimes be swapped over. Either swap the wires or swap the settings for EncoderPinClock and EncoderPinData.
- Buttons aren't triggering the right actions. Check that the right GPIO pins are configured and that there aren't any duplicates with the same action.
- Long press or double click isn't working. Double check the configuration and make sure "longpress" and "doubleclick" are spelt right!
- Not all USB MIDI devices are supported. There are various options you can try (more here) but this is probably a question for the discussion area.
- Details of USB MIDI support can be found here.
- MIDI IN requires a 3V3 compatible optoisolator circuit connected to the Raspberry Pi's RX pin. More here.
- Double check MIDI DIN socket wiring. Pin 4 and pin 5 are very commonly mixed up even by experts.
- MIDI IN should not have a GND connection (as per the MIDI spec).
- If you change the voice of a Tone Generator but everything still sounds like Brass 1. Yes. Sorry. You need to change the default performance.ini. See discussion here: https://github.com/probonopd/MiniDexed/issues/384.