How can I control the screen brightness with PWM output?

Post Reply
jorini
Posts: 6
Joined: Fri Jan 31, 2020 9:44 pm
languages_spoken: english
ODROIDs: ODROID-C2 and C4
Has thanked: 4 times
Been thanked: 0
Contact:

How can I control the screen brightness with PWM output?

Post by jorini »

Hi,

With my Odroid-C4, I am controlling a screen through HDMI interface with Android OS. Additionally, this screen has a PWM input to control the brightness, which I want to use.

What PWM output from the Odroid-C4 should I use for screen brightness control? How will I have to configure my OS-Android for the brightness control to work?

Thanks you

User avatar
mctom
Posts: 529
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 50 times
Been thanked: 54 times
Contact:

Re: How can I control the screen brightness with PWM output?

Post by mctom »

Hi!
Tell us more about the screen you have (Brand / model/ manual / where did you read about its PWM input)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mad_ady
Posts: 9798
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 615 times
Been thanked: 740 times
Contact:

Re: How can I control the screen brightness with PWM output?

Post by mad_ady »

User joerg had some changes to android to allow him to control brightness through a hardware pwm.

User avatar
odroid
Site Admin
Posts: 38180
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2056 times
Been thanked: 1227 times
Contact:

Re: How can I control the screen brightness with PWM output?

Post by odroid »

https://wiki.odroid.com/accessory/displ ... th_android
But, we might need to check the functionality with C4 Android OS.

User avatar
joerg
Posts: 1403
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 93 times
Been thanked: 220 times
Contact:

Re: How can I control the screen brightness with PWM output?

Post by joerg »

I can help, but actually I am away from home. At weekend I will have some time. I remember that in source code of lights pwmchip4 ist used. So with overlay pwm_ef the chip should be enabled.

User avatar
odroid
Site Admin
Posts: 38180
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2056 times
Been thanked: 1227 times
Contact:

Re: How can I control the screen brightness with PWM output?

Post by odroid »

We can test it soon.
If it doesn't work, we might need a couple of days to implement the driver.

User avatar
codewalker
Posts: 1379
Joined: Mon Feb 25, 2013 11:03 am
languages_spoken: english
ODROIDs: all
Has thanked: 61 times
Been thanked: 100 times
Contact:

Re: How can I control the screen brightness with PWM output?

Post by codewalker »

I've changed lights library to enable the PWM control. A new update image will be ready soon.
https://github.com/codewalkerster/andro ... c1a378d745

User avatar
codewalker
Posts: 1379
Joined: Mon Feb 25, 2013 11:03 am
languages_spoken: english
ODROIDs: all
Has thanked: 61 times
Been thanked: 100 times
Contact:

Re: How can I control the screen brightness with PWM output?

Post by codewalker »

These users thanked the author codewalker for the post:
jorini (Mon Oct 04, 2021 5:57 pm)

User avatar
odroid
Site Admin
Posts: 38180
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2056 times
Been thanked: 1227 times
Contact:

Re: How can I control the screen brightness with PWM output?

Post by odroid »

These users thanked the author odroid for the post:
jorini (Mon Oct 04, 2021 5:57 pm)

jorini
Posts: 6
Joined: Fri Jan 31, 2020 9:44 pm
languages_spoken: english
ODROIDs: ODROID-C2 and C4
Has thanked: 4 times
Been thanked: 0
Contact:

Re: How can I control the screen brightness with PWM output?

Post by jorini »

Hi,
Checking the PWM output, I see that the output frequency is 1KHz.

How could I modify this frequency to be 60KHz? I use a screen that needs a 60KHz PWM input.

Thanks you.

User avatar
joerg
Posts: 1403
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 93 times
Been thanked: 220 times
Contact:

Re: How can I control the screen brightness with PWM output?

Post by joerg »

This is hard-coded in the driver:
https://github.com/codewalkerster/andro ... hts.c#L125
The driver need to be modified to fulfill your needs.
BTW. Can you give a link to the screen that needs 60kHz pwm?
These users thanked the author joerg for the post (total 2):
odroid (Tue Oct 05, 2021 10:43 am) • jorini (Wed Oct 06, 2021 5:16 pm)

jorini
Posts: 6
Joined: Fri Jan 31, 2020 9:44 pm
languages_spoken: english
ODROIDs: ODROID-C2 and C4
Has thanked: 4 times
Been thanked: 0
Contact:

Re: How can I control the screen brightness with PWM output?

Post by jorini »

Thanks. Now, I will try to compile the image with your modification. It is the first time that I do it, and I do not know the difficulty.

On the screen, I use the powertip model PH102600T009-IBC21.
joerg wrote:
Tue Oct 05, 2021 12:23 am
This is hard-coded in the driver:
https://github.com/codewalkerster/andro ... hts.c#L125
The driver need to be modified to fulfill your needs.
BTW. Can you give a link to the screen that needs 60kHz pwm?

User avatar
joerg
Posts: 1403
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 93 times
Been thanked: 220 times
Contact:

Re: How can I control the screen brightness with PWM output?

Post by joerg »

I use the powertip model PH102600T009-IBC21.
I can't find this in the www. Is this a lvds display and you use another hdmi to lvds converter board for for connecting to C4?

jorini
Posts: 6
Joined: Fri Jan 31, 2020 9:44 pm
languages_spoken: english
ODROIDs: ODROID-C2 and C4
Has thanked: 4 times
Been thanked: 0
Contact:

Re: How can I control the screen brightness with PWM output?

Post by jorini »

Hi,

You can search PH102600T009, and you will find similar models. All of them have HDMI input. The IBC21 version is a customized model with integrated touch and powered with 12V.

Thanks.
joerg wrote:
Tue Oct 05, 2021 9:39 pm
I use the powertip model PH102600T009-IBC21.
I can't find this in the www. Is this a lvds display and you use another hdmi to lvds converter board for for connecting to C4?

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 0 guests