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. 💬 Easy/Newbie PCB for MySensors

💬 Easy/Newbie PCB for MySensors

Scheduled Pinned Locked Moved OpenHardware.io
mysensorsbatteryeasynewbiepcbmysx
716 Posts 111 Posters 305.9k Views 93 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.
  • sundberg84S Offline
    sundberg84S Offline
    sundberg84
    Hardware Contributor
    wrote on last edited by
    #105

    @Barna Its possible to use this, but you want as low as possible and not 2V. This means using 2xAA (3v max) you only have a range down to 2V before the booster wont work anymore. At this point if you have not changed the fuses in the arduino it will fail. I guess you could use this with 3XAA (4.5V) as well if thats what you are aiming for.

    Controller: Proxmox VM - Home Assistant
    MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
    MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
    RFLink GW - Arduino Mega + RFLink Shield, 433mhz

    BarnaB 1 Reply Last reply
    0
    • sundberg84S sundberg84

      @Barna Its possible to use this, but you want as low as possible and not 2V. This means using 2xAA (3v max) you only have a range down to 2V before the booster wont work anymore. At this point if you have not changed the fuses in the arduino it will fail. I guess you could use this with 3XAA (4.5V) as well if thats what you are aiming for.

      BarnaB Offline
      BarnaB Offline
      Barna
      wrote on last edited by
      #106

      @sundberg84
      ok, thanks. In that case some power will be left in the AAs, Am I right?
      what do you advice if I need 5V for some sensors but I would like to use battery?
      3xAA, 4xAA, 9V with regulator - is the lifetime of battery is efficient in this case ?

      1 Reply Last reply
      0
      • sundberg84S Offline
        sundberg84S Offline
        sundberg84
        Hardware Contributor
        wrote on last edited by
        #107

        @Barna
        That is a hard question, because i try to do 3.3v for battery and 5v for regulated power.
        I have 1 node at this point running on a 9v battery and 5v arduino (motion detector) but without booster and battery measurment. I have removed led and at this point i have had it run for 4 weeks. I have NO clue about batterylife but I do not expect it to work pretty long.

        Controller: Proxmox VM - Home Assistant
        MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
        MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
        RFLink GW - Arduino Mega + RFLink Shield, 433mhz

        1 Reply Last reply
        0
        • D Offline
          D Offline
          Dylano
          wrote on last edited by
          #108

          mmmm i think that al this work, for a 4 weeks working sensor is not a good solution for a home automation system....
          Why can a Zwave or 433Mhz motion sensor work for more then a year...
          Is my biggest question..
          Forum link

          Is there relay now solution for a battery live for a year...
          Other bord, other sketch, other regulator, other battery...

          or...

          Domoticz, with a lot of working hardware, include mysensors :-)
          OpenPLI, RuneAudio, Solarmeter, etc......

          Not a great builder of software and hardware, more a user...
          Only i try to do my best :-(

          Sander TeunissenS 1 Reply Last reply
          0
          • D Dylano

            mmmm i think that al this work, for a 4 weeks working sensor is not a good solution for a home automation system....
            Why can a Zwave or 433Mhz motion sensor work for more then a year...
            Is my biggest question..
            Forum link

            Is there relay now solution for a battery live for a year...
            Other bord, other sketch, other regulator, other battery...

            or...

            Sander TeunissenS Offline
            Sander TeunissenS Offline
            Sander Teunissen
            wrote on last edited by
            #109

            @Dylano Google for low power arduino mini. Or arduino mini on battery. I've got one running now for half a year on two aaa batteries. Only lost 10% or something.
            (Quickest is to remove the led and the voltage regulator)

            1 Reply Last reply
            0
            • sundberg84S Offline
              sundberg84S Offline
              sundberg84
              Hardware Contributor
              wrote on last edited by
              #110

              @Dylano Im not sure if I understand what you mean. This PCB does not support 433mhz or Zwave. You need to make that a question in the forum. I have nodes with this PCB now almost running for a year, and reporting good battery level.

              As Sander told you above, remove led and voltage regulator on a 3.3v arduino and you will run a mysensor node for a year:
              alt text

              Controller: Proxmox VM - Home Assistant
              MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
              MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
              RFLink GW - Arduino Mega + RFLink Shield, 433mhz

              L 1 Reply Last reply
              0
              • Sander TeunissenS Offline
                Sander TeunissenS Offline
                Sander Teunissen
                wrote on last edited by Sander Teunissen
                #111
                This post is deleted!
                A 1 Reply Last reply
                0
                • Sander TeunissenS Sander Teunissen

                  This post is deleted!

                  A Offline
                  A Offline
                  Alexander
                  wrote on last edited by
                  #112

                  @Sander-Teunissen I have some rev6 that I am willing to sell. Let me know if you are interested.

                  1 Reply Last reply
                  0
                  • OitzuO Offline
                    OitzuO Offline
                    Oitzu
                    wrote on last edited by
                    #113

                    If someone has one of these left in germany or nearby i'm willing to buy one for daugther-board dev purposes.

                    1 Reply Last reply
                    0
                    • sundberg84S sundberg84

                      @Dylano Im not sure if I understand what you mean. This PCB does not support 433mhz or Zwave. You need to make that a question in the forum. I have nodes with this PCB now almost running for a year, and reporting good battery level.

                      As Sander told you above, remove led and voltage regulator on a 3.3v arduino and you will run a mysensor node for a year:
                      alt text

                      L Offline
                      L Offline
                      lxz
                      wrote on last edited by lxz
                      #114

                      @sundberg84 said:

                      I have nodes with this PCB now almost running for a year, and reporting good battery level.

                      I see that battery measuring is not working in my case.
                      Can you post your sketch for a DHT22 or dallas sensor? Because readVCC.h does not work with a step up booster and 2x AA batteries connected, it seems..

                      1 Reply Last reply
                      0
                      • sundberg84S Offline
                        sundberg84S Offline
                        sundberg84
                        Hardware Contributor
                        wrote on last edited by sundberg84
                        #115

                        @lxz This is my code (Note dev branch!) for DHT22 incl battery measuring (2xAA).
                        The reason for readVCC:h does not work is that you measure after the booster = always 3.3V!

                        // Enable debug prints
                        #define MY_DEBUG
                        
                        // Enable and select radio type attached
                        #define MY_RADIO_NRF24
                        //#define MY_RADIO_RFM69
                        #define MY_NODE_ID 15
                        
                        #include <SPI.h>
                        #include <MySensor.h>  
                        #include <DHT.h>  
                        
                        #define CHILD_ID_HUM 0
                        #define CHILD_ID_TEMP 1
                        #define HUMIDITY_SENSOR_DIGITAL_PIN 3
                        unsigned long SLEEP_TIME = 600000; // Sleep time between reads (in milliseconds)
                        
                        #define SKETCH_NAME "UtomhusHumSyd #15"                // Change to a fancy name you like
                        #define SKETCH_VERSION "1.0"                    // Your version
                        
                        DHT dht;
                        float lastTemp;
                        float lastHum;
                        boolean metric = true; 
                        MyMessage msgHum(CHILD_ID_HUM, V_HUM);
                        MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
                        
                        //=========================
                        // BATTERY VOLTAGE DIVIDER SETUP
                        // 1M, 470K divider across battery and using internal ADC ref of 1.1V
                        // Sense point is bypassed with 0.1 uF cap to reduce noise at that point
                        // ((1e6+470e3)/470e3)*1.1 = Vmax = 3.44 Volts
                        // 3.44/1023 = Volts per bit = 0.003363075
                        #define VBAT_PER_BITS 0.003363075  
                        #define VMIN 1.9                                  //  Vmin (radio Min Volt)=1.9V (564v)
                        #define VMAX 3.0                                  //  Vmax = (2xAA bat)=3.0V (892v)
                        int batteryPcnt = 0;                              // Calc value for battery %
                        int batLoop = 0;                                  // Loop to help calc average
                        int batArray[3];                                  // Array to store value for average calc.
                        int BATTERY_SENSE_PIN = A0;                       // select the input pin for the battery sense point
                        //=========================
                        
                        void setup()  
                        { 
                         analogReference(INTERNAL);             // For battery sensing
                        
                          delay(500); // Allow time for radio if power used as reset
                          
                          dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); 
                        
                          metric = getConfig().isMetric;
                        }
                        
                        void presentation()  
                        { 
                          // Send the Sketch Version Information to the Gateway
                         // Send the Sketch Version Information to the Gateway
                          sendSketchInfo(SKETCH_NAME, SKETCH_VERSION);
                        
                          // Register all sensors to gw (they will be created as child devices)
                          present(CHILD_ID_HUM, S_HUM);
                          present(CHILD_ID_TEMP, S_TEMP);
                        }
                        
                        void loop()      
                        {  
                          delay(500); // Allow time for radio if power used as reset
                          delay(dht.getMinimumSamplingPeriod());
                         
                          // Fetch temperatures from DHT sensor
                          float temperature = dht.getTemperature();
                          if (isnan(temperature)) {
                              Serial.println("Failed reading temperature from DHT");
                          } else if (temperature != lastTemp) {
                            lastTemp = temperature;
                            if (!metric) {
                              temperature = dht.toFahrenheit(temperature);
                            }
                            send(msgTemp.set(temperature, 1));
                            Serial.print("T: ");
                            Serial.println(temperature);
                          }
                          
                          // Fetch humidity from DHT sensor
                          float humidity = dht.getHumidity();
                          if (isnan(humidity)) {
                              Serial.println("Failed reading humidity from DHT");
                          } else if (humidity != lastHum) {
                              lastHum = humidity;
                              send(msgHum.set(humidity, 1));
                              Serial.print("H: ");
                              Serial.println(humidity);
                          }
                          batM();
                          sleep(SLEEP_TIME); //sleep a bit
                        }
                        
                        void batM() //The battery calculations
                        {
                           delay(500);
                           // Battery monitoring reading
                           int sensorValue = analogRead(BATTERY_SENSE_PIN);    
                           delay(500);
                           
                           // Calculate the battery in %
                           float Vbat  = sensorValue * VBAT_PER_BITS;
                           int batteryPcnt = static_cast<int>(((Vbat-VMIN)/(VMAX-VMIN))*100.);
                           Serial.print("Battery percent: "); Serial.print(batteryPcnt); Serial.println(" %");  
                           
                           // Add it to array so we get an average of 3 (3x20min)
                           batArray[batLoop] = batteryPcnt;
                          
                           if (batLoop > 2) {  
                             batteryPcnt = (batArray[0] + batArray[1] + batArray[2] + batArray[3]);
                             batteryPcnt = batteryPcnt / 3;
                         
                           if (batteryPcnt > 100) {
                             batteryPcnt=100;
                         }
                         
                             Serial.print("Battery Average (Send): "); Serial.print(batteryPcnt); Serial.println(" %");
                               sendBatteryLevel(batteryPcnt);
                               batLoop = 0;
                              }
                             else 
                             {
                             batLoop++;
                             }
                        }```

                        Controller: Proxmox VM - Home Assistant
                        MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                        MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                        RFLink GW - Arduino Mega + RFLink Shield, 433mhz

                        1 Reply Last reply
                        0
                        • pkriekP Offline
                          pkriekP Offline
                          pkriek
                          wrote on last edited by
                          #116

                          Hi

                          I also bought v8 of these boards. 2 sensors up an running perfect.

                          2 others modules on the other hand, I think I fried the arduino. I am using 5v mini's. They worked when programming thru the USB port. Also communication with domoticz. They stopped working when I attached the 6v external adapter. I connected these to the ground and power connector. Now lights go on, but nothing anymore also not on the serial monitor.

                          Should I have used the raw connector????

                          thanks for helping

                          1 Reply Last reply
                          0
                          • sundberg84S Offline
                            sundberg84S Offline
                            sundberg84
                            Hardware Contributor
                            wrote on last edited by sundberg84
                            #117

                            Short answer - yes you should have used RAW. But at least you learned a lesson if you want to think positive. ☺

                            Try and see what happens if you change. Maybe they are still OK.

                            Controller: Proxmox VM - Home Assistant
                            MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                            MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                            RFLink GW - Arduino Mega + RFLink Shield, 433mhz

                            1 Reply Last reply
                            1
                            • pkriekP Offline
                              pkriekP Offline
                              pkriek
                              wrote on last edited by
                              #118

                              thanks!, lessons learned indeed. . Great stuff though.

                              1 Reply Last reply
                              1
                              • scooter217S Offline
                                scooter217S Offline
                                scooter217
                                wrote on last edited by
                                #119

                                what size terminal blocks do you buy? I bought some and they are the wrong size.

                                S 1 Reply Last reply
                                0
                                • scooter217S scooter217

                                  what size terminal blocks do you buy? I bought some and they are the wrong size.

                                  S Offline
                                  S Offline
                                  Samuel235
                                  Hardware Contributor
                                  wrote on last edited by Samuel235
                                  #120

                                  @scooter217, from a quick inspection of the .brd file and a look around the internet for the datasheets it would seem that sundberg has allowed for any screw terminal block that uses a 5mm pin pitch. So you would need a 3 terminal 5mm pin pitch screw terminal. Please allow @sundberg84 some time to reply to ensure I am correct.

                                  MySensors 2.1.1
                                  Controller - OpenHAB (Virtual Machine)
                                  Gateway - Arduino Mega MQTT Gateway W5100

                                  1 Reply Last reply
                                  1
                                  • sundberg84S Offline
                                    sundberg84S Offline
                                    sundberg84
                                    Hardware Contributor
                                    wrote on last edited by
                                    #121

                                    @scooter217 : http://www.ebay.com/sch/sis.html?_nkw=20pcs+KF301-2P+2+Pin+Plug-in+Screw+Terminal+Block+Connector+5.08mm+Pitch&_id=181759858196&&_trksid=p2057872.m2749.l2658

                                    Controller: Proxmox VM - Home Assistant
                                    MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                                    MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                                    RFLink GW - Arduino Mega + RFLink Shield, 433mhz

                                    scooter217S 1 Reply Last reply
                                    0
                                    • sundberg84S sundberg84

                                      @scooter217 : http://www.ebay.com/sch/sis.html?_nkw=20pcs+KF301-2P+2+Pin+Plug-in+Screw+Terminal+Block+Connector+5.08mm+Pitch&_id=181759858196&&_trksid=p2057872.m2749.l2658

                                      scooter217S Offline
                                      scooter217S Offline
                                      scooter217
                                      wrote on last edited by
                                      #122

                                      @sundberg84 Thank you, just ordered some from ebay!

                                      1 Reply Last reply
                                      1
                                      • M Offline
                                        M Offline
                                        Matt
                                        wrote on last edited by Matt
                                        #123

                                        Hi Sundberg.
                                        First of all thanks for what you have done here, and hi from New Zealand.
                                        I have a problem though, sorry to be a hassle.
                                        I assembled my first board tonight and I dont get 3.3v across the NRF. It starts at 0.07V then falls down to 0 on my cheap meter. Same on the MYSX1.4 connector at 3.3 and gnd. Am getting 3.3 on the mini as well as VCC and GND on the MYSX area so the regulator is working. May be a short? Or a bad solder? Although they look good to me.... If so what solder joints should I redo? Any other ideas?
                                        Also, Ive traced back the VCC from the NRF and I cant see where it connects to a power source, either the battery in or the boost converter?
                                        0_1461234488858_MS.jpg

                                        Thanks,
                                        Matt

                                        sundberg84S 1 Reply Last reply
                                        0
                                        • M Matt

                                          Hi Sundberg.
                                          First of all thanks for what you have done here, and hi from New Zealand.
                                          I have a problem though, sorry to be a hassle.
                                          I assembled my first board tonight and I dont get 3.3v across the NRF. It starts at 0.07V then falls down to 0 on my cheap meter. Same on the MYSX1.4 connector at 3.3 and gnd. Am getting 3.3 on the mini as well as VCC and GND on the MYSX area so the regulator is working. May be a short? Or a bad solder? Although they look good to me.... If so what solder joints should I redo? Any other ideas?
                                          Also, Ive traced back the VCC from the NRF and I cant see where it connects to a power source, either the battery in or the boost converter?
                                          0_1461234488858_MS.jpg

                                          Thanks,
                                          Matt

                                          sundberg84S Offline
                                          sundberg84S Offline
                                          sundberg84
                                          Hardware Contributor
                                          wrote on last edited by
                                          #124

                                          @Matt Hi Matt - tnx.

                                          Try to measure here: whats your reading?
                                          0_1461234892945_1.jpg
                                          if its 3.3v its your radio thats has some error... this is prettu much the last point before radio. Also measure VCC/GND under the pcb and not on top, what does it say?

                                          Sounds like a short or bad solder...

                                          Controller: Proxmox VM - Home Assistant
                                          MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                                          MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                                          RFLink GW - Arduino Mega + RFLink Shield, 433mhz

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


                                          14

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 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