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
B

ben999

@ben999
Unfollow Follow
About
Posts
188
Topics
22
Shares
0
Groups
0
Followers
1
Following
1

Posts

Recent Best Controversial

  • nRF24Doctor
    B ben999

    So i spent some time on that subject this past weekend...

    Unfortunately I did not learn anything nor got any good outcome.

    Every sketch has been tested on two seperate bits of hardawre : my custom built nRFDoctor and a random Arduino Nano.

    Fresh install of Yveaux's sketches, with official script to create symbolic links.

    All compiled nicely but none got to connect to GW.

    On the other hand, both units managed to register to the GW with a very basic sketch (relay sketch).

    My Project transmission delays compare modules power consumption radio quality doctor range gateway location diagnose nrf24 radio

  • nRF24Doctor
    B ben999

    @OldSurferDude that is ever so kind of you to provide such quality support !!

    So far so good : i took a different path but got to the same point.

    Line 73 of nRF24DoctorNode.ino mentions

    #include <LCDMenuLib2.h>	// Download 1.2.7: https://github.com/Jomelo/LCDMenuLib2
    

    Compile error probably comes from here. I installed older version (current is 2.2.8, recommended is 1.2.7), as requested.

    I manually installed all the *.h files and got it to compile (with MySensors 2.3.2, any other older version would not compile).

    At that point did you upload that sketch to a nano+nrf for testing ?

    EDIT : that "mklink" thing is specific to Windows right ? Does it do more magic than just copying shared files at the root of the nRFdoctor's directory ? I only have Linux computers at home...

    My Project transmission delays compare modules power consumption radio quality doctor range gateway location diagnose nrf24 radio

  • nRF24Doctor
    B ben999

    @OldSurferDude thanks once again for taking time to understand my problem !

    Moving

    #include "shared/RadioConfig.h"
    

    after

    #include <MySensors.h>
    

    got me the following compile error

    In file included from /home/ben/Documents/Arduino/nRF24QualityMeter03/nRF24QualityMeter03.ino:58:0:
    /home/ben/Arduino/libraries/MySensors/MySensors.h:426:2: error: #error No forward link or gateway feature activated. This means nowhere to send messages! Pretty pointless.
     #error No forward link or gateway feature activated. This means nowhere to send messages! Pretty pointless.
      ^~~~~
    exit status 1
    
    Compilation error: exit status 1
    
    My Project transmission delays compare modules power consumption radio quality doctor range gateway location diagnose nrf24 radio

  • nRF24Doctor
    B ben999

    Quick update:
    -compiling with MySensors librairy ver 2.3.2 gives no error but my simple setup cannot reach GW with the following debug on serial monitor:

    0 MCO:BGN:INIT NODE,CP=RNNNA---,FQ=16,REL=255,VER=2.3.2
    4 MCO:BGN:BFR
    35 TSM:INIT
    36 TSF:WUR:MS=100
    43 TSM:INIT:TSP OK
    45 TSM:INIT:STATID=250
    47 TSF:SID:OK,ID=250
    49 TSM:FPAR
    72 ?TSF:MSG:SEND,250-250-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    137 MCO:BGN:STP
    151 TSF:WUR:MS=2000
    2080 !TSM:FPAR:NO REPLY
    2082 TSM:FPAR
    2105 ?TSF:MSG:SEND,250-250-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2166 MCO:BGN:INIT OK,TSP=0
    4113 !TSM:FPAR:NO REPLY
    4115 TSM:FPAR
    4139 ?TSF:MSG:SEND,250-250-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    6147 !TSM:FPAR:NO REPLY
    6149 TSM:FPAR
    6172 ?TSF:MSG:SEND,250-250-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    8180 !TSM:FPAR:FAIL
    8181 TSM:FAIL:CNT=1
    8183 TSM:FAIL:DIS
    8185 TSF:TDI:TSL
    18187 TSM:FAIL:RE-INIT
    18189 TSM:INIT
    18195 TSM:INIT:TSP OK
    18197 TSM:INIT:STATID=250
    18200 TSF:SID:OK,ID=250
    18202 TSM:FPAR
    18225 ?TSF:MSG:SEND,250-250-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    20233 !TSM:FPAR:NO REPLY
    20235 TSM:FPAR
    20258 ?TSF:MSG:SEND,250-250-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    22266 !TSM:FPAR:NO REPLY
    22268 TSM:FPAR
    22291 ?TSF:MSG:SEND,250-250-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    24299 !TSM:FPAR:NO REPLY
    24301 TSM:FPAR
    24324 ?TSF:MSG:SEND,250-250-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    26332 !TSM:FPAR:FAIL
    26333 TSM:FAIL:CNT=2
    26335 TSM:FAIL:DIS
    26337 TSF:TDI:TSL
    36340 TSM:FAIL:RE-INIT
    36342 TSM:INIT
    36348 TSM:INIT:TSP OK
    36350 TSM:INIT:STATID=250
    36354 TSF:SID:OK,ID=250
    36356 TSM:FPAR
    36379 ?TSF:MSG:SEND,250-250-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    

    and so on

    • compiling with MySensors librairy ver 2.2.0 (as mentionned in the sketch) gives me the following error:
    Compilation error: 'RF24_PA_LOW' was not declared in this scope
    
    • same error with MySensors librairy ver 2.3.0
    My Project transmission delays compare modules power consumption radio quality doctor range gateway location diagnose nrf24 radio

  • nRF24Doctor
    B ben999

    @OldSurferDude thank you very much for taking time to explain.

    I didn't make it clear enough from my side though.

    My "test" setup here is not the whole "nRF Doctor", as i got fed up with it !!

    Last night i just grabbed a Nano and a red nRF (eByte).

    Then loaded a random basic sketch and it got connected to GW straight away.

    After that i loaded @yveaux 's sketch and it never reached the GW (although changes were made to sketch, such as default channel (76), power level and transmission speed. These changes were made to files located in the "share" directory, that are called via "#include").
    Yveaux's sketch is based on API ver 2.2.0... latest stable is 2.3.2. So i tried different versions other than 2.3.2 but they all ended up with errors when compiling.

    I'll keep on digging tonight anyway (and report errors).

    My Project transmission delays compare modules power consumption radio quality doctor range gateway location diagnose nrf24 radio

  • Shower Monitor
    B ben999

    @OldSurferDude :D that's the smell of experience !

    Even though things come eventually to an end (with great sadness i'm afraid) this had to be addressed.

    What kind of flow do you measure then ?

    My Project

  • Shower Monitor
    B ben999

    I have a bunch of teenagers at home... showers can be (are in fact) endless.

    This can be analysed from different points of view : waste of money, waste of precious resources, waste of energy to heat that water, ...

    One could simply "lock" the amount of water allowed for one shower, by using a flow meter and an electric valve.

    Let's try a more civilised approch first: a visual way of knowing instantly the amount of water used.

    We shall use :

    • flow meter
    • arduino
    • 1 unit NeoPixel
    • power bank

    FlowMeter is connected to INT0. Once calibrated it gives "X pusles per minutes" which is the base for the whole program.
    LED will be glowing from blue to red. Quantity of water used can be modifed by user.
    Water flow can be paused and resumed during the wash.
    If a certain amount of time (user modified) is elapsed, the arduino goes to deep sleep and timers/counters are reset.
    This project has not been "MySensorised" yet but it might be.

    I am also willing to integrate the whole lot into the shower head and replace the flow-meter with a water-powered generator (to charge a supercap) and some hall effect sensor (to get pulses from the generator's magnets). An ATTiny85 would do the job!

    Here is the code, comments welcome to make it more efficient :

    #include <Adafruit_NeoPixel.h>
    #include <avr/interrupt.h>                        //libraires to manage sleep mode
    #include <avr/sleep.h>                            //libraires to manage sleep mode
    
    #define FLOW_PIN    2                             //waterflow sensor pin
    #define LED_PIN     A0                            //neopixel data pin
    #define LED_COUNT   1
    
    /***********************
     * user defined values *
     ***********************/
    uint32_t maxLitres = 50;                               // max water quantity.  led goes RED !
    const float pulsesPerLiter = 570.0;               // pulses per litre (adjust after calibration)
    unsigned long delayBeforeReset = 120000;          // delay between last pulse and going to sleep
    uint32_t startHue = 43690;                             // hue of blue ( 65536*2/3 )
    uint32_t endHue = 0;                                   // hue of red ( 0 )
    /***********************
    /*          end        */
     ***********************/
    uint32_t hueNow;
    float hueIncrementPerPulse;                       // = ( startHue - endHue ) / ( pulsesPerLiter * maxLitres
    float litres = 0;                                 // total water consumption given by "pulses" and "pulse per liter"
    volatile unsigned long totalPulses = 0;           // 
    volatile unsigned long prevTotalPulses = 0;       // last total of pulses before next pulse
    unsigned long timeOfLastPulse = 0;                // when the last pulse occured
    
    Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800); //data sequence GRBW
    
    void setup() {
      Serial.begin(115200);
      strip.begin();
      delay(200);
      strip.clear();
      strip.show(); // Initialize pixel to 'off'
      pinMode(FLOW_PIN, INPUT_PULLUP);
      attachInterrupt(digitalPinToInterrupt(FLOW_PIN), flowISR, RISING);
      hueIncrementPerPulse = ( startHue - endHue ) / ( pulsesPerLiter * maxLitres );
      Serial.print("hueIncrementPerPulse:");
      Serial.println(hueIncrementPerPulse); // 3 decimals
    }
    
    void loop() {
      /****************************
          water volume management
       ****************************/
      static unsigned long lastPrintMs = 0;
      unsigned long now = millis();
      if (now - lastPrintMs >= 1000) {
        noInterrupts();
        unsigned long pulses = totalPulses;
        interrupts();
        litres = pulses / pulsesPerLiter;
      }
      showHue();
      /********************
         sleep management
       ********************/
      if ( (millis() - timeOfLastPulse >= delayBeforeReset) && (totalPulses == prevTotalPulses)) {
        delay(200);
        enterSleep();
      }
      prevTotalPulses = totalPulses;
    }
    
    
    void flowISR() {
      totalPulses++;
      timeOfLastPulse = millis();
    }
    
    
    void showHue() {
      if( litres >= maxLitres ) {
        hueNow = 0;
      }
      else {
        hueNow = startHue - (totalPulses * hueIncrementPerPulse ) ;
      }
      uint32_t rgbcolor = strip.ColorHSV(hueNow);
      strip.setPixelColor(0, rgbcolor);
      strip.show();
     
    }
    
    
    void enterSleep(void)
    {
      sleep_enable();
      attachInterrupt(digitalPinToInterrupt(FLOW_PIN), pin2Interrupt, LOW);  // Setup pin2 as an interrupt and attach handler
      set_sleep_mode(SLEEP_MODE_PWR_DOWN);
      strip.clear();
      strip.show(); // Initialize pixel to 'off'
      totalPulses = 0;
      litres = 0;
      timeOfLastPulse = millis();
      delay(1000);
      sleep_cpu();
      /* Program will start from here on after wake up */
      sleep_disable();
      }
    
    
    void pin2Interrupt(void)
    {
      Serial.println("Exiting sleep");  // This will bring us back from sleep
      detachInterrupt(0);  // We detach the interrupt to stop it from continuously firing while the interrupt pin is low.
      attachInterrupt(digitalPinToInterrupt(FLOW_PIN), flowISR, RISING);
    }
    

    I am using "Hue" instead of "RGB" as it simplifies a lot the process of following a ranibow !

    My Project

  • Piezzo siren/alarm
    B ben999

    @TheoL thanks a lot for your suggestions

    Unfortunately this is way above my league
    And i'm not brainy enough to modify his design

    I am using that same transistor mentionned in @Anticimex 's post

    My question was very general : does a transistor leak and by how much (is that a figure even given is the specs sheet?)

    Thanks you anyway for replies

    Hardware

  • Piezzo siren/alarm
    B ben999

    Next step is to measure battery voltage on a daily basis.

    Current setup is as follow:

    • Pro Mini 8MHz 3.3V (regulator removed)
    • Single cell LiPo (4.2V)
    • Solar panel (unknown specs)
    • Solar charger/boost to 5.0V based on 4056 chip

    My reference for this part of the project is this post :
    @Anticimex said in New library to read Arduino VCC supply level without resistors for battery powered sensor nodes that do not use a voltage regulator but connect directly to the batteries ;-)

    I would like to activate the voltage divider on demand, via a transistor (NDP6020P as per previous link) as to not draw voltage 24/7 on a permanent divider.
    I am also considering using AVR's internal 1.1V reference to measure the voltage.
    Simulation gives this: link to falstad
    circuit-20260319-1115.png

    As one looks at the "live" simulation one can notice that the transistor leaks a bit... a few mV.. that's the bit that worries me.

    Is this a flaw from the calculation or does a transistor leak anyway ?

    Thanks a lot for your suggestions !

    Hardware

  • Piezzo siren/alarm
    B ben999

    back at it !

    I got my LCD microscope out and tried to reverse-engineer the original board. I should have done that to start with.

    I drew that circuit on www.falstad.com (this link takes you to my actual circuit) and got several kV out of the simulation lol.

    I used the original transformer: i could only measure resistance, so 5,5ohms on primary side, and 195ohms on secondary.

    First transistor hooked to wave generator is J3Y. I replaced it with a BC547 (the "copy-paste" engineer hidden inside my head told me it's fairly close lol).

    Second transistor is labeled J41CG and seems pretty strong to me so i replaced it with TIP120 .

    buzz01.png

    Next I put all these components onto the breadboard, and load my favourite Nano with this sketch :

    const int buzzerPin = 9;
    int i = 0;
    unsigned long duration = 1000;
    
    void setup() {
      pinMode(buzzerPin, OUTPUT);
    }
    
    void   loop() {
      for (i = 1000; i < 5000; i++) {
        tone(buzzerPin, i, duration);
      }
      for (i = 5000; i > 1000; i--) {
        tone(buzzerPin, i, duration);
      }
    }
    

    That is ever so LOUD !!

    So this is plenty good enough for my little project !

    next step

    Hardware

  • nRF24Doctor
    B ben999

    @OldSurferDude as long as we’re using nRFs this project is still relevant :D

    I am now facing some more troubles:

    The nRFNode cannot connect to GW.

    Looks like a software issue. The exact same setup connects to GW when loaded with a very basic sketch (relay in my case). I am using @yveaux 's sketch from his Github.
    Could this sketch not be compatible with today's API ?

    My Project transmission delays compare modules power consumption radio quality doctor range gateway location diagnose nrf24 radio

  • nRF24Doctor
    B ben999

    I might be able to answer that myself !

    Looks like i have forgotten to "combine" a .ino file (CharLcdMenu.ino) with the main one (nRF24DoctorNode.ino), which seems to be a bit like a sub-program.

    edit: that's it. Just had to create a second TAB with that sub-program, compile and success.

    Please forgive my lack of vocabulary and knowldge, i am a "copy-paste" engineer :D

    My Project transmission delays compare modules power consumption radio quality doctor range gateway location diagnose nrf24 radio

  • nRF24Doctor
    B ben999

    Sorry to necro this old post :(
    I have just uploaded @yveaux's version of nRF24 doctor to a Nano.

    @Yveaux said in nRF24Doctor:

    https://github.com/TechNovation01/nRF24Doctor/blob/master/pcb/nRFDoctor_1.1_sch.pdf

    I got all the right libraries installed into IDE (especially LCDMenuLib2.h version 1.2.7, i also tried several other versions close to 1.2.7 just to be sure).
    But when compiling i get the following errors :

    /tmp/ccMpih6l.ltrans0.ltrans.o: In function `global constructors keyed to 65535_0_nRF24QualityMeter03.ino.cpp.o.3416':
    <artificial>:(.text.startup+0x19a): undefined reference to `lcdml_menu_display()'
    <artificial>:(.text.startup+0x19c): undefined reference to `lcdml_menu_display()'
    <artificial>:(.text.startup+0x1a6): undefined reference to `lcdml_menu_clear()'
    <artificial>:(.text.startup+0x1a8): undefined reference to `lcdml_menu_clear()'
    collect2: error: ld returned 1 exit status
    exit status 1
    Erreur de compilation pour la carte Arduino Nano
    

    That is a bit above my knowledge. Could someone please point me into the right direction? Could it be just a case of "wrong naming" of variables ?

    My Project transmission delays compare modules power consumption radio quality doctor range gateway location diagnose nrf24 radio

  • ic package and power consumption
    B ben999

    @OldSurferDude sorry i got you in the wrong direction !

    I am just building my own alarm unit for home protection. I bought a unit from aliX and salvaged enclosure, solar pannel and a few components (LEDs, piezzo, ...). I am no finalizing the PCB.

    Back to your project : please share your knowledge as i am in deep thinking about an off-grid capable solar system. It would make sense to have capability for external inputs such as ethanol-powered generator and wind turbine on top of solar panels. I also want a fairly big battery pack (for peace of mind and also to preserve it from deep discharge).

    Can't you find any serial-data connector somewhere on your power panel ?

    General Discussion

  • ic package and power consumption
    B ben999

    @monte thanks a lot for your answer

    That suits me perfectly :)

    General Discussion

  • ic package and power consumption
    B ben999

    Size matters ?

    My question is about one specific point : does a bigger package consume more power ?

    I am in the process of replicating a solar/battery circuit and adapting it to my needs (and mysensors of course).

    I won't be able to solder tiny SMDs... so i chose bigger SMDs and even through-hole components (mainly resistors and transistors).

    Will selecting the exact same component but in a bigger package affect overall power consumtion ?

    Or are internal bits dimensioned identical ?

    Thanks a lot

    General Discussion

  • Drive household SSR with SSR and Arduino
    B ben999

    Quick update: i wanted to hide and protect the Nano in a housing.
    Aliexpress supplies very nice enclosures that fits on Din rails.
    https://fr.aliexpress.com/item/1005005505247992.html

    They fit in electrical cabinets thanks to standard dimensions.

    A.png
    B.png

    One 3Dprinted part later (glued inside enclosure) and the Arduino is safely held in place!

    C.png
    D.png
    5.png

    stl file of adapter :
    dinRailEnclosureMountForNano-revE.stl

    Hardware

  • Drive household SSR with SSR and Arduino
    B ben999

    @OldSurferDude
    Thanks a lot for your time. I am very impressed by the amount of research !!

    In the end I still can not confirm whether this relay is noiseless/mechanical or just based on electronic components (triacs).

    Good news is that this Legrand noiseless relay can be driven by a mechanical relay or by a tiny SSR. I chose a SSR unit with a DinRail mount. Looks all very professional in the electrical cabinet.
    SSR.png

    I have also added an optocoupler to check the state of the light and sent it back to openHab: input is connected to lightbulb wires and signal is connected to Arduino. Works all fine!!
    Capture d’écran du 2026-01-11 20-58-23.png

    Next step is to receive optocoupler with DinRail mount !!
    opto.png

    Hardware

  • Drive household SSR with SSR and Arduino
    B ben999

    @OldSurferDude thanks a lot for your input.

    You are right. I remember reading this as well. SSRs need a minimal load on output side in order to latch properly

    I chose these relays because of noise: the electric cabinet for circuit breakers and relays is located next to the bedroom. At first cabinet was filed with mechanical 240V AC relays 😂 🤯

    I will have a second try with the tiny Omron Chinese clones, in case they need much less load to latch properly.

    Thanks a lot for you help 👍🏻
    I’ll come back here to conclude (either Omron SSRs or mech style relays).

    Hardware

  • Drive household SSR with SSR and Arduino
    B ben999

    I need a bit of advice here please.

    Long story short : what are the limitations for driving an SSR with an SSR ?

    Long story : I have an AC ceiling light powered by a DinRail Relay (latching relay module ?). That relay is driven by numerous 240V AC wall switches as per following drawing.
    telerupteur01.jpg

    Then enters MySensors!! Arduino and chineese SSR (input 3 to 32V DC, output AC 240V).
    telerupteur02.jpg

    DinRail relay still reacts with wall switches but not with Arduino+SSR...
    Fun fact : multimeter reads 150V at wall switch contacts (between orange and red line). This setup has been working flawlessly until now so i guess it is normal behaviour.

    I have read somewhere that these SSRs (based on triacs) only switch on when load voltage gets to zero... i'm not sure i fully understand and i am here asking you whether that's the reason why it doesn't work as expected and what would be the way to get this right.

    Thanks a lot for your input !

    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