Good stuff. Which coin cell are you using? What transmit power?
KevinT
Posts
-
None nnn Node in Home Assistant -
None nnn Node in Home AssistantGiven 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 uABasically, 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. -
None nnn Node in Home AssistantGood 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?
-
None nnn Node in Home AssistantI 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.
-
💬 Easy-Peasy Amplified MySensors Serial GatewayYes, 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.
-
💬 Easy-Peasy Amplified MySensors Serial GatewayHi @mfalkvidd
I rolled back the esp8266 library to 2.6.2 and it compiles.
Is there an upcoming release to fix this?
Thanks :-) -
💬 Easy-Peasy Amplified MySensors Serial GatewayI 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?
-
Outdoor Motion Sensor - Surprisingly GoodHi,
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.

On AliExpress:
PIR no base
PIR with base -
Outdoor Motion Sensor - Surprisingly GoodHi 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.

I ended up ordering a sensor on AliExpress.

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.


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

I'm curious, what have other people used for outdoor motion sensors?
-
Sump Pit Monitor@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.

I normally use mysensor nodes, but since this one is always on, I tried using MQTT for a change. -
Sump Pit MonitorHi 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.

Water level sensor installed.

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.

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

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.

Integrated into Home Assistant

Overall, after a few adjustments, the systems works really well and provides some peace of mind. -
A low cost energy meterHi 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. -
HVAC ControllerWow, you're going to be busy. Hope all goes well. Give us an update when you're finished.
-
Halloween LightsA 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.

-
WIP: My first PCB: Arduino Pro Mini + RFM69 small node (feedback wanted)@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. -
WIP: My first PCB: Arduino Pro Mini + RFM69 small node (feedback wanted)@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.
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. -
Washer & dryer monitorHi @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.

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 -
Self-balancing robot using MPU-6050HI @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.
-
Smart Speakers@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?
-
Washer & dryer monitor@CrankyCoder The code can be found on Github: Washer-Dryer-Monitor