Door sensor, remix of some MYS community efforts



  • This project is a remix of a few other MYS project. The base is the excellent Window Sensor with Sensebender (high WAF) where I thought I could get some use of the tiny jModule instead. I ended up ordering from a link to dirtyPCBs in the comments.
    This is the start, dirt cheap but still looks ok.
    0_1491512542575_mys-door-start.JPG
    Rip it open, de-solder the glass reed switch and don't bend the pins since that will most likely kill it. Use a dremmel and remove some excess plastic in the top part of the speaker fitting.
    0_1491512749706_mys-door.JPG
    Assemble your jModule. I didn't use any bent pins since the space is extremely limited.
    0_1491513025490_mys-door-pcb.JPG
    As you see, the wiring is just the reed switch to GND and 3. Power and GND to the edge of the jModule (on to VCC of pro mini). Since it's battery powered the pro mini LED is removed (destroyed :grin: ) and traces cut. Cut the corners of the pro mini (!) to make it fit.
    0_1491513534209_mys-door-end.JPG

    Last but not least, some code. I gave NodeManager by @user2684 a try and it makes things almost to easy :smile:

      /*
       * For v1.3
       * Register below your sensors
      */
      nodeManager.setBatteryMin(1.8);
      nodeManager.setBatteryMax(3.2);
      nodeManager.setBatteryReportCycles(2);
      nodeManager.registerSensor(SENSOR_DOOR,3);
      nodeManager.setSleep(SLEEP,3,HOURS);
      /*
       * Register above your sensors
      */
    

    Every 6 hous the sensor will report battery status. On open or close it will report state then go back to sleep.

    The second sensor took 15 minutes to assemble, quite ok imho...


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.