Portable luxmeter - Page 1
Forum section: electronics / projects

author: michalchoma
author_rank: Newbie
timestamp: July 04, 2019, 03:16:14 pm
content: I decided to make luxmeter, which has basic functions:1. measure lux from 0 to 188000 lux2. calculate watts/m23. charging using USB cabel via TP4056 boardBasic sensor is MAX44009, which measure lux. I use Arduino Pro Mini as microcontroller.Totally it cost cca 13 $. Case is homemade.Power consumption - 15 mA.for more info:https://www.instructables.com/id/Portable-Luxmeter/BOM:BOM:Arduino Pro Mini 5VLink:https://www.aliexpress.com/item/32900144921.html?aff_platform=link-c-tool&cpt=1561145247646&sk=bXMzgNni&aff_trace_key=e76e0b56093c46769687754f1b45f3d3-1561145247646-09449-bXMzgNni&terminal_id=6f16b2047f114c94a07652c7f0a9951aMAX440090.045 Lux to 188,000 Lux RangeVCC = 1.7V to 3.6VICC = 0.65µA Operating Current-40°C to +85°C Temperature RangeLinkhttps://www.aliexpress.com/item/32828622541.html?aff_platform=link-c-tool&cpt=1561145248451&sk=cjCuaAz6&aff_trace_key=266cb1e077524665b9f9b5a6a4a0c3e9-1561145248451-04838-cjCuaAz6&terminal_id=6f16b2047f114c94a07652c7f0a9951aOLED displayLink:https://www.aliexpress.com/item/32835854912.html?aff_platform=link-c-tool&cpt=1561145251180&sk=AgLlWyg&aff_trace_key=6508c50577044f99878cd6dd1342a224-1561145251180-08698-AgLlWyg&terminal_id=6f16b2047f114c94a07652c7f0a9951aDiagonal Screen Size：0.96"Number of Pixels：128 x 64Color Depth：Monochrome (Yellow&Blue)Dimension：27.8 x27.3x 4.3 mmWorking Voltage: 3.3~ 5V DCPower: 0.06WMaxViewing Angle: >160 DegreeDuty：1/32Brightness ( cd/m2)：150 (Typ) @ 5VInterface： I2CTP4056input 5VLink:https://www.aliexpress.com/item/32453058256.html?scm=1007.23534.123998.0&pvid=d1322270-c0d1-4618-90a5-d473f8129d86&rmsg=replace_same_item&aff_platform=link-c-tool&cpt=1561145253332&sk=chQVaxXw&aff_trace_key=65dc8d458d7e49df8da75c671b4da2d4-1561145253332-09383-chQVaxXw&terminal_id=6f16b2047f114c94a07652c7f0a9951aLi-Ion battery3 - 4.2 VLink:https://www.aliexpress.com/item/32807032859.html?aff_platform=link-c-tool&cpt=1561145254057&sk=b65UJ3ZI&aff_trace_key=ef2133d0227b4d26ae8f93359efad4da-1561145254057-05902-b65UJ3ZI&terminal_id=6f16b2047f114c94a07652c7f0a9951a18650 holderLink:https://www.aliexpress.com/item/32655188466.html?aff_platform=link-c-tool&cpt=1561145255140&sk=2eMn2fW&aff_trace_key=00a8c20d095c4c6d9ac0ad59b7ecb754-1561145255140-08614-2eMn2fW&terminal_id=6f16b2047f114c94a07652c7f0a9951aSwitch jumperLink:https://www.aliexpress.com/item/32926003235.html?aff_platform=link-c-tool&cpt=1561145256531&sk=l9e8zgU&aff_trace_key=36fa6729048847cb82357319cea58e85-1561145256531-06541-l9e8zgU&terminal_id=6f16b2047f114c94a07652c7f0a9951aDupont cable a pin headersLink:https://www.aliexpress.com/item/32880831392.html?aff_platform=link-c-tool&cpt=1561145261370&sk=cO5PqFE0&aff_trace_key=e56f57066b454a3a81a5d6d453a3f9ae-1561145261370-04817-cO5PqFE0&terminal_id=6f16b2047f114c94a07652c7f0a9951apin headersLink:https://www.aliexpress.com/item/32693979288.html?aff_platform=link-c-tool&cpt=1561145262638&sk=cg9p8QKc&aff_trace_key=731de03d832c47dbafb76b91b302a3fe-1561145262638-06851-cg9p8QKc&terminal_id=6f16b2047f114c94a07652c7f0a9951aCircuit:You need of course 5V Arduino to power it with Li-Ion battery (4,2 V!)Code:// OLED display TWI address#define OLED_ADDR 0x3CAdafruit_SSD1306 display(-1); // restart display with reset button on arduinovoid setup(){Lux.Begin(0, 188000);display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR);display.clearDisplay();display.display();// display a line of textdisplay.setTextSize(1);display.setTextColor(WHITE);display.setFont(&FreeSerif9pt7b);display.setCursor(1,15);display.print("MAX44009");display.display();}void loop(){lux=Lux.GetLux(); // get luxswatts =Lux.GetWpm(); // get watts/m2, only for SUN sourcedisplay.fillRect(1, 20, 100, 100, BLACK); // create black rectangle on values positiondisplay.setCursor(1,40);display.print(lux);display.setCursor(80,40);display.print("lux");display.setCursor(1,60);display.print(watts);display.setCursor(80,60);display.print("W/m");display.setCursor(115,55);display.print("2");display.display();delay(1000);}Photos:ChargingNight pollution?

author: kathy
author_rank: Contributor
timestamp: January 05, 2020, 08:51:46 am
content: Look good, the next time, you could consider the 0.96" oled display with dual colors here:https://www.szmaclight.com/product/0-9-6-inch-oled-display-module-4-pins-I2C-Arduino.htmlThe same I2C interface, with blue and yellow dual colors.