People's light ripple meter

  • Mar 25, 2022
click fraud protection

Ripple is the main parameter of light that affects health, but, alas, there are no available devices for measuring the ripple coefficient for sale. I decided to correct this situation and develop an inexpensive device.

People's light ripple meter

Theory

The pulsation of light is visually unpleasant, eyes get tired from it, it can cause headaches and exacerbation of nervous diseases. It is believed that ripple up to 5% is completely harmless. Ripple up to 30% is almost imperceptible and most likely does not have a negative effect on a person.

Many people use the smartphone camera to determine the ripple (if there is a ripple, stripes appear on the screen), but this method does not allow evaluate the level of pulsation and often people, seeing the stripes, decide that such a light source is dangerous, but in fact it may have a pulsation less than 5%.

Slightly better pencil test (https://ammo1.livejournal.com/418344.html) - it allows you to fix only the visible ripple.

In a nutshell, what is pulsation in general. Pulsation is a frequent change in the brightness of the light, in the worst case, the light can completely go out and light up 100 times per second. The ripple can be caused by a simplified mains powered LED circuit or by using pulse width modulation (PWM) to adjust the brightness of the light.

instagram viewer

Exists two formulas calculation of the pulsation coefficient. The first formula is often called the simplified one.

The ripple factor calculated by this formula can take values ​​from 0 to 100%. 0 - no ripple, 100% - the light goes out completely and lights up.

The second formula is often called GOST, since it is given in GOST R 54945-2012.

The formula looks scary, but in fact everything is simpler:

The ripple factor calculated using this formula can take values ​​higher than 100%. This happens when the light is not only completely extinguished, but the time of darkness is longer than the time of light.

Different instruments that measure the ripple coefficient calculate it using different formulas. Luxmeter-pulsemeter-brightness meter "Lupin" (https://ammo1.livejournal.com/621744.html) uses the GOST formula, UPRtek MK350D spectrometer (https://ammo1.livejournal.com/783394.html) uses a simplified formula. In the Lamptest project, I measure ripple with a UPRtek MK350D, so lamp ripple values ​​do not exceed 100%. I switched to a simplified formula for two reasons: many people were surprised by a ripple greater than 100% and they thought that something is wrong with the measurements, besides, by and large, it doesn’t matter at all whether the ripple is 90, 100 or 146%. In all these cases, the light is bad and should not be used.

It is believed that a pulsation with a frequency of more than 300 Hz does not affect a person in any way, and in many devices there is a filtering that excludes the fixation of a pulsation with a higher frequency.

Opportunities

A popular ripple meter displays two ripple coefficients on the screen at once: Kp1 - GOST formula, Kp2 - a simplified formula.

In the lower part of the screen, the brightness waveform is displayed in the entire range, in the upper part - an enlarged waveform of only the ripple itself (if any). The brightness minimum value for the top waveform is displayed below it on the right.

A colored bar is displayed below the top waveform. When it is green, the ripples are low and the light is safe, yellow indicates a slight ripple that is not visually noticeable. Orange color - ripple, noticeable visually. Red color - strong visible ripple.

Additionally, three options are displayed:

Emax - current maximum light brightness in conventional units;
Emin - current minimum brightness;
Eenv - ADC background light and noise level.

The lower waveform has a blue horizontal line corresponding to Eenv. The red dots show the contour of the oscillogram with smoothing (software filtering).

The backlight level is measured when the device is turned on, when the message "Auto calibration" is displayed on the screen. To recalibrate, simply turn the instrument off and on. The most accurate measurements are obtained when measuring in complete darkness, but the results are quite accurate under normal lighting.

The device operates in the illumination range ~100-2000 lx. If there is not enough light for an accurate measurement, "Low Light" is displayed; if the light is too bright, "Over Light" is displayed.

When measuring, place the device at such a distance from the light source that none of these messages is displayed on the screen. It is better that the value of Emax be greater than 500.

The screen displays oscillograms for 40 ms. For most lamps, the pulsation has a frequency of 100 Hz, while four waves are visible on the screen. If the pulse has a higher frequency, the number of waves on the screen will be greater. The maximum frequency that the device "sees" is ~ 800 Hz. There is no filtering by pulsation frequency in the device.

Accessories

All main components can be bought on Aliexpress from one trusted seller. We will need:

1. Light sensor TEMT6000.
2. microcontroller
NodeMCU (we choose the second option Nodemcu-CH340).
3. Screen
TFT 1.77". Can be taken TFT 1.8" (the screen itself is exactly the same there, including in size, the difference is in the SD card slot at the back and that 1.8 has pins under the screen, and 1.77 has pins above the screen). 1.77" is better because the module is thinner due to the lack of an SD slot.
4. wires
with Dupont connectors (choose the first option 10C Female TO Female). Of course, you can not use wires with connectors, but simply solder everything with ordinary wires. In any case, you will have to solder - the light sensor comes with an unsoldered connector, which lies separately in a bag).
At the last step before payment, change the shipping method for all items to "Aliexpress Saver Shipping", then the total shipping cost will decrease.

There remains a switch, a case, a Krona battery connector and the battery itself.

You can use any switch, such as in the photo, I ordered here.

The Krona battery connector is torn out of an old battery of this type. The battery can be used both alkaline (Alkaline) and saline (it will last for two hours of continuous operation). By the way, if there is not enough space in the case at all, you can disassemble the Kron alkaline battery, remove six AAAA batteries connected in series from it and arrange them in the case as convenient.

In order not to cut out a window for the screen, it is better to use a case made of transparent plastic. I used as a hull"organizer for small things "Every day" 125x75x30 mm", bought in Auchan for 30 rubles. Boxes from children's ear sticks, from toothpicks-brackets are also suitable. You can also use shoe sponges with a transparent half, but they have a very thin plastic that cracks easily.

Firmware

The firmware for the device was completely disinterestedly created by Stanislav Gritsinov, for which many thanks to him!

Download archive https://ammo1.ru/aa/pic22a/Lamptest_Flicker.rar and extract it to any folder. There are two files in the archive - firmware and ESP8266Flasher program.

Connect the NodeMCU board to the computer (it is not necessary to connect the sensor and screen to the board). If required, install the CH340 driver. A new COM port should appear on the computer.

Launch ESP8266Flasher, select the COM port that appears, click Config, click the top gear, select firmware file (LAMP_PULSE_TEMT6000_15_2_ST7735_4_1_ESP_18_filter_1.ino.nodemcu.bin), click Operation, click flash. The firmware process will begin, which will take about 30 seconds. When a green checkmark appears below, the board can be turned off.

For those who are more comfortable flashing the device through the Arduino IDE and those who want to study how the program works and possibly improve it, I publish the sketch: https://ammo1.ru/aa/pic22a/LAMP_PULSE_TEMT6000_15_2_ST7735_4_1_ESP_18_filter_1.ino.

Assembly

Sensor connection:

OUT(S)-A0
VCC (V) - 3V (any of the three pins)
GND (G) - G (preferably the one next to A0)

Battery connection:

+ - VIN (via switch)
- - G (preferably the one next to the VIN)

Screen connection:

Screen 1.77"
1 GND-G
2 VCC - 3V
3SCK-D5
4 SDA-D7
5 RES - 3V (can be connected to D6)
6RS-D1
7CS-D2
8 LEDA - 3V

Screen 1.8"
LED - 3V
SCK-D5
SDA-D7
A0 - D1
RESET - 3V (can be connected to D6)
CS-D2
GND-G
VCC - 3V

The screen is glued from the inside to the transparent case with hot glue. It is important not to confuse top and bottom (1.77" contacts on top, 1.8" on bottom). The sensor is glued with the same hot glue to the end of the housing.

It is better to assemble and run everything first, and therefore already place it in the case.

Nutrition

The easiest option is battery powered "Krona". You can generally do without built-in power and connect the device via the MicroUSB connector to any power source with a USB output or power bank. You can use one or two AA/AA batteries and a boost converter. It makes no sense to make battery power, because the device is unlikely to be used very often.

Sensor

It is not necessary to use the TEMT6000. There are OPT101 sensors on sale, for which you can change the sensitivity by changing the value of the shunt resistor. You can even use small solar panels from toys as a sensor (measurement accuracy will be lower, but the absence of pulsation and pulsation under 100% will be perfectly visible).

Problems

The response of the TEMT6000 sensor is not completely linear. I even thought about making a table of conversion factors, but it turned out that the readings of the device are already quite accurate. (By and large, the ripple of 30% or 35% is not very important, the main thing is that you can see when the ripple is less than 1% or more 90%).

I planned to make a beautiful interface with large numbers of ripple values. This is the layout that was drawn.

Unfortunately, due to current events, Stanislav ended up in another country and it is not known when he will be able and whether he will be able to return to development. If one of you undertakes to complete the interface, it will be very cool. Maybe I'll do it myself when I redo all the accumulated cases.

Is it possible to buy a ready-made device

I have no goal to make money on the device. I came up with this project for the public good. Now the device exists in two copies (one in the case, the second just in the form of a breadboard assembly). There is a person who is ready to collect them. What price are you willing to pay for a device in the same case as in the title photo?
If there are people or companies that want to release the device, I'm not against it. If they deem it necessary to deduct a percentage for the development of Lamptest it will be fine, but I do not demand anything.

I know that many have bought parts, will assemble and run the device this weekend. I ask you to take a picture of your devices and post a photo here in the comments or in Telegram @ammochat. I will be very pleased and I will know that all this is not in vain.

Peace for everyone!

© 2022, Alexey Nadezhin

For twelve years I have been writing about technology, discounts, interesting places and events. Read my blog site ammo1.ru, in Learn, Zen, Mirtesen, Telegram.
My projects:
lamptest.ru. I test LED lamps and help you figure out which ones are good and which are not so good.
Elerus.ru. I collect information about domestic electronic devices for personal use and share it.

#do it yourself#DIY#ripple#device#ripple meter#heart rate monitor#arduino