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. Announcements
  3. Sensebender Micro

Sensebender Micro

Scheduled Pinned Locked Moved Announcements
584 Posts 84 Posters 401.8k 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.
  • N Offline
    N Offline
    nikos1671
    wrote on last edited by
    #315

    I vote for one cheap Sensebender version without the temp/hum sensor on it. It will be the perfect door/window sensor.

    1 Reply Last reply
    0
    • tbowmoT Offline
      tbowmoT Offline
      tbowmo
      Admin
      wrote on last edited by
      #316

      @nikos1671

      It has been up before, but back then it was decided that we don't save that much (2-3 $ or something like that). It might also be lower production quantities, which also keeps the price up..

      M 1 Reply Last reply
      0
      • tbowmoT tbowmo

        @nikos1671

        It has been up before, but back then it was decided that we don't save that much (2-3 $ or something like that). It might also be lower production quantities, which also keeps the price up..

        M Offline
        M Offline
        mvader
        wrote on last edited by
        #317

        @tbowmo just curious do you guys know how many of these you've sold?
        I've bought about 15+ :)

        1 Reply Last reply
        0
        • hekH Offline
          hekH Offline
          hek
          Admin
          wrote on last edited by
          #318

          @mvader
          Then you've bought almost 2% of them :)

          We're deeply grateful for yours and others support of the MySensors project.

          1 Reply Last reply
          0
          • petoulachiP Offline
            petoulachiP Offline
            petoulachi
            wrote on last edited by
            #319

            Ordered 6 board too ! I'm glad to support MySensors project !

            1 Reply Last reply
            0
            • T Offline
              T Offline
              timropp
              wrote on last edited by
              #320

              I've got 3 coming, can't wait to figure out what I'm going to use them for :)

              VeraEdge UI7 with Mysensors ethernet gateway

              M 1 Reply Last reply
              0
              • T timropp

                I've got 3 coming, can't wait to figure out what I'm going to use them for :)

                M Offline
                M Offline
                mvader
                wrote on last edited by
                #321

                @timropp said:

                I've got 3 coming, can't wait to figure out what I'm going to use them for :)

                I'm deploying mine all over the house.
                in my attics, garage, shed. bedrooms. etc
                I've attached motion and lux sensors to several of them already.
                I tested / proof of concept adding IR transmitters. but these will likely need to be 5v nano's or something as battery power probably won't work with the IR and staying away waiting for messages from the controller.

                1 Reply Last reply
                0
                • N Offline
                  N Offline
                  NotYetRated
                  wrote on last edited by
                  #322

                  Got 3 up just using the built in temp/humidity, making sure all looks ok. Will slowly add motion.

                  Any suggested motion sensor for these guys?

                  M 1 Reply Last reply
                  0
                  • N NotYetRated

                    Got 3 up just using the built in temp/humidity, making sure all looks ok. Will slowly add motion.

                    Any suggested motion sensor for these guys?

                    M Offline
                    M Offline
                    mvader
                    wrote on last edited by
                    #323

                    @NotYetRated said:

                    Got 3 up just using the built in temp/humidity, making sure all looks ok. Will slowly add motion.

                    Any suggested motion sensor for these guys?

                    I'm using that HC501 PIR
                    you can connect to the side pin and use 3v instead of the 5v

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

                      @mvader Can you elaborate how you use 3V on the HC501 ? Which side pin ? Can you post an image ?

                      M 1 Reply Last reply
                      0
                      • GertSandersG GertSanders

                        @mvader Can you elaborate how you use 3V on the HC501 ? Which side pin ? Can you post an image ?

                        M Offline
                        M Offline
                        mvader
                        wrote on last edited by
                        #325

                        @GertSanders
                        if you look at this image
                        on the left side where it says "H" by the 3 pins with the jumper.
                        i take off the jumper and connect 3v to the H pin
                        works great.
                        http://www.bdspeedytek.com/wp-content/uploads/1.1.jpg

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

                          @mvader Thanks !

                          1 Reply Last reply
                          0
                          • hekH Offline
                            hekH Offline
                            hek
                            Admin
                            wrote on last edited by
                            #327

                            My Sensebender node started June 10 is still going strong.

                            Screen Shot 2015-11-12 at 20.04.18.png

                            AnticimexA 1 Reply Last reply
                            1
                            • hekH hek

                              My Sensebender node started June 10 is still going strong.

                              Screen Shot 2015-11-12 at 20.04.18.png

                              AnticimexA Offline
                              AnticimexA Offline
                              Anticimex
                              Contest Winner
                              wrote on last edited by
                              #328

                              @hek nice, what tool do you use for logging/graphing? Or is it exported and post-processed?

                              Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                              hekH 1 Reply Last reply
                              0
                              • AnticimexA Anticimex

                                @hek nice, what tool do you use for logging/graphing? Or is it exported and post-processed?

                                hekH Offline
                                hekH Offline
                                hek
                                Admin
                                wrote on last edited by
                                #329

                                @Anticimex

                                Datamine for Vera. The actual data is stored to my NAS (mounted from vera).

                                AnticimexA 1 Reply Last reply
                                0
                                • hekH hek

                                  @Anticimex

                                  Datamine for Vera. The actual data is stored to my NAS (mounted from vera).

                                  AnticimexA Offline
                                  AnticimexA Offline
                                  Anticimex
                                  Contest Winner
                                  wrote on last edited by
                                  #330

                                  @hek cool. Can Vera do that now? Vera lite as well? Though the data miner plugin only could use USB mounts.

                                  Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                                  hekH 1 Reply Last reply
                                  0
                                  • AnticimexA Anticimex

                                    @hek cool. Can Vera do that now? Vera lite as well? Though the data miner plugin only could use USB mounts.

                                    hekH Offline
                                    hekH Offline
                                    hek
                                    Admin
                                    wrote on last edited by hek
                                    #331

                                    @Anticimex said:

                                    Can Vera do that now? Vera lite as well? Though the data miner plugin only could use USB mounts.

                                    Na, a little hack
                                    http://forum.micasaverde.com/index.php/topic,14910.0.html

                                    1 Reply Last reply
                                    1
                                    • petoulachiP Offline
                                      petoulachiP Offline
                                      petoulachi
                                      wrote on last edited by
                                      #332

                                      Hello,
                                      I've just received my sensebender boards and start playing with it.

                                      My first goal is to make a door sensor running on battery. I will not use the integrated temp/hum sensor for battery purpose, and use interrupt to have the sensor on sleep the majority of time.

                                      Looking at the sketch given with temp/hum, I have one question;

                                      on the loop function, we have

                                      if ((measureCount == 5) && highfreq) 
                                        {
                                          clock_prescale_set(clock_div_8); // Switch to 1Mhz for the reminder of the sketch, save power.
                                          highfreq = false;
                                        } 
                                      

                                      But I don't really understand this ; highfreq is initialized to true in the declaration, and never again. So, does this clock_prescale_set is call only once, meangin that the sensor will run at 1Mhz all the time ?
                                      It is the 5 first mesure that are running at normal speed, and then the sensor goes into a "battery efficient" mode ?
                                      Why waiting for 5 mesure to do so, and not doing it at startup ?

                                      Thanks for your explanation !

                                      1 Reply Last reply
                                      0
                                      • tbowmoT Offline
                                        tbowmoT Offline
                                        tbowmo
                                        Admin
                                        wrote on last edited by
                                        #333

                                        @petoulachi said:

                                        But I don't really understand this ; highfreq is initialized to true in the declaration, and never again. So, does this clock_prescale_set is call only once, meangin that the sensor will run at 1Mhz all the time ?
                                        It is the 5 first mesure that are running at normal speed, and then the sensor goes into a "battery efficient" mode ?
                                        Why waiting for 5 mesure to do so, and not doing it at startup ?

                                        Thanks for your explanation !

                                        It's waiting with switching to lower frequency, because it is dumping debug information to the serial port. And when you switch to 1Mhz, the baudrate is "screwed".

                                        When that's said, my opinion is that there is not much power to save, with switching to 1Mhz. This is because the MCU is sleeping most of the time, with the RC oscillator switched off. I am thinking that the freq. scaling should be removed in the comming releases

                                        1 Reply Last reply
                                        0
                                        • petoulachiP Offline
                                          petoulachiP Offline
                                          petoulachi
                                          wrote on last edited by
                                          #334

                                          Oooh so I guess that also explain why I have strange output on the serial using the default sketch ?

                                          Well, I'll start without touching frequency and see how it behave in the next month. This is the sketch I use (not tested yet !). Sleeping all the time, awake but interrupt. When awake, send the Battery % if different from last mesure.

                                          /**
                                           * The MySensors Arduino library handles the wireless radio link and protocol
                                           * between your home built sensors/actuators and HA controller of choice.
                                           * The sensors forms a self healing radio network with optional repeaters. Each
                                           * repeater and gateway builds a routing tables in EEPROM which keeps track of the
                                           * network topology allowing messages to be routed to nodes.
                                           *
                                           * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
                                           * Copyright (C) 2013-2015 Sensnology AB
                                           * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
                                           *
                                           * Documentation: http://www.mysensors.org
                                           * Support Forum: http://forum.mysensors.org
                                           *
                                           * This program is free software; you can redistribute it and/or
                                           * modify it under the terms of the GNU General Public License
                                           * version 2 as published by the Free Software Foundation.
                                           *
                                           *******************************
                                           *
                                           * REVISION HISTORY
                                           * Version 1.0 - Henrik Ekblad
                                           * 
                                           * DESCRIPTION
                                           * Default sensor sketch for Sensebender Micro module
                                           * Act as a temperature / humidity sensor by default.
                                           *
                                           * If A0 is held low while powering on, it will enter testmode, which verifies all on-board peripherals
                                           *  
                                           * Battery voltage is as battery percentage (Internal message), and optionally as a sensor value (See defines below)
                                           *
                                           */
                                          
                                          
                                          #include <MySensor.h>
                                          #include <Wire.h>
                                          #include <SPI.h>
                                          #include "utility/SPIFlash.h"
                                          #include <EEPROM.h>  
                                          #include <avr/power.h>
                                          
                                          
                                          #define RELEASE "1.0"
                                          
                                          // Child sensor ID's
                                          
                                          #define DIGITAL_INPUT_SENSOR 3   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
                                          #define INTERRUPT DIGITAL_INPUT_SENSOR-2 // Usually the interrupt = pin -2 (on uno/nano anyway)
                                          #define CHILD_ID_DOOR 1   // Id of the sensor child
                                          
                                          
                                          MySensor gw;
                                          
                                          // Sensor messages
                                          MyMessage msgDoor(CHILD_ID_DOOR, V_TRIPPED);
                                          
                                          // Global settings
                                          int measureCount = 0;
                                          int sendBattery = 0;
                                          boolean highfreq = true;
                                          
                                          // Storage of old measurements
                                          long lastBattery = -100;
                                          boolean oldDoorValue;
                                          
                                          /****************************************************
                                           *
                                           * Setup code 
                                           *
                                           ****************************************************/
                                          void setup() {
                                            Serial.begin(115200);
                                            Serial.print(F("Sensebender Micro FW "));
                                            Serial.print(RELEASE);
                                            Serial.flush();
                                            
                                            gw.begin();
                                          
                                            Serial.flush();
                                            Serial.println(F(" - Online!"));
                                            gw.sendSketchInfo("Battery Door", RELEASE);
                                          
                                            // sets the motion sensor digital pin as input
                                            pinMode(DIGITAL_INPUT_SENSOR, INPUT);     
                                            // Activate internal pull-ups
                                            digitalWrite(DIGITAL_INPUT_SENSOR, HIGH);
                                            
                                             // Register all sensors to gw (they will be created as child devices)
                                            gw.present(CHILD_ID_DOOR, S_DOOR);
                                          }
                                          
                                          
                                          /***********************************************
                                           *
                                           *  Main loop function
                                           *
                                           ***********************************************/
                                          void loop() {
                                            gw.process();
                                          
                                            sendBattLevel(false); 
                                            door(false);
                                            
                                            gw.sleep(INTERRUPT, CHANGE, 0);
                                          }
                                          
                                          //  Check if digital input has changed and send in new value
                                          void door(bool force) 
                                          {
                                            // Short delay to allow buttons to properly settle
                                            sensor_node.sleep(5);
                                            
                                            bool tx = force;
                                            
                                            boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; 
                                            
                                            if (tripped != oldDoorValue) 
                                            {
                                              tx = true;
                                              oldDoorValue = tripped;
                                            }
                                            if (tx)
                                            {
                                               // Send in the new value
                                               gw.send(msgDoor.set(tripped ?  1 : 0));  // Send tripped value to gw 
                                            }
                                          } 
                                          
                                          
                                          
                                          /********************************************
                                           *
                                           * Sends battery information (battery percentage)
                                           *
                                           * Parameters
                                           * - force : Forces transmission of a value
                                           *
                                           *******************************************/
                                          void sendBattLevel(bool force)
                                          {
                                            if (force) lastBattery = -1;
                                            
                                            long vcc = readVcc();
                                            
                                            if (vcc != lastBattery) 
                                            {
                                              lastBattery = vcc;
                                          
                                              // Calculate percentage
                                              vcc = vcc - 1900; // subtract 1.9V from vcc, as this is the lowest voltage we will operate at
                                              long percent = vcc / 14.0;
                                              gw.sendBatteryLevel(percent);
                                            }
                                          }
                                          
                                          /*******************************************
                                           *
                                           * Internal battery ADC measuring 
                                           *
                                           *******************************************/
                                          long readVcc() {
                                            // Read 1.1V reference against AVcc
                                            // set the reference to Vcc and the measurement to the internal 1.1V reference
                                            #if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
                                              ADMUX = _BV(REFS0) | _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
                                            #elif defined (__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__)
                                              ADMUX = _BV(MUX5) | _BV(MUX0);
                                            #elif defined (__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
                                              ADcdMUX = _BV(MUX3) | _BV(MUX2);
                                            #else
                                              ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
                                            #endif  
                                           
                                            delay(2); // Wait for Vref to settle
                                            ADCSRA |= _BV(ADSC); // Start conversion
                                            while (bit_is_set(ADCSRA,ADSC)); // measuring
                                           
                                            uint8_t low  = ADCL; // must read ADCL first - it then locks ADCH  
                                            uint8_t high = ADCH; // unlocks both
                                           
                                            long result = (high<<8) | low;
                                           
                                            result = 1125300L / result; // Calculate Vcc (in mV); 1125300 = 1.1*1023*1000
                                            return result; // Vcc in millivolts
                                          }
                                          
                                          

                                          BTW, what is the F() function ? instead of Serial.print("Sensebender Micro FW "); why using Serial.print(F("Sensebender Micro FW ")); ?

                                          Thanks !

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


                                          13

                                          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