Hypfer / esp8266-vindriktning-particle-sensor

Wifi MQTT Data Logging via an esp8266 for the Ikea VINDRIKTNING PM2.5 air quality sensor
Apache License 2.0
1.17k stars 128 forks source link

Control LED? Night mode? #18

Open fabiosoft opened 3 years ago

fabiosoft commented 3 years ago

Did you find same traces for LED controlling? I can see some pins labelled LED_G and LED_R...but i can't figure out what's the purpose and if i can use GPIO or need a relay... btw where is the Yellow? 🤣

Maybe could be useful in bedrooms during the night (too tiny space to add a photoresistor too?)

Hypfer commented 3 years ago

There already is a light sensor for automatic dimming in place, however even in the "dim" state, the LEDs are still way too bright IMO.

I've mitigated that issue with my sensors by taking a black permanent marker and adding a few layers of paint to the LEDs. They're still a bit too bright though

fabiosoft commented 3 years ago

So next step... cut out uC for led 😇 ...and use pins and transistors/relays to control colors with a rule based on epa rules (already followed by original fw) AIR QUALITY STANDARDS (page 4)

brev-dev commented 3 years ago

I believe the image below shows the resistors corresponding to the LED pairs (greens are in parallel with two resistors; red and yellow are in series, with one each). So you should be able to tweak their values to reduce the offensive glare. I've popped-off R9 as a quick way to halve the green output. The least destructive alternative might be to shove some paper behind the frosted window.

edit: Yes, a few sheets of paper works quite well. Keep it off the top of the window if you don't want to obscure the light sensor. No need to go removing resistors LOL.

board

mamama1 commented 3 years ago

So next step... cut out uC for led 😇 ...and use pins and transistors/relays to control colors with a rule based on epa rules (already followed by original fw) AIR QUALITY STANDARDS (page 4)

at that point it would be easier to just ditch the original uC board and use the ESP or whatever uC for everything...

fabiosoft commented 3 years ago

I found this schematic online Vindriktning_shematic_Foto 19-08-21, 14 46 02

As far as i understant the PIN7 controls the GREEN LEDs and Pin3 controls the orange and red colors. I'am thinking how...maybe the uC ouputs low for turn on red and high for turn on orange? ...but then... how does it turn off everything except green (high on pin7)

My idea is to chop off uC legs 3 and 7 but i don't know what signal to generate to control LEDs individually.

Some suggestions? Thanks

xSnowHeadx commented 3 years ago

...but then... how does it turn off everything except green (high on pin7)

To switch LED off the pin is set to tristate (or as input without pullup). So it is in fact disconnected and the voltage from power supply is not sufficient to reach the resulting flow voltage of the four LED in series.

Pin7 controls the brightness of all LED with the photosensor PD1. The higher the voltage on Pin7 the brighter the LED. To decrease the overall brightness of the LED put a resistor in parallel to R8.

mcodebase commented 1 year ago

Hi, I try the solution from xSnowHeadx (add a resitor in parallel to R8 (22k)), this resistor will be reduce the brightness when it's bright to the "dark" mode (has only 2 levels, normal or "dark"). But no chance to reduce the "dark mode" darker ...

My question, is there a Pin or an option to cut a ciruit path physically, so the LED will be completly "off". My idea is to add a switch or relay so the Vindrikning is completly dark in the night (but still woking).

xSnowHeadx commented 1 year ago

There is no simple solution for that. You only can switch the LED completely off by removing the connections of the red and green LED to the positive voltage and of the orange LED to ground by scratching the copper lines and using a dual poled switch to reconnect them on demand.

dudzio12 commented 1 day ago

@mcodebase have you found any solutions? :)