sfguy
Posts: 6
Joined: Mon Apr 10, 2017 2:14 pm

Pi Zero W performance question

Mon Apr 10, 2017 2:22 pm

Hello everyone,

I just got one of the new (and nicely small) Raspberry Pi Zero W computers.
Now I try to run a program that controls a LCD (the code is published by SUNFOUNDER (Sunfounder_SuperKit_Python_code_for_RaspberryPi, Lession 13 LCD1602), but – unfortunately – after a short while (less than a minute) the program crashes (the LCD freezes) while the Pi Zero W is still responsive. The code runs very well on my B+ (same LCD unit and other hardware)
.
Is it possible that the performance of the Zero W is not sufficient to run this task (which would surprise me)...?

Any input is highly appreciated.

Thanks in advance!

HD

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5644
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Pi Zero W performance question

Mon Apr 10, 2017 5:57 pm

sfguy wrote:Hello everyone,
I just got one of the new (and nicely small) Raspberry Pi Zero W computers.
Now I try to run a program that controls a LCD (the code is published by SUNFOUNDER (Sunfounder_SuperKit_Python_code_for_RaspberryPi, Lession 13 LCD1602), but – unfortunately – after a short while (less than a minute) the program crashes (the LCD freezes) while the Pi Zero W is still responsive. The code runs very well on my B+ (same LCD unit and other hardware).
Is it possible that the performance of the Zero W is not sufficient to run this task (which would surprise me)...?
Any input is highly appreciated.
Thanks in advance!
HD
It's unlikely to be a "performance" issue - more likely that the code hasn't been (properly) updated. Although I haven't got around to using my P0W with any of my LCD displays, I have used it with a camera + HDMI-to-VGA converter which is much more "demanding":
http://www.cpmspectrepi.uk/raspberry_pi ... amera_Test
LCD displays require little power and are not "code intensive" eg. here's a P0 "serially-powered" + a display:
http://www.cpmspectrepi.uk/raspberry_pi ... Powered.22
(interface details here: http://www.cpmspectrepi.uk/raspberry_pi ... iPlus.html , code is my own, in 'C' , using wiringPi )
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

W. H. Heydt
Posts: 12784
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Pi Zero W performance question

Mon Apr 10, 2017 6:03 pm

I haven't used a Pi0W with an attached display (as opposed to an HDMI-connected monitor)....yet. But I've used a couple of different attached displays with Pi0s with no special issues.

sfguy
Posts: 6
Joined: Mon Apr 10, 2017 2:14 pm

Re: Pi Zero W performance question

Tue Apr 11, 2017 2:45 pm

Hello,

Thanks for the answers so far. I am actually puzzled about this. I initially thought it was a matter of the power supply (I was using a usb hub) and bought an original power adapter for the Zero W. However, no changes after testing. The LCD just displays some random letter or signs and freezes.

Trev. - not sure what you mean with proper update. I just got the Zero W and run all the updates and upgrades I know. I found that the GIOPs are the same on the B+ and the Zero W. The code should run well on both without any modifications, I guess. Maybe it is a defective device ...?

HD

W. H. Heydt
Posts: 12784
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Pi Zero W performance question

Tue Apr 11, 2017 2:50 pm

About power requirements... A Pi0 with a 3.5" display takes about 200mA. A Pi0W would take about 20mA more. Either way, a properly built hub should provide plenty of power for such a set up. A 4-port USB 2.0 hub *should* have a PSU rated for at least 2A.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5644
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Pi Zero W performance question

Tue Apr 11, 2017 3:15 pm

sfguy wrote: ...
The LCD just displays some random letter or signs and freezes.
...
Trev. - not sure what you mean with proper update...
In reverse order :) ...
By "a proper update" I meant that it was/is possible that the Sunfounder LCD code may not have been tested and updated (if necessary) on a P0W.
W.r.t. "displays some random letter or signs and freezes" - how (by what type of interface) is the Sunfounder LCD connected to the Pi (eg. purely via GPIO 8bit/4bit, or via an I2C or SPI buffered interface**). Depending upon the method used (4-bit data being less reliable) I've observed E-strobe timing issues resulting in garbage and have had to use longer pulses/delays in my own 'C' code than has been observed (by other forum members) in other 'C' and Python examples. I've not been able to determine the exact cause (probably needs an oscilloscope, something that I no longer have access to) but suspect clock rate differences for different LCD modules may contribute especially if the on-board controller samples the data lines.:
http://www.cpmspectrepi.uk/raspberry_pi ... gData.html
Trev.
** FWIW, these are some of the methods/interfaces I've used:
http://www.cpmspectrepi.uk/raspberry_pi ... alLCD.html
http://www.cpmspectrepi.uk/raspberry_pi ... ut2p1.html
http://www.cpmspectrepi.uk/raspberry_pi ... elLCD.html
http://www.cpmspectrepi.uk/raspberry_pi ... iPlus.html
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

sfguy
Posts: 6
Joined: Mon Apr 10, 2017 2:14 pm

Re: Pi Zero W performance question

Tue Apr 25, 2017 3:48 pm

Hello everyone,
Thanks so much for your replies and great help!!
I got an answer from Sunfonder. They have suggested to change some GPIOs (see attachment). I did not have the time to test (they apparently did) as I am traveling (for 3 more weeks), but I thought you might be interested... When I am back home I will try and let you know.
Best,
HD
Attachments
RPi0.png
GPIO changes RPi0W
RPi0.png (42.26 KiB) Viewed 1214 times

Return to “General discussion”