Configurable on atmega usb too.erdem_ua wrote:It's configurable on V-USB approach.
I don't know if it's same on hardware based MCUs.
Brightness auto adjusting to ambient light level
Re: Brightness auto adjusting to ambient light level
Re: Brightness auto adjusting to ambient light level
For comparison purposes, Samsung's own solution (from C-Series service manual ; chassis N96A ):
In our product, light sensor operates only "Standard" mode (???) - is it actually true in C-Series?
edit: apparently no; eco sensor operation is not restricted to Standard mode only..
Code: Select all
In our product, light sensor operates only "Standard" mode.
Eco Sensor
step1 : Read the Lux five times as the unit of 400ms.
step2 : Transfrom the taken Lux to 20 level.
step3 : Get the most frequent grade, them set up the current level.
step4 : If |current level| - |previous level| > 1 , change the level
step5 : Refresh the Backlight set-up as the 200ms.
Lux > 200 190 ... 10 0
Sensor Backlight 20 19 .... 1 0
edit: apparently no; eco sensor operation is not restricted to Standard mode only..
Re: Brightness auto adjusting to ambient light level
sbav, does service manual show where is the sensor located?
Hmm, 10 levels were very very rough. 20 is little bit better but why to impose unnecessary leveling at all?
and if you select "dynamic", you're probably blind and no sensor can help you.
Code: Select all
step2 : Transfrom the taken Lux to 20 level.
But it makes sense to use sensor only in "Standard" mode. If you set "film" mode you should darken the roomsbav1 wrote: In our product, light sensor operates only "Standard" mode (???) - is it actually true in C-Series?
edit: apparently no; eco sensor operation is not restricted to Standard mode only..
and if you select "dynamic", you're probably blind and no sensor can help you.
Re: Brightness auto adjusting to ambient light level
Well, in theory we can read configuration settings from I2C EEPROM..erdem_ua wrote: @sbav1 I think this as command line program... Easier to run/debug
Alas, I think this will be very unreliable method for checking model code:
1) it's guaranteed to work for specific model only (LE*B650). Catch-22

3) it may be dangerous on different firmware/hardware versions
2) using it while exeDSP is running is not 100% predictable (AT24C256B is not stateless device).
Note: sdp_i2c_io.h is from kernel sources (I2C driver code for Chelsea is actually open).
Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/mman.h>
#include "sdp_i2c_io.h"
#define FATAL do { fprintf(stderr, "Error at line %d, file %s (%d) [%s]\n", \
__LINE__, __FILE__, errno, strerror(errno)); exit(1); } while(0)
#define SADDR_ID_PANEL_TYPE 0x6911
#define SADDR_ID_MODEL 0x6912
#define SADDR_ID_PANELTIME 0x691c
int i2c_eeprom_comb_read(int fd, unsigned short subaddr, unsigned short len, unsigned char *buf) {
struct sdp_i2c_packet_t iicp;
unsigned char pSA[2];
pSA[0]=(unsigned char)((subaddr >> 8) & 0xff);
pSA[1]=(unsigned char)(subaddr & 0xff);
printf("### i2c_eeprom_comb_read(): SA[0]=0x%02x SA[1]=0x%02x len=%d\n", pSA[0], pSA[1], len);
iicp.slaveAddr=0xa0;
iicp.subAddrSize=2;
iicp.udelay=50;
iicp.speedKhz=400;
iicp.dataSize=len;
iicp.pSubAddr=pSA;
iicp.pDataBuffer=buf;
iicp.reserve[0]=iicp.reserve[1]=iicp.reserve[2]=iicp.reserve[3]=0;
return(ioctl(fd, I2C_CMD_COMBINED_READ, &iicp));
}
int main(int argc, char **argv) {
int fd;
unsigned char buf[64];
// AT24C256B: I2C bus 1; slave 0xA0; 32kB
if ((fd=open("/dev/sdp_i2c1", 0x1002)) == -1) FATAL;
memset(buf, 0, sizeof(buf));
int res=i2c_eeprom_comb_read(fd, SADDR_ID_MODEL, 1, buf);
printf("### ioctl result=%d; ID_MODEL setting: %d (0x%02x)\n", res, buf[0], buf[0]);
unsigned utmp=0;
res=i2c_eeprom_comb_read(fd, SADDR_ID_PANELTIME, 4, (unsigned char *)&utmp);
printf("### ioctl result=%d; ID_PANELTIME setting: %d (0x%08x) == %d (?) hours\n", res, utmp, utmp, utmp/6);
close(fd);
return 0;
}
Re: Brightness auto adjusting to ambient light level
Can't find an exact location in SM; I guess it's on "Function & IR" board (panel keys + IR sensor).tom_van wrote:sbav, does service manual show where is the sensor located?
There is service setting in factory menu for "Front Color" (NONE, W-Milky, T-M-Brn, T-W-Brn, T-W-Gray, W-D-Gray, W-M-Whit W-Violet, T-C-Gray, T-R-BLK, S-BLK, S-C-Gray)
which AFAIRC affects eco-sensor calculations. If there is semi-transparent/semi-colored front bezel element in given C-Series model, sensor is probably located behind this element.
Well, I'm mostly using "Movie" (decent color rendition, nearly no banding), even in broad daylightBut it makes sense to use sensor only in "Standard" mode. If you set "film" mode you should darken the room

