Portable luxmeter

Published by Michal Choma in the blog Michal Choma's blog. Views: 31


[​IMG]


I decided to make luxmeter, which has basic functions:

1. measure lux from 0 to 188000 lux

2. calculate watts/m2

3. charging using USB cabel via TP4056 board


Basic 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:

[​IMG]


BOM:

Arduino Pro Mini 5V

Link: https://www.aliexpress.com/item/329...&terminal_id=6f16b2047f114c94a07652c7f0a9951a


MAX44009


0.045 Lux to 188,000 Lux Range

VCC = 1.7V to 3.6V

ICC = 0.65µA Operating Current

-40°C to +85°C Temperature Range

Link

https://www.aliexpress.com/item/328...&terminal_id=6f16b2047f114c94a07652c7f0a9951a


OLED display

Link: https://www.aliexpress.com/item/328...&terminal_id=6f16b2047f114c94a07652c7f0a9951a


Diagonal Screen Size:0.96"


Number of Pixels:128 x 64


Color Depth:Monochrome (Yellow&Blue)


Dimension:27.8 x27.3x 4.3 mm


Working Voltage: 3.3~ 5V DC


Power: 0.06W


MaxViewing Angle: >160 Degree


Duty:1/32Brightness ( cd/m2):150 (Typ) @ 5V


Interface: I2C




TP4056

input 5V

Link: https://www.aliexpress.com/item/324...&terminal_id=6f16b2047f114c94a07652c7f0a9951a



Li-Ion battery


3 - 4.2 V

Link: https://www.aliexpress.com/item/328...&terminal_id=6f16b2047f114c94a07652c7f0a9951a


18650 holder

Link: https://www.aliexpress.com/item/326...&terminal_id=6f16b2047f114c94a07652c7f0a9951a


Switch jumper

Link: https://www.aliexpress.com/item/329...&terminal_id=6f16b2047f114c94a07652c7f0a9951a


Dupont cable a pin headers

Link: https://www.aliexpress.com/item/328...&terminal_id=6f16b2047f114c94a07652c7f0a9951a


pin headers

Link: https://www.aliexpress.com/item/326...&terminal_id=6f16b2047f114c94a07652c7f0a9951a



Circuit:

You need of course 5V Arduino to power it with Li-Ion battery (4,2 V!)
[​IMG]



Code (Text):
  1.  
  2.  
  3.   // OLED display TWI address
  4.  
  5.   #define OLED_ADDR   0x3C
  6.  
  7.   Adafruit_SSD1306 display(-1); // restart display with reset button on arduino
  8.  
  9.  
  10.   void setup()
  11.  
  12.  
  13.   {
  14.  
  15.  
  16.   Lux.Begin(0, 188000);
  17.  
  18.   display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR);
  19.  
  20.   display.clearDisplay();
  21.  
  22.   display.display();
  23.  
  24.  
  25.   // display a line of text
  26.  
  27.   display.setTextSize(1);
  28.  
  29.   display.setTextColor(WHITE);
  30.  
  31.   display.setFont(&FreeSerif9pt7b);
  32.  
  33.   display.setCursor(1,15);
  34.  
  35.   display.print("MAX44009");
  36.  
  37.   display.display();
  38.  
  39.   }
  40.  
  41.  
  42.   void loop()
  43.  
  44.  
  45.   {
  46.  
  47.   lux=Lux.GetLux();  // get luxs
  48.  
  49.   watts =Lux.GetWpm();  // get watts/m2, only for SUN source
  50.  
  51.  
  52.   display.fillRect(1, 20, 100, 100, BLACK); // create black rectangle on values position
  53.  
  54.   display.setCursor(1,40);
  55.  
  56.   display.print(lux);
  57.  
  58.   display.setCursor(80,40);
  59.  
  60.   display.print("lux");
  61.  
  62.   display.setCursor(1,60);
  63.  
  64.   display.print(watts);
  65.  
  66.   display.setCursor(80,60);
  67.  
  68.   display.print("W/m");
  69.  
  70.   display.setCursor(115,55);
  71.  
  72.   display.print("2");
  73.  
  74.   display.display();
  75.  
  76.   delay(1000);
  77.  
  78.   }
  79.  
  80.  


Photos:

[​IMG]


[​IMG]


[​IMG]


[​IMG]


Charging


[​IMG]


Night pollution?


[​IMG]
You need to be logged in to comment