Moode Forum
OLED Display 16x2... doesn't work - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: OLED Display 16x2... doesn't work (/showthread.php?tid=178)

Pages: 1 2


OLED Display 16x2... doesn't work - mancio61 - 05-13-2018

Today I try to wire and use the new OLED Display 16x2 that arrived yesterday.
Following the suggestions catched on this forum, I use the standard Winstar_OLEDDisplay.py and the RaspDacDisplay.py files.
I changed the few constants (e.g. Debug, Log, TimeZone etc.) in the code.

The wiring is this:
1    GND                 -> 6 GND
2    VCC                  -> 2 (5.0V)
3    not wired
4    RS                    -> 26 GPIO7
5    R|W                  -> 14 GND
6    E                      -> 24 GPIO8
7,8,9,10 not wired
11  DB4                   -> 22 GPIO25
12  DB5                   -> 18 GPIO24
13  DB6                   -> 16 GPIO23
14  DB7                   -> 15 GPIO22
15-16 not wired

The problem is that the display doesn't light up. 
I try to run alone the WinstarOLED_Display.py driver and it works, printing on the console "OLED Display Test Started" and after some seconds "OLED Display Test Ended"...
Running instead the RaspDacDisplay.py file, it runs with no errors, but anyway no light from the display....

What can I do? It could be a display problem? Even the DBx wiring could be wrong, anyway connecting it to 5V and GND... at least it should be light up....
Any ideas?

thanks!
Andrea


RE: OLED Display 16x2... doesn't work - remy1961 - 05-16-2018

Hi,
The fact that WinstarOLED_Display.py works means that the wiring is good. What happens when you run the original RaspDacDisplay.py without any modification? And during the installation process there was no error message?
Remy


RE: OLED Display 16x2... doesn't work - remy1961 - 05-16-2018

Hi Andrea,
Try connecting OLED pin 14 to GPIO 27 (pin 13). That's how mine is connected.
Remy


RE: OLED Display 16x2... doesn't work - mancio61 - 05-16-2018

(05-16-2018, 12:07 PM)remy1961 Wrote: Hi,
The fact that WinstarOLED_Display.py works means that the wiring is good. What happens when you run the original RaspDacDisplay.py without any modification? And during the installation process there was no error message?
Remy

"the wiring is good" means that the wiires are connected in the right pins AND that the soldering for that pins is OK.. Correct? This was one of my hypothesis (bad soldering...).
Regarding running modules:
1) Running WinstarOLED_display.py as stand-alone script, the OLED tests run correctly
2) Running the original RaspDacDisplay.. non error is raised, no messages on the console (only the ones that I added to have a kind of simply debug...).
3) The RaspDacDisplay.Log file seeems perfect, no error/warning records inside...