Re: Brightness auto adjusting to ambient light level
BTW (hardware-wise), I wonder if some "el cheapo" USB webcams (3 EUR or so) can be used as light sensors. I dismantled one of those couple of months ago,
and there was photoresistor inside (for auto adjusting LED lights level, I guess). But is that sensor value readable via USB?
Well, if not: with a little effort (V4L drivers, etc.) we can probably use webcam itself (with lens removed) as a sophisticated light sensor (sort of).
After all, it has at least 320x240 built-in photodiodes
.
and there was photoresistor inside (for auto adjusting LED lights level, I guess). But is that sensor value readable via USB?
Well, if not: with a little effort (V4L drivers, etc.) we can probably use webcam itself (with lens removed) as a sophisticated light sensor (sort of).
After all, it has at least 320x240 built-in photodiodes

Re: Brightness auto adjusting to ambient light level
I'm sure that typical webcam has exposure auto setting, so the overall light level is intentionally removed from output. There might be some special readings but I doubt if on "el cheapo".
- erdem_ua
- SamyGO Admin
- Posts: 3126
- Joined: Thu Oct 01, 2009 6:02 am
- Location: Istanbul, Turkey
- Contact:
Re: Brightness auto adjusting to ambient light level
Ahahaha.
3$ web cam
over kill & cheaper 
I think I needed to hurry to publish things...
Placed tapatalk plugin to forum, piwik scripts...
Needed to setup gravatar and some other minor things.
Than I think I could turn back to this again

3$ web cam


I think I needed to hurry to publish things...
Placed tapatalk plugin to forum, piwik scripts...
Needed to setup gravatar and some other minor things.
Than I think I could turn back to this again

Re: Brightness auto adjusting to ambient light level
Aye, to prevent AE/AWB from working we will need some reference light source (small white LED ?) shining on the 2/3 of the sensor and read the ambient light from the remaining 1/3 or so.tom_van wrote:I'm sure that typical webcam has exposure auto setting, so the overall light level is intentionally removed from output.
Also in theory we can compute standard deviation/SNR, should be (roughly) reverse proportional to ambient light level.
But, seriously, I know this is not very practical solution

I looked into this webcam (TC102 Titanum ???) again; photoresistor is most probably just a part of (very simple) circuit for backlight LED[s] driver. It's not readable from USB, unless I'm very much mistakenThere might be some special readings but I doubt if on "el cheapo".

Re: Brightness auto adjusting to ambient light level
I released Autobright app for A-series SH - see viewtopic.php?f=8&t=2068
Works with both serial and USB (atmega32u4 dongle) and also should work with erdem's attiny/V-USB based sensor.
It includes programmers exercise - graphic setup screen - I hope it is usable for B series as well.
Works with both serial and USB (atmega32u4 dongle) and also should work with erdem's attiny/V-USB based sensor.
It includes programmers exercise - graphic setup screen - I hope it is usable for B series as well.