Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. VEML6070 and VEML6075 UV sensors

VEML6070 and VEML6075 UV sensors

Scheduled Pinned Locked Moved Hardware
52 Posts 6 Posters 16.1k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • korttomaK Offline
    korttomaK Offline
    korttoma
    Hero Member
    wrote on last edited by
    #22

    Did anyone measure the current consumption of these VEML chips?
    I just compared a Sensebender Micro with the VEML6075 to a standalone Sensebender Micro and the standalone one measured 28uA and the one with the VEML6075 measured 740uA.

    I just checked the VEML6075 documentation and typical consumption is 480uA but it should also be possible to shut it down and then it should only draw 800nA.

    I need to check the Lib if there is some function to shut it down and wake it up. Or else I will try to change the setup so I can power the VEML6075 from an output pin so I can turn it completely off.

    • Tomas
    scalzS 1 Reply Last reply
    0
    • korttomaK korttoma

      Did anyone measure the current consumption of these VEML chips?
      I just compared a Sensebender Micro with the VEML6075 to a standalone Sensebender Micro and the standalone one measured 28uA and the one with the VEML6075 measured 740uA.

      I just checked the VEML6075 documentation and typical consumption is 480uA but it should also be possible to shut it down and then it should only draw 800nA.

      I need to check the Lib if there is some function to shut it down and wake it up. Or else I will try to change the setup so I can power the VEML6075 from an output pin so I can turn it completely off.

      scalzS Offline
      scalzS Offline
      scalz
      Hardware Contributor
      wrote on last edited by
      #23

      @korttoma
      if i remember, sleep is not implemented in the veml6075 lib above. I added a sleep function and set the corresponding CONF register. not a big thing ;)

      korttomaK 1 Reply Last reply
      0
      • scalzS scalz

        @korttoma
        if i remember, sleep is not implemented in the veml6075 lib above. I added a sleep function and set the corresponding CONF register. not a big thing ;)

        korttomaK Offline
        korttomaK Offline
        korttoma
        Hero Member
        wrote on last edited by korttoma
        #24

        @scalz please share your sleep function implementation :D it is quite a "big thing" for a non programmer.

        • Tomas
        1 Reply Last reply
        0
        • scalzS Offline
          scalzS Offline
          scalz
          Hardware Contributor
          wrote on last edited by scalz
          #25

          @korttoma you can try this, and you'll see it's not a big thing :smile:

          in your .h, in the public section, add this:

          void sleep(bool mode);
          

          then in the .cpp, add this:

          void VEML6075::sleep(bool mode) {
          
          	if (mode) 
          		this->config |= 1; // Go to sleep			
          	else 
          		this->config &= 254; // Wake up
          	
          	this->write16(VEML6075_REG_CONF, this->config);
          	
          }
          

          In your sketch, just do this:

          veml6075.sleep(true); // power down veml6075
          

          Note: i added this because i noticed it wasn't implemented, but i've not checked the power consumption yet. So if you can tell me if it's ok, please!

          Enjoy ;)

          korttomaK alexsh1A 2 Replies Last reply
          1
          • scalzS scalz

            @korttoma you can try this, and you'll see it's not a big thing :smile:

            in your .h, in the public section, add this:

            void sleep(bool mode);
            

            then in the .cpp, add this:

            void VEML6075::sleep(bool mode) {
            
            	if (mode) 
            		this->config |= 1; // Go to sleep			
            	else 
            		this->config &= 254; // Wake up
            	
            	this->write16(VEML6075_REG_CONF, this->config);
            	
            }
            

            In your sketch, just do this:

            veml6075.sleep(true); // power down veml6075
            

            Note: i added this because i noticed it wasn't implemented, but i've not checked the power consumption yet. So if you can tell me if it's ok, please!

            Enjoy ;)

            korttomaK Offline
            korttomaK Offline
            korttoma
            Hero Member
            wrote on last edited by
            #26

            @scalz thanks for the sleep function! The current consumption is now down to 85uA but the problem is that onece it sleeps I cant get it to wake up.

            Tried with:

            veml6075.sleep(false);
            

            Tried allso adding a 500ms sleep after the wakeup to give it time to setle.
            But do I need to do something more?

            • Tomas
            scalzS 1 Reply Last reply
            0
            • korttomaK korttoma

              @scalz thanks for the sleep function! The current consumption is now down to 85uA but the problem is that onece it sleeps I cant get it to wake up.

              Tried with:

              veml6075.sleep(false);
              

              Tried allso adding a 500ms sleep after the wakeup to give it time to setle.
              But do I need to do something more?

              scalzS Offline
              scalzS Offline
              scalz
              Hardware Contributor
              wrote on last edited by scalz
              #27

              @korttoma sorry for the copy/paste mistake :) you can try again, i've updated above. maybe someday i'll measure power consuption of a sensebender, weird that you get 28uA for the standalone..

              korttomaK 1 Reply Last reply
              0
              • scalzS scalz

                @korttoma sorry for the copy/paste mistake :) you can try again, i've updated above. maybe someday i'll measure power consuption of a sensebender, weird that you get 28uA for the standalone..

                korttomaK Offline
                korttomaK Offline
                korttoma
                Hero Member
                wrote on last edited by korttoma
                #28

                @scalz seems to be working now :D don´t take my current consumtion figures to sareously since Im using the Micro (nano) ampere meter and I realy have nothing good to calibrate it against.

                0_1498719943898_20170628_071528.jpg

                • Tomas
                1 Reply Last reply
                1
                • alexsh1A Offline
                  alexsh1A Offline
                  alexsh1
                  wrote on last edited by
                  #29

                  I have a strange problem. VEML6070 is showing UV Index 6, which is more or less in line with other online sources. VEML6075 is showing UV index 10.5, which is wrong. I'll double check the sketch once more but cannot understand where this error comes from

                  1 Reply Last reply
                  0
                  • korttomaK Offline
                    korttomaK Offline
                    korttoma
                    Hero Member
                    wrote on last edited by korttoma
                    #30

                    I mounted the Sensebender Micro VEML6075 inside my old broken UVN800 and set it in the roof. Here are graphs of the values I received the last 3 days. Unfortunately I do not have anything to compare with but the values seem reasonable.

                    0_1499540455956_UVIndex.jpg

                    • Tomas
                    1 Reply Last reply
                    0
                    • scalzS scalz

                      @korttoma you can try this, and you'll see it's not a big thing :smile:

                      in your .h, in the public section, add this:

                      void sleep(bool mode);
                      

                      then in the .cpp, add this:

                      void VEML6075::sleep(bool mode) {
                      
                      	if (mode) 
                      		this->config |= 1; // Go to sleep			
                      	else 
                      		this->config &= 254; // Wake up
                      	
                      	this->write16(VEML6075_REG_CONF, this->config);
                      	
                      }
                      

                      In your sketch, just do this:

                      veml6075.sleep(true); // power down veml6075
                      

                      Note: i added this because i noticed it wasn't implemented, but i've not checked the power consumption yet. So if you can tell me if it's ok, please!

                      Enjoy ;)

                      alexsh1A Offline
                      alexsh1A Offline
                      alexsh1
                      wrote on last edited by
                      #31

                      @scalz FYG, I am using VEML6075 without sleep and it works now for nearly a year on 2xAA. I am still puzzled though by Index difference 6070 and 6075

                      1 Reply Last reply
                      0
                      • korttomaK Offline
                        korttomaK Offline
                        korttoma
                        Hero Member
                        wrote on last edited by
                        #32

                        Yeah, my 6075 device is also still working fine on the 2xAA batteries I put in it a year ago.

                        • Tomas
                        alexsh1A 1 Reply Last reply
                        0
                        • alexsh1A Offline
                          alexsh1A Offline
                          alexsh1
                          wrote on last edited by
                          #33

                          OK, I think found what the issue is. VEML 6070 is not providing accurate UV Index. Adafruit is stating the following:

                          Note that this is not UV index, its just UV light intensity!
                          

                          This is how it can be converted into sort of UV Index according to the datasheet:

                          RISK_LEVEL convert_to_risk_level(WORD uvs_step)
                          {
                          WORD risk_level_mapping_table[4] = {2241, 4482, 5976, 8217};
                          }
                          
                          WORD read_uvs_step(void)
                          {
                          BYTE lsb, msb;
                          WORD data;
                          VEML6070_read_byte(VEML6070_ADDR_DATA_MSB, &msb);
                          VEML6070_read_byte(VEML6070_ADDR_DATA_LSB, &lsb);
                          data = ((WORD)msb << 8) | (WORD)lsb;
                          return data;
                          }
                          
                          
                          LEVEL* UV Index 
                          ===== ======== 
                          LOW 0-2 
                          MODERATE 3-5 
                          HIGH 6-7 
                          VERY HIGH 8-10 
                          EXTREME >=11
                          
                          1 Reply Last reply
                          1
                          • korttomaK korttoma

                            Yeah, my 6075 device is also still working fine on the 2xAA batteries I put in it a year ago.

                            alexsh1A Offline
                            alexsh1A Offline
                            alexsh1
                            wrote on last edited by alexsh1
                            #34

                            @korttoma @scalz FYG I got a new DMM from Dave Jones 121GW and decided to measure a sleep current for VEML6075 and to my surprise:

                            0_1530957108991_0F29A8F8-3AD9-4235-AAF9-5756384C7B79.jpeg

                            Quickly reading the datasheet I discovered my mistake:

                            • current supply - 480uA
                            • shutdown current - 800nA

                            Therefore, the sensor has to be put to sleep properly.
                            One can modify the existing lib:

                            uint8_t VEML6075::Shutdown() {  //Places device in shutdown low power mode
                            
                            	Config = ReadByte(CONF_CMD, 0); //Update global config value
                            
                            	return WriteConfig(Config | 0x01); //Set shutdown bit
                            
                            }
                            
                            
                            
                            uint8_t VEML6075::PowerOn() {  //Turns device on from shutdown mode
                            
                            	Config = ReadByte(CONF_CMD, 0); //Update global config value
                            
                            	return WriteConfig(Config & 0xFE); //Clear shutdown bit
                            
                            }
                            
                            Make sure you define #define CONF_CMD 0x00
                            
                            

                            PS Now I understand why I did not change batteries - they are rechargeable. Charing and putting them back made me think that batteries lasted for a long time. :relaxed:

                            1 Reply Last reply
                            0
                            • alexsh1A Offline
                              alexsh1A Offline
                              alexsh1
                              wrote on last edited by
                              #35

                              I have now three sensor from Vishay - VEML6040, VEML6070 and VEML6075
                              I can confirm all three sensors must be property put down to sleep with battery nodes or you would have the following sleeping currents on nodes with typical mysensors setup and standalone sleeping current of 4uA:

                              VEML6040 - 240uA
                              VEML6070 - 94uA
                              VEML6075 - 622uA

                              Unfortunately, most libraries do not care for properly sleeping/waking up sensors and therefore, one has to do a little tinkering with software to make it work. I am actually thinking about re-writing some libs completely.

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                Avamander
                                wrote on last edited by
                                #36

                                Battery issues is one thing, SparkFun's VEML6075 library can't handle direct daylight even (compensated UV readings go negative).

                                alexsh1A 1 Reply Last reply
                                0
                                • A Avamander

                                  Battery issues is one thing, SparkFun's VEML6075 library can't handle direct daylight even (compensated UV readings go negative).

                                  alexsh1A Offline
                                  alexsh1A Offline
                                  alexsh1
                                  wrote on last edited by
                                  #37

                                  @avamander That's impossible - it is designed to handle the direct sunlight. Mine is showing UV Index = 9. Negative UV reading is a software issue - looks like Sparkfun did not write a good lib for it. Did you try a different lib?

                                  A 1 Reply Last reply
                                  0
                                  • alexsh1A alexsh1

                                    @avamander That's impossible - it is designed to handle the direct sunlight. Mine is showing UV Index = 9. Negative UV reading is a software issue - looks like Sparkfun did not write a good lib for it. Did you try a different lib?

                                    A Offline
                                    A Offline
                                    Avamander
                                    wrote on last edited by Avamander
                                    #38

                                    @alexsh1

                                    Did you try a different lib?

                                    Haven't bothered, I'm just logging the raw values and then compensating with software.

                                    alexsh1A 1 Reply Last reply
                                    0
                                    • A Avamander

                                      @alexsh1

                                      Did you try a different lib?

                                      Haven't bothered, I'm just logging the raw values and then compensating with software.

                                      alexsh1A Offline
                                      alexsh1A Offline
                                      alexsh1
                                      wrote on last edited by
                                      #39

                                      @avamander It definitely works.

                                      My problem for now was just the battery consumption. I have one of these:

                                      https://www.aliexpress.com/item/I2C-Interface-3-3V-Board-Based-on-VEML6075-UVA-UVB-Light-Sensor-Module/32832979057.html?spm=2114.search0104.3.1.5f765e65b6nG8K&ws_ab_test=searchweb0_0,searchweb201602_3_10152_10151_10065_10344_10130_10068_10324_10342_10547_10325_10343_10340_10548_10341_10696_10192_10190_10084_10083_10618_10307_10820_10301_10821_10303_10059_100031_10103_524_10624_10623_10622_10621_10620,searchweb201603_25,ppcSwitch_7&algo_expid=c6a42de3-1e19-435c-af06-c3a9b24d4ca3-0&algo_pvid=c6a42de3-1e19-435c-af06-c3a9b24d4ca3&priceBeautifyAB=0

                                      The problem is that it is dodgy - the sleep consumption never goes below 50uA at 3.2V. According to the datasheet it should be 800nA while sleeping at 1.8V and 25C. Can anyone measure a shutdown current for VEML6085 please?

                                      A 1 Reply Last reply
                                      0
                                      • alexsh1A alexsh1

                                        @avamander It definitely works.

                                        My problem for now was just the battery consumption. I have one of these:

                                        https://www.aliexpress.com/item/I2C-Interface-3-3V-Board-Based-on-VEML6075-UVA-UVB-Light-Sensor-Module/32832979057.html?spm=2114.search0104.3.1.5f765e65b6nG8K&ws_ab_test=searchweb0_0,searchweb201602_3_10152_10151_10065_10344_10130_10068_10324_10342_10547_10325_10343_10340_10548_10341_10696_10192_10190_10084_10083_10618_10307_10820_10301_10821_10303_10059_100031_10103_524_10624_10623_10622_10621_10620,searchweb201603_25,ppcSwitch_7&algo_expid=c6a42de3-1e19-435c-af06-c3a9b24d4ca3-0&algo_pvid=c6a42de3-1e19-435c-af06-c3a9b24d4ca3&priceBeautifyAB=0

                                        The problem is that it is dodgy - the sleep consumption never goes below 50uA at 3.2V. According to the datasheet it should be 800nA while sleeping at 1.8V and 25C. Can anyone measure a shutdown current for VEML6085 please?

                                        A Offline
                                        A Offline
                                        Avamander
                                        wrote on last edited by
                                        #40

                                        @alexsh1 I have the same board, there seems to be a regulator and a few other components on the board, if you remove those, how's the power consumption then?

                                        alexsh1A 1 Reply Last reply
                                        0
                                        • A Avamander

                                          @alexsh1 I have the same board, there seems to be a regulator and a few other components on the board, if you remove those, how's the power consumption then?

                                          alexsh1A Offline
                                          alexsh1A Offline
                                          alexsh1
                                          wrote on last edited by
                                          #41

                                          @avamander I have removed every component bit by bit. Originally the consumption was 56uA and now it is 50uA with the only sensor left on the board

                                          A 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          15

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular