Brightness auto adjusting to ambient light level

This is general talk area for things that NOT RELATED WITH TV! Instead, about internal works like web site, forum, wiki, or talking, etc...
Post Reply

tom_van
Official SamyGO Developer
Posts: 146
Joined: Tue Jan 19, 2010 10:44 am

Brightness auto adjusting to ambient light level

Post by tom_van » Thu May 12, 2011 10:47 am

Hi all,

I lacked ambient light sensor in my LE46A956 for long time. I think it was a shame that high-end model did not include such feature even three years ago.
Now I'm testing home-made auto adjusting of brightness. I made a sensor, connected externally to ex-link connector and modified TV firmware of course.
No doubts, comfort of watching increased a lot. The picture is perfect in a sunny day as well as in darkness of a night without manual adjusting.

I want to estimate the demand for ambient light sensor. Does newer series than "A" also lack light sensor?

I'm going to publish small board with a sensor and MCU as an open hardware. So if you are an enthusiast for electronics, you will be able to build it yourself.
If not I expect the price of ready-to-use sensor could be around 50 EUR (or less if reasonable amount of sensors will be produced).

So what do you think?

User avatar
juusso
SamyGO Moderator
Posts: 10125
Joined: Sun Mar 07, 2010 6:20 pm

Re: Brightness auto adjusting to ambient light level

Post by juusso » Thu May 12, 2011 11:36 am

Yes, my old CRT samsung had magic eye for auto-contrasting and i miss such functionality on my B653. :)
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

tom_van
Official SamyGO Developer
Posts: 146
Joined: Tue Jan 19, 2010 10:44 am

Re: Brightness auto adjusting to ambient light level

Post by tom_van » Mon May 16, 2011 6:29 pm

juuso: Good to hear YES from one of core hackers here. Does your YES also mean that you will cooperate on firmware hacking for auto-brightness? My TV is an SH4 model, I'm not able to test hacks for ARM versions.

I'm disappointed that you are alone. Unfortunately just a few readers go to "general" section, I'm afraid that I should cross-post the topic to at least A and B series.

User avatar
erdem_ua
SamyGO Admin
Posts: 3106
Joined: Thu Oct 01, 2009 6:02 am
Location: Istanbul, Turkey
Contact:

Re: Brightness auto adjusting to ambient light level

Post by erdem_ua » Mon May 16, 2011 10:46 pm

What? 50?! What's that?
Do you planning to rebuild TV's entire motherboard? :D

Such a sensor could easily build with a ATTinyX5. That family also support USB connection with software!
That chip is ~$1,5 simple light sensor is ~$1,5 too...Equals $3. Just 3$. You don't need any other pricey things.
Plus USB connector, short wire, a small PCB (or small empty prototype board ) , a crystal, and 3,3 regulator and a case needed such a project...
I estimate whole device price is needed to be under $10... I don't have any idea how do you make it 50?.

I don't know how could we handle contrast settings on the fly, on B series... Do we have access to brightness/contrast settings?
If someone could handle jobs on TV side, I can make a poormans light sensor device for SamyGO.

User avatar
juusso
SamyGO Moderator
Posts: 10125
Joined: Sun Mar 07, 2010 6:20 pm

Re: Brightness auto adjusting to ambient light level

Post by juusso » Tue May 17, 2011 6:52 am

Erdem, nice to hear that price could drop, it is more acceptable!

Tom, i could test it on my B653, but only if anyone ports it from sh4 to ARM...
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

tom_van
Official SamyGO Developer
Posts: 146
Joined: Tue Jan 19, 2010 10:44 am

Re: Brightness auto adjusting to ambient light level

Post by tom_van » Tue May 17, 2011 7:06 am

Cool down Erdem. I clearly stated that if anybody is able to build light sensor himself I'll be happy to share my know-how.
The price I estimated (maybe overestimated) is not a bill of material but price of completed and tested box.
If you look for any profi made boards with small ATmega (without light sensor etc...), you see prices around 20$.
And those are produced in series at least 1000 pieces.
So if you offer working external light sensor for 10$ I'm ordering one. ;)

