sparkfun / OpenLCD

An open source serial LCD (HD44780) controller based on the ATmega328.
Other
32 stars 16 forks source link

Persistent faint blue backlight when backlight is set to off (0,0,0) and on initial power on. #23

Closed rustycoat closed 4 years ago

rustycoat commented 4 years ago

Although it is not noticeable in the daytime, there is a constant very faint blue backlight on my unit. This occurs on startup, and also persists even after setting the backlight to 0x00, 0x00, 0x00 with the provided sample code (write: |, -, |, +, 0x00, 0x00, 0x00).

This is over i2c. All other functions seem to perform fine. This has been tested both with direct I2C commands and with the SerLCD library.

fourstix commented 4 years ago

Hi, I think that's an design artifact from using PWM to control the Blue backlight. From looking at the source code the blue backlight is controlled by using PWM to dim the output.

If I remember right, PWM is not necessarily an absolutely rock solid line at 100% duty cycle, so I think you are seeing the blue value dimmed to a very small value that is considered zero.

But not actually a perfectly flat zero line, as there are tiny little intervals where the blue light pulses on then off, very briefly, very faintly, that most people wouldn't notice. But your eyes are sensitive enough to see it to see it as a faint blue glow. My guess is mine glows just the same as yours, I just don't see it.

I'm not expert and I don't work for Sparkfun. This is just my theory from looking at the code.

Good luck to you.

rustycoat commented 4 years ago

Thanks for the tip -- although I tend to be on the sensitive side when it comes to senses, I do believe it's very easily seen at night. In daytime you can only see it from the side of the LCD. It's about as bright as a dim nightlight or a fading indiglo watch from the 80s.

I would think if they use PWM they would have a conditional for 100% and 0% for true on and off to bypass that needless logic/circuitry in that case. Seems easy enough, though the phrase "the SerLCD v2.5 pulse width modulates the backlight via a 1A BJT transistor" makes me wonder if that transistor is not bypassable. I'm from a software not a hardware background so I am likely misguided on my expectations here as I know what's trivial programmatically may not translate easily onto the circuit board.

That said: a consumer device with the backlight set to "off" should definitely not be illuminating one's bedroom at night. I think the expectation that off is off is fairly reasonable.

If yours can't be seen at night with all the lights off then I'm guessing I may just have a hardware problem where the PWM transistor mentioned above is not manufactured to spec in my individual unit?

nseidle commented 4 years ago

@hbirch - Thanks for reporting! I agree with fourstix. It's probably a software issue, not hardware. We're looking into it this week.

rustycoat commented 4 years ago

Thanks. Am I right that PR#22 from March 2019 fixes this? It appears to be addressing the same issue.

Unfortunately, this probably means I will need to purchase the FTDI adapter to update firmware...

lewispg228 commented 4 years ago

Hey All, Thanks for submitting this issue, and thanks to everyone chiming in.

I just verified that pull request #22 does fix this issue. We are currently working on getting this new fimrware (v14) into production. But if you'd like to update your current unit, @rustycoat , then yes, you'll need an FTDI adapter (make sure you use a 3.3V logic level).

We have these in both USB-C connectors:

https://www.sparkfun.com/products/15096

And microB:

https://www.sparkfun.com/products/14050

Thanks again everyone!