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
alexsh1A

alexsh1

@alexsh1
About
Posts
1.3k
Topics
71
Shares
0
Groups
0
Followers
1
Following
1

Posts

Recent Best Controversial

  • Node is rebooted by waking up from a sleep
    alexsh1A alexsh1

    Hi all,

    I have the following code which constantly reboots my node when Interrupted by PIR.
    Any idea why?

    //#define MY_DEBUG_VERBOSE_SIGNING
    //#define MY_SPLASH_SCREEN_DISABLED
    
    // Enable and select radio type attached
    #define MY_RADIO_RFM69
    #define MY_RFM69_NEW_DRIVER
    #define MY_RFM69_ATC_MODE_DISABLED
    #define MY_RFM69_FREQUENCY RFM69_868MHZ
    #define MY_PARENT_NODE_IS_STATIC
    #define MY_PARENT_NODE_ID 0
    #define MY_RFM69_NETWORKID (100)
    #define MY_NODE_ID 3
    
    #define INT_PIN 6
    #define INT_PINN 7
    #define SLEEP_TIME 9000000  // 15 min
    uint32_t sleepTime = SLEEP_TIME;
    int8_t wakeupReason = 0;
    
    #include <MySensors.h>
    
    void setup() {
      Serial.begin(115200);
      PCMSK2 |= bit(PCINT22);
      PCMSK2 |= bit(PCINT23);
      PCIFR |= bit(PCIF2);  // clear any outstanding interrupts
      PCICR |= bit(PCIE2);  // enable pin change interrupts for D0 to D7
      delay(2000);
      pinMode(INT_PIN, INPUT);
      pinMode(INT_PINN, INPUT);
    }
    
    
    void loop() {
      if (wakeupReason == digitalPinToInterrupt(INT_PIN) || wakeupReason == digitalPinToInterrupt(INT_PINN)) {
        Serial.println("Sleep Interrupted!");
        digitalWrite(9, HIGH);
        delay(20);
        digitalWrite(9, LOW);
        // Report sensor status here
      } else if (wakeupReason == MY_WAKE_UP_BY_TIMER) {
        Serial.println("MY_WAKE_UP_BY_TIMER");
        // Report battery level here
      }
      wakeupReason = sleep(digitalPinToInterrupt(INT_PIN), CHANGE, digitalPinToInterrupt(INT_PINN), CHANGE, sleepTime);
    }
    
    Troubleshooting

  • 💬 MyMultisensors
    alexsh1A alexsh1

    @scalz I have just updated to MySensors 2.3.2 and the sketch with interrupts stopped working. Any changes in any lib?

    OpenHardware.io 328p motion atsha204a multi sensor humidity temperature pir ambiant light low power coincell

  • error compiling
    alexsh1A alexsh1

    Hi all,

    Latest MySensors 2.3.2 on Moteino USB is giving the following compile errors:

    "C:\\Users\\ashes\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\4.8.1-arduino5/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=8000000L -DARDUINO=10607 -DARDUINO_AVR_ATmega328 -DARDUINO_ARCH_AVR "-IC:\\Users\\ashes\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\cores\\arduino" "-IC:\\Users\\ashes\\AppData\\Local\\Arduino15\\packages\\Moteino\\hardware\\avr\\1.6.1\\variants\\Moteino" "-Ic:\\Users\\ashes\\Documents\\Arduino\\libraries\\MySensors" "-IC:\\Users\\ashes\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\libraries\\SPI\\src" "-IC:\\Users\\ashes\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\libraries\\Wire\\src" "-Ic:\\Users\\ashes\\Documents\\Arduino\\libraries\\SparkFun_BME280\\src" "C:\\Users\\ashes\\AppData\\Local\\Temp\\arduino-sketch-9F678573572D7168587156F8AF298387\\sketch\\MotionSensor-lowlabs_v2_Nr2.ino.cpp" -o "C:\\Users\\ashes\\AppData\\Local\\Temp\\arduino-sketch-9F678573572D7168587156F8AF298387\\sketch\\MotionSensor-lowlabs_v2_Nr2.ino.cpp.o"
    In file included from c:\Users\ashes\Documents\Arduino\libraries\MySensors/hal/crypto/AVR/MyCryptoAVR.h:25:0,
                     from c:\Users\ashes\Documents\Arduino\libraries\MySensors/hal/crypto/AVR/MyCryptoAVR.cpp:21,
                     from c:\Users\ashes\Documents\Arduino\libraries\MySensors/MySensors.h:65,
                     from C:\Users\ashes\Documents\Arduino\MotionSensor-lowlabs_v2_Nr2\MotionSensor-lowlabs_v2_Nr2.ino:17:
    c:\Users\ashes\Documents\Arduino\libraries\MySensors/hal/crypto/AVR/drivers/AES/aes.cpp: In function 'AES_CBC_encrypt_buffer(AES_ctx*, unsigned char*, unsigned long)':
    c:\Users\ashes\Documents\Arduino\libraries\MySensors/hal/crypto/AVR/drivers/AES/aes.cpp:525:1: error: unable to find a register to spill in class 'POINTER_REGS'
     }
     ^
    c:\Users\ashes\Documents\Arduino\libraries\MySensors/hal/crypto/AVR/drivers/AES/aes.cpp:525:1: error: this is the insn:
    (insn 288 325 289 11 (set (reg:HI 26 r26)
            (reg/v/f:HI 67 [ buf ])) c:\Users\ashes\Documents\Arduino\libraries\MySensors/hal/crypto/AVR/drivers/AES/aes.cpp:524 82 {*movhi}
         (expr_list:REG_DEAD (reg/v/f:HI 67 [ buf ])
            (nil)))
    c:\Users\ashes\Documents\Arduino\libraries\MySensors/hal/crypto/AVR/drivers/AES/aes.cpp:525: confused by earlier errors, bailing out
    
    Using library MySensors at version 2.3.2 in folder: C:\Users\ashes\Documents\Arduino\libraries\MySensors 
    Using library SPI at version 1.0 in folder: C:\Users\ashes\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4\libraries\SPI 
    Using library Wire at version 1.0 in folder: C:\Users\ashes\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4\libraries\Wire 
    Using library SparkFun_BME280 at version 2.0.9 in folder: C:\Users\ashes\Documents\Arduino\libraries\SparkFun_BME280 
    exit status 1
    
    Compilation error: exit status 1
    

    Any idea how to fix it? Using latest Arduino IDE and libraries

    Troubleshooting

  • Sensebender micro failing with funny characters
    alexsh1A alexsh1

    @flix I have seen these issues with some boards. Garbage is coming from the serial output and nothing is transmitted. Any sign of moisture ingress? You may try to re-solder the atmega328p with a hot gun but this most likely would required de-soldering all the wires from the board. Please check other things - bad soldering connection to VCC or GND may give a similar error. Maybe some bad soldering joints? You may want to try 9600 rate to make sure it works. On some boards to had to re-upload the boatloader (fake atmega328p IC).

    The last resort of nothing works - change atmega328p. If the power is fine and no probs with the transmitter and no bad joints, most likely it is the IC

    Troubleshooting

  • What happened to ceech?
    alexsh1A alexsh1

    @mfalkvidd said in What happened to ceech?:

    I don't know, but according to https://forum.mysensors.org/user/ceech last time online in this forum was September 2017.

    His eBay shop is empty.
    Not a good sign...

    Hardware

  • What happened to ceech?
    alexsh1A alexsh1

    Hello,

    I have written several messages but looks like he is not replying. Anyone knows if he has gone out of business or ...?

    Thanks
    Alex

    Hardware

  • Multiple BME280 sensor for Domoticz
    alexsh1A alexsh1

    @palmerfarmer said in Multiple BME280 sensor for Domoticz:

    Hi,
    I'm trying to build a node that uses x2 BME280 sensors for a whole house fan controller, one inside temp/hum and one outside. The BME280 has a selectable I2C address by grounding the SDO pin on the sensor. I have successfully tested this using the BlueDot_BME280.h library and sketches.
    Problem I am having is turning this sketch into a working Mysensors node I can use in domoticz. I think I'm almost there but cannot see why i am getting an 'invalid use of non-static member function' message.
    here is my hacked code...

    I thought i would try and get it working with one BME280 first..

    Check if you use } or { correctly.
    I can see one mistake:

    else
    {
    Serial.print(F("Temperature in Celsius from Sensor 1:\t\t"));
    Serial.println(F("Null"));
    Serial.print(F("Humidity in % from Sensor 1:\t\t\t"));
    Serial.println(F("Null"));
    Serial.print(F("Pressure in hPa from Sensor 1:\t\t\t"));
    Serial.println(F("Null"));
    { (This should be } )

    Troubleshooting

  • PMS7003 dust sensor battery powered
    alexsh1A alexsh1

    What Chinese are doing with this sensor which is used in a handheld air quality meters like this:

    https://a.aliexpress.com/_UCY55

    is this -> Li-Ion battery 3000-4000mAh
    This would last hours. Not days.

    Unless you want to use a car battery, I do not think there is a portable pm25 monitor able to work days without recharging.

    My Project

  • 💬 Effective Solar Supercap Boost Charger for Small Solar Panel
    alexsh1A alexsh1

    @neverdie It does work under very extreme conditions (dark or very cloudy days for weeks), but I have not tested it extensively with internal lightning. The solar panel is very close to a window. I may be mistaken by I do not think LTC3108 is designed for low current (< 1 mA) application. BQ25570 is absolutely brilliant.

    OpenHardware.io

  • 💬 Effective Solar Supercap Boost Charger for Small Solar Panel
    alexsh1A alexsh1

    @neverdie said in 💬 Effective Solar Supercap Boost Charger for Small Solar Panel:

    @ncollins said in 💬 Effective Solar Supercap Boost Charger for Small Solar Panel:

    @neverdie they work super well. I've been testing them for a few months now, very reliable.

    Great! Nice to have your feedback. :)

    I had high expectations for Ceech's LTC3108 design:
    https://www.ebay.com/i/331654685113?chn=ps&norover=1&mkevt=1&mkrid=711-117182-37290-0&mkcid=2&itemid=331654685113&targetid=809743845025&device=c&mktype=pla&googleloc=9028292&poi=&campaignid=6470262913&mkgroupid=80364172271&rlsatarget=pla-809743845025&abcId=1141166&merchantid=115344895&gclid=CjwKCAjw29vsBRAuEiwA9s-0B7exYA8yU9w--t63jcXP7QWO_f05DzJKNxw2XS6pwlLkPkfK1UYqkxoC084QAvD_BwE
    but when I tested it, it turns out it needs about 5ma of current to run, which is at least 10x+ more than most small solar panels will deliver under even quite bright indoor lighting. Basically, if a panel can produce 5ma of current, the voltage will also be fairly high, thereby completely defeating the purpose of a chip like the LTC3108, which can be powered from 20mv. In my testing it took a minimum of 50mv and 5ma of current to get it to actually harvest any energy. 50mv would still be impressive, but the 5ma minimum is what kills its usefulness.

    One of the best modules @ceech made was this one

    https://www.ebay.co.uk/itm/BQ25570-thermal-solar-energy-harvester/332071662285?_trkparms=aid%3D1110001%26algo%3DSPLICE.SIM%26ao%3D1%26asc%3D20131231084308%26meid%3D759b68bcf5834d74bfa46f9df6b8ae4d%26pid%3D100010%26rk%3D1%26rkt%3D6%26sd%3D332393146893%26itm%3D332071662285%26pmt%3D0%26noa%3D1%26pg%3D2047675&_trksid=p2047675.c100010.m2109

    It has been running non-stop for many months now

    OpenHardware.io

  • Sketch for Lightning Sensor
    alexsh1A alexsh1

    @skywatch I have the same sensor for months working like a charm. Sadly I had to disable it as I had one node and several sensors interfering with each other.

    I will have to have the lightning sensor on a separate node

    Development

  • VEML6075 high sleep consumption
    alexsh1A alexsh1

    @manutremo

    Activate a forced mode. I bet your sensor is in standby mode right now

    Hardware

  • Multiple Gateways
    alexsh1A alexsh1

    @terence-faul this is not a fail prove design. Nodes are not typically moved even within one GW. Each GW must have each one channel and the same goes for nodes. Otherwise, in theory you may have a situation that the same node is reporting to one GW and then to the other GW. For controller this is going to be a chaos. A lot of data will be shared between two similar child IDs, i.e. for example two similar temperature child IDs for one node will have one measurement assigned through the first GW to the first temperature child ID and another measurement assigned to another child ID through another GW.

    General Discussion

  • not working Ethernet Gateway (sensebender and/or nano gateway)
    alexsh1A alexsh1

    @tbowmo said in not working Ethernet Gateway (sensebender and/or nano gateway):

    I haven't updated any of my SAMD21 boards the last year, so don't know if the latest arduino breaks something.

    I updated SAMD21 (Sensebender) with the latest Arduino and nothing has been broken.
    I have not tested it extensively though.

    Hardware

  • 💬 Sensebender Gateway
    alexsh1A alexsh1

    @rolandow said in 💬 Sensebender Gateway:

    Forgive me if this isn't the right place to ask; but as a beginner, where do I start? How can I order this thing, or any other stuff from OpenHardware.io ? I see so many design files, I'm not sure what to do with them. Soldering the thing I can probably manage, but is there a guide available how to order the PCB, and maybe the parts as well?

    Sesnebender GW can be ordered from Itead:

    https://www.itead.cc/mysensors-gateway.html

    Other openhardware.io projects maybe ordered either (1) directly from a link; pcb only (2) you can download eagle files and upload them to pcb manufactures like oshpark.com (3) you can purchase the final product. So a generic answer to your question is it depends :)

    I do not think there is a guide here, but if you go to oshpark.com there is a guide how to order a pcb. Parts (BOM) can be ordered from Aliexpress, eBay or more reputable supplies like digi-key or mouser

    OpenHardware.io mysensors gateway samd

  • What did you build today (Pictures) ?
    alexsh1A alexsh1

    @kalina scene controller? I have almost finished mine on Nextion, but do not have time to tidy things up.

    General Discussion

  • What did you build today (Pictures) ?
    alexsh1A alexsh1

    @acb Hot air has been used for soldering the board. I have not tried low power as I did not build this board for a battery sensor. My board has got two LEDs - power and another LED connected to D0 so clearly not very low power. I also have a 16Mhz firmware. I did not have any size limitation either. I have one particular node with a few sensors and with signing I cannot upload the sketch onto ATMEGA328P as it is marginally larger. Having said that I have not spent too much time optimising the sketch. I think that refactoring libraries, you are fine with ATMEGA328P in 98% of all MySensors applications.
    BTW - this is not my project. I have followed it https://github.com/peekpt/mightyduino

    Re cost. I stopped Ali shopping for ICs and other sensitive components some time ago after purchasing some fake ATMEGA328P and wasting so many hours trying to troubleshoot it. There is a post about it here on MySensors forum. Ever since I order all components on digi-key. 1284p is priced around $5 + 20% VAT. 328P is priced at $1.2 + VAT. However, I can also buy ATSAMD21 for $2.2 + VAT. Do you see my point? 1284p is extremely expensive and yet it is still 8 bit processor. That's why for me it was a one-off board.

    Re sleeping
    I am using TPL5110 which I built myself (similar to Adafruit one).
    Check out sleeping current:

    alt text

    Sadly, I struggled to get some sensors to sleep properly - probably lack of my programming skills - and with a sleeping current being hundreds of uA, I had to resort to this trick. Most of the time, the node sleeps is disconnected from power by TPL5110 then timer is up and it powers up, sends all sensors readings to the GW and then power gets disconnected to the node, only TPL5110 goes to nA sleep. Perfect!

    General Discussion

  • What did you build today (Pictures) ?
    alexsh1A alexsh1

    @acb I have built similar board.
    0_1549896894038_41B5EC1D-BA6B-4ADA-BE5D-9CB48359207D.jpeg

    The only downside is the cost and size of Atmega1284p is just so prohibitive. Yet it is 8 bits processor. I have only one fully conpleted board and a few blank pcbs.

    General Discussion

  • What did you build today (Pictures) ?
    alexsh1A alexsh1

    Finally finished building my dual precision voltage reference LTC6655:

    0_1549896394457_B2F58A87-E2DB-436B-ADFA-0514F43D2AAA.jpeg

    General Discussion

  • Rocketscream Mini Ultra Pro V3 as gateway
    alexsh1A alexsh1

    @robbie-deloose BTW, it works even with the following minimum settings:

    #define MY_RADIO_RFM95
    #define MY_RFM95_FREQUENCY RFM95_868MHZ
    #define MY_RFM95_CS_PIN 5
    

    given that SCK, MOSI, MISO are wired to standard pins for ATSAMD21

    Hardware
  • Login

  • Don't have an account? Register

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