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. My Project
  3. My own board (50mm x 30mm)

My own board (50mm x 30mm)

Scheduled Pinned Locked Moved My Project
133 Posts 22 Posters 94.1k Views 21 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.
  • GertSandersG Offline
    GertSandersG Offline
    GertSanders
    Hardware Contributor
    wrote on last edited by
    #92

    Indeed, those :+1:

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gloob
      wrote on last edited by
      #93

      Do you have an idea how long a temperature sensor will run on 2 AAA batteries?

      1 Reply Last reply
      0
      • GertSandersG Offline
        GertSandersG Offline
        GertSanders
        Hardware Contributor
        wrote on last edited by
        #94

        @gloob Not yet, some of mine have been running for 2months with a voltage drop of less then 1%

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

          IMG_2229.JPG

          My board waiting for a sensor from China

          G 1 Reply Last reply
          2
          • alexsh1A alexsh1

            IMG_2229.JPG

            My board waiting for a sensor from China

            G Offline
            G Offline
            gloob
            wrote on last edited by
            #96

            @alexsh1
            How did you connect the battery? Did you solder it directly to the board?

            1 Reply Last reply
            0
            • GertSandersG Offline
              GertSandersG Offline
              GertSanders
              Hardware Contributor
              wrote on last edited by GertSanders
              #97

              @gloob There are two connections on the board to allow soldering the battery holder. Both the AA and AAA versions I use have the same pin spacing (seems standard), so you can use an AA battery holder as @alexsh1 does, or an AAA as I have.

              http://forum.mysensors.org/uploads/files/1446751714416-image.jpeg

              The red arrows show where the batteryholder pins should go. If you have individual AAA battery holders, then the pins surrounded by yellow circle are also used to connect the batteries in series. If the battery holder holds 2 batteries, then only the pins pointed to by red arrows are used.

              batteryholderconnections.jpg

              The PLUS sign next the the pin on the lower right of the above image is for the LED, the polarity of the pins from the battery is marked on the silkscreen of the bottom side. Looking at it from the top side, the pin above right is for Positive, the pin on below right is for Negative (or GND).

              Jumper J2 is to connect the IRQ pin from the NRF24 to pin 2 (INT0) of the atmega328. You could also use that to connect a switch between the top jumper pad (connected to pin 2) and the extra ground pin of C5, to use with a doorswitch. I have used this with the internal pull up, but that would not be very good for the battery-use. It is better to use a 1MOhm pull up resistor wich can also be connected using the extra hole connected to pin 2 and Vcc

              rmtuckerR 1 Reply Last reply
              1
              • alexsh1A Offline
                alexsh1A Offline
                alexsh1
                wrote on last edited by
                #98

                @gloob @GertSanders is spot on! I only have 1.5V AA rechargeable lithium batteries so the choice of the battery holder is obvious.

                1 Reply Last reply
                0
                • rmtuckerR Offline
                  rmtuckerR Offline
                  rmtucker
                  wrote on last edited by
                  #99

                  Just ordered a batch from DirtyPcb so the journey is just beginning!.
                  Doubt i will need a whole batch so if anyone requires a couple in the uk let me know.

                  1 Reply Last reply
                  0
                  • GertSandersG GertSanders

                    @alexsh1 I completely switched off the BoD in my fuse settings, this saves the battery even more. I found that the processor kept working down to around 1,64V. Even my NRF24 worked to that low level, because the last message I received in my Domoticz from that node gave a battery voltage of 1.64V
                    Anyway, since I monitor all battery levels via a script in Domoticz, there is no need for BoD.

                    rmtuckerR Offline
                    rmtuckerR Offline
                    rmtucker
                    wrote on last edited by
                    #100

                    @GertSanders said:

                    @alexsh1 I completely switched off the BoD in my fuse settings, this saves the battery even more. I found that the processor kept working down to around 1,64V. Even my NRF24 worked to that low level, because the last message I received in my Domoticz from that node gave a battery voltage of 1.64V
                    Anyway, since I monitor all battery levels via a script in Domoticz, there is no need for BoD.

                    How is 1.64v possible,It was my understanding that 8Mhz requires a minimum of 2.4v?

                    1 Reply Last reply
                    0
                    • mfalkviddM Offline
                      mfalkviddM Offline
                      mfalkvidd
                      Mod
                      wrote on last edited by
                      #101

                      The processor is guaranteed to work within the specified limits. Outside the specified limits, no guarantees are made. It might work, it might not work or it might work slightly with strange glitches.

                      1 Reply Last reply
                      0
                      • rmtuckerR Offline
                        rmtuckerR Offline
                        rmtucker
                        wrote on last edited by
                        #102

                        I see now.Thank you
                        Has anyone modified Gertsanders Firmware to run at 1Mhz?
                        That would give reasonably stable results down to 1.8v.
                        I don't have the skills to compile from scratch and cater for the led on pin8 etc.

                        1 Reply Last reply
                        0
                        • GertSandersG Offline
                          GertSandersG Offline
                          GertSanders
                          Hardware Contributor
                          wrote on last edited by
                          #103

                          @rmtucker The firmware itself does not need to be changed to use the internal oscillator. You accomplish that by using a different set of fuse values:
                          atmega328pO4M8i.bootloader.low_fuses=0xE2
                          atmega328pO4M8i.bootloader.high_fuses=0xDE
                          atmega328pO4M8i.bootloader.extended_fuses=0x07

                          This sets the processor to a mode using the internal oscillator.

                          Add the call to divide the frequency by 8 (can be done in the sketch itself) and you have a 1MHz internal clock.

                          rmtuckerR 1 Reply Last reply
                          0
                          • GertSandersG GertSanders

                            @rmtucker The firmware itself does not need to be changed to use the internal oscillator. You accomplish that by using a different set of fuse values:
                            atmega328pO4M8i.bootloader.low_fuses=0xE2
                            atmega328pO4M8i.bootloader.high_fuses=0xDE
                            atmega328pO4M8i.bootloader.extended_fuses=0x07

                            This sets the processor to a mode using the internal oscillator.

                            Add the call to divide the frequency by 8 (can be done in the sketch itself) and you have a 1MHz internal clock.

                            rmtuckerR Offline
                            rmtuckerR Offline
                            rmtucker
                            wrote on last edited by
                            #104

                            @GertSanders So have you never found it a problem running at 8Mhz?
                            Do most of your sensors work ok below the 2.4v threshold?
                            Guess i will find out when the pcb boards arrive:smiley:

                            1 Reply Last reply
                            0
                            • GertSandersG Offline
                              GertSandersG Offline
                              GertSanders
                              Hardware Contributor
                              wrote on last edited by GertSanders
                              #105

                              @rmtucker Short answer: yes. So far most my sensors are working fine and all sit above 2.4V but I have not had problems when they do below 2.4V

                              There is one sensor now that has a battery in decline. This sensor uses a lot of power and goes through it's batteries very fast. So it is a good test for this low voltage work. It is now at 2.11V and still sends messages every 5 minutes. On the first graph you can see it is still working fine wel below 2.4V and it is clocked at 8MHz with a crystal.

                              Screen Shot 2016-01-03 at 20.27.54.png

                              I have a notification on all my sensors so that when the battery voltage goes below 2V I get a Prowl from Domoticz. This has only happened on this sensor (twice so far), because I was using NiMH batteries (which discharge faster than alkaline). Around 2 november I put in 2 alkaline batteries (AAA), but these were not brand new.

                              Most of my sensors have a discharge pattern as here below:

                              Screen Shot 2016-01-03 at 20.38.51.png

                              rmtuckerR 1 Reply Last reply
                              0
                              • GertSandersG GertSanders

                                @rmtucker Short answer: yes. So far most my sensors are working fine and all sit above 2.4V but I have not had problems when they do below 2.4V

                                There is one sensor now that has a battery in decline. This sensor uses a lot of power and goes through it's batteries very fast. So it is a good test for this low voltage work. It is now at 2.11V and still sends messages every 5 minutes. On the first graph you can see it is still working fine wel below 2.4V and it is clocked at 8MHz with a crystal.

                                Screen Shot 2016-01-03 at 20.27.54.png

                                I have a notification on all my sensors so that when the battery voltage goes below 2V I get a Prowl from Domoticz. This has only happened on this sensor (twice so far), because I was using NiMH batteries (which discharge faster than alkaline). Around 2 november I put in 2 alkaline batteries (AAA), but these were not brand new.

                                Most of my sensors have a discharge pattern as here below:

                                Screen Shot 2016-01-03 at 20.38.51.png

                                rmtuckerR Offline
                                rmtuckerR Offline
                                rmtucker
                                wrote on last edited by
                                #106

                                @GertSanders What rate is the sensor in the very bottom graph sending messages?
                                That discharge rate looks very nice.

                                @GertSanders said:

                                @rmtucker The firmware itself does not need to be changed to use the internal oscillator. You accomplish that by using a different set of fuse values:
                                atmega328pO4M8i.bootloader.low_fuses=0xE2
                                atmega328pO4M8i.bootloader.high_fuses=0xDE
                                atmega328pO4M8i.bootloader.extended_fuses=0x07

                                This sets the processor to a mode using the internal oscillator.

                                Add the call to divide the frequency by 8 (can be done in the sketch itself) and you have a 1MHz internal clock.

                                Problem with using div/8 in the sketch and not altering the bootloader is that all the timings are off for baud rates and pwm etc.
                                Where if it is altered in the bootloader it all works as it should.

                                Last question i promise :yum:

                                I currently use the arduino mini pro and when uploading sketches to it using ftdi,i have to press the reset button to get the upload to work.
                                Will i have the same problem with your boards?

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

                                  @rmtucker On my board I do not need to press a reset to be able to upload sketches, since I connected the RESET pin to the FTDI header via a capacitor.

                                  So if the FTDI interface does the reset via RTS pin, then it will reset the board and you can upload sketches.

                                  The sensor in the last graph sends it's voltage and temperature every 5 minutes, even if the value is sometimes the same as the previous one. It also sends it's battery voltage every 5 minutes.

                                  In my last version of the sketch I have now added a change based on the Sensebender sketch. That sketch sends it's temperature or humidity only if the change is a minimal difference with the previously sent temperature or humidity. It always sends it's battery level every half hour. That should make it last minimum a year on 2 AAA batteries.

                                  Below is a graph of another sensor sending data every 5 minutes.
                                  Screen Shot 2016-01-05 at 21.06.06.png

                                  1 Reply Last reply
                                  0
                                  • rmtuckerR Offline
                                    rmtuckerR Offline
                                    rmtucker
                                    wrote on last edited by rmtucker
                                    #108

                                    In comparison here is an ESP8266 doing the same job every 5mins
                                    But that is 4 AA Alkaline batteries.
                                    And by the look of todays voltage it is on it's way out.

                                    Screenshot from 2016-01-07 17:55:20.jpg

                                    1 Reply Last reply
                                    0
                                    • GertSandersG GertSanders

                                      Battery-monitoring
                                      The capacitor between AREF and ground (C3 in my schematic) is not to pull that pin to ground, but to stabilise this reference. Not strickly needed I think, but I prefer it since my sensors will live in a "noisy" environment.

                                      The code to check the level of VCC using the internal 1.1V reference is found here:
                                      http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/

                                      The error of 10% is something I can live with, since I need to be able to measure the supply-voltage and monitor it. It does not need to be super exact, since I plan to replace the batteries when I see levels around 2.2V. I'm mostly interested in the trend graph.

                                      When using a DC stepup converter, you will of course need to use a pin to measure the original battery level, because the step up will make VCC always 3V3. I like your idea of dual use, so I will implement the pins to hold a voltage divider anyway. It is indeed a good use of PCB space.

                                      I also ordered some step up converters (from Aliexpress) and I will measure them once I get them. Not all China stepups are crap it seems (as far as I read on various websites).

                                      LED
                                      As for the LEDs, I have only 1 LED on my boards. The LED blinks very shortly (5ms) every minute to show that a message is sent. It flashes three times if there is an error. So no need to have two leds. It is also the same LED that is flashed by the bootrom (I'm compiled nmy own version of Optiboot to used pin 14 of the atmega328. On a atmega1284p I use pin 1. This is personal preference.

                                      I checked your schematic. You will need to change the value of C1 (it is now 22pF, will need to be 100nF).

                                      I will need to read the datasheet of the atmega328 again to understand the exact use of AREF. I'm not sure that pulling this to VCC is a good idea.

                                      It seems you have removed the crystal and capacitors and plan to use the internal oscillator, I did this as well. Works most of the time, but uploading of sketches can give transmission errors of you go above 57K6 baud. Better to transmit at 36Kbit then (needs a change in the BOARDS.TXT file of Arduino IDE). Slower, but not a problem if you do not plan to change the sketch every 5 minutes.

                                      Here is a preview of my new board:
                                      upload-ef70e5f9-9073-4b47-a074-4a48779f1004

                                      It will be able to work both as a repeater (NRF24 with antenna) as well as a normal sensor board (small NRF24). The voltage divider on A0 is not yet implemented here. Still some empty spaces :-)

                                      Z Offline
                                      Z Offline
                                      Zeph
                                      Hero Member
                                      wrote on last edited by
                                      #109

                                      @GertSanders said:

                                      It seems you have removed the crystal and capacitors and plan to use the internal oscillator, I did this as well. Works most of the time, but uploading of sketches can give transmission errors of you go above 57K6 baud. Better to transmit at 36Kbit then (needs a change in the BOARDS.TXT file of Arduino IDE)

                                      76K8 baud works better than 57K6 (division from 8 MHz has less error), and there are Optiboot variants which support it (with theBOARDS.TXT change you mention). Or 38K4 baud (half that) as you suggest, which is no more timing accurate than 76K8 but by being slower still may give more margin for sloppy edges or the like - if needed.

                                      1 Reply Last reply
                                      0
                                      • Carl HC Offline
                                        Carl HC Offline
                                        Carl H
                                        wrote on last edited by
                                        #110

                                        Hi GertSanders,

                                        After ordered and make 3 of 50mm x 30mm board with success. Now I ordered the AC Capable 50mm x 50mm board. I try to read the schema and I have some question. If I want to use this board with only 2 AAA battery, Do I need to use AMS1117? and witch jumper do I need to close? It is optional to use AT24C ?

                                        Thank you for your help

                                        1 Reply Last reply
                                        0
                                        • GertSandersG Offline
                                          GertSandersG Offline
                                          GertSanders
                                          Hardware Contributor
                                          wrote on last edited by GertSanders
                                          #111

                                          @Carl-H To use the board with AA batteries you do NOT need to place the AMS1117. But you will need to short the jumper "BAT" which you will find on the same surface as the AMS1117 if you want to feed the NRF24 with the same power.
                                          The batteries are connected to the Vcc power line. The NRF24 is connected to the 3V3 power line. There is no interconnection, unless you use the AMS1117 or you short the jumper "BAT".

                                          The AT24C's are optional. If you do plan to use them, you will also need to place the I2C pull resistors and you will need to short the jumpers RSCL and RSDA. These two jumpers connect the pull-up resistors to the SCL and SDA lines.
                                          If you use a sensor connected to the pins SCL/SDA of the extension connector you sometimes have no need for pull-ups as the sensor itself has them.
                                          The jumpers SCL-SDA and SDA-SCL are there to allow switching the signals of the SCL/SDA pins on the extension connector. The jumper closest to the board edge is for the pin on the very edge of the connector, the jumper close to the ATSHA is for the second pin. Without shorting these two jumpers, the pins on the extension connector have no function.
                                          Some sensor-boards have a SDA-SCL-GND-3V3 connector, others have a SCL-SDA-GND-3V3 pattern. The jumpers are there to be able to use both types.

                                          IMG_7673.jpg

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


                                          10

                                          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