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
W

waspie

@waspie
About
Posts
109
Topics
10
Shares
0
Groups
0
Followers
2
Following
0

Posts

Recent Best Controversial

  • High power consumption NRF52832 & SI7021
    W waspie

    I don't know if any of you guys are still around and using this stuff -
    I moved and am reviving a few of these 51/52 boards that I had built. Prior to moving I had decent luck with all these fixes though I don't quite remember where I was with any of this stuff seeing as it was 3 years ago.

    I had a few motion sensors and some temp/humd based on these fixes and they were working great, no dips.

    Not sure any of you will ever see this but hey it all worked.

    Troubleshooting

  • 💬 AM612 Passive Infrared Sensor Breakout Board
    W waspie

    @NeverDie said in 💬 AM612 Passive Infrared Sensor Breakout Board:

    @waspie said in 💬 AM612 Passive Infrared Sensor Breakout Board:

    for what its worth IIRC i'm getting at least 6 months on the ol' 612 with a CR2450.
    Close to two years on a CR123a. So yeah, if I made more I'd design a new board for the new PIR sensors you're finding out there but the 612 even with its higher dropout voltage seems to work fine with even a moderatly sized battery.

    Unless the actual current drain is larger than the 14ua I'm assuming, it sounds as though the other drains on your battery are what's dominating. So, if my calculations are right, you likely wouldn't get more than a small percentage more battery life out of using the 3ua sensor instead of the AM612.

    I'm using mostly 328p with edbyte radios with a resting current (no PIR) of like lets say 5-7ua? I haven't tested it in forever. with 2 years of battery on a 123 it just didnt seem worth the trouble worrying about any of it. and thanks for your designs that got me off the ground with that stuff btw.

    after the fix for the 51822 and 832 i put together a few of those and those are using the cr2450. i think those rest at like 4.5ua (minus the pir of course). 6+ months on a button cell is quite all right with me.

    OpenHardware.io

  • 💬 AM612 Passive Infrared Sensor Breakout Board
    W waspie

    for what its worth IIRC i'm getting at least 6 months on the ol' 612 with a CR2450.
    Close to two years on a CR123a. So yeah, if I made more I'd design a new board for the new PIR sensors you're finding out there but the 612 even with its higher dropout voltage seems to work fine with even a moderatly sized battery.

    OpenHardware.io

  • Working (so far) NRF5 NRF52832 PIR/Motion Sketch
    W waspie

    So, like i've mentioned before, my coding is ugly but generally works. So if anyone wants to pretty this up - have at it.

    Finally circling back to the nrf5 that I haven't touched in like a year I spent some time trying to get a working sketch. I played with neverdie's LPCOMP one and it kept locking up or something and I tried again with a GPIOTE one and it (besides being too complicated for me in general) was doing something similar. Using the latest alpha branch with the fixes for the nrf5 that were added about a year ago it finally works with just the plain jane interrupt sketch with a small addition to put i2c asleep. Found that tidbit on the nordic forums and sprinkled around elsewhere as well.
    Power usage is around 24 microamps. I use it with a CR2450 so I figure probably at least 6 months. I'm using a circular board similar to @NeverDie 's nrf51 board so its a very compact PIR.

    As a side note, I tried making the LED blink but it would always lock up after sending a 0 (no pir low). no idea why so I stopped messing with it for now just happy that it's working

    Hopefully this is of use to someone:

    /*
     * This example sketch shows how you can manage the nRF5 pin mapping as part of your code.
     * You can use the method for any nRF51822 or nRF52832 board or module.
     * 
     * Most components, like UART, SPI, Wire Bus, of the nRF5 series chips don't
     * have a fixed pin mapping. There are some pins with restrictions like analog
     * inputs, NFC or pins near the radio module. Please refer the latest
     * documentation about pin restrictions at http://infocenter.nordicsemi.com 
     * 
     * To use the custom pin mapping you have to do following steps:
     * 
     * 1. Install "arduino-nrf5" like described at
     *    https://github.com/sandeepmistry/arduino-nRF5/
     * 2. Install the "My Sensors nRF5 Boards" with the board manager like
     *    explained at https://github.com/mysensors/ArduinoBoards
     * 3. Copy the files "MyBoardNRF5.cpp" and "MyBoardNRF5.h" from
     *    "MyBoardNRF5" example into your sketch.
     * 4. Modify pin mappings in "MyBoardNRF5.cpp" and "MyBoardNRF5.h" to fit
     *    your requirements.
     * 5. Select "MyBoardNRF5 nrf52832" or "MyBoardNRF5 nrf52822" as your board.
     *    Choose the correct parameters and programmer in the Tools menu.
     */
    
    // MySensors /////////////////////
    #define MY_RADIO_NRF5_ESB
    #define MY_NODE_ID 121
    //#define MY_NRF5_ESB_MODE (NRF5_1MBPS)
    #define MY_NRF5_ESB_MODE (NRF5_250KBPS)
    #define MY_PASSIVE_NODE
    #include <MySensors.h>
    #define SKETCH_NAME "NRF52 Motion 2021"
    #define SKETCH_VERSION "v1"
    #define CHILD_ID 1
    #define CHILD_ID_VOLT 28
    
    
    float batteryVoltage=0;  
    uint32_t SLEEP_TIME = 840000; //14 minutes
    int batteryReport = 0;
    int percent = 0;
    MyMessage msg(CHILD_ID, V_TRIPPED); // Motion
    MyMessage msgVoltage(CHILD_ID_VOLT,V_VOLTAGE);
    #define DIGITAL_INPUT_SENSOR 2
    
    
    void setup() { 
      pinMode(DIGITAL_INPUT_SENSOR, INPUT);
      pinMode(LED_BUILTIN, OUTPUT);
      i2c_off(); // Shut down the i2c
    }
    
    void presentation()
    {
      sendSketchInfo(SKETCH_NAME, SKETCH_VERSION);
      present(CHILD_ID, S_MOTION);
      present(CHILD_ID_VOLT,S_MULTIMETER);
    }
    
    void loop() 
    {
      bool tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH;
      send(msg.set(tripped?"1":"0"));  // Send motion tripped value to gw
      i2c_off();
      sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME);
      if ( batteryReport == 0 ) {
        batteryVoltage=((float)hwCPUVoltage())/1000.0;  //take voltage measurement after transmission to hopefully measure lowest voltage that occurs. 
        percent = map(batteryVoltage, 2.8, 3.25, 0, 100);
        //send(msgVoltage.set(batteryVoltage,3));  //send battery voltage with 3 decimal places
        send(msgVoltage.set(percent,2));
      }
      batteryReport++;
      if ( batteryReport > 20 ) {
        batteryReport=0;
      }
    
    }
    
    void i2c_off() // Shut i2c down, powerconsumption rises up to 450uA instead of 11 ua  - https://github.com/sandeepmistry/arduino-nRF5/issues/291#issuecomment-407492282
    {
      NRF_TWI1->ENABLE=TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos;
    *(volatile uint32_t *)0x40004FFC = 0;
    *(volatile uint32_t *)0x40004FFC;
    *(volatile uint32_t *)0x40004FFC = 1;
    
    }
    
    My Project

  • NRF5 Hardware module crash after while
    W waspie

    @ncollins

    Are you currently working with any NRF5x? Do you have a working motion/contact sketch for the NRF52?

    My Project

  • AM612 PIR can
    W waspie

    @mfalkvidd said in AM612 PIR can:

    BL412 (the adafruit link) is rated for 2.7V minimum.

    However, the BS412 is rated for 2.0V minimum. Maybe that's a good candidate?

    nice find!
    and 11ua, a little lower than the 612. Might have to try one of these some day

    @chey I really never did much looking around. As I said, it wasn't really much of an issue. The first PIRs I built are having their batteries die just now. I started down this road with the PIRs about 2 years ago - so that's about how long they've been lasting as-is. :)

    General Discussion

  • AM612 PIR can
    W waspie

    Did anyone ever find a PIR sensor that could handle voltages below 2.8v without going wonky?

    I use CR123a batteries with my PIR and I recently had to replace one. It was at the moment I realized I had at least of year of life out of this one and it had only then dropped to 60%.

    If there was another sensor readily and cheaply available it could be of some interest although I'm pretty content with a year of life.

    General Discussion

  • Where did everyone go?
    W waspie

    i'm still around but most of my stuff is working and has been for a long time so I haven't much need to check in. I wish i could get my nrf51/52 based things to work better but i've kind of given up on those.

    General Discussion

  • Funny story time
    W waspie

    @skywatch
    hah, tell me about it. it went through battery and all. Still dutifully reporting every 3 minutes.

    General Discussion

  • Funny story time
    W waspie

    A temperature sensor in my boys' room went missing this morning when my wife gathered up the bed sheets to launder. I hadn't printed a case for it and mounted it anywhere and had it on the bed out of the way. It should have been hard to get tangled up in the sheets.
    I noticed it was missing from its perch and was looking around for it but not too hard as I was working.
    And hour or so later I walked passed one of the panels in the house that displays information and noticed the temperature for that room had increased to over 100 Fahrenheit which immediately confirmed my suspicion about where it went.

    It went through the wash cycle and on to dry (combination machine) and survived the whole thing 😂20210105_155934.jpg

    General Discussion

  • OH3 - MySensors Binding
    W waspie

    @haasje30 if it's mqtt both can subscribe at the same time

    OpenHAB

  • OH3 - MySensors Binding
    W waspie

    @haasje30
    smartsleep is easy with MQTT

    Initially a few years ago i tried the binding and it gave me nothing but trouble.
    While it was configured I'd watch MQTT to see what it would do.

    2020-12-31 22:58:22 unoout/202/255/3/0/33 180000 (THIS IS THE SLEEP DURATION)
    2020-12-31 22:58:22 unoout/202/255/3/0/32 500 (AT THIS MOMENT YOU HAVE 500MS to GET A COMMAND SENT)

    So define a thing to the channel ending in 32.
    Bind an item to that channel with an expire timer for like 10 seconds state = 0

    then for your rule you'd have

    rule "whatever"
    when
    Item whateverSleepItem changed from 0 to 500
    then
    whateverOtherItemThatIsSendingOutACommand.sendCommand(ON/OFF/WHATEVER)
    end

    OpenHAB

  • NRF5 Hardware module crash after while
    W waspie

    @Didou @evb
    I download the dev version AND replaced the two files with the ones from the proposed fix.

    I think that's the right path - it seems to be showing positive results.

    My Project

  • NRF5 Hardware module crash after while
    W waspie

    @ncollins
    Seems to be working well on NRF51, not so much on NRF52. I backed off the changes for NRF52 modules and they're working ok with latest alpha. I think I need a better sketch for them...

    Anyway, NRF51822 is doing much much better.

    @Didou follow the links posted by @ncollins

    The first big dip on 11/29 was a deadlock. I tried some change after that that still didn't work and lead to another deadlock on 12/7. Using the fix from github you can see how much more stable battery reporting has been since 12/9 (small spike when it was plugged in for programming) when i flashed it using the fixed code. This one might finally be fixed.

    8a34ba1c-f51f-4806-95d1-349e382491df-image.png

    My Project

  • High power consumption NRF52832 & SI7021
    W waspie

    @Omemanti
    If you're experiencing this issue I'd certainly try 1. I don't know that I'd got hog wild just yet unless they're easy to get to and easy to hook up.

    Troubleshooting

  • High power consumption NRF52832 & SI7021
    W waspie

    @ncollins
    yep!
    while its only a few days I'm not seeing those dips that you can notice prior to the big drop. might be nothing, might be something. who know!

    Troubleshooting

  • [SOLVED] Troubleshooting MQTT Gateway with Amplified NRF24L01+PA+LNA Long Range Antenna
    W waspie

    I also had a lot of problems before finally switching to (cd)ebyte modules. After moving to ebyte modules for the gateway and nodes my problems have all but vanished. good luck.

    Hardware

  • High power consumption NRF52832 & SI7021
    W waspie

    @ncollins 1455 is the latest and greatest
    https://github.com/mysensors/MySensors/pull/1455
    d00616 replied to use it.

    6 days on no dip (yet)

    edit i guess its 3 days since the spike (plugged in) was on 12/10

    df543d7f-e870-4e25-bc24-3fa9849b0db2-image.png

    Troubleshooting

  • High power consumption NRF52832 & SI7021
    W waspie

    that's the reversion isn't it? so wouldn't that be the same as no changes at all? or is this supposed to be the pre-reversion test fix? i think i'll try that code in 1455. nothing to lose but another cr2032 heh

    good idea on asking, will do

    Troubleshooting
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular