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

💬 MyMultisensors

Scheduled Pinned Locked Moved OpenHardware.io
328pmotionatsha204amulti sensorhumiditytemperaturepirambiant lightlow powercoincell
176 Posts 33 Posters 61.2k Views 35 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.
  • scalzS Offline
    scalzS Offline
    scalz
    Hardware Contributor
    wrote on last edited by
    #11

    @carlierd
    the W not the HW. It's because CW is smaller than the W version. They are software compatible.

    For the pullup, it's a good practice to be sure to have the right level on the CS line. you can forgot it sometimes, but sometimes not having it on each cs line can be source of useless trouble..

    1 Reply Last reply
    1
    • carlierdC Offline
      carlierdC Offline
      carlierd
      wrote on last edited by
      #12

      First time I see this resistor ! Will add it in my design. But I need to learn more information on the SPI first.

      David.

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

        @carlierd
        yes I know..and sure the cs line can be output=high in the setup sketch part...
        briefly for spi, you have: mosi (data output of master/mcu), miso (data input), sck (clock sync). and the CS line is active low when you want to select the chip.
        So if for any reason, the CS line is in an unknown state (for instance when mcu reset or other case..), that could give some strange working. And again more trouble, if you have other chip sharing the same spi bus, and no pullup on each CS to give a nice voltage level and choose the right chip..

        Here a nice article: http://www.dorkbotpdx.org/blog/paul/better_spi_bus_design_in_3_steps

        1 Reply Last reply
        0
        • carlierdC Offline
          carlierdC Offline
          carlierd
          wrote on last edited by
          #14

          Merci pour le lien ! Très instructif !

          @scalz said:

          http://www.dorkbotpdx.org/blog/paul/better_spi_bus_design_in_3_steps

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

            Will the board be possible to buy assembled?

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

              yep, it's planned. I will try to make this option possible.
              sorry for delay, I have lot of other things in progress. but it should not take too much time before I give more news.

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

                I am very happy because the pir circuit trigger very well, I'm rather impressed. Yeah :smiley:
                so far, very few tests because I was playing with software on other things but I've tested two different lens as the pir sensor range is mostly dependant of the lens.

                • 8308 type
                  http://www.ebay.com/itm/10-Infrared-Sensor-8308-4-mini-White-Fresnel-Lens-body-pyroelectric-PIR-/141271386262
                  I got a good 3meter range.
                • 8120 type
                  http://www.ebay.com/itm/10-PIECE-White-Fresnel-8120-PIR-infrared-mini-sensor-lights-small-Lenses-/141271544319
                  Is my favorite for the moment. Compact and a good 5meter. I just move a little bit and it trigger.

                I will give more results. I'm working on it today ;) I need to boost..tonight no work! it's champions league final :smile:

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

                  and the interesting thing is power consumption (pir circuit only) : 1.8uA in sleep mode, 2.5uA active, promising :)

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

                    still working nice for the moment :) I have modified my schematic a bit, removed few useless things, and improved others for power consumption and a bit of miniaturization ;)

                    I am working on the software too. to improve power consumption during blindtime etc.

                    @hek
                    I'm using pinchange in my sketch, for few pins. Actually it's raw, I did it with raw registers too, but that's not user friendly and I have already seen this question. I'm looking to make it mysensors now. I am using the EnableInterrupt lib.
                    So if I use the lib with mysensors I get an error "multiple definition of `__vector_2' ". I see that comes from myHwATmega328 part, from "attachinterrupt".

                    What do you think about this:

                    • a special define like MYS_USE_EXTINT.
                    • If defined, in myHwATmega328, in the sleep methods we use the EnableInt lib instead of arduino attachinterrupt
                    • keep the isr routines for int0 and 1 handled as it is
                    • and for the others isr, in the main sketch so user/I could do what I want in my irq.
                      something like this in sketch then,
                      enableInterrupt(PIR_INT_PINH, irq_pirh, RISING);
                      enableInterrupt(PIR_INT_PINL, irq_pirl, RISING); 
                    

                    It's roughly explained :) Is it planned or done? Which way do you prefer??

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

                      Hi.

                      so it's still a wip but I'm getting close of what I want :)
                      because using a coincell (without regul) is more tricky. due to internal res of coin cell ;)

                      An example, the PIR circuit was working nice in standalone (without nothing around, it uses 1.6uA in trigger or not). As soon as I added the atmel chip (and nothing more, no radio at all, no i2c..). Bingo, nice to meet you false triggers!!
                      This was the coincell which was making me a joke lol As soon as atmel woke up I got a cycling false trigger yeah. In fact having atmel internal 8mhz is enough power hungry to make a nice voltage drop and the pir trigger.
                      So I solved it in sketch, and a bit of hardware too ;)

                      I am curious to know if others people playing with coincell will have long lifetime without some optimizations (hardware and software..).

                      So now, the actual state for me this week end, is to connect radio and play again. And add some stuff about listenmode and atc to improve overall..

                      About my previous post about external int, no more problem, I am using raw registers for external int and sleep function. because I need some custom things. Plus, the more libs and features, the less mem I have and I have not so much space...I will need to disable some debugs lol if I want all my sensors, signing, rfm69 with new mode etc..

                      I'm not really surprised, I was expecting a bit this behaviour, that's why I said this would be a nice sketch challenge :)

                      1 Reply Last reply
                      0
                      • NeverDieN Offline
                        NeverDieN Offline
                        NeverDie
                        Hero Member
                        wrote on last edited by NeverDie
                        #21

                        @scalz This is sure to be unwelcome advice, but do yourself a favor by simplifying this project before it drags you down.

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

                          @NeverDie saying this you're challenging me lol :) more seriously, I have no real issue.
                          what would you simplify? can't be more simple imho. no regulator, just batt.. I still can use 2xaa/aaa. That would ease a bit. the circuit works fine as expected ;) but that would be less fun without optimizations ;)

                          Things I have thought when I did my choice:

                          • as the pir analog is sensitive, I wanted no regul for this one. or I would go for a booster and then more hardware debug (I have already a one cell optimized design that I plan to try with this pir, just to know if there will be a rev2 lol..). But that would need more care&filtering with good quality components (shielded inductors, ferrites, capacitors...) to prevent false trigger.
                            Like this one I did https://forum.mysensors.org/topic/2951/my-mysx-multisensors-board or my ulpnode clone ;) That would be an overall more expensive solution. but with less maintenance and one cell ;)
                          • use 1uA digital PIR...not cheap
                          • use a better mcu like cc1310 with its power domains and events. but not mysensors/arduino.
                          • coincell is just for the fun as this design. and like I said I can use 2 lithium or alkaline.
                          1 Reply Last reply
                          1
                          • scalzS Offline
                            scalzS Offline
                            scalz
                            Hardware Contributor
                            wrote on last edited by scalz
                            #23

                            Few pics of another board i have just assembled. I have just noticed I didn't show any proof/pics :confused:

                            Top view
                            0_1468163835509_MyCoincellMultisensors_t1.jpg
                            With this lense, I get 5-6m.
                            0_1468163883675_MyCoincellMultisensors_t2.jpg
                            Bottom view, with rfm69, coincell holder and AVRSPI/FTDI connector.
                            0_1468163920031_MyCoincellMultisensors_b1.jpg

                            I am waiting for rev 1.1 pcb. No big changes, I improved a bit silkscreen, removed the schmitt trigger to save some power and in place i use pinchange int, makes more sense. Few routes and size changed.
                            Though, 328p is memory limited, I have to disable debug for this one!

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

                              nothing fancy, just wanted to share how this is working as we're all busy..

                              there is a small problem with my widgets but no matter :blush: I show you what this board outputs if you're curious, and I'm beginning to like this board :heart_eyes:

                              0_1469402151633_dash_multisensor.jpg

                              I will change my dashboard later, it's just for fun.

                              For power consumption, few reference for sleep time : old VC506 multimeter but working well + uCurrent Gold

                              • PIR enabled, other sensors+MCU in deep sleep with interrupt on pins : 4-5uA for Varta CR2032 coincell, 3-4uA for 2xAAA Duracell
                              • PIR enabled, other sensors+MCU in deep sleep with interrupt on pins + WDT enabled : 11uA for the coincell, 8uA for 2xAAA
                              • PIR enabled, MCU active 1Mhz, other sensors sleeping with interrupt on pins + WDT enabled : 730-740uA for both

                              not that bad :)
                              I have an other proto waiting (for fun because i do not really need it lol). it's another version not for coincell, but as thin and much smaller! with ota back. I thought for coincell, ota or chain tx pulse, was a bit too much battery killer..even if CR2450 imho...and with our preferred lib :) there are multiple chain tx for presentation, some signing stuff etc..and you can't pause this to limit internal resisitance of the coincell..

                              The sketch is still in progress. I mean it's working of course, but still looking to improve a bit things..but i can show you the infos and commands which are available for the controller. That should help to save enough power I think:

                              
                              // For controller. CHILD_ID are presented. CMDID are not presented to not charge radio tx. But are available from controller, using receive()
                              //  CHILD NODE ID/CMD           ID    Description
                              #define CHILD_ID_PIR            1     // PIR sensor 
                              #define CHILD_ID_TEMP           2     // Temperature sensor
                              #define CHILD_ID_HUM            3     // Humidity sensor
                              #define CHILD_ID_LIGHT          4     // Ambiant light Child node ID
                              #define CHILD_ID_BATT_SENSOR    5     // Battery voltage, % is reported by sendbattery stuff
                              #define CHILD_ID_RSSI           6     // Radio rssi
                              #define CHILD_ID_DOOR           7     // Door reed switch
                              #define CHILD_ID_PIR_EN         8     // Enable PIR 
                              #define CMID_FULL               10    // Command from controller with all params below in one tx. below is more for debug..
                              #define CMID_PULSES             11    // Command from controller to set PIR number of pulse for windows time 
                              #define CMID_WINDOWTIME         12    // Command from controller to set PIR window time   
                              #define CMID_BLINDTIME          13    // Command from controller to set PIR blind time   
                              #define CMID_CANCELTIME         14    // Command from controller to set PIR cancel time
                              #define CMID_EN_LIGHT           15    // Command from controller to enable Light sensor threshold 
                              #define CMID_LIGHT_MODE         16    // Command from controller to set Light sensor special mode (for instance, enable pir at certain light level only...) 
                              #define CMID_LIGHT_H            17    // Command from controller to set Light sensor high threshold 
                              #define CMID_LIGHT_L            18    // Command from controller to set Light sensor low threshold 
                              #define CMID_LIGHT_DELTA        19    // Command from controller to set difference of lux for update controller 
                              #define CMID_TRANSMIT_INTERVAL  20    // Command from controller to set time between sensor updates
                              #define CMID_TH_DELTA           21    // Command from controller to set difference of temp/hum for update controller 
                              #define CMID_EN_LED             22    // Command from controller to set led
                              

                              See you soon :)

                              1 Reply Last reply
                              4
                              • carlierdC Offline
                                carlierdC Offline
                                carlierd
                                wrote on last edited by
                                #25

                                Hello,

                                Very complete board !

                                How did you report RSSI ? It is RSSI of the node or the gateway ?

                                David.

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

                                  @carlierd hello. hehe yep a bit complete, very memory ric-rac limited :) It's rssi of the node tuned by ATC ;) I have modified libs, but i'm late on pr...sorry

                                  carlierdC 1 Reply Last reply
                                  0
                                  • scalzS scalz

                                    @carlierd hello. hehe yep a bit complete, very memory ric-rac limited :) It's rssi of the node tuned by ATC ;) I have modified libs, but i'm late on pr...sorry

                                    carlierdC Offline
                                    carlierdC Offline
                                    carlierd
                                    wrote on last edited by
                                    #27

                                    @scalz I will wait. I am curious to see the result on my nodes !

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

                                      Yo,

                                      for those who have not seen my latest rev..apologize, I'm working hard to release all my stuff ;)
                                      It's still working well btw. this is the revision i will release i think (i have few other nice iteration but that's enough!).
                                      0_1474116844076_20160915_212045.jpg
                                      0_1474116860159_20160915_212143.jpg

                                      • Size is 25mmx49mm (same size as a nodemcu)
                                      • Same specs as before, plus OTA. So optimized for very low power and coincell management. Temp/hum/pir/lux/contact door input
                                      • Thickness depends on the battery used. That's great as now it's possible to use different kind of battery holder :) CR2032 for the thinnest (8mm without PIR) very thin!, CR2450, or through hole 2xAAA holder
                                      • you can see a test I want to try: a special antenna i saw on the forum. I will compare it with straight wire antenna, and coiled wire antenna.

                                      See you soon :)

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

                                        another little pic :yum:
                                        0_1474568971435_20160922_170105.jpg
                                        left to right: 1) pcb without holder, 2) with cr2032 holder, 3) cr2450, 4) 2xaaa
                                        different antenna format, i have not compared yet. But the straight one, if i remember well, reached 40-50m range with one brick wall (All are the low power version of rfm69, CW). As you can see the coiled antenna (4) does not take so much place compared to the 1.9€ special ant (3).
                                        I can cover a nice range of use, yeah :)

                                        1 Reply Last reply
                                        2
                                        • carlierdC Offline
                                          carlierdC Offline
                                          carlierd
                                          wrote on last edited by
                                          #30

                                          Very good job !

                                          When will share the schematic ?
                                          How is responding the PIR ?

                                          And off course, how is the battery usage ? So many sensors could discharge it faster ...

                                          David.

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


                                          12

                                          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