My Ultra Low Power Wireless Trigger Sensor: Overview (Part 1)

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ต.ค. 2020
  • This video introduced the design of a wireless, battery-based, low-cost, real-time trigger sensor.
    The Build - • My Ultra Low Power Wir...
    The Hub - • My Ultra Low Power Wir...
    This sensor can be used to monitor doors, motion, or it can act as wall switches. It uses microAmps while in standby and has a trigger time of 240ms. It is designed using ESP8266, Attiny and communicates over ESPNOW, Wifi and MQTT.
    Amazon.com:
    - Wemos d1 mini (4M version) - amzn.to/3bqzb2c
    - ESP-01 module - amzn.to/356vxb1
    - ESP-12F module - amzn.to/2GZUEVf
    - ATtiny13a - amzn.to/2GYKXGx
    - NPN kit - amzn.to/37eclLb
    AliExpress:
    - Wemos d1 mini (4M version) - s.click.aliexpress.com/e/_dXc...
    - ESP-01 module with programmer - s.click.aliexpress.com/e/_eNOrzT
    - ESP-12F module - s.click.aliexpress.com/e/_etRdC1
    - ATtiny13a (DIP) - s.click.aliexpress.com/e/_ePqoLb
    - ATtiny13a (SMD) - s.click.aliexpress.com/e/_eO8tTP
    - NPN kit - s.click.aliexpress.com/e/_eOhevR
    Amazon.ca:
    - Wemos d1 mini (4M version) - amzn.to/3fx28Lq
    - ESP-01 module with programmer - amzn.to/3kaGfnh
    - ESP-12F module - amzn.to/356vewT
    - ATtiny13a - amzn.to/37epB2t
    - NPN kit - amzn.to/3dALmuH
    Get the project files: schematics and code on Instructables:
    www.instructables.com/Ultra-L...
    DISCLAIMER: Some of the links found here may be affiliate links, meaning I will make commission on sales you make through my link. This is at no extra cost to you to use my links/codes, it's just one more way to support me and my work. Much of the information contained is based on personal knowledge and experience. It is the responsibility of the viewer to independently verify all information.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 50

  • @supperka2
    @supperka2 3 ปีที่แล้ว +4

    Nice work ! I'm look forward to your new video about this triggers.

  • @dukej9820
    @dukej9820 3 ปีที่แล้ว +2

    Awesome! If I could get about 2 years battery life I would put one on every window and door in the house.

  • @rfdave3980
    @rfdave3980 2 ปีที่แล้ว +1

    Very interesting. I have just started to get into ESP-NOW. Your work is excellent. Subed to your channel.

  • @axelcjensen
    @axelcjensen 3 ปีที่แล้ว +1

    Love it, keep up the good work!

  • @wackogames
    @wackogames 3 ปีที่แล้ว +4

    Looking forward to the instructional video on how to set this up, very interested in how you set it up using the reed switch since this could be perfect for door/window sensors. And the fake light switch is genious.

    • @MrDIYca
      @MrDIYca  3 ปีที่แล้ว +1

      I am working on it now. It should be out next week or so.

  • @MrBobWareham
    @MrBobWareham 3 ปีที่แล้ว

    Looks very good a very nice system I am looking forward to your next video on this project and thanks for sharing your project.

    • @MrDIYca
      @MrDIYca  3 ปีที่แล้ว

      Thanks for watching!

  • @TecSanento
    @TecSanento 3 ปีที่แล้ว +2

    This should have much more views and is exactly what I need! I didn’t want to use all my sensors with static IP in my IOT Wifi, so ESP now (mesh?) is a great solution. Did you implement some turnover message to push the sensor into regular WiFi/flash mode ?
    Also the Sensor nodes seem simple enough to make a good compromise for the improved capability’s and battery live - I would relay like an kit version using pcbways kit service at and Size Level - but the Gateway seems a bit hacky compared to the rest of your design. When I am building this for myself, I will be using an POE powers ESP32 Ethernet board and use the wifi part as the Espnow Gateway - seems reasonable for mee

    • @MrDIYca
      @MrDIYca  2 ปีที่แล้ว

      BTW, I have a new Gateway design here th-cam.com/video/xPPdYvKbSFk/w-d-xo.html

  • @PileofKyle
    @PileofKyle 3 ปีที่แล้ว +1

    Very cool!

  • @MrDIYca
    @MrDIYca  3 ปีที่แล้ว

    Follow up how-to build video here th-cam.com/video/LbGGeREwECc/w-d-xo.html

  • @digitalartee
    @digitalartee 3 ปีที่แล้ว +1

    Like it! It's awesome.

  • @williamdenbeste9703
    @williamdenbeste9703 3 ปีที่แล้ว +1

    Nice design work! I have done something similar to get super low idle current. I used an Attiny202 which has an internal oscillator going as low as 32kHz. At 32kHz the Attiny202 draws less than 15uA. Of course in sleep mode it is similar to the Attiny you used. Just another idea in case it is useful.

    • @MrDIYca
      @MrDIYca  3 ปีที่แล้ว

      That is indeed a great idea, slowing the speed way down - I will add that to my bag of tricks. Thank you for sharing!

  • @FrankGraffagnino
    @FrankGraffagnino 3 ปีที่แล้ว +1

    very very cool. If you are looking for something similar but using the ESP32 and not requiring a hub device, check out the Trigboard. Very clever board with super low power. I like the low cost of this design!

    • @MrDIYca
      @MrDIYca  3 ปีที่แล้ว

      Thank you. I did check the Trigboard - it has a very clever design indeed. I really like it. However, I needed something that is super simple and extremly fast acting. The Trigboard, without a hub, takes over 3 seconds to action a motion. Not really a hardware issue, it's the wifi stack. That is why I opted for ESPNow in my design.

    • @FrankGraffagnino
      @FrankGraffagnino 3 ปีที่แล้ว +1

      @@MrDIYca ok. in my experience it has been much faster than 3 seconds but i definitely see your point. Thanks for sharing your great work! Can't wait to see some more. I am really starting to love the beauty and simplicity of MQTT and I think you've got some great projects on your channel.

  • @meierthomas
    @meierthomas 2 ปีที่แล้ว

    Interesting system. You mentioned the ATtiny responds to (hardware) interrupts. Could this also be timer driven? I' m designing a low power sensor application to measure sensor data n times a day then go back to sleep but with the power consumption of your system this could be very attractive

    • @MrDIYca
      @MrDIYca  2 ปีที่แล้ว

      Yes you can. This is what I did for a ULP temperature sensor I am working on. You can see a preview here: th-cam.com/video/xPPdYvKbSFk/w-d-xo.html ( jump to 3:50). I used the ATtiny as a timer to wake up every 15 minutes. Project should be out in the coming months.

    • @meierthomas
      @meierthomas 2 ปีที่แล้ว

      @@MrDIYca Txs. Will get going in there meantime 🙂

  • @Fabsenet
    @Fabsenet 3 ปีที่แล้ว

    Does the esp not have the trigger capabilities as well? This could void the need for the attiny

    • @MrDIYca
      @MrDIYca  3 ปีที่แล้ว +1

      It does. However, deep sleep and interrupts don't play well together in the ESPs.

  • @lluisvila9231
    @lluisvila9231 3 ปีที่แล้ว

    Good job! I'm planning on making your project myself. I read your instructables page but still have lots of questions. May I reach you via twitter?

  • @sshah876
    @sshah876 3 ปีที่แล้ว

    If a gpio could be toggled at the low power battery operated side, I can then try to power momentarily a servo, to act like switchbot, for that application, an RF or Bluetooth would be more efficient? Or wifi with some timed polling might do the trick?.

    • @MrDIYca
      @MrDIYca  3 ปีที่แล้ว

      It might work but will drain the battery very fast.

    • @sshah876
      @sshah876 3 ปีที่แล้ว

      @@MrDIYca Thank you so much sir for the feedback, may be BLE would be a candidate for that application.

  • @abhinmajix
    @abhinmajix 2 ปีที่แล้ว

    Could pls comment on how you measured current on rigol oscilloscope

    • @MrDIYca
      @MrDIYca  2 ปีที่แล้ว +1

      Watch this th-cam.com/video/oOB1rgJMCN8/w-d-xo.html

    • @abhinmajix
      @abhinmajix 2 ปีที่แล้ว

      @@MrDIYca thanks....

  • @warrengacho4773
    @warrengacho4773 2 ปีที่แล้ว

    Can you use directly the esp8266 on sleep mode tgen wakes up with external interrupt? Sorry newbie here..

    • @MrDIYca
      @MrDIYca  2 ปีที่แล้ว +1

      ESP8266 micro-controllers don't have normal interrupts while in deep sleep as AVRs for example. You can not trigger on an active low that is why I used the attiny.

  • @wackogames
    @wackogames 3 ปีที่แล้ว +2

    So how long does the battery in light switch last?

    • @MrDIYca
      @MrDIYca  3 ปีที่แล้ว

      It heavily depends on the usage and the battery size. I will be touching on that topic in a future video.

  • @basiratan702
    @basiratan702 3 ปีที่แล้ว

    Is there a limit on how many sensors can be added? Doesn't ESPNOW protocol has some restriction on this?

    • @MrDIYca
      @MrDIYca  3 ปีที่แล้ว

      Yes, for peer connections, it is 20. But I am not sure if that applies to broadcast or not, which I use.

  • @importfanatik
    @importfanatik 3 ปีที่แล้ว

    Could you explain more around why the hub is needed? Like why couldn't the esp8266 just emit the mqtt message?

    • @MrDIYca
      @MrDIYca  3 ปีที่แล้ว +2

      The Hub is needed because going the wifi route would have increased the trigger time. It usually takes seconds for the ESP to wake up, connect to wifi and send msgs and I wanted a sensor that can send msgs in almost real time. This where the really fast ESPNOW comes in. The hub is needed to convert the ESPNOW msgs to MQTT over Wifi. Since the hub is always on and connected to wifi, the ESPNOW to MQTT becomes almost instantaneous. Hope that helped.

    • @importfanatik
      @importfanatik 3 ปีที่แล้ว

      Thanks, that makes sense. I hadn't heard of espnow before. Seems like you could possibly eliminate the esp8266. randomnerdtutorials.com/esp32-esp-now-wi-fi-web-server/

  • @the-matrix-has-you
    @the-matrix-has-you 2 ปีที่แล้ว

    Hi, it has a Security Flaw if the Intruder has a magnet he can disable the trigger of latch circuit to off position you need to add a timer circuit for latching mechanism

    • @MrDIYca
      @MrDIYca  2 ปีที่แล้ว

      Yes, in theory, you are correct. But it is very tricky to pull off in real life. It is way easier to just jam the 2.4Ghz frequency band. My goal is not to build a security system but a sensor for notifications/automations. Can you tell me more about the 'timer circuit for latching mechanism' and how would that work?

    • @the-matrix-has-you
      @the-matrix-has-you 2 ปีที่แล้ว +1

      @@MrDIYca Timer is little more tricky to build you need NE555N to do that you can check out its datasheet but there is more easier way why not use NPN, s base as input from MCU and in program you just pull it LOW when the program starts then when MQTT message is sent you can pull it high.I made my sensor board with ESP12F using two BC547 s two 10k resistors, 1k resistor, 1uF Capacitor and I have also implemented my own regulator with HT7333 LDO with some capacitor filtering before and after. All of this working in Deep Sleep mode. All consume around 4 uA which is good for battery operation.I Just checked out the LDO SPX3819 it has a quiescent current of 90uA which is not really ideal for battery operation.

  • @kingoftennis94
    @kingoftennis94 ปีที่แล้ว

    why use 2 wemos d1's

  • @clintAdventures
    @clintAdventures 3 ปีที่แล้ว

    Can you please make a how to make this video? Really want to make one.

    • @MrDIYca
      @MrDIYca  3 ปีที่แล้ว

      In the works, should be out soon ..

    • @clintAdventures
      @clintAdventures 3 ปีที่แล้ว

      @@MrDIYca awesome. Got all the parts I think.

  • @herberthaas5471
    @herberthaas5471 3 ปีที่แล้ว

    how to login into gateway interface? I made the gateway node first. i was able to connect and set my wifi ssid and pw. i don´t have mqtt server right now so i put in some random data. the node connects to my network but when i try to connect it asks me for username and password. what to put in here? maybe i´m stupid but please help me out.

    • @MrDIYca
      @MrDIYca  3 ปีที่แล้ว

      Hi Herbert, no not at all, the username is 'admin' and the password is the same as the AP's ( or 'mrdiy.ca' if you didn't change it).

    • @herberthaas5471
      @herberthaas5471 3 ปีที่แล้ว

      @@MrDIYca Wow. Thanks for the fast answer. Not it works. But one strange thing. The gateway of the hub connects to my network and the receiver of the hub also obtains an ip but is not accessible in browser. is this normal or because i uploaded the gatewaysketch to the receiver board for first testing but then uploaded the receiver sketch later. i thought receiver is only to receive espnow messages and should´t connect to my wifi.

    • @MrDIYca
      @MrDIYca  3 ปีที่แล้ว

      @@herberthaas5471 You are right, the receiver doesn't connect to your network. So if you are seeing an IP on that device, then you are probably doing something wrong - make sure you are using the code from esp8266_receiver.ino