Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. waspie
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    waspie

    @waspie

    35
    Reputation
    108
    Posts
    435
    Profile views
    2
    Followers
    0
    Following
    Joined Last Online

    waspie Follow

    Best posts made by waspie

    • Funny story time

      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

      posted in General Discussion
      waspie
      waspie
    • RE: 💬 nrf52832 PIR

      Some pictures of an assembled unit with 3d printed case

      4_1560857780234_20190618_073230.jpg 3_1560857780234_20190618_073218.jpg 2_1560857780233_20190618_073211.jpg 1_1560857780233_20190618_073200.jpg 0_1560857780233_20190618_073136.jpg

      posted in OpenHardware.io
      waspie
      waspie
    • RE: nRF5 action!

      @ncollins

      throw this somewhere in your code:

      void reboot() {
        wdt_disable();
        wdt_enable(WDTO_15MS);
        while (1) {}
      }
      

      and then calling the reboot (in the entire loop):

      void loop() {
      
        if (motion_change) {
          motionDetected=!motionDetected;
          if (motionDetected) {
            send(msg.set("1"));  // motion detected
          }
          else {
            digitalWrite(LED_BUILTIN,LOW);  //turn-off LED to signify motion no longer detected
            send(msg.set("0"));  // send all-clear to prepare for future detections
          }    
          
          NRF_LPCOMP->EVENTS_CROSS=0;
          motion_change=false;
        }
        else { //must be a scheduled wake-up.  Time to report voltage as a heartbeat.
          batteryVoltage=((float)hwCPUVoltage())/1000.0;  //take voltage measurement after transmission to hopefully measure lowest voltage that occurs. 
          send(msg_S_MULTIMETER_V_VOLTAGE.set(batteryVoltage,3));  //send battery voltage with 3 decimal places
          time = millis();
          if (time > 14400000 ) {
            reboot();
          }
        }
        mySleep(1200000);  //sleep for 20 minutes
      }```
      posted in My Project
      waspie
      waspie
    • RE: Ebyte nRF24 module comparison (2020)

      I had seemingly unending problems getting sensors to be reliable and about gave up until i switched to ebyte modules.

      Since redesigning boards to use their slightly different pinout and moving to their modules I haven't had any issues. A complete turnaround from what i was experiencing before - highly recommended.

      posted in Hardware
      waspie
      waspie
    • RE: [SOLVED] ds18b20 vs si7021 loss of granularity in measurement

      @Yveaux this has resolved it, thank you

      posted in Troubleshooting
      waspie
      waspie
    • RE: Raspberry Pi Zero W gateway + NRF24L01+ Radio + MQTT - Radio failing

      try another radio? My gateway is a Pi Zero W and works fine so there's no reason it shouldn't work for you.

      posted in Troubleshooting
      waspie
      waspie
    • AM612 PIR can

      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.

      posted in General Discussion
      waspie
      waspie
    • RE: Cannot flash atmega328 on new custom board

      @scalz
      Thanks for the link to the 3.3v USBASP mod!
      i have been pulling my hair out trying to get bare 328p chips programmed using a generic ASP

      thank you!!!

      posted in Hardware
      waspie
      waspie
    • RE: pi gateway just stops communicating

      my pi3b does this as well. it's far and few in between. I even made a watchdog in openhab to "ping" the msgw (requesting an ack) and mysgw responds but it doesn't send out new sensor readings. i thought about expanding the watchdog to watch for all sensor readings and throw up a restart to the gw if it receives no readings in a 10 minute period but mine doesn't fail nearly as consistently as yours so I haven't worried about it too much...

      would still like to see a resolution to this as I've moved most of my PIRs and temp sensors to mysgw so when it goes down it can be a bit of a problem.

      posted in Troubleshooting
      waspie
      waspie
    • RE: AM612 PIR can

      @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. 🙂

      posted in General Discussion
      waspie
      waspie

    Latest posts made by waspie

    • RE: 💬 AM612 Passive Infrared Sensor Breakout Board

      @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.

      posted in OpenHardware.io
      waspie
      waspie
    • RE: 💬 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.

      posted in OpenHardware.io
      waspie
      waspie
    • Working (so far) NRF5 NRF52832 PIR/Motion Sketch

      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;
      
      }
      
      dots123 created this issue in sandeepmistry/arduino-nRF5

      closed I2C AND attachInterrupt current consumption in sleep mode #291

      posted in My Project
      waspie
      waspie
    • RE: NRF5 Hardware module crash after while

      @ncollins

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

      posted in My Project
      waspie
      waspie
    • RE: AM612 PIR can

      @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. 🙂

      posted in General Discussion
      waspie
      waspie
    • AM612 PIR can

      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.

      posted in General Discussion
      waspie
      waspie
    • RE: Where did everyone go?

      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.

      posted in General Discussion
      waspie
      waspie
    • RE: Funny story time

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

      posted in General Discussion
      waspie
      waspie
    • Funny story time

      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

      posted in General Discussion
      waspie
      waspie