Navigation

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

    Best posts made by Sasquatch

    • RE: Issues when upgrading EnergyMeterPulseSensor from 1.5.x to 2.3.2

      V_Var1 is variable(your total pulses) stored in the controller - HomeAssistant, Domoticz etc....
      Assuming you have controller shut down you have to send that value from MYSController.

      This request will be fulfilled by controller after you configure it to use node's 7 child 1

      posted in Development
      Sasquatch
      Sasquatch
    • RE: Suggestions for my setup? Very new here.

      Imagine thermostat relying on IFTTT/cloud to work on schedule and your internet fails(winter, someone crashes car into ISP cabinet)... πŸ˜‰

      posted in General Discussion
      Sasquatch
      Sasquatch
    • RE: NodeManager sensors with multiple interrupt pins

      @j54n1n said in NodeManager sensors with multiple interrupt pins:

      So can somebody confirm that pin change interrupts can wake up a sleeping node loaded with a NodeManager template sketch?

      I have got the impression by reading here in the forum that the ATmega328p microcontroller has problems waking up from pin change interrupts. Maybe I am wrong?

      You are wrong, i have one sitting on my bench right now sleeping and waking up on A5 pin change.
      it's bare 328p test bead drawing mere 1uA in sleep...
      Use sleep(0);
      All the code you need to set things up:(tested on nano and mini boards)

      void pciSetup(byte pin)// enables pin change for given pin
      {
      	*digitalPinToPCMSK(pin) |= bit (digitalPinToPCMSKbit(pin));  // enable pin
      	PCIFR  |= bit (digitalPinToPCICRbit(pin)); // clear any outstanding interrupt
      	PCICR  |= bit (digitalPinToPCICRbit(pin)); // enable interrupt for the group
      }
      void pciClear(byte pin)// disables pin change for given pin
      {
      	*digitalPinToPCMSK(pin) &= ~(bit (digitalPinToPCMSKbit(pin)));  // disable pin
      	PCIFR  |= bit (digitalPinToPCICRbit(pin)); // clear any outstanding interrupt
      	PCICR  &= ~(bit (digitalPinToPCICRbit(pin))); // disable interrupt for the group
      }
      
      
      ISR (PCINT0_vect)//pins d8-d13
      {
      	
      }
      ISR (PCINT1_vect)// pins a0-a7
      {
      	
      }
      ISR (PCINT2_vect)//pins d0-d7
      {
      	
      }
      
      

      If you want to get several readings and then send them to gateway(power meter pulse counting) it's better to write your own sleep function. Built in sleep(); wakes radio on every wake up.
      :work in progress:

      void PowerDown(void)
      {
        ADCSRA &= ~(1<<ADEN);//disable ADC - 120uA
        sleep_bod_disable();//disable bod  - 15uA
        set_sleep_mode(SLEEP_MODE_PWR_DOWN);
        wdt_disable();
        sleep_enable();
        sleep_cpu();
        sleep_disable();
       ADCSRA |= (1<<ADEN);//enable ADC
       }
      

      then call transportDisable(); before powering down
      and transportReInitialise(); before sending your data.

      posted in NodeManager
      Sasquatch
      Sasquatch
    • RE: Arduino pro mini, rfm69 with 2 Reed switches on interrupts?

      @kiesel

      Found on here:
      Quote:

      Commented by Manoraj Gnanadhas (Atmel)
      2015-01-20 06:23:36 GMT
      [Recipients: Nick Gammon]

      Hello Nick,

      Our design team has confirmed that β€œNote-3 mentioned under Table 10-1” is a datasheet bug. So you can use any type of interrupt (Rising edge/ Falling edge / Low level / Any logical change) to wake up from sleep mode. Sorry for the inconvenience caused.

      Best Regards,
      Manoraj Gnanadhas

      Not responding to reed relay:
      PRIMARY_BUTTON_PIN interrupt is active only in sleep. if you're (un)lucky enough to move magnet when cpu is awake it will ignore it.

      More likely is that relay bounce longer than wake up time + 5ms in your loop.
      Do away with pin reading, serial print and delay, shorter your loop, longer battery life.
      In ISR (PCINT0_vect) set flag, then in a loop check for that flag.
      If it's set it's secondary buttton pin that avoke your cpu,
      if it's not set it's primary button .

      I'm reusing your variables:

      #include <avr/sleep.h>
      #define DEBUG  // coment out when ready to go into the box 
      #ifndef DEBUG //disable serial in production compile, potentially saves few uA in sleep mode
           #define MY_DISABLED_SERIAL
      #endif
      ISR (PCINT0_vect) // handle pin change interrupt for D8 to D13 here
       {    
          //delayMicroseconds(2);
          valueSecondary = true; // ISRs need to finish very fast or the arduino crashes. 
      void loop()
      {
         // Sleep until something happens with the sensor
        //sleep(PRIMARY_BUTTON_PIN-2, CHANGE, SECONDARY_BUTTON_PIN-2, CHANGE, 0);
        sleep_bod_disable();//disable BOD  - saves~ 15uA
        sleep(PRIMARY_BUTTON_PIN-2, CHANGE, 0);
      
        #ifdef DEBUG   //get rid of unnecessary slow downs when ready    
        Serial.println("Woken up");
        #endif
        
      
        if (valueSecondary == true){
               valueSecondary = false;
               #ifdef DEBUG     //get rid of unnecessary slow downs when ready    
               Serial.print("Secondary:");
               #endif
               send(msg2.set(1)); //box emptied/mail in the box
        }
        else{
            #ifdef DEBUG   //get rid of unnecessary slow downs when ready    
             Serial.print("Primary:");
            #endif
            send(msg.set(1));//mail in the box/box emptied
        }
      }
      

      Unless you really need to know if box was opened then closed, then check pin states in my if/else after 10-50ms delay, experiment until you get no bounce errors. BUT it will increase battery drain SIGNIFICANTLY.
      You will have 2 messages sent per event, one per door opening and one per door closing.

      posted in Development
      Sasquatch
      Sasquatch
    • RE: Suggestions for my setup? Very new here.

      @Smart-Projects-ABC
      1- not really. HA can use any sensor with Google Assistant(not sure if alexa was added since I last used it)
      2-flash requried? - going back to 2005 is IMHO not the way forward, what kind of advanced automation cannot be done in, say Domoticz or HomeAssistant?
      3-as little different protocols as practicable is a good idea
      4- I would add: avoid cloud based sensors at all cost for security and future proofing reasons. Cloud based sensor can be rendered useless by vendor deciding it's time to sell you a new one. Having local controller talking to sensors/actuators over WIFI/ZIGBEE/RFM69/NRF24/MagicBeam and allowing remote control over GA/Aexa/an app is more robust solution than every sensor talking to a server in china over different open port and ten talking trough outdated website(ittt.com) to talk to controller over yet another open port....

      And yes, with a bit of creativity and couple seeedstudio.com orders you can get every sensor you want on MySensors transport πŸ˜‰

      posted in General Discussion
      Sasquatch
      Sasquatch
    • RE: Domoticz/Mysensors

      @alco plenty people here ready to help

      posted in Domoticz
      Sasquatch
      Sasquatch
    • RE: [SOLVED] Go to loop(); when parent/gateway can't be found.

      @mfalkvidd Thank You!!!
      @skywatch just search forums, plenty of use examples, knowing what to search for was a key problem ;).

      posted in Development
      Sasquatch
      Sasquatch
    • RE: Generic pressure sensors -SOLVED

      It is most likely OP amp output you are seeing,
      connect 5v, resistors as needed and multimeter to resistor output, check if works satisfactory, simple....

      posted in Hardware
      Sasquatch
      Sasquatch
    • RE: BATERY CHARGER CONNECTION ?

      In Proteus you click on terminal end to draw a wire connection πŸ˜‰

      But on serious note - with copper with help from soldering alloy on PCB πŸ˜‚ .

      If you are asking for exact schematics then do your own homework and look in TP4056 datasheet. You are looking for typical application drawing.

      Tp4056 is linear regulator, very inefficient, look at spv1040 or spv1050 instead - MPPT tracking propper solar chargers.

      posted in General Discussion
      Sasquatch
      Sasquatch
    • RE: [SOLVED] Go to loop(); when parent/gateway can't be found.

      @BearWithBeard my bad, looked at wrong post and understood your answer wrong, bloody small text on phones ;~)

      posted in Development
      Sasquatch
      Sasquatch
    • RE: Second setup, choosing a radio

      I found that 2.4 GHz is too noisy for stable operation in area, had problems with range and missing packets. Radios worked fine, 80-90 meters in open field, 2 meters indoors across one room !!! but i can see 20+ WIFI networks within reach.
      Long story short: check your environment before you buy many radio modules.

      I'm currently in finishing stages of ultimate low power node - 5+ years on single AA(LITHIUM) battery with one minute update/report interval, based on RFM69+atmega328p.

      If you really need/wand OTA then nrf24 or rfm69/rfm95 is the way to go. Possibly gateway could be nRF52840 and nodes nrf24, not 100% sure, but should be compatible.

      posted in Hardware
      Sasquatch
      Sasquatch
    • RE: Help needed to setup a RFM69 & ESP8266 Gateaway on Adafruit Feather Huzzah

      @scalz I do agree,
      I found that even USB powered NodeMCU gateway needed at least 10uf ceramic or 47uF electrolytic capacitor on radio supply, without it heavy traffic was causing gateway freezes and reboots. There is 100nF capacotor on rfm69 and 220nf on RFM69H modules(at least my Aliexpress cheap clones have them) right next to the VCC pin, so i skip the external one.

      posted in Development
      Sasquatch
      Sasquatch
    • RE: Solar Energy Harvesting for wireless motes

      cough cough , so much dust here in the archives... πŸ˜‰

      @NeverDie SPV1050 is what you are looking for, only Maximum Power Point Tracking IC from all IC's you mentioned/tested in both your topics. And trust me, it makes a whole world of a difference. ST even have online component calculator for matching it to solar panel and battery used. My usage scenario was outdoor rechargeable coin cell battery and calculator solar cell. Only drawback: you have to determine maximum power point of your solar cell.

      posted in Hardware
      Sasquatch
      Sasquatch
    • RE: PlatformIO instead of official Arduino IDE?

      @TRS-80
      "Arduino IDE" is hardly an glorified notepad, it is beyond useless, why can't it save your board config with your project FFS!!!.
      I'm using arduino plugin for atmel studio, since it's only way to use hardware debuggers, both AVR dragon and ATMEL ICE work great.

      posted in Development
      Sasquatch
      Sasquatch
    • RE: Solar Energy Harvesting for wireless motes

      I made pcb for it it's on the roof of my flat, will dig trough my archives to see if i have kicad project for it.

      posted in Hardware
      Sasquatch
      Sasquatch