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. OpenHardware.io
  3. 💬 Button size radionode with sensors swarm extension

💬 Button size radionode with sensors swarm extension

Scheduled Pinned Locked Moved OpenHardware.io
atsha204aflashhumidityrf69lightuv lightbatterymysensortemperatureota
189 Posts 28 Posters 40.5k Views 25 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.
  • gohanG gohan

    @bjornhallberg if you want you can just order pcb and build your own node

    bjornhallbergB Offline
    bjornhallbergB Offline
    bjornhallberg
    Hero Member
    wrote on last edited by
    #31

    @gohan Yeah I could but I'm just too lazy :-) There are a lot of components to source from AliExpress before anyone can build these boards. It would take months even if there aren't any errors in the BOM or lost packages from China.

    gohanG 1 Reply Last reply
    0
    • bjornhallbergB bjornhallberg

      @gohan Yeah I could but I'm just too lazy :-) There are a lot of components to source from AliExpress before anyone can build these boards. It would take months even if there aren't any errors in the BOM or lost packages from China.

      gohanG Offline
      gohanG Offline
      gohan
      Mod
      wrote on last edited by
      #32

      @bjornhallberg since @Koresh is still in the early production stage, I think he can manage to make a few with a different radio, given of course he has the 866 mhz modules available 😁

      bjornhallbergB 1 Reply Last reply
      0
      • gohanG gohan

        @bjornhallberg since @Koresh is still in the early production stage, I think he can manage to make a few with a different radio, given of course he has the 866 mhz modules available 😁

        bjornhallbergB Offline
        bjornhallbergB Offline
        bjornhallberg
        Hero Member
        wrote on last edited by bjornhallberg
        #33

        @gohan Thankfully I do have some CW 868 radios (~5 left) available that I bought ahead of time. I think everyone can solder the radio to the board by hand and so I personally would prefer that @Koresh would consider selling the parts separately.

        1 Reply Last reply
        0
        • Cliff KarlssonC Offline
          Cliff KarlssonC Offline
          Cliff Karlsson
          wrote on last edited by
          #34

          If possible I would also like the option to chose 868 Mhz or be able to buy board without radio.

          KoreshK 1 Reply Last reply
          0
          • Cliff KarlssonC Cliff Karlsson

            If possible I would also like the option to chose 868 Mhz or be able to buy board without radio.

            KoreshK Offline
            KoreshK Offline
            Koresh
            Contest Winner
            wrote on last edited by
            #35

            @Cliff-Karlsson
            @bjornhallberg
            I have some assembled boards without the radio. You can buy them here https://www.ebid.net/eu/for-sale/arduino-ide-compatible-coincell-powered-controller-ready-for-rfm69cw-hcw-radio-156711327.htm . I just reminding this board has a rfm69HCW footprint but you can solder rfm69CW modules with the pcb adapter which I made. Of course I will supply the adapter with the main board.

            bjornhallbergB 1 Reply Last reply
            1
            • KoreshK Koresh

              @Cliff-Karlsson
              @bjornhallberg
              I have some assembled boards without the radio. You can buy them here https://www.ebid.net/eu/for-sale/arduino-ide-compatible-coincell-powered-controller-ready-for-rfm69cw-hcw-radio-156711327.htm . I just reminding this board has a rfm69HCW footprint but you can solder rfm69CW modules with the pcb adapter which I made. Of course I will supply the adapter with the main board.

              bjornhallbergB Offline
              bjornhallbergB Offline
              bjornhallberg
              Hero Member
              wrote on last edited by
              #36

              @Koresh Thanks! Great solution with the adapter board as well, you really do think of everything. Do you have the other boards without radio as well? Specifically the Switch Controller?

              KoreshK 1 Reply Last reply
              0
              • bjornhallbergB bjornhallberg

                @Koresh Thanks! Great solution with the adapter board as well, you really do think of everything. Do you have the other boards without radio as well? Specifically the Switch Controller?

                KoreshK Offline
                KoreshK Offline
                Koresh
                Contest Winner
                wrote on last edited by
                #37

                @bjornhallberg
                I have some insertable switch boards without radio. I planned to solder nrf24 into them but can sell them without radio too (it supports only cw modules). Will put up for sale soon.

                bjornhallbergB 1 Reply Last reply
                1
                • KoreshK Koresh

                  @bjornhallberg
                  I have some insertable switch boards without radio. I planned to solder nrf24 into them but can sell them without radio too (it supports only cw modules). Will put up for sale soon.

                  bjornhallbergB Offline
                  bjornhallbergB Offline
                  bjornhallberg
                  Hero Member
                  wrote on last edited by
                  #38

                  @Koresh Sounds great! Oh and btw, any idea how customs will handle the packages, any chance of taxes and customs fees? You're outside of the EU customs union right?

                  KoreshK 1 Reply Last reply
                  0
                  • bjornhallbergB bjornhallberg

                    @Koresh Sounds great! Oh and btw, any idea how customs will handle the packages, any chance of taxes and customs fees? You're outside of the EU customs union right?

                    KoreshK Offline
                    KoreshK Offline
                    Koresh
                    Contest Winner
                    wrote on last edited by Koresh
                    #39

                    @bjornhallberg I do not know exactly, but I don't think there should be any fees. Try to find out tomorrow.

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

                      @Koresh I got one of boards and would like to add Si1132-A10-GMR. What else I need to add? C8?
                      Why are you not using this sensor on your board?

                      KoreshK 1 Reply Last reply
                      0
                      • alexsh1A alexsh1

                        @Koresh I got one of boards and would like to add Si1132-A10-GMR. What else I need to add? C8?
                        Why are you not using this sensor on your board?

                        KoreshK Offline
                        KoreshK Offline
                        Koresh
                        Contest Winner
                        wrote on last edited by
                        #41

                        @alexsh1 yes, you should solder the sensor and the bypass capacitor. I have a lot of si1132 sensors, but I can't find the correct library. Almost promo videos of commertial sensors based on the si1132 shows incorrect data ))) It shows correct UV and IR level, but incorrect visible light value. So I decided to not solder this sensor yet.

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

                          @Koresh I would only use it for UV so this is good for me.

                          No need to use a lib:

                          // Distributed with a free-will license.
                          // Use it any way you want, profit or free, provided it fits in the licenses of its associated works.
                          // SI1132
                          // This code is designed to work with the SI1132_I2CS I2C Mini Module available from ControlEverything.com.
                          // https://www.controleverything.com/content/Light?sku=SI1132_I2CS#tabs-0-product_tabset-2
                          
                          #include<Wire.h>
                          
                          // SI1132 I2C address is 0x60(96)
                          #define Addr 0x60
                          
                          int response = 0;
                          void setup()
                          {
                            // Initialise I2C communication as MASTER
                            Wire.begin();
                            // Initialise Serial Communication, Baud rate = 9600
                            Serial.begin(9600);
                          
                            // Enable UVindex measurement coefficients
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select COFF-1 register
                            Wire.write(0x13);
                            // Default value
                            Wire.write(0x29);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select COFF-2 register
                            Wire.write(0x14);
                            // Default value
                            Wire.write(0x89);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select COFF-3 register
                            Wire.write(0x15);
                            // Default value
                            Wire.write(0x02);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select COFF-4 register
                            Wire.write(0x16);
                            // Default value
                            Wire.write(0x00);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select PARAM_WR register
                            Wire.write(0x17);
                            // Enable uv, Visible, IR
                            Wire.write(0xF0);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select command register
                            Wire.write(0x18);
                            // Select CHLIST register in RAM
                            Wire.write(0x01 | 0xA0);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                            delay(10);
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select PARAM_RD register
                            Wire.write(0x2E);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Request 1 byte of data
                            Wire.requestFrom(Addr, 1);
                            // Read 1 byte of data
                            response = Wire.read();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select HW_KEY register
                            Wire.write(0x07);
                            // Default value
                            Wire.write(0x17);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select PARAM_WR register
                            Wire.write(0x17);
                            // Small IR photodiode
                            Wire.write(0x00);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select COMMAND register
                            Wire.write(0x18);
                            // Select ALS_IR_ADCMUX register in RAM
                            Wire.write(0x0E | 0xA0);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                            delay(10);
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select PARAM_RD register
                            Wire.write(0x2E);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Request 1 byte of data
                            Wire.requestFrom(Addr, 1);
                            // Read 1 byte of data
                            response = Wire.read();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select PARAM_WR register
                            Wire.write(0x17);
                            // Set ADC Clock divided / 1
                            Wire.write(0x00);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select COMMAND register
                            Wire.write(0x18);
                            // Select ALS_IR_ADC_GAIN register in RAM
                            Wire.write(0x1E | 0xA0);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                            delay(10);
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select PARAM_RD register
                            Wire.write(0x2E);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Request 1 byte of data
                            Wire.requestFrom(Addr, 1);
                            // Read 1 byte of data
                            response = Wire.read();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select PARAM_WR register
                            Wire.write(0x17);
                            // Set 511 ADC Clock
                            Wire.write(0x70);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select COMMAND register
                            Wire.write(0x18);
                            // Select ALS_IR_ADC_COUNTER register in RAM
                            Wire.write(0x1D | 0xA0);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                            delay(10);
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select PARAM_RD register
                            Wire.write(0x2E);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Request 1 byte of data
                            Wire.requestFrom(Addr, 1);
                            // Read 1 byte of data
                            response = Wire.read();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select PARAM_WR register
                            Wire.write(0x17);
                            // Set ADC Clock divided / 1
                            Wire.write(0x00);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select COMMAND register
                            Wire.write(0x18);
                           // Select ALS_VIS_ADC_GAIN register in RAM
                            Wire.write(0x11 | 0xA0);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                            delay(10);
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select PARAM_RD register
                            Wire.write(0x2E);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Request 1 byte of data
                            Wire.requestFrom(Addr, 1);
                            // Read 1 byte of data
                            response = Wire.read();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select PARAM_WR register
                            Wire.write(0x17);
                            // High Signal Range
                            Wire.write(0x20);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select COMMAND register
                            Wire.write(0x18);
                            // Select ALS_IR_ADC_MISC register in RAM
                            Wire.write(0x1F | 0xA0);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                            delay(10);
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select PARAM_RD register
                            Wire.write(0x2E);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Request 1 byte of data
                            Wire.requestFrom(Addr, 1);
                            // Read 1 byte of data
                            response = Wire.read();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select PARAM_WR register
                            Wire.write(0x17);
                            // Set 511 ADC Clock
                            Wire.write(0x70);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select COMMAND register
                            Wire.write(0x18);
                            // Select ALS_VIS_ADC_COUNTER register in RAM
                            Wire.write(0x10 | 0xA0);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                            delay(10);
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select PARAM_RD register
                            Wire.write(0x2E);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Request 1 byte of data
                            Wire.requestFrom(Addr, 1);
                            // Read 1 byte of data
                            response = Wire.read();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select PARAM_WR register
                            Wire.write(0x17);
                            // High Signal Range
                            Wire.write(0x20);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select COMMAND register
                            Wire.write(0x18);
                            // Select ALS_VIS_ADC_MISC register in RAM
                            Wire.write(0x12 | 0xA0);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                            delay(10);
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select PARAM_RD register
                            Wire.write(0x2E);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                          
                            // Request 1 byte of data
                            Wire.requestFrom(Addr, 1);
                            // Read 1 byte of data
                            response = Wire.read();
                            delay(300);
                          }
                          void loop()
                          {
                            unsigned int data[4];
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select COMMAND register
                            Wire.write(0x18);
                            // Start ALS conversion
                            Wire.write(0x0E);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                            delay(500);
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select data register
                            Wire.write(0x22);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                            
                            // Request 4 byte of data
                            Wire.requestFrom(Addr, 4);
                          
                            // Read 4 bytes of data
                            // visible lsb, visible msb, ir lsb, ir msb
                            if (Wire.available() == 4)
                            {
                              data[0] = Wire.read();
                              data[1] = Wire.read();
                              data[2] = Wire.read();
                              data[3] = Wire.read();
                            }
                          
                            float visible = (data[1] * 256.0 + data[0]);
                            float ir = (data[3] * 256 + data[2]);
                          
                            // Start I2C Transmission
                            Wire.beginTransmission(Addr);
                            // Select data register
                            Wire.write(0x2C);
                            // Stop I2C Transmission
                            Wire.endTransmission();
                            
                            // Request 2 bytes of data
                            Wire.requestFrom(Addr, 2);
                          
                            // Read 2 bytes of data
                            // uv lsb, uv msb
                            if (Wire.available() == 2)
                            {
                              data[0] = Wire.read();
                              data[1] = Wire.read();
                            }
                            // Convert the data
                            float uv = (data[1] * 256 + data[0]);
                          
                            // Output data to screen
                            Serial.print("Visible Light of Source : ");
                            Serial.print(visible);
                            Serial.println(" lux");
                            Serial.print("IR Of Source : ");
                            Serial.print(ir);
                            Serial.println(" lux");
                            Serial.print("UV Of the Source : ");
                            Serial.print(uv);
                            Serial.println(" lux");
                            delay(500);
                          }
                          
                          alexsh1A 1 Reply Last reply
                          0
                          • alexsh1A alexsh1

                            @Koresh I would only use it for UV so this is good for me.

                            No need to use a lib:

                            // Distributed with a free-will license.
                            // Use it any way you want, profit or free, provided it fits in the licenses of its associated works.
                            // SI1132
                            // This code is designed to work with the SI1132_I2CS I2C Mini Module available from ControlEverything.com.
                            // https://www.controleverything.com/content/Light?sku=SI1132_I2CS#tabs-0-product_tabset-2
                            
                            #include<Wire.h>
                            
                            // SI1132 I2C address is 0x60(96)
                            #define Addr 0x60
                            
                            int response = 0;
                            void setup()
                            {
                              // Initialise I2C communication as MASTER
                              Wire.begin();
                              // Initialise Serial Communication, Baud rate = 9600
                              Serial.begin(9600);
                            
                              // Enable UVindex measurement coefficients
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select COFF-1 register
                              Wire.write(0x13);
                              // Default value
                              Wire.write(0x29);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select COFF-2 register
                              Wire.write(0x14);
                              // Default value
                              Wire.write(0x89);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select COFF-3 register
                              Wire.write(0x15);
                              // Default value
                              Wire.write(0x02);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select COFF-4 register
                              Wire.write(0x16);
                              // Default value
                              Wire.write(0x00);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select PARAM_WR register
                              Wire.write(0x17);
                              // Enable uv, Visible, IR
                              Wire.write(0xF0);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select command register
                              Wire.write(0x18);
                              // Select CHLIST register in RAM
                              Wire.write(0x01 | 0xA0);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                              delay(10);
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select PARAM_RD register
                              Wire.write(0x2E);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Request 1 byte of data
                              Wire.requestFrom(Addr, 1);
                              // Read 1 byte of data
                              response = Wire.read();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select HW_KEY register
                              Wire.write(0x07);
                              // Default value
                              Wire.write(0x17);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select PARAM_WR register
                              Wire.write(0x17);
                              // Small IR photodiode
                              Wire.write(0x00);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select COMMAND register
                              Wire.write(0x18);
                              // Select ALS_IR_ADCMUX register in RAM
                              Wire.write(0x0E | 0xA0);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                              delay(10);
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select PARAM_RD register
                              Wire.write(0x2E);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Request 1 byte of data
                              Wire.requestFrom(Addr, 1);
                              // Read 1 byte of data
                              response = Wire.read();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select PARAM_WR register
                              Wire.write(0x17);
                              // Set ADC Clock divided / 1
                              Wire.write(0x00);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select COMMAND register
                              Wire.write(0x18);
                              // Select ALS_IR_ADC_GAIN register in RAM
                              Wire.write(0x1E | 0xA0);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                              delay(10);
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select PARAM_RD register
                              Wire.write(0x2E);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Request 1 byte of data
                              Wire.requestFrom(Addr, 1);
                              // Read 1 byte of data
                              response = Wire.read();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select PARAM_WR register
                              Wire.write(0x17);
                              // Set 511 ADC Clock
                              Wire.write(0x70);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select COMMAND register
                              Wire.write(0x18);
                              // Select ALS_IR_ADC_COUNTER register in RAM
                              Wire.write(0x1D | 0xA0);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                              delay(10);
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select PARAM_RD register
                              Wire.write(0x2E);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Request 1 byte of data
                              Wire.requestFrom(Addr, 1);
                              // Read 1 byte of data
                              response = Wire.read();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select PARAM_WR register
                              Wire.write(0x17);
                              // Set ADC Clock divided / 1
                              Wire.write(0x00);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select COMMAND register
                              Wire.write(0x18);
                             // Select ALS_VIS_ADC_GAIN register in RAM
                              Wire.write(0x11 | 0xA0);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                              delay(10);
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select PARAM_RD register
                              Wire.write(0x2E);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Request 1 byte of data
                              Wire.requestFrom(Addr, 1);
                              // Read 1 byte of data
                              response = Wire.read();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select PARAM_WR register
                              Wire.write(0x17);
                              // High Signal Range
                              Wire.write(0x20);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select COMMAND register
                              Wire.write(0x18);
                              // Select ALS_IR_ADC_MISC register in RAM
                              Wire.write(0x1F | 0xA0);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                              delay(10);
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select PARAM_RD register
                              Wire.write(0x2E);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Request 1 byte of data
                              Wire.requestFrom(Addr, 1);
                              // Read 1 byte of data
                              response = Wire.read();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select PARAM_WR register
                              Wire.write(0x17);
                              // Set 511 ADC Clock
                              Wire.write(0x70);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select COMMAND register
                              Wire.write(0x18);
                              // Select ALS_VIS_ADC_COUNTER register in RAM
                              Wire.write(0x10 | 0xA0);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                              delay(10);
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select PARAM_RD register
                              Wire.write(0x2E);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Request 1 byte of data
                              Wire.requestFrom(Addr, 1);
                              // Read 1 byte of data
                              response = Wire.read();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select PARAM_WR register
                              Wire.write(0x17);
                              // High Signal Range
                              Wire.write(0x20);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select COMMAND register
                              Wire.write(0x18);
                              // Select ALS_VIS_ADC_MISC register in RAM
                              Wire.write(0x12 | 0xA0);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                              delay(10);
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select PARAM_RD register
                              Wire.write(0x2E);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                            
                              // Request 1 byte of data
                              Wire.requestFrom(Addr, 1);
                              // Read 1 byte of data
                              response = Wire.read();
                              delay(300);
                            }
                            void loop()
                            {
                              unsigned int data[4];
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select COMMAND register
                              Wire.write(0x18);
                              // Start ALS conversion
                              Wire.write(0x0E);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                              delay(500);
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select data register
                              Wire.write(0x22);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                              
                              // Request 4 byte of data
                              Wire.requestFrom(Addr, 4);
                            
                              // Read 4 bytes of data
                              // visible lsb, visible msb, ir lsb, ir msb
                              if (Wire.available() == 4)
                              {
                                data[0] = Wire.read();
                                data[1] = Wire.read();
                                data[2] = Wire.read();
                                data[3] = Wire.read();
                              }
                            
                              float visible = (data[1] * 256.0 + data[0]);
                              float ir = (data[3] * 256 + data[2]);
                            
                              // Start I2C Transmission
                              Wire.beginTransmission(Addr);
                              // Select data register
                              Wire.write(0x2C);
                              // Stop I2C Transmission
                              Wire.endTransmission();
                              
                              // Request 2 bytes of data
                              Wire.requestFrom(Addr, 2);
                            
                              // Read 2 bytes of data
                              // uv lsb, uv msb
                              if (Wire.available() == 2)
                              {
                                data[0] = Wire.read();
                                data[1] = Wire.read();
                              }
                              // Convert the data
                              float uv = (data[1] * 256 + data[0]);
                            
                              // Output data to screen
                              Serial.print("Visible Light of Source : ");
                              Serial.print(visible);
                              Serial.println(" lux");
                              Serial.print("IR Of Source : ");
                              Serial.print(ir);
                              Serial.println(" lux");
                              Serial.print("UV Of the Source : ");
                              Serial.print(uv);
                              Serial.println(" lux");
                              delay(500);
                            }
                            
                            alexsh1A Offline
                            alexsh1A Offline
                            alexsh1
                            wrote on last edited by
                            #43

                            @Koresh BTW, Found this library - working fine for my needs

                            https://github.com/hardkernel/WEATHER-BOARD/tree/master/libraries/ODROID_Si1132

                            I am using this sensor purely for UV Index.

                            PS Got your sensor. Soldered it to the mote. Works just fine

                            1 Reply Last reply
                            0
                            • KoreshK Koresh

                              @alexsh1 yes, you should solder the sensor and the bypass capacitor. I have a lot of si1132 sensors, but I can't find the correct library. Almost promo videos of commertial sensors based on the si1132 shows incorrect data ))) It shows correct UV and IR level, but incorrect visible light value. So I decided to not solder this sensor yet.

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

                              @Koresh I can see Si1132 visible light is twice more than BH1750.
                              Not sure what's wrong, but as you said it reports incorrect value.

                              UV Index is in line with VEML6070

                              alexsh1A 1 Reply Last reply
                              0
                              • alexsh1A alexsh1

                                @Koresh I can see Si1132 visible light is twice more than BH1750.
                                Not sure what's wrong, but as you said it reports incorrect value.

                                UV Index is in line with VEML6070

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

                                The sensor looks more complicated that I thought:

                                2.2. Ambient Light
                                The Si1132 has photodiodes capable of measuring both vi
                                sible and infrared light. Howe
                                ver, the visible photodiode
                                is also influenced by infrared light. The measurement of illuminance require
                                s the same spectral response as the
                                human eye. If an accurate lux measurement is desired, the
                                extra IR response of the vi
                                sible-light photodiode must
                                be compensated. Therefore, to allow the host to make corrections to the infrared light’s influence, the Si1132
                                reports the infrared light measurement on a separate channel. The separate visible and IR photodiodes lend
                                themselves to a variety of algorithmic solutions. The
                                host can then take these two measurements and run an
                                algorithm to derive an equivalent lux level as perceive
                                d by a human eye. Having
                                the IR correction algorithm
                                running in the host a
                                llows for the most flexibility in adjusting for system-dependent
                                variables. For example, if the
                                glass used in the system blocks visibl
                                e light more than infrared light, the
                                IR correction needs to be adjusted.

                                I will have to spend more time to understand how to extract the correct ambient light

                                alexsh1A 1 Reply Last reply
                                0
                                • Y Offline
                                  Y Offline
                                  yury
                                  wrote on last edited by
                                  #46
                                  This post is deleted!
                                  1 Reply Last reply
                                  0
                                  • alexsh1A alexsh1

                                    The sensor looks more complicated that I thought:

                                    2.2. Ambient Light
                                    The Si1132 has photodiodes capable of measuring both vi
                                    sible and infrared light. Howe
                                    ver, the visible photodiode
                                    is also influenced by infrared light. The measurement of illuminance require
                                    s the same spectral response as the
                                    human eye. If an accurate lux measurement is desired, the
                                    extra IR response of the vi
                                    sible-light photodiode must
                                    be compensated. Therefore, to allow the host to make corrections to the infrared light’s influence, the Si1132
                                    reports the infrared light measurement on a separate channel. The separate visible and IR photodiodes lend
                                    themselves to a variety of algorithmic solutions. The
                                    host can then take these two measurements and run an
                                    algorithm to derive an equivalent lux level as perceive
                                    d by a human eye. Having
                                    the IR correction algorithm
                                    running in the host a
                                    llows for the most flexibility in adjusting for system-dependent
                                    variables. For example, if the
                                    glass used in the system blocks visibl
                                    e light more than infrared light, the
                                    IR correction needs to be adjusted.

                                    I will have to spend more time to understand how to extract the correct ambient light

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

                                    The sketch I posted above contains some errors
                                    (it sets COFFs 0x29, 0x89, 0x02 and 0x00 to the 0x13, 0x14, 0x15 and 0x16 registers).

                                    The correct UCOEF values are 0x7B, 0x6B, 0x01, and 0x00

                                    The sensor is quite complex.

                                    alexsh1A 1 Reply Last reply
                                    0
                                    • alexsh1A alexsh1

                                      The sketch I posted above contains some errors
                                      (it sets COFFs 0x29, 0x89, 0x02 and 0x00 to the 0x13, 0x14, 0x15 and 0x16 registers).

                                      The correct UCOEF values are 0x7B, 0x6B, 0x01, and 0x00

                                      The sensor is quite complex.

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

                                      I got the following values from the sensor:

                                      1. V_VOLTAGE (3.21)
                                      2. V_HUM (51
                                      3. V_TEMP (30)
                                      4. V_LIGHT_LEVEL (4466)
                                      5. V_UV (1.74)
                                      6. V_LIGHT_LEVEL (3367)
                                      7. V_LIGHT_LEVEL (3367)

                                      Clearly, Si1132 is not in line with BH1750. VEML6075 is giving me UV Index 1.65, which is close to the Si1132.

                                      Moreover, depending where it is used, the coeff in formula has to change (I am using 0.282 for the direct sunlight) :

                                      Visible Photodiode 
                                      Response
                                      
                                      Sunlight
                                      ALS_VIS_ADC_GAIN=0
                                      VIS_RANGE=0
                                      —
                                      0.282
                                      
                                      2500K incandescent bulb
                                      ALS_VIS_ADC_GAIN=0
                                      VIS_RANGE=0
                                      
                                      0.319
                                      
                                      “Cool white” fluorescent 
                                      ALS_VIS_ADC_GAIN=0
                                      VIS_RANGE=0
                                      
                                      0.146
                                      
                                      
                                      1 Reply Last reply
                                      0
                                      • alexsh1A Offline
                                        alexsh1A Offline
                                        alexsh1
                                        wrote on last edited by alexsh1
                                        #49

                                        @Koresh My 2032 died in 2 days and I noticed that power consumption is 3.5mA. OK, maybe bad soldering - I desoldered Si1132, but the consumption is still 0.14mA while sleeping. For 2032 this is a huge consumption. Did you measure consumption at all? I am using CW radio

                                        Si1132 must be consuming around < 500 nA standby current according to the datasheet. Not sure why consumption was increased with Si1132.

                                        KoreshK 1 Reply Last reply
                                        0
                                        • alexsh1A alexsh1

                                          @Koresh My 2032 died in 2 days and I noticed that power consumption is 3.5mA. OK, maybe bad soldering - I desoldered Si1132, but the consumption is still 0.14mA while sleeping. For 2032 this is a huge consumption. Did you measure consumption at all? I am using CW radio

                                          Si1132 must be consuming around < 500 nA standby current according to the datasheet. Not sure why consumption was increased with Si1132.

                                          KoreshK Offline
                                          KoreshK Offline
                                          Koresh
                                          Contest Winner
                                          wrote on last edited by Koresh
                                          #50

                                          @alexsh1 Do not forget put BH1750 into sleep mode. Unfortunatelly standart library do not put the sensor into this mode. I described it on the github page.

                                            /*  Please comment out private declaration in BH1750.h 
                                             *   Otherwise you can't call lightMeter.write8(BH1750_POWER_DOWN); and BH1750 will not sleep!
                                             *   
                                             *  //private:
                                             *   void write8(uint8_t data);
                                             */
                                             
                                            lightMeter.write8(BH1750_POWER_DOWN);
                                          
                                          alexsh1A 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          9

                                          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