CTRL PWM control brightness on a TFT scree
I am trying to control the screen brightness with a PWM signal on a NHD-7.0-HDMI-HR-RSXP-CTU.
The PWM signal is generated by an arduino, by setting its hardware registers (as described here:
https://github.com/tardate/LittleArduinoProjects/tree/master/playground/AvrHardwarePWM ).
The arduino sketch is quite simple: read a potentiometer and set a hardware register accordingly, so a suitable PWM signal is generated (62.5 KHz).
My approach works while the HDMI cable is disconnected.
When I plug the HDMI cable, the screen goes from full brightness to dark.
Can anyone help me understand what is going on?
-
Hi nandomtl,
It may be that the device the HDMI display is connected to does not recognize the display's 1024x600 resolution and the device is sending a black image to the display.
The brightness of the LED backlight will not be visible when a black video signal is output to the HDMI display.
Please clarify what the device is that the display is connected to as it may be possible to preset it's resolution to 1024x600 to drive the display properly.
Regards,0 -
The screen is connected to a raspberry pi 4B, and otherwise it operates normally.
It is just the dimming control that isn't working as expected. This function (the PWM signal) is provided by an arduino.
(I've been having a hard time posting this reply, apologies if multiple messages get uploaded)0 -
Hi nandomtl,
Try using a 7v 2amp power supply to drive the HDMI display. Some 5v power adapters fail to provide a clean voltage to properly drive this display.
Also, please confirm if these HDMI settings have been configured in the config.txt file on the Raspberry Pi:
hdmi_group=2
hdmi_mode=87
hdmi_cvt=1024 600 60 6 0 0 0
Please also confirm the PWM voltage is at least 5v and within the frequency range of 5khz - 100khz
Regards,0 -
Hello, Ted
Thanks for the suggestions
I do not have a 7 V / 2 A power adapter, I'll try to buy one tomorrow.
The config.text parameters were commented out, so I activated them a per your specs and rebooted the RPi.
Same behaviour as before.
The PWM signal is supplied by an arduino nano, the frequency is 62.5 KHz (details on my original post) - but I have no instruments to verify...
I know it works on a LED (makes it brighter/darker).
I am thinking of using a pair of 555 to generate the signal - do you think such setup would be adequate?
Or would you have other suggestions?
Thanks for your assistance0 -
Hi nandomtl,
I don't see any issues with using a 555 timer or the Arduino nano to generate the PWM frequency for this display.
Try the 7v power supply and see if that resolves the issue with the black screen when the HDMI input is connected.
Regards,0 -
Hello, Ted
I bought tried a 7.5 V converter, but had no luck: the screen flickered so much that it was not usable, so I went back to previous power source.
Then I used a 555-based circuit to generate the PWM. The first test, with a frequency of 15.5 KHz, worked - well, sort of: at the extreme ends of the pot travel, the screen flickered (same as with the new power converter). Within a narrow band, the dimming was working, but the range (low/high brightness) seemed limited.
I then replaced the pot, so that the frequency changed to 65.5 KHz. This time the dimming worked smoothly (no insane flickering). The dimming range, though, seems somewhat limited, as in the previous test.
Unfortunately I don't have the instrumentation (other than a decent multimeter) to continue digging into this (although I might get one of those cheap pocket oscilloscopes from China...).
Thank you for your help0 -
nandomtl,
I have the same display that you have and tried using the Arduino nano to produce the PWM. I also made changes to the frequency and had about the same luck that you had. I was able to get the display to vary some, but not consistently. Most of the time it would just go black. I am using an RPi4 to drive the display and it works great when when no PWM is applied.
I have a scope meter and I did look at the waveform, and it looks like PWM.. but I am not sure what I should see to have the proper output of the Arduino circuit.
Please let me know if you found a way to make the PWM work.
Or if anyone has some circuit ideas, please point me in the direction.
Thanks!
Dick0 -
Hello, Dick
The best results I had was with a 555-based PWM generator.
It does not make a ton of sense to me, but I do not have an oscilloscope to do better trouble shooting.
It's annoying to have such a simple function behaving this way. Oh, well...
If you manage to figure things out, please post your findings here.0 -
Yes, I will post what I find with Ardunio. Right now I am making a bracket to mount the display on the dash of my boat.
Do you have a link to a circuit for the 555 PWM, that I could reference??
Thanks!
Dick0 -
I also ran into issues with both PWM and EasyScale mode - just a lot of flickering and no dimming.
Put an NPN transistor between CTRL and the PWM ground. CTRL => Collector, GND => Emitter. Put a 10K resistor between Base and your PWM signal, and a 10K pull-up resistor on the collector. There's a lot of HF noise floating around and the signal would have to take a pretty horrifically noisy route to ground if you don't use the provided PWM ground. Don't forget to invert your input signal due to the NPN transistor.
After doing this both PWM @ 25khz and EasyScale mode worked perfectly and smoothly.0 -
I know this is an older thread, but I had this exact same problem and figured I'd share how I got it working. I'm using a teensy 3.2 to generate a 100kHz pwm signal and it resulted in the exact same occasional flicker but mostly just black screen. I ended up getting this working great just by adding a 510ohm resistor on the pwm signal.
The signal went from the before_resistor.jpg attachment without the resistor (which actually looks like it should work fine?).
To the with_resistor.jpg attachment with the resistor and everything works great.Before resistor
With resistor
0 -
Thanks for posting the waveforms! Adding this resistor looks like a great solution to this issue.
Best Regards,0
Please sign in to leave a comment.
Comments
12 comments