Navigation

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

    Posts made by fsgraz

    • RE: RS485 transmit errors

      @sebastieng too much load ? one 120ohm on the far one should be enough

      posted in Troubleshooting
      fsgraz
      fsgraz
    • RE: Getting Better Range with NRF24L01 Modules

      @sindrome73 in the gateway and the nodes you have a

      #define MY_RF24_DATARATE RF24_250KBPS

      The default value is RF24_1MBPS.
      Just add the line above if it's not in your sketches
      Both gateway and nodes must be set to the same speed.

      Buon divertimento!

      posted in My Project
      fsgraz
      fsgraz
    • RE: Getting Better Range with NRF24L01 Modules

      lower the speed, it makes a huge difference.
      also, check the nRF24 power supply.

      posted in My Project
      fsgraz
      fsgraz
    • RE: Flame Sensor Not Triggering Setup

      @Jordan22xx do you mean via Serial Monitor from the pro mini ? if it works that would exclude hardware issues. do you poll the pin in the loop ? do you use an interrupt pin ?
      I would exclude problems with the mysensors library. is the gateway recognized by the controller ? Check if the node is registered and the sensor presentation works.

      posted in Troubleshooting
      fsgraz
      fsgraz
    • RE: Some questions on how gateway works

      @mfalkvidd I got what you mean.
      Yes, I am using the tcp connection using the mySensors serial API, not the USB<>UART serial interface 😉

      I am running a gateway with the nRF24 at 1Mpbs for the fast & furious sensors (mainly energy meters); another at 250kbps for the battery supplied nodes (temp/hum and door sensors); another one at 1Mbps dedicated to the actuators / mission critical.
      60 nodes running

      Another on is a BLE<>Mysensors bridge between the Mopeka Tank Pro (2) and the TPMS (4)
      Another one is a fauxmo<>Mysensors bridge.

      A few esp32 based displays (round oled, 3.5", 7")

      🙂

      posted in Home Assistant
      fsgraz
      fsgraz
    • RE: Some questions on how gateway works

      @mfalkvidd thanks.

      I am happily running 6 esp32 WiFi gateways with nRF24L01+, but with the mysensors serial protocol, not mqtt. I don't see any value on MQTT for a local system based entirely on mysensors like mine, but I might be wrong and don't see the potential.

      I have a couple of them working as bridges, like between BLE sensors and mysensors, or Alexa an mysensors, meteo RSS Feed etc.

      posted in Home Assistant
      fsgraz
      fsgraz
    • RE: Keen to build again

      It depends a lot on what you can do. As @OldSurferDude wrote, if you want a cheap solution, this is the way to go. Also when you need something that is not available on the market. Here below the list of my camper nodes.

      IMO mySensors is the best possible alternative, if not the only one, to the systems that rely on standards, which require way too many resources for the job they are asked.

      In my case, several nodes have edge capabilities, because they have to keep working even if the controller is not responsive.

      fceb57d7-b24b-424e-88e4-b35b07281499-image.png

      posted in General Discussion
      fsgraz
      fsgraz
    • RE: Code Garage to the rescue.

      it is up and running

      posted in General Discussion
      fsgraz
      fsgraz
    • RE: Some questions on how gateway works

      let me also add that if the serial protocol is possible with an ethernet gateway, I would prefer that, w/o messing with MQTT.

      posted in Home Assistant
      fsgraz
      fsgraz
    • RE: Some questions on how gateway works

      Maybe is a silly point, but the node presents itself to the gateway, and afterwards you should see your node in your controller. The node ( in myController V1 that is my choice) I see the node's registration status as New. I need to edit the node properties and change the node status to Registered. After that the sensors show up.

      there's also an inclusion mode in the gateway if this is not possible with Vera:

      // Enable inclusion mode
      //#define MY_INCLUSION_MODE_FEATURE

      // Enable Inclusion mode button on gateway
      //#define MY_INCLUSION_BUTTON_FEATURE
      // Set inclusion mode duration (in seconds)
      //#define MY_INCLUSION_MODE_DURATION 60
      // Digital pin used for inclusion mode button
      //#define MY_INCLUSION_MODE_BUTTON_PIN D1

      https://www.mysensors.org/build/advanced_gateway

      posted in Home Assistant
      fsgraz
      fsgraz
    • RE: CHATGPT My new best friend!

      Fully agree with you about the library. The best one for sensors, amazingly stable and openly useable with lots of controllers.

      And the combo ATmega328P + nRF24L01+ just great.

      posted in General Discussion
      fsgraz
      fsgraz
    • RE: Code Garage to the rescue.

      @TheoL I wish nRF will be supported for longer time. Maybe just be free to specify the payload lenght instead ?

      But I am with you on wishing for MySensors protocol over wifi with extendable lenght.

      posted in General Discussion
      fsgraz
      fsgraz
    • RE: Status of my rv(camper) home automation system 2020-2025

      @OldSurferDude same here 😬

      posted in My Project
      fsgraz
      fsgraz
    • RE: Status of my rv(camper) home automation system 2020-2025

      @fsgraz I have also a system with temperature and humidity sensors at home, but I don't think I will improve that

      posted in My Project
      fsgraz
      fsgraz
    • RE: Status of my rv(camper) home automation system 2020-2025

      @TheoL I use the nRF24L01+ because my use case is my RV, which is 6m long and 2m wide, so the radios are all working at the lowest power level

      posted in My Project
      fsgraz
      fsgraz
    • RE: Status of my rv(camper) home automation system 2020-2025

      @TheoL thank you !

      for me this excellent platform is all but dead.
      I just ordered 10 nRF20L01+ and 10 SI24R1 modules in SMD form factor, just in case.

      posted in My Project
      fsgraz
      fsgraz
    • Status of my rv(camper) home automation system 2020-2025

      I'd like to share with you the figures after 6 years of dedicated work to my system:

      controller: #mycontroller v1
      database: influxDB v.1.8
      visualisation: grafana v.9.3.2
      events and mobile UI: node-red
      peer-to-peer VPN: ZeroTier One

      5 gateways
      3 displays
      52 nodes
      392 sensors

      935 sensor data/minute

      Hardware:
      Beelink SLIM-T4PRO Windows 10 Pro
      ESP32
      Arduino Nano
      Arduino RF-Nano
      Arduino Mini
      Radio nRF24L01+
      Mobile router Teltonika RUT241 E-SIM

      Thank you MySensors !

      posted in My Project
      fsgraz
      fsgraz
    • RE: Why is the output of ACS712 current measurement module unchanged?

      @ZenBlizzard in case you are measuring the output with a multimeter, you will get an averaged level, since AC current waveform should be sinusoidal and overlapped with the Vcc/2->2.56V in your case.
      To measure the current you need a decently high sampling and some math.

      #define SENSITIVITY	66		// mV/A
      
      const float readings = 5;
      const float alpha = 2.0 / (2 * readings + 1); 
      
      for (ifor = 0; ifor < 250; ifor++)
      	{
      		// Voltage
      		voltageSampleRead = analogRead(V) * vccRead / 1023 - vccRead / 2;	/* read the sample value including offset value*/
      		voltageSampleSum = voltageSampleSum + sq(voltageSampleRead);		/* accumulate total analog values for each sample readings*/
      		voltageSampleOffsetSum = voltageSampleOffsetSum + voltageSampleRead;
      		
      		// Current
      		currentSampleRead = analogRead(I) * vccRead / 1023 - vccRead / 2;	/* read the sample value including offset value*/
      		currentSampleSum = currentSampleSum + currentSampleRead * currentSampleRead;		/* accumulate total analog values for each sample readings*/
      		currentSampleOffsetSum = currentSampleOffsetSum + currentSampleRead;
      
      		wait(1);
      
      
      	}
      
      	voltageMean = voltageSampleSum / ifor;				/* calculate average value of all sample readings taken*/
      	voltageOffset = voltageSampleOffsetSum / ifor;
      	reading = (sqrt(voltageMean) - voltageOffset) * 230.0 / 1.0;		// read voltage / reported voltage.
      	voltage = round_to_dp(alpha * reading + (1 - alpha) * voltage,1);
      	Serial.println(voltage);
      	if (voltage < 25) voltage = 0;
      
      	currentMean = currentSampleSum / ifor;				/* calculate average value of all sample readings taken*/
      	currentOffset = currentSampleOffsetSum / ifor;
      	reading = (sqrt(currentMean) - currentOffset) / SENSITIVITY * 1000 - currentZeroOffset;		// subtract no load current.
      	if (reading < 0) reading = 0;
      	current = round_to_dp( alpha * reading + (1 - alpha) * current,2);
      
      posted in General Discussion
      fsgraz
      fsgraz
    • RE: Sensor to detect marijuana vape/smoke

      @Hellmark I have a sensor with a dust sensor, and it detects sigarette smoke pretty well.
      I use it in my RV and act on the fairing vents.

      posted in Hardware
      fsgraz
      fsgraz
    • RE: A low cost energy meter

      @OldSurferDude yes, you are correct. this sensor is capable of 50A continuous, which safely I would make it working at 40A max., but for such an important load as in your case I would go for a beefier one, like the ACS75x, 77x, but at this point I would also change the node's form factor for space and insulation reasons.

      On my application on the RV I have a max. curr. of 13A running on a AWG14-16 cable (European rules for RVs), so I did not ask myself too many questions beside, of course, safety.

      About the signal, it will be a sinusoidal signal swinging around Vcc/2.
      Vcc can be easily measured internally on the ATmega328. On all my DC sensors I measure Vcc at every loop, just before measuring the ADCs.

      Honestly, when the space is not an issue like in my RV, I would rather use a ring core current transformer, and I would get rid of noise, response time, power dissipation, but over all no need to cut any cable.

      Long story short, it has been a nice experiment and I used it for 6 months, and then I switched back to my RF-NANO based RS485-Modbus - Mysensors bridge connected to an off-the shelf power analyzer.

      Just for fun I attach a pic of my 12Vdc sensors installed on my RV. Forgive me for the spaghetti wiring on the right side, but this is an area that needs improvement.
      IMG_20231008_120026.jpg

      posted in My Project
      fsgraz
      fsgraz
    • RE: Water Filtering and Sterilization and Hot Water Recirculation

      @OldSurferDude thank you !

      posted in My Project
      fsgraz
      fsgraz
    • RE: A low cost energy meter

      bcb4cc66-7eca-46da-a476-593acf3e35d2-image.png
      4275839e-30d4-4782-9c31-7d6340a25a84-image.png

      posted in My Project
      fsgraz
      fsgraz
    • RE: A low cost energy meter

      I saw on your git page that you were looking for a HW.
      @OldSurferDude would something like this work ? The schematic is very similar.
      I would just need to move the current sensor a bit far from the connector, in case of a new PCB order is required
      34c9dad0-ad76-4513-bcd9-0bf7193b6ec0-image.png

      posted in My Project
      fsgraz
      fsgraz
    • RE: Water Filtering and Sterilization and Hot Water Recirculation

      @hlehoux thank you 😊

      posted in My Project
      fsgraz
      fsgraz
    • Alexa Fauxmo - Mysensor Bridge Gateway / BLE - Mysensors Bridge Gateway

      In my RV I use #mysensors and #mycontroller V1.

      A few times I wished I could switch on/off remotely a few subsystems (water, solar, geofencing and alarms to name a few) without needing to access mycontroller from remote.

      So I took off from my ideas shelf an old experiment with Fauxmo and Alexa Echo Dot gen 3.

      Alexa Echo Dot embeds a WiFi gateway for Hue lights. Fauxmo Arduino library allows to fake these lamps, and works on ESP8266 and ESP32. Perfect for our MySensors.

      So I simply created a Mysensors Gateway with 16 Dimmer local sensors, and added the Fauxmo library and created 16 fake ("faux") lamp devices.
      When an Alexa event is detected, and the event send()s the lamp status to the controller.
      When the GW receive()s a dimmer sensor event from the controller, the dimmer state is sent to Alexa.

      Alexa needs to receive a device update at least every minute, so a simple software timer in the loop() is in charge for this.

      A couple of years ago I created a BLE - Mysensors Gateway which scans my Gas Tank sensors over BLE and sends the sensors data to the Controller.

      Both projects consist of ESP32 dev boards without any additional HW, in a nice and simple 3D printed enclosure bought on Ebay.
      9b5a2968-c369-4730-83cf-bdc659cc12fb-image.png

      posted in My Project
      fsgraz
      fsgraz
    • Water Filtering and Sterilization and Hot Water Recirculation

      My RV is under restoration, so now or never. I wanted to experiment a bit out of the pure sensorics and iot and try another interesting use case:

      1. 12V water boiler - in series with the Truma Combi gas boiler
      2. wireless node to handle the boiler power supply (see the link above)
      3. water tank loading with pre-filter, valve, pump and 1-stage filter
      4. water filter, ultra-violet sterilizer, thermostatic mixer and warm water recirculation.

      This new node handles the water loading, starting the valve and the pump via a push button, and stopping after 10' or when a Tank Full capacitive sensor is enabled.
      A water flow sensor switches on the UVC water sterilizer for a minimum of 15' (to save power and minimize the amount of power cycles applied to the UVC lamp).

      Three temperature sensors measure the temperature on the hot water delivery and return, and the connection between the Truma Combi boiler and the electric boiler.
      The purpose is to keep the hot water always ready at the taps, keep the boilers water at the same temperature when needed and a few more other cases.

      A pressure sensor inhibits the recirculation pump and the UVC Lamp if the pressure is too low.

      This time I've pushed myself out of the comfort zone.
      IMG_20240707_095604.jpg IMG_20240628_072428.jpg

      posted in My Project
      fsgraz
      fsgraz
    • Auxiliary Loads and Mains Charger Controller for my Smart Mobile Home

      A simple node to enable/disable the 12V power supply to auxiliary non vital loads (e.g. water boiler) based on the service battery voltage. A relay is controlled by the presence of a charging source.
      Additionally, in presence of other charge sources, the Mains Charger is disconnected from the Service Battery. The Mains Charger relay is enabled if there are no other charge sources and the camper is connected to the Shore Power.

      There are 2 additional analog voltage input.

      I tend to create edge nodes, with full capability of serving the desired use cases, even if Gateway/Controller are down. In this case I can Arm/Disarm some automations from the controller using S_DOOR sensor types.

      IMG_20240106_132129.jpg AuxRelaysController.PNG AuxRelaysController.jpg

      posted in My Project
      fsgraz
      fsgraz
    • RE: What did you build today (Pictures) ?

      Finally I had the time to refine it:
      IMG_20220825_151637.jpg IMG_20220825_151528.jpg

      posted in General Discussion
      fsgraz
      fsgraz
    • RE: Arduino Nano Every problem

      Given the chip shortage of ATmega328, would the ATmega4809 architecture support be developed ?
      The advantages of Arduino Nano Every is undeniable for non-battery-supplied nodes

      posted in Hardware
      fsgraz
      fsgraz
    • ESP WiFi hung solution

      This is how I solved the issue of ESP32 GW hanging when WiFi connection is lost or not established. It is not 100% my original work, it has been put together using bits and pieces, but it works.

      I simply use a watchdog timer:

      #include "esp_system.h" // added for WDT
      hw_timer_t* timer = NULL;
      
      // WDT related
      void IRAM_ATTR resetModule() {
      	Serial.println("reboot\n");
      	ESP.restart();
      }
      
      void WdtReset()
      {
          timerWrite(timer, 0); //reset timer (feed watchdog)
      }
      
      void StartWatchDog()
      {
          timer = timerBegin(0, 240, true); //timer 0, div 80
          timerAttachInterrupt(timer, &resetModule, true);
          timerAlarmWrite(timer, 5000000, false); //set time in us
          timerAlarmEnable(timer); //enable interrupt
      }
      
      IPAddress ConnectWiFi()
      {
          Serial.println();
          Serial.println();
          Serial.print("Connecting to ");
          Serial.println(MY_WIFI_SSID);
      
          /* Explicitly set the ESP to be a WiFi-client, otherwise, it by default,
             would try to act as both a client and an access-point and could cause
             network-issues with your other WiFi-devices on your WiFi-network. */
      #ifdef ESP32
          WiFi.persistent(false);
          WiFi.mode(WIFI_STA);
      #endif // ESP32
      
          WiFi.begin(MY_WIFI_SSID, MY_WIFI_PASSWORD);
      
      
          while (WiFi.status() != WL_CONNECTED) {
              digitalWrite(LED_BUILTIN, LED_ON);
              wait(500);
              Serial.print(".");
              digitalWrite(LED_BUILTIN, LED_OFF);
              wait(500);
          }
      
      #ifdef ESP32
          WiFi.setAutoReconnect(true);
      #endif // ESP32
      
          return WiFi.localIP();
          
      }
      void before()
      {
      
          StartWatchDog();
      
          // We start by connecting to a WiFi network
          localIP = ConnectWiFi();
          myHostname = WiFi.getHostname();
      
          WdtReset();
      
          Serial.println("");
          Serial.println("WiFi connected");
          Serial.println("IP address: ");
          Serial.println(localIP);
          Serial.println(myHostname);
      
      // do other stuff ...
      
      }
      
      void loop()
      {
         
      
          // check WiFi connection
          if (WiFi.status() != WL_CONNECTED) return; // the WDT is not reset
          WdtReset();
      
      // do other stuff ...
      }
      

      Hope it helps

      posted in Development
      fsgraz
      fsgraz
    • RE: What did you build today (Pictures) ?

      Some updates in almost one year.

      I moved all the gateways and controller part in a most suitable locationIMG_20220305_110252.jpg

      I've created a dual current sensor for the fuse box and the inverter. Each Current sensors can withstand 90A max, so I used both channels in parallel. The sensors are defined for both Channel 1, 2 and Sum(Ch1+Ch2) to handle this case easily
      IMG_20210824_172723__01.jpg
      Recently I made an updated version of my Photovoltaic monitor since the 20A that the old one could withstand are not enough now, so the new version is capable of 50A max. Still waiting the Hall sensors though...
      IMG_20220526_175957.jpg
      Finally, I cleaned up a bit the deployment under the bench
      IMG_20220527_161849.jpg but I am not done yet

      posted in General Discussion
      fsgraz
      fsgraz
    • RE: What did you build today (Pictures) ?

      the display node for my camper, based on a Arduino Mega clone
      IMG_20210704_080638.jpg

      posted in General Discussion
      fsgraz
      fsgraz
    • RE: What did you build today (Pictures) ?

      A collection of the sensors and actuators I buit for my camper in the past year

      the power supply system under the dinette seat
      IMG_20210306_181846.jpg IMG_20200308_151728.jpg
      the battery management system (purchased) data are read via wifi by an ESP32, which reports the info to the GW via nRF24L01+.

      a closed look at 2 sensors.
      the one on the left reads voltage and current from the solar PV panel and to the battery management system
      IMG_20210306_181903.jpg
      the one on the right reads voltage and current from/to the start and service batteriers
      both sensors report instant power and energy.

      Fresh water sensor reads the water level, flow and temperature.
      has 4 optcoupled outputs to send the information to the 4 LEDs of the original control panel of the camper
      IMG_20210306_112850.jpg IMG_20210306_112844.jpg

      gray water tank sensor reports water level with an ultrasound sensor. has an optocoupled output to the "full" LED of the original control panel
      IMG_20210316_175523.jpg IMG_20210316_175427.jpg

      bettry supplied temperature and humidity sensor.
      I use it in the fridge but also at home, where I have also one with BME280.
      IMG_20210414_081625.jpg IMG_20210414_081617.jpg

      A fan controller to help the fridge to work better, controlling the condenser temperature using an optical thermometer sensor.
      I have 3 other units, one in the power supply system, one in the closet and one on the roof.
      They are all with a PID controller.
      IMG_20210503_095913.jpg IMG_20210313_153635 (2).jpg IMG_20210313_153612 (2).jpg

      posted in General Discussion
      fsgraz
      fsgraz
    • A few sensors for my camper (pandemic lockdown edition ...)

      IMG_20210306_181941.jpg IMG_20210306_181934.jpg IMG_20210306_181903.jpg

      Charge Monitors
      Batteries Monitor
      Controller and Mobile Router
      IMG_20210306_112850.jpg
      Fresh Water Level Monitor
      IMG_20210313_153635 (2).jpg IMG_20210313_153612 (2).jpg
      Fridge Fan Controller
      IMG_20210305_161539__01.jpg IMG_20210305_161353__01.jpg
      Display

      posted in General Discussion
      fsgraz
      fsgraz
    • RE: RF Nano = Nano + NRF24, for just $3,50 on Aliexpress

      Hello,

      I use the RF-NANO widely in my sensors. At the beginning of the year I reordered 10 pcs and I got the new version.
      I discovered that between V1 (bought in 2019) and V2 (bought in 2020) D9 and D10 are reversed between the 2 versions.

      V1

      345a0528-8275-4ea3-897c-aab1acaea237-image.png

      V2
      48866489-e593-400c-8bf4-b2cdd5615bd6-image.png

      links:
      https://github.com/emakefun/emakefun-nano-plus/blob/master/RF-Nano/Schematic/RF-Nano-Schematic.pdf
      https://github.com/emakefun/rf-nano/blob/master/RF-Nano-Schematic.pdf

      Hope it helps.
      Franco

      posted in Hardware
      fsgraz
      fsgraz
    • RE: Project enclosures

      This is my temperature-humidity-pressure sensor in a 1151v3wh enclosure.
      IMG_20210228_171133.jpg

      posted in Hardware
      fsgraz
      fsgraz