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
K

KevinT

@KevinT
Unfollow Follow
About
Posts
45
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • None nnn Node in Home Assistant
    K KevinT

    Good stuff. Which coin cell are you using? What transmit power?

    Home Assistant home assistant nrf5 nrf52832 node

  • None nnn Node in Home Assistant
    K KevinT

    Given that the nrf52832 is a fairly fast processor (ARM Cortex M4), I can see how that might happen, depending on the speed of the gateway and controller. That's why I asked @oldsurferdude what he's running. I'm running a Pi4 with Home Assistant OS and 2 serial gateways, 915Mhz and 2.4Ghz. My 2.4Ghz gateway consists of an ESP8266 with an nRF24L01P module. So far, I haven't had any lost messages, but it's early days for me, just testing out the hardware. I've been running with DEBUG off.

    I'm also trying to determine battery requirements. Here's what I've found for current for various peripherals.
    Bare bones mySensors sketch, with sleep, serial disabled: 2 uA
    Bare bones mySensors sketch, with sleep & serial: 7.5 uA
    sketch with I2C, sleep, serial disabled, ic2 disable/enable: 2 uA
    sketch with I2C, sleep & serial, ic2 disable/enable: 8.4 uA
    sketch with I2C, sleep & serial disable/enable, ic2 disable/enable: 2 uA
    sketch with digital interrupt, sleep, serial disabled: 7.6 uA
    sketch with digital interrupt, sleep, serial: 3.5 mA !
    sketch with digital interrupt, sleep, serial disable/enable: 7.6 uA
    sketch with spi, sleep, serial disabled: 2 uA
    sketch with spi, sleep, serial : 3.1 mA !
    sketch with spi, sleep, serial disable/enable: 2 uA

    Basically, if you are using serial output, always disable it before sleep, and re-enable upon wake.
    Current draw is normally 2 uA when sleeping. If you are using digital input interrupts, sleep current is 7.6 uA.

    Home Assistant home assistant nrf5 nrf52832 node

  • None nnn Node in Home Assistant
    K KevinT

    Good to know. I'll have to check and see if all my sensor measurements are getting through to ha. Out of curiosity, what hardware are you using for your gateway and controller?

    Home Assistant home assistant nrf5 nrf52832 node

  • None nnn Node in Home Assistant
    K KevinT

    I ran into a problem while testing out an nRF52832 board with home assistant. Sometimes, when a new node connected, it would show in Home Assistsant as None nnn (where nnn is the node number) with only a battery sensor and no other sensors. Looking in the mysensors.json file, I found the sensors were defined but the sketch_name was "null".

        "211": {
            "sensor_id": 211,
            "children": {
                "0": {
                    "id": 0,
                    "type": 6,
                    "description": "Temperature",
                    "values": {
                        "0": "22.99"
                    }
                },
                "1": {
                    "id": 1,
                    "type": 8,
                    "description": "Pressure",
                    "values": {
                        "43": "kPa",
                        "4": "101.86"
                    }
                }
            },
            "type": 17,
            "sketch_name": null,
            "sketch_version": "1.0",
            "battery_level": 0,
            "protocol_version": "2.3.2",
            "heartbeat": 0
        }
    

    The sketch name is set by sendSketchInfo(), which made me think that this message was getting lost sometimes, perhaps the transport message system was still processing previous messages.
    I added a 10ms wait, and the problem was solved, the nodes now consistently register with home assistant.

    void presentation()  {
      // Send the sketch name & version information to the gateway and Controller
      wait(10);		// allow transport to setup, sometimes sketch info is being lost
      sendSketchInfo("BMP280 Sensor", "1.0");
    
      present(CHILD_ID_TEMP, S_TEMP, "Temperature");
      present(CHILD_ID_PRES, S_BARO, "Pressure");
    }
    

    I just thought I would share this, in case others run into the same problem.

    Home Assistant home assistant nrf5 nrf52832 node

  • 💬 Easy-Peasy Amplified MySensors Serial Gateway
    K KevinT

    Yes, Lol, you have 2 PRs but both have issues. I looked, but I didn't manage to find them on Github/MySensors. I did read that espressif updated their esp8266 core to use standard Arduino yield functions. I guess it's related to that.

    OpenHardware.io

  • 💬 Easy-Peasy Amplified MySensors Serial Gateway
    K KevinT

    Hi @mfalkvidd
    I rolled back the esp8266 library to 2.6.2 and it compiles.
    Is there an upcoming release to fix this?
    Thanks :-)

    OpenHardware.io

  • 💬 Easy-Peasy Amplified MySensors Serial Gateway
    K KevinT

    I know this thread is old but it seems the most relevant. I just tried to compile the standard GatewaySerial.ino sketch using Wemos D1 mini as board type and I get error:

    MyMainESP8266.cpp:95:9: error: 'cont_can_yield' was not declared in this scope;
    

    I'm using MySensors Library v2.3.2

    I'm assuming this used to work. Is it broken or I am doing something wrong?

    OpenHardware.io

  • Outdoor Motion Sensor - Surprisingly Good
    K KevinT

    Hi,
    The sensor has a lux setting you can adjust to block triggering during daylight, but I just add an "after sunset" condition to my automation script to prevent daylight triggering.
    PIR settings.png
    On AliExpress:
    PIR no base
    PIR with base

    My Project

  • Outdoor Motion Sensor - Surprisingly Good
    K KevinT

    Hi everyone,

    I've wanted to add an motion sensor overlooking my driveway to turn on the outside lights when I return home at night. I wanted something I could integrate into my home automation system, not exterior lights with built in motion sensors.
    My search for outdoor motion sensors that could be wired into a MySensors node yielded few results. I have previously used Panasonic pir sensors but they don't work with direct sunlight.
    panasonic pir.png

    I ended up ordering a sensor on AliExpress.
    Aliexpress Motion Sensor.png
    I selected the 12V model, expecting I would need to supply both 12V and 3.3V to my node. Out of curiosity, I tried running the sensor on 5V, and to my surprise, it worked fine. Deciding to push my luck, I tried 3.3V and again, it worked fine!

    I installed the sensor last fall and it has been working great for 7 months now.
    20260106_102421.jpg
    20260505_082806.jpg

    I had to add a load resistor for the sensor to switch properly.
    20241020_170538.jpg

    I'm curious, what have other people used for outdoor motion sensors?

    My Project

  • Sump Pit Monitor
    K KevinT

    @TheoL Thanks. As @OldSurferDude says, it's an analog sensor I got off AliExpress Fuel level sensor. I chose a 0-190 ohm sensor, 450 mm long. I wired a 100 ohm resistor in series with the sensor and read the voltage with an analog channel. I do a little extra math to linearise the measurement.
    Fuel Sensor.PNG
    I normally use mysensor nodes, but since this one is always on, I tried using MQTT for a change.

    My Project

  • Sump Pit Monitor
    K KevinT

    Hi All,
    I recently replaced my sump pit pump and installed a battery backup pump at the same time. Naturally, when I saw all the alarms available on the backup system, I wanted to integrate them into my home automation system. I also wanted to add a water level sensor to get a better idea of how often the pump ran and also create a water level alarm.
    e61c8797-9b2e-4cc5-9d17-68e08e8258f4-image.png

    Water level sensor installed.
    20251031_175111.jpg

    I looked at the backup controller and realised it would be difficult to pull signals from it since it isn't easy to disassemble. So, I opted to used photo transistors to read the state of the alarm LEDs.
    20251020_112445.jpg

    The photo transistors are held in place with velcro strips for easy removal.

    20251020_131352.jpg

    My monitoring node consists of an ESP32C3 Super Mini ucontroller configured with 5 digital input channels and 1 analog channel to read the alarm LEDs and water level. I'm using MQTT, for this project, to send the data to Home Assistant.
    20251018_171532.jpg

    Integrated into Home Assistant
    fa40f775-0714-4d36-adcb-d148e4928c3f-image.png
    Overall, after a few adjustments, the systems works really well and provides some peace of mind.

    My Project

  • A low cost energy meter
    K KevinT

    Hi OldSurferDude,
    I just read through your Energy Meter documentation. Nice work. It gives basic theory and calculations. I've been thinking about building an energy meter for a while now. I'll use this as a reference. Thanks.

    My Project

  • HVAC Controller
    K KevinT

    Wow, you're going to be busy. Hope all goes well. Give us an update when you're finished.

    My Project

  • Halloween Lights
    K KevinT

    A little Halloween fun. I've added LED strip lights to an old Halloween plastic ghost and jack-o-lantern and automated switching them off/on using a MySensors node.

    20231029_180758_sm.jpg 20231029_220818_sm.jpg 20231029_220805_sm.jpg 20221030_203644_sm.jpg 20231029_144026_sm.jpg

    My Project led strip light ws2812b

  • WIP: My first PCB: Arduino Pro Mini + RFM69 small node (feedback wanted)
    K KevinT

    @kiesel Thanks for the schematic.
    For the decoupling cap, it should be as close to the 3.3V & Gnd pins of the radio as possible.
    Keep us posted, thanks.

    My Project

  • WIP: My first PCB: Arduino Pro Mini + RFM69 small node (feedback wanted)
    K KevinT

    @kiesel Looks like you are well on your way.
    If you post a schematic, you'll likely get more feedback.
    If you are using one of those Chinese step up converters to 3.3V, I found I had to add a 1 uF cap on Vin to get good performance at no load.9ffc2873-7429-4314-a592-74958b0342b1-image.png

    Most designs I've seen also have a 0.1 uF decoupling cap at the power connections to the radio.

    I can't tell where you are connecting the door switch, directly to an unused pins on the pro mini?

    One limitation to the pro mini is that you only have 2 interrupts and 1 is used for the radio, leaving you 1 for your project, which is probably fine for your application.
    If you used a pro micro (32U4) instead, you would have 5 interrupts, leaving 4 for your project. And I don't think I've ever seen an rfm69 board for the pro micro, so it would be a first. Just a thought.

    My Project

  • Washer & dryer monitor
    K KevinT

    Hi @Leonel-Epps.
    My pleasure, I've gotten a lot of good ideas from the Forum, its always good to give back.

    P.S.
    My washing machine leak sensor alerted me to a leak about 3 weeks. I checked, and sure enough, there was a small puddle of water under the machine. The door seal was wearing and had a few tears in the bellows.
    43b2bfe1-ab47-4a35-8050-1817a877076b-image.png

    I replaced the door seal (thank you youtube videos) and all is good. The washing machine is on the upper floor in my home and could have done serious damage to the lower level if it hadn't been detected quickly.

    Regards,
    KevinT

    My Project

  • Self-balancing robot using MPU-6050
    K KevinT

    HI @Henil179

    I made one myself a couple of years ago, and yes, it was a fair bit of trial and error to get it working.
    Of course, the gain values will be dependent on a number of factors, for example, the torque constant of your motor, the gear ratio, the mass of the robot, where your centre of gravity is located, your loop rate, and where you've located your mpu-6050.
    I located my mpu-6050 over the axis at 12 o'clock near the vertical centre of my bot.

    What are you control variables?
    I used pitch (angle of rotation around motor axis) calculated from gx, gz and tan function.
    I also used pitch rate from the gyro.

    Are you using the onboard DSP of the mpu-6050 to do the calculations?
    I had no luck with this, the mpu-6050 kept freezing up, bad clone I guess.

    You also have to verify the direction of rotation of your motor versus your control variables.
    If you have the wrong direction, it will just run away.

    My gains are Kp:41, Ki:160, Kd:0.4

    I started with only Kp and kept increasing the value until the system became unstable, then I backed off to a stable point.
    Next, I began increasing Ki. This will bring you to steady state stability. It should balance itself when Kp & Ki.
    You will likely have to reduce Kp somewhat as you move to higher Ki values, if your system becomes unstable.
    Finally, I added Kd, to help it react more quickly to changes in angle.

    How do you change your gains?
    I have a bluetooth module on mine, to allow me to send serial commands to the robot, to set the gains and other things.

    My robot's biggest problem is gear backlash. This generates acceleration noise as it vibrates backward/forward, balancing itself. This vibration can feedback on itself and cause instability (when you increase Kp too high). It looks like the robot has Parkinsons when this happens! :grinning:

    I'd like to update my design to use a belt/gear drive or continuous rotation servo, but I haven't had a chance to get back to it.

    I hope this helps.

    Hardware

  • Smart Speakers
    K KevinT

    @ejlane Your Death star speaker sounds pretty impressive! LEDs, timer/stopwatch, impact sensor, and of course speaker & microphone, she'll be loaded. You'll have to share a few pictures. How big will it be? Which Pi fits inside it?

    Hardware

  • Washer & dryer monitor
    K KevinT

    @CrankyCoder The code can be found on Github: Washer-Dryer-Monitor

    My Project
  • Login

  • Don't have an account? Register

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