I am finally getting around to trying this out. I was playing with just trying to see if i can get the pulses. First thing i did was take an old compass and put it beside the meter and had someone turn on the water. I could definitely see the compass needle pull a little as the water was flowing. So I assumed that pull was enough to be detectable with my hall effect sensor. I have tried a couple, and just can't seem to get it to pick up.
If i use a magnet, simple code will detect the pulse and the green led on the sensor lights up.
But no matter where I put that sensor near the meter it just doesn't seem to detect it. Not quite sure what's happening.
The meter i have is this one.
https://www.badgermeter.com/resources/add29b88-1ffb-49c9-80ab-bb8697bd6d1a/absolute digital encoder product data sheet ade-ds-00183-en.pdf/
Not sure if anyone has any recommendation on which hall effect sensor would be the best for this but ill take suggestions lol
My sensor I am testing with is
3144E Hall Effect Sensor
Doesn't have a sensitivity dial but the recommended one on this build page didn't either.
If I remember correctly, writing to the serial port takes about 10s / baud rate for a single byte. That's a little unter 90µs at 115200 baud (common for Arduinos clocking 16 MHz at 5V) or about 1ms at 9600 baud (1MHz for 3V or less).
Imagine we are transmitting two messages per wake cycle and print another few custom lines to the serial port as well, that may result in about 500 bytes total. This would then add another 45ms on a fast clocking Arduino (115200 baud) or 0.5s (9600 baud) - plus likely some overhead - to the time the microcontroller spends in an active state.
According to the datasheet (p.312), an ATmega328P clocking at 1MHz consumes about 0.5mA in an active state at about 3V. So, from here on, you could calculate how drastically (or not) an additional ~0.1 - 0.7s of active time per wake cycle would impact the runtime of the battery.
Since it's possible to run a node for a year or much longer off a set of batteries if it doesn't send lots of messages every few minutes, I doubt you would be able to notice a difference between disabling debug prints or keeping them.
It is usually much more important to keep the current consumption during the power down phase as low as possible, than shedding off a few ms of active time.
@tssk said in Building a MQTT Gateway:
@frits Cool! So you already had this?
no, not as a webserver. I only print some node information to Serial.
Webserver seems to work and not to interfere with mysensors core. My (MQTT-)Gateway doesn't act as a server, so there's only one listener. But multiple listeners (webserver on port 80 and Ethernet Gateway on port 5003 for example) should also be possible. I've not tested this though.
Well, i don't know if it is a timing issue or a hardware issue, but increasing the RFM95_POWERUP_DELAY_MS from 10 to 100ms solved the issue.
Now testing range improvement over rfm69h, will report back.
@tekka , Great work !
I finally understand with was the problem...
My WiFi Mesh LAN accepted only 802.11.g+n radio... now that I have set 802.11.b+g+n it's ok
Strange this think cause an all other WiFi Arduino schetch the 802.11.g+n radio was always accepted.
Anyway... now it's work
I would like to ask about the radio module connection - I am using SX1276 and I connect it the same way as described by @sundberg84 said in Connecting the Radio except I additionally connect also RST (NRESET) pin according to this https://github.com/sandeepmistry/arduino-LoRa/blob/master/README.md#semtech-sx1276777879-wiring
Is it necessary?