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.
  • A Affe

    Hello, I'm just finished with 3 cards and test . I read on mysensor.org I'll connect NRF24L01+ Radio whit decoupling capacitor of 47ยตF and on your card whit 4,7ยตF

    What is the difference?

    mfalkviddM Offline
    mfalkviddM Offline
    mfalkvidd
    Mod
    wrote on last edited by mfalkvidd
    #135

    @Affe in practice, there is usually no difference. 4.7uF is enough, but 47uF doesn't hurt.

    1 Reply Last reply
    1
    • Nca78N Offline
      Nca78N Offline
      Nca78
      Hardware Contributor
      wrote on last edited by
      #136

      Hello,

      I just ordered from DirtyPCB.
      Thank you very much for this board which will obviously save me a lot of time with the radio connection.
      I'm planning to use the boards for :

      • as door+temp/humidity sensors for my children's bedrooms, not for the "security"/"safety" aspect but to manage AC more efficiently
      • as window sensors for all windows in my appartment coupled with a rain sensor on the balcony, so I can ring an alarm/flash something/sens sms if it starts to rain and one of the windows is left opened. I'm in a tropical country and windows are opened most of the time, with the sudden and strong rains and winds we have sometime it can really be ugly :)

      Power will most probably come from button cells and I will cut the right part of the PCB to fit in small and very cheap plastic boxes I find in shops here. I'm just waiting to see if the test sensor I have put on my entry door survives long enough with a CR2032.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rasenheizung
        wrote on last edited by
        #137

        Could you give me the size when the pcb is fully soldered as battery sensor?

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

          @Nca78 - sounds great, let me know how it works out for you! Good luck!

          @Rasenheizung - 50x50cm fully soldered. The dept is about 35mm (Batteryholder + PCB + Components)

          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
          • sundberg84S Offline
            sundberg84S Offline
            sundberg84
            Hardware Contributor
            wrote on last edited by sundberg84
            #139

            So - I have a question for the community about boosters. I had a 3.3v Arduino running with my PCB. The radio is connected directly to the battery and the rest through a booster. I experienced alot of st:fails.

            0_1467277885161_1.png

            I tested adding a 0.1uF cap on the booster from OUT to GND and the st:fails became st:ok, even though the radio does not get its power from this booster.

            Im sure the boosters are in different qualities and renders alot of noice - but could it effect the radio - through the arduino?
            If this continues Im going to add the possibility to add this cap on my PCB. (Or maybe its possible to use 0.1uF cap by the voltage divider...)

            Any feedback ?

            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

            alexsh1A 1 Reply Last reply
            0
            • sundberg84S sundberg84

              So - I have a question for the community about boosters. I had a 3.3v Arduino running with my PCB. The radio is connected directly to the battery and the rest through a booster. I experienced alot of st:fails.

              0_1467277885161_1.png

              I tested adding a 0.1uF cap on the booster from OUT to GND and the st:fails became st:ok, even though the radio does not get its power from this booster.

              Im sure the boosters are in different qualities and renders alot of noice - but could it effect the radio - through the arduino?
              If this continues Im going to add the possibility to add this cap on my PCB. (Or maybe its possible to use 0.1uF cap by the voltage divider...)

              Any feedback ?

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

              @sundberg84 typically, I try to add the lc-filter to the booster as some of them are very noisy. This is very simple - 3.3ยตH Axial lead inducter and a large 220ยตF capacitor (I use the SMD version). This helps to smooth any ripple effect.

              M 1 Reply Last reply
              1
              • S Offline
                S Offline
                Samuel235
                Hardware Contributor
                wrote on last edited by
                #141

                Any sort of manipulation, including regulators and boosters, added to any module i would always attempt to filter and smooth the input AND the output of the devices. The noise from the boosters would technically be reaching your radio from those traces. I'm not sure if a diode would stop it from feeding back to the radio, but either way if it did i would still prefer to smooth and filter the power instead of stopping it coming backwards.

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

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

                  @sundberg84
                  it could be multiple things..
                  But as alexsh1 said you can try to fix it with filtering.

                  You can usea capa + an inductor or a ferrite bead too (a bit different), or a small resistor too can work like a snubber in fact. Generally 0-2ohms<100ohms, but the smaller the better depending of the capa too because it could generate drop out voltage. So for ferrite, it's the same, it's better to use a low ferrite res.
                  But then, with filtering come some compromise regarding the booster efficiency and the load etc... Use formula and calc or the scope or iterate to choose the better compromise. But that should fix it mostly.

                  There are two main strategy:

                  • you filter each power input of concerned ics,
                  • or you filter at powersupply (booster) output because lack of footprint on pcb.

                  Note :

                  • it's better for filtering to use small multilayer ceramic capa. low esr, low esl when you can, but again there can be some compromise in this.
                  • shielded inductor on the booster module is better
                  • if high esr and esl capacitor used at booster input, then you can have noise back into the batterie, and then propagate elsewhere. If it's your case, and can't fix it at power supply input, try to filter at your radio vcc input with another res for instance and a capa
                  • there is also the ground loop, having a strong gnd, is better. this is one point why it's useful to use gnd pour plane on your pcb.
                  • etc...

                  I hope this will help you a bit ;)

                  1 Reply Last reply
                  2
                  • Nca78N Offline
                    Nca78N Offline
                    Nca78
                    Hardware Contributor
                    wrote on last edited by
                    #143

                    Boards received from DirtyPCB, they look gorgeous in white, too bad I have to put those ugly blue nrf and promini boards on top of it :P
                    I received exactly 10, they are looking good except the silkscreen 1/2mm too much on the left for some of the boards

                    1 Reply Last reply
                    1
                    • Nca78N Offline
                      Nca78N Offline
                      Nca78
                      Hardware Contributor
                      wrote on last edited by
                      #144

                      @sundberg84 sorry to bother you but maybe you have an idea.
                      I soldered components as in the picture below (looking so much cleaner than with all the cables...), I am using a 3.3V pro mini.
                      Before soldering I tested the pro mini and the nrf24 together, connected with cables, and simulated the reed switch with some wires: everything was fine and I was receiving the open/close messages in domoticz.
                      I soldered the components as below but I only got some "radio init failed" when connected to my PC, power coming to the GND/VCC on top of the arduino.
                      As I put the jumper on "reg" to bypass the regulator, my understanding is that in this case the raw/power/vcc are all connected together, am I wrong ?

                      Another subject, I suffered to cut the right part of the PCB with a cutter, would it be possible to add some slots along the black line to reduce a bit the length we have to cut ?

                      alt text

                      S sundberg84S 2 Replies Last reply
                      0
                      • Nca78N Nca78

                        @sundberg84 sorry to bother you but maybe you have an idea.
                        I soldered components as in the picture below (looking so much cleaner than with all the cables...), I am using a 3.3V pro mini.
                        Before soldering I tested the pro mini and the nrf24 together, connected with cables, and simulated the reed switch with some wires: everything was fine and I was receiving the open/close messages in domoticz.
                        I soldered the components as below but I only got some "radio init failed" when connected to my PC, power coming to the GND/VCC on top of the arduino.
                        As I put the jumper on "reg" to bypass the regulator, my understanding is that in this case the raw/power/vcc are all connected together, am I wrong ?

                        Another subject, I suffered to cut the right part of the PCB with a cutter, would it be possible to add some slots along the black line to reduce a bit the length we have to cut ?

                        alt text

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

                        @Nca78, do you have power on the radio, do you have power present everywhere it should be? Arduino included. If this is all present i would then go into diode mode with a multimeter to make sure all of your pins on the radio are connected to those of the ATMega328 on the arduino.

                        This would be just a basic starting point at troubleshooting this.

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

                        1 Reply Last reply
                        0
                        • Nca78N Nca78

                          @sundberg84 sorry to bother you but maybe you have an idea.
                          I soldered components as in the picture below (looking so much cleaner than with all the cables...), I am using a 3.3V pro mini.
                          Before soldering I tested the pro mini and the nrf24 together, connected with cables, and simulated the reed switch with some wires: everything was fine and I was receiving the open/close messages in domoticz.
                          I soldered the components as below but I only got some "radio init failed" when connected to my PC, power coming to the GND/VCC on top of the arduino.
                          As I put the jumper on "reg" to bypass the regulator, my understanding is that in this case the raw/power/vcc are all connected together, am I wrong ?

                          Another subject, I suffered to cut the right part of the PCB with a cutter, would it be possible to add some slots along the black line to reduce a bit the length we have to cut ?

                          alt text

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

                          @Nca78 - Hi, nice to see your white boards ! :)
                          I see your image, and you have choosen a REG jumper (regulated power supply). How do you power it? Through RAW?
                          You have missed the voltage regulator with caps for the radio, so at this point it does not get any power at all?

                          If you are using a 3.3v arudino with RAW you can bypass it with a wire.
                          If you are using a 5v with RAW or Regulated power (PWR) you need a 5 to 3.3v voltage regulator.

                          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
                          • B BastienVH

                            @sundberg84 said:

                            If you use the FTDI connector, make sure its the 3.3v and connect it to Gnd/Pwr on the PCB and not Arduino FDTI connector.
                            You could just exclude those pins and connect a battery directly and use that as power and the FDTI as programmer/serial debug only

                            Bat or Reg is nessecary!
                            See this picture for battery use: https://www.openhardware.io/view/4/EasyNewbie-PCB-for-MySensors
                            https://www.openhardware.io/uploads/568ed84b60aa3f8965fbf095/image/3.jpg
                            All components in the image is needed (except battery measurment).
                            If you dont want to use booster you need to bypass that one with a wire/jumper (or set the jumper on REG instead of BAT but that kills the logic).

                            The battery doesnt "need" the 0,1uF but see here:https://www.mysensors.org/build/battery
                            "The tap point could be bypassed with a 0.1 uF capacitor to keep the noise level low, at this otherwise high impedance point. "

                            C Offline
                            C Offline
                            chuckconnors
                            wrote on last edited by
                            #147

                            @sundberg84
                            @BastienVH said:

                            @sundberg84 said:

                            If you use the FTDI connector, make sure its the 3.3v and connect it to Gnd/Pwr on the PCB and not Arduino FDTI connector.
                            You could just exclude those pins and connect a battery directly and use that as power and the FDTI as programmer/serial debug only

                            Bat or Reg is nessecary!
                            See this picture for battery use: https://www.openhardware.io/view/4/EasyNewbie-PCB-for-MySensors
                            https://www.openhardware.io/uploads/568ed84b60aa3f8965fbf095/image/3.jpg
                            All components in the image is needed (except battery measurment).
                            If you dont want to use booster you need to bypass that one with a wire/jumper (or set the jumper on REG instead of BAT but that kills the logic).

                            The battery doesnt "need" the 0,1uF but see here:https://www.mysensors.org/build/battery
                            "The tap point could be bypassed with a 0.1 uF capacitor to keep the noise level low, at this otherwise high impedance point. "

                            Hi. I've been using this board with 5V power from cell chargers and it works great. I'm trying to make my first battery sensor and am a bit confused (again) as to what is necessary. I'm powering using 2 AA batteries. I've cut the right side off the board so I'm obviously not using the measuring portion, but the above bit about the booster leaves me confused. Can someone answer:

                            • I connect via the PWR and GND pads right?
                            • Do I jumper BAT or REG?
                            • Do I need to do anything else to get this to work?

                            I tried to program using battery in but was using the ground from the ftdi connector. I could not get this to work. I'm thinking that this was a major problem and that I should have used the battery ground. That's the right approach right?

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

                              @chuckconnors - assuming you are using a Arduino Pro Mini 3.3v it will die when the voltage drops below 3v (about) so it leaves alot of power left in your batteries and also it will die rather quickly.

                              Thats why I have designed the PCB with a booster for battery operations, and then its not possible to cut the right side of the PCB since the booster is located there. Check the image out: https://www.openhardware.io//uploads/568ed84b60aa3f8965fbf095/image/Rev8 Bat.jpg and you see the booster on the top right corner.

                              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
                              • Nca78N Offline
                                Nca78N Offline
                                Nca78
                                Hardware Contributor
                                wrote on last edited by
                                #149

                                Thank you for the tip @sundberg84, it just needed the bypassing of the regulator, and then I can connect my cell battery to the GND and PWR and it runs fine.

                                @Samuel235 yes you are right I did it and it didn't have Vcc power that's why I asked that question to sundberg84, next time I'll precise it as it could have ended in wasted time...

                                @chuckconnors this is how you have to connect the jumpers to use directly on battery power (on GND and PWR pins). But as sundberg84 says you will not have a long battery life with AA batteries and without a booster. Even if you update the fuses and bootloader to run at 1MHz and have the BOD at 1.8V there will still be power left (I guess not far from 25% of capacity with 2 batteries) that is wasted. If you keep the defaults settings of the arduino at 8MHz it will run down to 2.4V and around half of the energy in your batteries will be wasted.

                                Nca78N 1 Reply Last reply
                                1
                                • Lior RubinL Offline
                                  Lior RubinL Offline
                                  Lior Rubin
                                  wrote on last edited by
                                  #150

                                  @sundberg84 is the board ready for Ver 2.0.0 ?
                                  the final version announced yesterday at HERE, anyhow can you share an example of Node sketch ?

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

                                    @Lior-Rubin - the PCB or the hardware has nothing to do with 2.0
                                    It will work fine - 2.0 is only software (what you program it with).
                                    I have been running 2.0 beta (dev) for a long time now without any problems.

                                    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

                                    Lior RubinL 1 Reply Last reply
                                    0
                                    • sundberg84S sundberg84

                                      @Lior-Rubin - the PCB or the hardware has nothing to do with 2.0
                                      It will work fine - 2.0 is only software (what you program it with).
                                      I have been running 2.0 beta (dev) for a long time now without any problems.

                                      Lior RubinL Offline
                                      Lior RubinL Offline
                                      Lior Rubin
                                      wrote on last edited by
                                      #152

                                      @sundberg84 I'm aware of it. I just ask to be sure.
                                      Can you upload here an example sketch (v2.0) with battery reporting ?

                                      Nca78N sundberg84S 2 Replies Last reply
                                      0
                                      • Lior RubinL Lior Rubin

                                        @sundberg84 I'm aware of it. I just ask to be sure.
                                        Can you upload here an example sketch (v2.0) with battery reporting ?

                                        Nca78N Offline
                                        Nca78N Offline
                                        Nca78
                                        Hardware Contributor
                                        wrote on last edited by
                                        #153

                                        @Lior-Rubin said:

                                        @sundberg84 I'm aware of it. I just ask to be sure.
                                        Can you upload here an example sketch (v2.0) with battery reporting ?

                                        You can just check the examples included in the library, I've been using the beta version of MySensors 2 for a long time and started from supplied examples, never had a problem.

                                        This is some code I use to report battery level, it's harder to make it more simple, juste keep your existing code to read the battery level and replace the line sending the value with the sendBatteryLevel() :

                                            int currentBatteryPercent = SystemStatus().getVCCPercent(VccMin, VccMax);
                                            if (currentBatteryPercent != LastBatteryPercent) {
                                                LastBatteryPercent = currentBatteryPercent;
                                                sendBatteryLevel(currentBatteryPercent);
                                            }```
                                        1 Reply Last reply
                                        1
                                        • Lior RubinL Lior Rubin

                                          @sundberg84 I'm aware of it. I just ask to be sure.
                                          Can you upload here an example sketch (v2.0) with battery reporting ?

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

                                          @Lior-Rubin - If you use a voltage divider and 2xAA use this:

                                          Defines:

                                          //=========================
                                          // 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 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++;
                                               }
                                          }
                                          

                                          Add batM(); in the loop where you want to measure.
                                          This calculates an avarage and sends it every 3rd time. So i sleep my sensors for 20 min, and battery is reported every 1hour.

                                          If you want to measure incoming VCC agains ref use @Nca78 but this does not work if you are using a booster (since it will always be 3.3v on incoming).

                                          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
                                          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.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