OK, I follow your suggestion to move DB7-connected wire from GPIO22 to GPIO27 (changing obviously the constant assignment in the WinstarOLED_Display.py driver


Additional question: is there a simple way to test the status of the RPI GPIOs. Clearly I suppose that this test shall be run with no devices connected to the 20x2 connector.... Only to verify that all the GPIOs are working correctly (remember that I have an HAT DAC plugged on top of the RPi, so I soldered a 20x2 connector on it to replicate the RPIs' one)

thanks
Andrea


RE: OLED Display 16x2... doesn't work - Tim Curtis - 05-16-2018

Try the gpio cmd

Code:
pi@rp3:~ $ gpio
Usage: gpio -v
      gpio -h
      gpio [-g|-1] ...
      gpio [-d] ...
      [-x extension:params] [[ -x ...]] ...
      gpio [-p] <read/write/wb> ...
      gpio <read/write/aread/awritewb/pwm/clock/mode> ...
      gpio <toggle/blink> <pin>
      gpio readall/reset
      gpio unexportall/exports
      gpio export/edge/unexport ...
      gpio wfi <pin> <mode>
      gpio drive <group> <value>
      gpio pwm-bal/pwm-ms
      gpio pwmr <range>
      gpio pwmc <divider>
      gpio load spi/i2c
      gpio unload spi/i2c
      gpio i2cd/i2cdetect
      gpio rbx/rbd
      gpio wb <value>
      gpio usbp high/low
      gpio gbr <channel>
      gpio gbw <channel> <value>
pi@rp3:~ $



RE: OLED Display 16x2... doesn't work - mancio61 - 05-17-2018

(05-16-2018, 02:03 PM)Tim Curtis Wrote: Try the gpio cmd

Code:
pi@rp3:~ $ gpio
Usage: gpio -v
      gpio -h
      gpio [-g|-1] ...
      gpio [-d] ...
      [-x extension:params] [[ -x ...]] ...
      gpio [-p] <read/write/wb> ...
      gpio <read/write/aread/awritewb/pwm/clock/mode> ...
      gpio <toggle/blink> <pin>
      gpio readall/reset
      gpio unexportall/exports
      gpio export/edge/unexport ...
      gpio wfi <pin> <mode>
      gpio drive <group> <value>
      gpio pwm-bal/pwm-ms
      gpio pwmr <range>
      gpio pwmc <divider>
      gpio load spi/i2c
      gpio unload spi/i2c
      gpio i2cd/i2cdetect
      gpio rbx/rbd
      gpio wb <value>
      gpio usbp high/low
      gpio gbr <channel>
      gpio gbw <channel> <value>
pi@rp3:~ $

Hi Tim
So, running GPIO readall, this is the output. Consider that Moode 4.1 is running, and that the HifiBerry DAC PRO+ il pluggeg onto the RPi.

[attachment=74]

I suppose that the GPIO with ALT0 mode are the ones used by DAC. I don't understand the V columns. Are there any GPIOs not properly working? How can I test them using the gpio command parameters (I didn' found any kind of help on web...)
Thanks


RE: OLED Display 16x2... doesn't work - TheOldPresbyope - 05-17-2018

(05-16-2018, 02:03 PM)Tim Curtis Wrote: Try the gpio cmd

Code:
pi@rp3:~ $ gpio
Usage: gpio -v
      gpio -h
      gpio [-g|-1] ...
      gpio [-d] ...
      [-x extension:params] [[ -x ...]] ...
      gpio [-p] <read/write/wb> ...
      gpio <read/write/aread/awritewb/pwm/clock/mode> ...
      gpio <toggle/blink> <pin>
      gpio readall/reset
      gpio unexportall/exports
      gpio export/edge/unexport ...
      gpio wfi <pin> <mode>
      gpio drive <group> <value>
      gpio pwm-bal/pwm-ms
      gpio pwmr <range>
      gpio pwmc <divider>
      gpio load spi/i2c
      gpio unload spi/i2c
      gpio i2cd/i2cdetect
      gpio rbx/rbd
      gpio wb <value>
      gpio usbp high/low
      gpio gbr <channel>
      gpio gbw <channel> <value>
pi@rp3:~ $

For those of you following along at home, the version of gpio in my moOde player doesn't know about the new RPi 3B+ and the readall option fails (other options apparently do work, however).

Code:
pi@moode:~ $ gpio readall
Oops - unable to determine board type... model: 13

pi@moode:~ $ gpio -v
gpio version: 2.44
Copyright (c) 2012-2017 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
Type: Unknown13, Revision: 03, Memory: 1024MB, Maker: Sony
* Device tree is enabled.
*--> Raspberry Pi 3 Model B Plus Rev 1.3
* This Raspberry Pi supports user-level GPIO access.

Do not follow Gordon's wiringPi update instructions in his Mar 14 post to wiringpi.com. As of today, at least, his wiringpi-2.46-1.deb file still contains gpio v2.44 (and yes, I've messaged him about it).

Instead clone his repo and build a fresh wiringPi

Code:
git clone git://git.drogon.net/wiringPi
cd wiringPi
sudo ./build
 
Now,