tom_van
Official SamyGO Developer
Posts: 146
Joined: Tue Jan 19, 2010 10:44 am

Re: Brightness auto adjusting to ambient light level

Post by tom_van » Tue May 17, 2011 8:36 am

juuso wrote:Tom, i could test it on my B653, but only if anyone ports it from sh4 to ARM...
So if "anyone" wants to do some tracing on ARM:

The code common for SH4 and ARM:
SsPictureBase::SetBrightness(unsigned char) / SsPictureBase::SetContrast(unsigned char)
in turn calls
SsPictureBase::SetPictureModeData(SS_PictureModeItem_k, unsigned char *)
This routine call low level setting and stores new value in SsStore

On SH4 SetPictureModeData calls VDH_SetBrightness / VDH_SetContras / VDH_SetEnergySave - these are low level routines we need.
As far as I understand ARM code SetPictureModeData seems to call a method from SS_PictureModeItem_k.

tom_van
Official SamyGO Developer
Posts: 146
Joined: Tue Jan 19, 2010 10:44 am

Re: Brightness auto adjusting to ambient light level

Post by tom_van » Tue May 17, 2011 10:05 am

Let's discuss how to connect ambient light sensor to the TV.

1) I2C sensor connected to internal I2C bus. This variant might be even cheaper than Erdem offered. Just a sensor and 3 wires. But it can easy turn into the most expensive if you damage your TV mainboard. This option is only for TV makers, not for us.

2) A microcontroller conected to USB. I would not go for Erdem's "poor man's solution" (I do not feel like a poor man when I'm watching the very TV I paid 2000EUR for :roll: ). Fortunately there is e.g. ATmega8u2 for $4 with real USB interface. You can connect any ambient light sensor, I2C or analog. This solution is the cleanest one from technical point of view. However there is a drawback: it occupies the only USB socket in TV. Of course you can use a hub if you don't mind extra wires...

I searched for ready-made USB-to-I2C converters. The cheapest one I found is for $35, it is just PCB (no box) and you have to connect the sensor. You need USB drivers for the dongle working on ARM or SH4 - it might be a problem.

3) A microcontroller connected to Ex-link. I've built this variant on a breadboard and changed T-RBYDEUC firmware to use it. It works. The trickiest thing is powering from RS232. I see advantages in free USB socket, no need for USB drivers. The dongle can also serve as Ex-Link/RS232 reduction.

User avatar
erdem_ua
SamyGO Admin
Posts: 3106
Joined: Thu Oct 01, 2009 6:02 am
Location: Istanbul, Turkey
Contact:

Re: Brightness auto adjusting to ambient light level

Post by erdem_ua » Tue May 17, 2011 10:26 am

If you look for any profi made boards with small ATmega (without light sensor etc...), you see prices around 20$.
What boards? I will build from bare chips. Don't buy such a kit. :) I think even no PCB is required for 2 piece.Could solder chips with wire will do the job :)

1. If you are gonna do that via I2C, ATTinyX5 family has also I2C port.
2. AFAIK, ATmega8u2 is BGA only. Will be problematic on soldering to the board. ATTiny85 with softUSB is eligible solution. Works with Interrupts. Has DIP8 and SMD chices. Also bandwidth will be small. So It will work without problem. I think cleanest solution is this approach.
3. RS232/EXLink is good but don't know how to power unit. Trying to power from USB is not meaningfull. Might be possible to pull charge from ExLink interface to an ultracap. ATTiny consumes really low if it on sleep mode or on low frequency. Some programming trick will put sensor on sleep when doesn't on use and I guess that power might be efficient to run ATTiny at full speed on data sending but needed to test first...

So I am gonna buy some photocells for play. :)

User avatar
juusso
SamyGO Moderator
Posts: 10125
Joined: Sun Mar 07, 2010 6:20 pm

Re: Brightness auto adjusting to ambient light level

Post by juusso » Tue May 17, 2011 10:41 am

Do not forget give us some detail schematic after you finish ;)
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

Post Reply

Return to “General”