Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Instruction Guide 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi
Hi The Herb Guy

Thank you for your description of the problem.

If you added a line to /boot/config.txt like 'dtparam=i2c_arm_baudrate=400000', could you try removing it.

Does it make any difference if you specify your DAC is a IQaudiO DAC+?

Here is another link about I2C with this DAC chip: https://e2e.ti.com/support/audio/f/6/t/538530

It makes me wonder if it is worth writing to the DAC board manufacturer to ask if I2C is meant to be available to other devices, and whether it requires any configuration to make it available.

[EDIT]... or search the internet for someone else who has the same or similar DAC board and is using another I2C device with it and find out if they did anything special to enable this.

Adrian.
Reply
Hi Adrii,
Quote:If you added a line to /boot/config.txt like 'dtparam=i2c_arm_baudrate=400000', could you try removing it.
Removed it and reboot the system. Spectrum Analyser in display is really slow but the problem still exist.

Quote:Does it make any difference if you specify your DAC is a IQaudiO DAC+?
Yes, there is no sound at all. Doesn't matter which IQaudiO card I select. So without starting the Display there is no sound.

Quote:It makes me wonder if it is worth writing to the DAC board manufacturer to ask if I2C is meant to be available to other devices, and whether it requires any configuration to make it available.
... or search the internet for someone else who has the same or similar DAC board and is using another I2C device with it and find out if they did anything special to enable this.
I will search and ask.

Further information:
When you start the music and then start the display it looks like it should be (as descriped earlier) and also when the song changes (playing the next song after the current one is over) everything is fine. It only happens, when you change the behaviour of the player (e.g. mpc toggle to pause and mpc toggle again to play at console or pressing pause/play button in the UI)

Is there a way to monitor, what is going on at the i2c bus?

The Herb Guy
Reply
This is what I found on the Hifiberry website:
Quote:GPIO USAGE OF HIFIBERRY BOARDS
....
We do not guarantee interoperability with any other add-on card. Even if another card is not using the same GPIOs, there are many other things that might prevent interoperability. The Raspberry Pi GPIOs are not designed as a bus system (even the I2C bus can’t be simply used by multiple cards as there might or might not be the right pull-up resistors on every I2C slave).
....
HIFIBERRY DAC+, DAC+ ADC, DIGI+ AND AMP+
GPIO2-3 (pins 3 and 5) are used by our products for configuration. If you are experienced with I2C, you might add other slave devices. If you a a novice, we don’t recommend this at all.
GPIOs 18-21 (pins 12, 35, 38 and 40) are used for the sound interface. You can’t use them for any other purpose.
Maybe the resistors on the display are the problem?
Reply
Hi The Herb Guy

On the mpd_oled side, the player changing state isn't especially significant, as all mpd_oled does is run through a loop where it gathers state information and then displays it. However, it does loop faster when music is playing (for a smooth spectrum animation) and so there would be more data travelling over I2C then.

From a quick search, here is a script to monitor the i2c bus: 

https://github.com/joan2937/pigpio/tree/...2C_SNIFFER

Seems old, but I expect there are other programs around if this one doesn't work out.

Another thought, and not a solution to the issue, but mpd_oled supports SPI OLED screens now, and maybe it is possible to use one of these with the DAC board.

Adrian.
Reply
Hi The Herb Guy

That is good information you have found. It strongly suggests that this is the issue.

Adrian.
Reply
Cool
Reply
Termination should not be the problem.
At least on the RPI 3 B+ (purchased Dec 2016) there are two 1.8k PullUp-Resistors to 3.3V. So there is no need for i²c-PullUp of Pin 3 or 5 on any card!

Sniffing the i2c is not easy. I cannot get useable information.
Problem exists further :-(
Reply
I had a look at running the OLED on the second i2c bus /dev/i2c-0, which would avoid the issue. Unfortunately, while the display works, mpd_oled uses up all the available CPU (on a Pi Zero), even with low values of option -b and -f, and the spectrum animation is slow.

I don't recommend this, but for reference (tested on Volumio not Moode)...

In /boot/config.txt
Code:
dtparam=i2c_vc=on
dtparam=i2c_vc_baudrate=800000

Wire like this (I didn't use any pull ups, maybe that is why the display runs slow?)
http://fs5.directupload.net/images/160401/ccw3ju5w.png

Build mpd_oled with
Code:
PLAYER=MOODE CXXFLAGS=-DI2C_V1 CFLAGS=-DI2C_V1 make
Reply
There are posts over at the hifiberry forum where LCD displays using i2c backpacks work....I have previously used an LCD Display without backpack with my  hifiberry Digi+.  
Curious, what happens if you build, skipping cava, and just try the oled without the spectrum analyser ?


Hmmm... just looking at another thread and saw this...

Quote:I'm using the OLD Pi1 Model B+ Rev. 2
Kindly regards
The Herb Guy


Adrii... does your oled script work on that  model ?
----------
bob
Reply
Pin27/28 is normally reserved for eeprom. But I will try out tomorrow.
Regards The Herb Guy
Reply


Forum Jump: