sirvolcano
Posts: 8
Joined: Tue Jan 01, 2019 6:01 pm

Pi 3B or 3B+ / Amp2 / pi official 7‘‘touch display

Tue Jan 01, 2019 6:46 pm

Hi RaspberryPi-Team

I have a raspberry pi model 3B and a model 3B+. I want to combine one of them with the hifiberry amp2 and the pi official 7’’ touch display. The combination is powered via Amp2 with the recommended power supply (Mean Well: GST60A18-P1J) which works fine.

On the SD-Card I installed OSMC (Linux osmc 4.14.78-2-osmc) where the media center Kodi 17.6 is running.

Pi 3B/3B+ works fine, as well as the display and amp2 but my problem is the touch function of the display:

The touch function doesn’t work or works intermittently and or delayed - but most of the time it doesn’t work when amp2 is attached, so at the moment it is not usable for navigation in Kodi. But when I detach amp2 and run the screen with pi only the touch function works fine almost as good as on a smart phone. This problem I have with both models of pi (3B and 3B+) in combination with hifiberry amp2.

In some posts I read that the problem might be because of the I2C-Bus which is needed and used by the amp2 and the touch function of the display. Without amp2 I don’t need to connect the additional jumper for SDA and SCL everything works fine. When amp2 is attached, no matter if SDA/SCL is connected to the pins via jumper cable or not, either it doesn’t work, or it works very poor as explained above. (This posts that I found are quite old ones and the issues were with the pi version 2 or older. I have a pi model 3B and 3B+, as far as I understood it should be no problem with the new models that I have, but it does have this problems). Here are the post that I found and looked at:

viewtopic.php?t=129171
viewtopic.php?f=108&t=120460&sid=08bb00 ... e&start=25

As well I read some post where people say everything works fine with that hardware/software combination - so there must be a solution for that problem, but I haven't found any yet.

So, please can you help me with this issue? Is this hardware combination a total no go combination (which I don't believe) or is it only a configuration problem?

The same question I already asked Hifiberry and OSMC and got this answer from Hifiberry:

“the display uses a separate I2C bus directly connected (not via the GPIO that the Amp2 is connected to). We know about a lot of users that use the display without problems. Unfortunately I can't say what might be causing the problem in your installation. You might try other Kodi-based systems e.g. LibreElec.”

But I still don’t know if it is a system or config based problem. Could you please help me?

I tried to give you as much information as possible about my hardware/software setup. If you need more information just go ahead and ask for it. Thanx in advance for helping me!

Best regards

aBUGSworstnightmare
Posts: 1152
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi 3B or 3B+ / Amp2 / pi official 7‘‘touch display

Wed Jan 02, 2019 7:50 am

No need to connect the two jumper wires when using RPi3B/3B+; the I2C bus is on the DSI connector

You should post your config.txt so we can see if it's a configuration problem.

sirvolcano
Posts: 8
Joined: Tue Jan 01, 2019 6:01 pm

Re: Pi 3B or 3B+ / Amp2 / pi official 7‘‘touch display

Wed Jan 02, 2019 5:57 pm

Hi,

yes, as far as I understood up to now, I don't need to connect the two jumper wires when using RPi3B/3B+ because the I2C bus is on the DSI connector, it was a wort of try and an act of desperation, but can you tell me which one of the I2C bus is on the DSI? I2C-0 or I2C-1? And is there a bus on CSI if yes which one? It is only an information for me for the future!

I don't know which config.txt you might need, I found one config.txt in /boot which I can adapt.
As well in /boot I found a config of my OSMC version, you might need this as well: config-4.14.78-2-osmc.

I will post both of them, as well as the logs of OSMC (uploadlog) and Kodi (kodi) if you might need them. The Kodi log contains enhanced information as usual because I enabled the Debugging function before and did a reboot.

Thank you very much in advanced that you take time.

Best regards

PS: Unfortunately, I can’t attach the files because of an error “Invalid file extension: config.txt”, but I will enter here the content of config.txt at least, the others are too long. If you need them, I will ask the admin what I have to do to be able to attach them!

Code: Select all

gpu_mem_1024=256  
hdmi_ignore_cec_init=1  
disable_overscan=1
start_x=1  
disable_splash=1
gpu_mem_256=112  
dtoverlay=hifiberry-dacplus-overlay  
sdtv_aspect=1  
gpu_mem_512=144  
dtparam=audio=off  
arm_freq=1200
core_freq=400
sdram_freq=400
ignore_lcd=0
The only change that I made here is the last line "ignore_lcd=0" because in a post and description for the screen I read that it might help. But it didn't! It doesn't matter if this line is in or not, the problem is the same!

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6053
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Pi 3B or 3B+ / Amp2 / pi official 7‘‘touch display

Thu Jan 03, 2019 6:13 pm

All Pi models after the original model A and B have i2c0 wired to the csi and DSI connectors. Only those original models need any extra wiring, and adding the extra wiring on a later model will most likely cause problems.

Ignore_lcd will be 0 by default on all models except the Compute Module and those original model a and B.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

sirvolcano
Posts: 8
Joined: Tue Jan 01, 2019 6:01 pm

Re: Pi 3B or 3B+ / Amp2 / pi official 7‘‘touch display

Fri Jan 04, 2019 1:01 pm

Hi 6by9,

thanx for replying! I will keep that information in mind for the future.

And do you have any advice or a hint for my problem?

@ aBUGSworstnightmare: You asked for the config.txt, which I have posted here. Could you manage to have a look at it? Or do you need more information for any analysis?

Best Regards

sirvolcano
Posts: 8
Joined: Tue Jan 01, 2019 6:01 pm

Re: Pi 3B or 3B+ / Amp2 / pi official 7‘‘touch display

Fri Jan 04, 2019 4:06 pm

Hi,

just an update - I have the same problem not only with OSMC as well the problem is the same in rasbian. Rasbian is installed on a separate SD-Card updated and upgraded, here the information of rasbian version (Linux raspberrypi 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux).

The problem is identical to that I explained above. Touch function of the display works perfect without Hifiberry amp2.
As soon as amp2 is attached everything works (sound via amp2 as well) still fine except the touch function, either it is very poor or not existing! It doesn’t matter if I use pi model 3B or 3B+, same behaviour on both pi models.

Any ideas!? I know from other forums that this combination of hardware works fine!

aBUGSworstnightmare
Posts: 1152
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi 3B or 3B+ / Amp2 / pi official 7‘‘touch display

Fri Jan 04, 2019 5:06 pm

Which I/Os are required by this HAT? This sounds like a conflict with I2C resource allocation. As requested already please post your full config.txt file

sirvolcano
Posts: 8
Joined: Tue Jan 01, 2019 6:01 pm

Re: Pi 3B or 3B+ / Amp2 / pi official 7‘‘touch display

Fri Jan 04, 2019 5:25 pm

Hi,

the HAT uses the PINs 3/5/7/12/35/38/40. As you can see with PINs 3 and 5 it uses I2C but Hifiberry say that it is not interfering with the screen because the screen uses an other I2C.

I would like to share the config but I can't attach no file here I get the same error like before: “Invalid file extension: config-4.14.78-2-osmc”

Regards

aBUGSworstnightmare
Posts: 1152
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi 3B or 3B+ / Amp2 / pi official 7‘‘touch display

Fri Jan 04, 2019 7:13 pm

sirvolcano wrote:
Fri Jan 04, 2019 5:25 pm
Hi,

the HAT uses the PINs 3/5/7/12/35/38/40. As you can see with PINs 3 and 5 it uses I2C but Hifiberry say that it is not interfering with the screen because the screen uses an other I2C.

I would like to share the config but I can't attach no file here I get the same error like before: “Invalid file extension: config-4.14.78-2-osmc”

Regards
no need to attach the file. Copy the content and use 'code' option for posting it here. It's text only, so should be a piece of cake to post it here.

Sorry fo say, but I'm interrested in the Raspbian config.txt only! 'Config.txt' is located in /boot directory. I will not bother myself with OSMC stuff. If it works on Raspbian it should work with OSMC too, if not you're asking for support in the wrong place as OSMC users might be able to help you.

sirvolcano
Posts: 8
Joined: Tue Jan 01, 2019 6:01 pm

Re: Pi 3B or 3B+ / Amp2 / pi official 7‘‘touch display

Sat Jan 05, 2019 3:05 pm

Hi,

thanx for taking time! The reason why I wanted to post a file was only because the content of "config-4.14.78-2-osmc" is quite long.

But you are right if it works with rasbian it should work with OSMC as well - due to that OSMC bases on rasbian and is slimmed down only. I am trying to run the hardware configuration either on OSMC or on rasbian to check the behaviour of different OS but up to now the reaction of rasbian and OSMC is the same!

But now, to put it in a nutshell - here is the config of my rasbian:

Code: Select all

lcd_rotate=0
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=2
#hdmi_mode=85

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi
dtoverlay=hifiberry-dacplus

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
gpu_mem=256
Hope you might find something that helps!

Thanx

aBUGSworstnightmare
Posts: 1152
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi 3B or 3B+ / Amp2 / pi official 7‘‘touch display

Sun Jan 06, 2019 8:37 am

Shouldn't you uncomment I2C and I2S pameters too?

Code: Select all

dtparam=i2c_arm=on
dtparam=i2s=on   
this should enable the I2C intwrface as well as I2S.

sirvolcano
Posts: 8
Joined: Tue Jan 01, 2019 6:01 pm

Re: Pi 3B or 3B+ / Amp2 / pi official 7‘‘touch display

Sun Jan 06, 2019 6:03 pm

Hi,

I thing it doesn't matter if they are commented out. When hifiberry amp2 is not attached it works perfect with the same config.txt, so even that this two lines are commented out or not!

When I look at the touchscreen docs here https://www.raspberrypi.org/documentati ... e/display/:
NB: With the display connected to the GPIO I2C pins, the GPU will assume control of the respective I2C bus. The host operating system should not access this I2C bus, as simultaneous use of the bus by both the GPU and Linux will result in sporadic crashes.


As far as I understood
dtparam=i2c_arm=on
is for Linux and it is not recommended to use it with the GPU at the same time! Or should I change something in the config???

But I have some new discovery:

When I power the touchscreen with a separat 5V-2.5A power supply the touch function is really much better, though not as good as when the amp2 is not attached but really it woks much better. Here is the new hardware setup:

  • Powering pi and amp2 with “Mean Well: GST60A18-P1J” via map2
  • Powering pi original 7’’ touch screen directly with a power supply 5V - 2,5A
  • No connection between screen to amp2 for screen powering via 5V pin
This was the setup before:

  • Amp2 is attached to the pi via 40 pin socket
  • Touchscreen is connected via ribbon cable to the pi DSI port
  • Touchscreen is connected via jumper cables to amp2 5V pin and GND pin for power supply (changed, see above)
  • No connection to the SCL/SDA pins of GPIO!
  • All are powered via amp2 with the Meanwell power supply
ok, unfortunately I don’t have a multimeter but as soon as I get one I will check the power supply at 5V pin at amp2. As well I will check the power supply when the jumper cable are connected to amp2 5V pin, if there is any voltage drop via jumper cable. I am expecting here a constant supply of 5V.

Did anyone made similar experience? So it seams not only to be a software config issue, I have to check the hardware setup as well!

If someone can see the failure just post it please!

Thanx and best regards.

aBUGSworstnightmare
Posts: 1152
Joined: Tue Jun 30, 2015 1:35 pm

Re: Pi 3B or 3B+ / Amp2 / pi official 7‘‘touch display

Mon Jan 07, 2019 5:55 am

sirvolcano wrote: ...
When I look at the touchscreen docs here https://www.raspberrypi.org/documentati ... e/display/:
NB: With the display connected to the GPIO I2C pins, the GPU will assume control of the respective I2C bus. The host operating system should not access this I2C bus, as simultaneous use of the bus by both the GPU and Linux will result in sporadic crashes.


As far as I understood
dtparam=i2c_arm=on
is for Linux and it is not recommended to use it with the GPU at the same time! Or should I change something in the config???
... But you're not using I2C from GPIO !
I2C module on DSI and CSI connector is I2C0, and I2C module on GPIO is I2C1 --> two different modules.

User avatar
rpdom
Posts: 13120
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Pi 3B or 3B+ / Amp2 / pi official 7‘‘touch display

Mon Jan 07, 2019 6:59 am

The display should only be connected to the GPIO i2c pins (3&5) on the original Pi 1B model. That's because the i2c0 bus was not connected to the display interface, but went to those GPIOs instead.

All later models had i2c0 routed to the display connector and used the i2c1 bus for the GPIOs.

sirvolcano
Posts: 8
Joined: Tue Jan 01, 2019 6:01 pm

Re: Pi 3B or 3B+ / Amp2 / pi official 7‘‘touch display

Sat Jan 12, 2019 5:03 pm

Hi everybody,

latest news from my issue with the touchscreen: It is NOT A SOFTWARE ISSUE!!!!

This post is a bit long and a kind of a report – be patient and read it ;) .

It is somehow a hardware issue which I can’t explain at the moment. As well it is to mention that I have found the solution for me a little bit coincidently – but still have some question marks in my head!

What I have done since my last post:

I got a multimeter from a friend and measured the touchscreen support directly at the 5V pin to the GND of amp2. (And promptly I destroyed my new – even not one-month old pi 3b+ while measuring because I slipped with the tip of the contact and build a bridge between the 5V and 3V pin, bloody hell :( and all this because a very trivial issue but luckily only the pi is destroyed other components are still fine).

Well before that mishap I measured about 5.06V at the pin. Then I had to change the pi and installed my pi 3b and measured again – very carefully ;) – and measured again 5.06V, so power supply at the pin is ok. Next step – I connected the jumper cable for the touchscreen support to the 5V and GND pins on amp2 and measured at the end of the cables which will be connected to the display board – here as well 5.06V, so still enough power there. During all this the screen faced down to the table to get good access to the pins. Then I took all the construct with display, pi and amp2 in my hand – this is the coincidently moment – and tried out to navigate with the touch function and Look! It works perfect even the amp2 was attached! Then I played some music and it worked as well and I could even use the touch function at the same time while the music was playing without any problems.

Maybe one more thing that everybody should know – I assembled some brackets to the chassis of the display at the back to put it straight upward for a comfort use and look. But unfortunately, the free space between the construct and table is a little bit small and at the same time the power supply connector of amp2 faces towards the table and the barrel-connector of the power supply is a bit long, so when it is connected to amp2 the space is even smaller – too small to put it on the bracket’s feet. Therefore, I positioned the whole construct somehow in the box of the display with the foam inside for having as less bending on the supply cable as possible and this is one of the positions when the touch doesn’t work.

Nevertheless, I measured the 5V pin in this position as well and power supply was ok – 5.06V but touch function poor, so it can’t be a power supply issue. With this finding I took the construct in the hand again, hold it at the bracket and bended the power supply in many directions – small bends, big bends of the cable, jiggled and shifted directly the barrel-connector – and tried at the same time to navigate with the touch and there was no problem with the touch function, it worked perfectly. Then I tried jacking up the brackets at its feet to get more space between the construct and the table, so that the cable can hang little bit more free and straight. Subsequently I put the construction on the table and not in the box again. Result – bad touch reaction. In this position I measured the power again, still 5.06V. …???... What is the problem? I don’t know! Doesn’t matter in which position and constellation only the cables and power supply are connected in a right way and firmly and there is no other contact of the components with anything else so that we can exclude any possible short circuits or something similar.

Someone told me to shield the ribbon cable between screen board and pi by wrapping the ribbon cable with some aluminium foil, which I did already before (and which didn’t help). Based on that ideas I put the supply cable and loudspeaker cable and with other parts and cables closer together to see if there are any EMC issues – still good touch reaction when I hold it in my hand, so that can’t be the problem either!

When there is the problem with the bad or no touch reaction – sometimes while trying the mouse arrow appears in the upper left corner of the screen but doesn’t move. So, I guess sometimes the touch reaction is been gathered by the system but not used.

But here is another phenomenon – physically I keep the construct in that position in my hand in which it works perfectly as described above and don’t change. Then I change only the config.txt to rotate the display 180° and reboot. After reboot I see everything upside-down in the display and try to navigate with touch – nothing happens, so no touch function even the supply cable is in that position in that it worked before rotating the display via change of config!

So, hopefully now everybody can understand why I still have question marks in my head and can’t explain the behaviour! But fortunately, and/or hopefully I found now my solution – after I will be done all my implementation – I would install everything in that way as I would hold it in my hand and hope that it works!

But this is pitiful and pelting and keeps still some doubts that it will work in the end when everything is ready, and I put it in a nice box. I would like to exclude the doubts and be sure that it will work fine when I am ready with everything!

So, if anyone have an idea what the problem might cause – go ahead and tell me! ;)

Best regards

PS: If someone wants, I could make some Fotos of the whole construct and post it here!

Return to “Official Foundation Display”