New status update: IT WORKS!
I have to implement sleep and ATC, then I will upload it to GitHub for testing, if anyone is iterested...
Eduard Iten
@eiten
Best posts made by eiten
-
RE: CubeCell HAL anyone?
-
RE: Does a Bluetooth controller/gateway exist?
Hello Henrik,
In your scenario, I would not use a RPi. Maybe a ESP32 with BLE is already enough as a controler, if you don't need to log too much data or add an SD card. You could even combine two NRF52 (see below) and use one for BLE and the other for MySensors.
For your sensoirs, you could use a Keywish RF Nano or an NRF52 module like (this one)[https://www.aliexpress.com/item/32974237147.html] which combines a NRF24L01 and an ARM cortex M cpu and have very low sleep current.
Maybe it's best for you to use passive nodes when not using the RPi, so you don't have to care about address management and so on on the gateway.Regards, Edi
-
RE: CNC PCB milling
@NeverDie Did you check out the assembly instructions? There they use a fuse with a rather high current in this place
The explanation why it is polarized is because in fact, it used to be a diode in older revisions, check out Step 7 here. -
CubeCell reloaded: the SX126x hal drivers, please test
Hi everyone,
After the good comments by @Yveaux and @mfalkvidd in this thread i started over again. After some sleepless nights, a SSD-crash destroying about 12h of coding and tons of soft drinks, I just uploadated my github repository with the SX126x drivers and the ASR650x hal.
What is different to the things I mentioned in the thread above:- Everything is rebased to the developement branch as suggested by @mfalkvidd
- CubeCell hal byebye, welcome SX126x hal. As inspired by @Yveaux, I abandoned the CubeCell drivers in favor of SX126x drivers which should work on other SX126x based modules as well. Feel free to test. The code should work for the SX1261 as well as the SX1262, but as I only have CubeCell boards, only SX1262 is tested.
- ATM, I really dont feel like writing down all the defines, but everything is documented in
MyConfig.h
and in ```SX126x.h`` If you got questions. please ask.
During developement, I found another nasty bug in ASR650x Arduino regarding IRQ handling. You should take the latest version from ASR650x github if you encounter strange freezes on a CellCube board.
Have fun, I gotta get some sleep
-
RE: FOTA using OptiBoot copy_flash_pages
IT WORKS
I got a first working version, using an ATmega1284P running on MightyCore 2.2.2 (as soon as I began developement, they switched from Optiboot to Urboot in version 3.0.0, whicht does not include the copy_flash_pages function anymore, but I'm working on a work around there).
Only thing I could not solve is to do a CRC check of the image after download...
You can try it out here: https://github.com/eiten/MySensors/tree/FOTAInternalFlashTest
It's not beautiful yet with much Serial.prints in it, but maybe it helps you if you find errors.
-
RE: Node with only sendBatteryLevel into Home Assistant
Well, battery level is an attribute in Home Assistant, so you can only see it as a byproduct of a reading. Workaround is to open the persistence file, there, you can see the battery level even in no reading is shown in the frontend:
-
RE: Gateway stops communicating (again)
Hm, maybe the problem is that your rPI has a short interruption in the WIFI connection, the MQTT TCP connection is interrupted and does not autostart again. Maybe there is something in the logs. Maybe you can find something about reconnects in one of these:
journalctl --unit=systemd-networkd journalctl --unit=wpa_supplicant
You could try to run wpa_cli in daemon mode to react to disconnects and connects. Create a script like this:
#!/bin/bash case "$2" in CONNECTED) <your command to start the gateway>; ;; DISCONNECTED) <your command to stop the gateway>; ;; esac
then, start
wpa_cli
in deamon mode:wpa_cli -a /path/to/your/script #use sudo if your gateway commands need sudo
If that helps, you could create a service from this command.
Regards, Edi
-
RE: Possible flaw in RFM95 driver
Oh sorry, my fault. It was a bit late. We have a return true in there, where we exit the loop as soon as we got an ack. You are right!
-
RE: CubeCell HAL anyone?
Yes, exactly.
Well, I think we would have to write the HAL functions (which is not too hard as I imagine) as a first step. I hope we could use the RFM95 drivers in a first step, but the Framework compiles with a LoRa and a LoRaWAN app. If we have luck, we have no collisions.
In a further step, I would test if it is worth while to implement a new transport and use the native LoRa-stack.Well, I think I fork the github-repository and start to play around...
-
RE: ATMEGA 328 Timer/Counter2 frequency problem
Hi Monte!
May you please post your sketch?
Thank you very much, edi
Latest posts made by eiten
-
RE: GatawayESP8266 - Compile error
Hi everyone
Which MySensors lib did you use? The 2.3.2 or the delevopment version? I tried to fix the errors, but they don't appear in the development branch. Only another error which i fixed.
Regards, Edi
-
RE: GatawayESP8266 - Compile error
@OldSurferDude said in GatawayESP8266 - Compile error:
It appears that MySensors, too, is losing adherents.
Sad but true, it seems. I'm fighting myself out of a depression, but when I'm a little better, I'll try to fix the ESP8266 support in MySensors.
Regards, Edi
-
RE: GatawayESP8266 - Compile error
hey @OldSurferDude as I wrote in https://forum.mysensors.org/topic/12217/gateways/2?_=1707229400694, it is limited to 2 controllers. The esp8266 can handle many nodes. I had one with 9 or 10 IIRC. Now I got a ESP32 handling 39 nodes without any proplems.
-
RE: Gateways
@OldSurferDude well, the ESP8266 is limited to 4 TCP clients in arduino IDE. This can't be really increased. I did som experiments and you can set it up to 15, but after the 5th client on my web server, I got a freeze.
Maybe you got something wrong.
#define MY_GATEWAY_MAX_CLIENTS 2
defines how many controllers (eg Home Assistant) can connect to the gateway, not how many sensors/MySensors devices.And yes, you can have multiple TCP gateways in HomeAssistant. I got an NRF24, an RFM95 long range and a RFM95 short range gateway (all based on ESP32) on the same Home Assistant.
Regards, Edi
-
RE: single-click, double-click, long-press button possible with MySensors?
hey @dirkc, maybe you can trigger your interrupt to rising and falling edge and use millis() to see how long the press was?
-
RE: "Remote Irrigation with LoRaWAN: LM27313 Challenges and PCB Design"
@wrendral said in "Remote Irrigation with LoRaWAN: LM27313 Challenges and PCB Design":
I will go with a Li-Po Battery type: 304048 3.7V 1200mAh
Might work, but maybe the internal protection will trigger with the high current peaks. I'd suggest you plan a 0 Ohm, (2512/THT) resistor as R2 and then replace it with a 100Ohm/1Watt if the protection triggers.
-
RE: "Remote Irrigation with LoRaWAN: LM27313 Challenges and PCB Design"
@wrendral btw: what battery are you using?
-
RE: "Remote Irrigation with LoRaWAN: LM27313 Challenges and PCB Design"
Hey @wrendral
I don't have personal experience with the LM27313 I have to admit. But according to the data sheet, the device has cycle by cycle current limiting and thermal shutdown (see last sentence in Chapter 3). So I think regarding the switcher, you don't have problems. If the battery survives about 6 Amps for a short time after switch on, this should work very well without the 100 Ohm resistor.
Regarding design: You have to make sure your switched current loops are as small as possible. So keep U1.5 - L1 - U1.1, U1.1 - D3 - U1.2 and U1.5 - C1 - U1.2 as short as possible.
I see you did a good job in your layout regarding this point.
What concerns me is the 3.3V connection to the LM27313 . There, you can have several amps of current, especially when switching on the LM, charging the capacitors. Let's say the LM limits the current to 1.5A on the 9 Volt side, then you have (including losses of the converter) about 4.5 Amps on the 3.3 V side. They have to go trough the 3.3V regulator on the Heltec board. I don't think it will survive it. And you have additional losses: Suppose you have a fully charged LiPo with 4.2 Volts. The regulator will first drop it to 3.3V, resulting in (4.2-3.3)V = 0.9V drop, 0.9V * 4.5A is over 4 Watt of thermal dissipation in the 3.3V regulator. I'd suggest you make a connection battery -> pcb, and from there a connection to the LM with MUCH wider traces than your 3.3V traces are now and another connection from the PCB to the Heltec battery pins.
Furthermore, I would add another ground plane on the top side, at least around the LM. Your ground traces are really to small there. See Figure 22 in the datasheet.
VCC also seems to be a bit thin.
I'd put the comments for the connectors on the silkscreen layer, It's much better readable.Regards, Edi
-
RE: Saving last known good state, but not in EEPROM
When you define a utility meter in home assistant, you can choose the last option: regular reset or something like this (my installation is in german, it says "Regelmässiges Zurücksetzen". If you activate this, the utility meter continues counting when the counter of the measuring device is reset to zero.
-
RE: "Remote Irrigation with LoRaWAN: LM27313 Challenges and PCB Design"
@wrendral said in "Remote Irrigation with LoRaWAN: LM27313 Challenges and PCB Design":
'Rain Bird 100 DV 1'' M 9V'
Hi @wrendral
Ah, I see. I don't find any useful information about this latching type on the internet. So guessing from the name and according to your informations, this valve needs a 100mS pulse, 9V @1.5A to switch on or off?
For the passive components around the LM27313, I'd reccomend to use the TI webbench (google for it), there you can enter your parameters and get a design proposal.
The problem might be the current you need for this short time. THe LM27313 can deliver at most 1A, and I don't know what your battery can deliver, but I don't think it's in the range of 5A. So you need a rather big capacitor after the LM27313. You can estimate it if you know what maximum voltage drop during the impulse your valve can accept, I could not find informations regarding this.
About the PWM: please ignore my remark, I had the wrong part in my mind. This driver has an internal boost and does not need PWM to bootstrap the Vgs.
Regards, Edi