Code:
pi@moode:~ $ gpio -v
gpio version: 2.46
Copyright (c) 2012-2018 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
 Type: Pi 3+, Revision: 03, Memory: 1024MB, Maker: Sony
 * Device tree is enabled.
 *--> Raspberry Pi 3 Model B Plus Rev 1.3
 * This Raspberry Pi supports user-level GPIO access.

and 'gpio readall' reads all the pins on the RPi 3B+.

Regards,
Kent


RE: OLED Display 16x2... doesn't work - TheOldPresbyope - 05-17-2018

(05-17-2018, 05:48 AM)mancio61 Wrote:
(05-16-2018, 02:03 PM)Tim Curtis Wrote: Try the gpio cmd

...

Hi Tim
So, running GPIO readall, this is the output. Consider that Moode 4.1 is running, and that the HifiBerry DAC PRO+ il pluggeg onto the RPi.



I suppose that the GPIO with ALT0 mode are the ones used by DAC. I don't understand the V columns. Are there any GPIOs not properly working? How can I test them using the gpio command parameters (I didn' found any kind of help on web...)
Thanks

Hi, @mancio61

Basically, you have to go to the source code to find out the "V" stands for Value. 

The HiFiBerry site states which GPIO pins are taken up by their products (GPIO usage). In summary, stay away from Pins 3 and 5 (used for configuration) 12, 35, 38, and 40 (for the DAC+ sound interface), and 27 and 28 (always reserved...see the description).

I'm having trouble understanding why, if your OLED display works with one Python program but not another, you are looking for a hardware problem, which is what I believe @remy1961 tried to point out as well. Are you using exactly the same hardware with the two programs? 

Sorry, I don't (yet) have any displays, OLED or otherwise, to play along with.

Regards,
Kent


RE: OLED Display 16x2... doesn't work - mancio61 - 05-17-2018

(05-17-2018, 01:46 PM)TheOldPresbyope Wrote:
(05-17-2018, 05:48 AM)mancio61 Wrote:
(05-16-2018, 02:03 PM)Tim Curtis Wrote: Try the gpio cmd

...

Hi Tim
So, running GPIO readall, this is the output. Consider that Moode 4.1 is running, and that the HifiBerry DAC PRO+ il pluggeg onto the RPi.



I suppose that the GPIO with ALT0 mode are the ones used by DAC. I don't understand the V columns. Are there any GPIOs not properly working? How can I test them using the gpio command parameters (I didn' found any kind of help on web...)
Thanks

Hi, @mancio61

Basically, you have to go to the source code to find out the "V" stands for Value. 

The HiFiBerry site states which GPIO pins are taken up by their products (GPIO usage). In summary, stay away from Pins 3 and 5 (used for configuration) 12, 35, 38, and 40 (for the DAC+ sound interface), and 27 and 28 (always reserved...see the description).

I'm having trouble understanding why, if your OLED display works with one Python program but not another, you are looking for a hardware problem, which is what I believe @remy1961 tried to point out as well. Are you using exactly the same hardware with the two programs? 

Sorry, I don't (yet) have any displays, OLED or otherwise, to play along with.

Regards,
Kent

Hi Kent,
my OLED display never worked! I made a couple of weeks ago some tests with an LCD 16x2 display (with I2C interface) and instead it works perfectly.

Half an hour ago, anyway, I made another test, unplugging the DAC board from the RPI3, and wiring the OLED directly onto the RPI3 20x2 connector. Same situation, the scripts (WinstarDisplay_OLED.py and RaspDacDisplay both) run, but no sign of life on the display....
Really frustrating.... the last possibilities in my poor opinion are two: a non perfect soldering of the 16-pins connector on the display, or the display itself that could be damaged....

[attachment=75]

[attachment=76]

Other suggestions or different paths to explore?

P.S. Sorry for my bad english.... :-)

Andrea


RE: OLED Display 16x2... doesn't work - remy1961 - 05-17-2018

Hi Andrea. From the picture, it looks like there might be bad/faulty contacts on the oled pins 2, 5, 6, 7 and 11. If you have a soldering iron use it to make better soldering.
Remy