Forum Replies Created
-
AuthorPosts
-
Hi
I’m running into a low power issue with the sensors/RS485 turned off.
There is a backfeed going on, which leaves SW_3.3V at about 2V and LED3 comes on.I think @aufdenkampe gave me a hint of this and described a solution
https://github.com/EnviroDIY/ModularSensors/issues/140 in discussion with @srgdamianoHowever I can’t find it in the release I have – and I’m not sure I understand if @aufdenkampe solution in 140 is releasable since its in LoggerEnviroDIY.cpp
That is the RS485 serial port enable bits have to follow the SW_3V3 as is turned on/off.
Seems to me this should happen in the sensor power up and down for the ModbusParent? – though I haven’t been able to find where power up/down is implemented yet. Perhaps I haven’t dug deep enough
So modbusParent power up would be
// Restart the stream for the modbus sensors, because we set pins LOW, below
modbusSerial.begin(9600);and modbusParent power down
// Reset AltSoftSerial pins to LOW, to reduce power bleed on sleep,
// because Modbus Stop bit leaves these pins HIGH
digitalWrite(5, LOW); // Reset AltSoftSerial Tx pin to LOW
digitalWrite(6, LOW); // Reset AltSoftSerial Rx pin to LOWThe issues are closed – so would they be migrated into the main ?
https://github.com/EnviroDIY/ModularSensors/issues/140
https://github.com/EnviroDIY/ModularSensors/issues/148 same issue @fisherba
many thanks for insights.Wow – nice Shannon,
I was wondering @shicks do you have any references to the XBP900 driver code on the mayfly. Since you’ve put the infrastructure in place be nice to have a starting point :). Thanks for the reference to the Uno. Interesting what you can do on an Uno.
Same observation about 2.4GHz in a forest – the 2.4G gets absorbed by water – ie leaves.
I used two XBP900 in a point-2-multipoint with an Lantronix XPORT AR, that delivered the UART serial data to a destination port – that was then processed into a mysql record.The wire protocol used a TinyOS packet structure which could support a mesh. For a mesh the power usage and network maintenance considerations get more complicated.
The multi-point was a “gateway” that was at buildings that had power and internet access. So from the building antenna position the Line Of Sight for a standard XBP-900HP is about 9miles in a radius from that point – and can support 16bit addressing (65K) end point nodes.
In one location there was a slight ground hump in the way and it was on the edge of the range. I made sure the RSSI was part of the reported signal to be able to monitor it.
There are websites out there that can analyze elevation profile between two points to determine if there is an LOS.Now-days I’m looking at a PocketBeagle with a Ethernet module and POE splitter
PocketBeagle-SC-569
MIKROE-971Attachments:
Hi Dave @dartmouthwsn
Yes I’ve been thinking about it, and I have used the XBP900s before.
Do you see that it would gateway to a) building with internet and power, or b) would it be a gateway to a cellular service?I just did a long post about this – but then when I completed I have been logged out somehow the post was lost. ouch.
Will try and reconstruct the post but got to get some other things done.
NeilInteresting – I would treat the logging the SD as just a step on the way to having it registered on the remote site database/cloud – whatever the transmission method.
I’ve done it in the past on a serial SPI flash, with two pointers, one for the next log sample and then a following pointer for what was last
ACKed remotely. It works because its direct access on the serial flash – not a file. This also allowed a UDP type packet in a mesh XPB 900Mhz networkSince ram is likely to be a limitation, and persistent storage is SD card, I would think it needs be stored on the SD card.
For an SD, maybe a way would be if the sensor reading transmission isn’t successful (ie never attempted, or not ACKed from the remote site) for whatever reason, its stored in a separate SD file <reading_staged.json> .
The logging happens as per defined schedule. The wireless connection also has an algorithm for connection attempts. (ie attempt connect every 4th logging interval, or every 24hrs, AND only if there is adequate power [battery voltage] -so makes extended solar loss more manageable)
Then when a connection attempt to the remote site is successful, if the file <reading_staged.json> exists, the current reading is written on to the end of the file. Then renamed to <reading_upload.json> and transmitted sequentially from the file.
If the connection is lost halfway through, then any undelivered records are written to <reading_staged.json>, and delete <reading_upload.json>.
Just an idea.What I’ve also found useful is a <record_num>, and that has enabled me visually audit on the cloud database to see if there are missing records.
Well easy to have ideas. Still working my way through.
I get the Digi WiFi XB2B-WFWT-001 and the new Digi CAT-M1 XB3-C-A2-UT-001 Xbees on Thursday. THe Cat-M1 is very exciting from the power point of view as its designed for data delivery and faster to connect to the cell power from power off.Cheers
Hi @srgdamiano – wonderful to work through the code. Very readable and nicely laid out. Very nice to step through the classes. I’m mostly used C, TinyOS/nesC, Python and now JS. But great to see realtime cpp -all on mega1284 device!!!
DEBUGGING: that was what I was looking for. after seeing a line in the macro file I was guessing some trick out there… now I see in KellerParent.h
// #define DEBUGGING_SERIAL_OUTPUT Serial
// #define DEEP_DEBUGGING_SERIAL_OUTPUT Serial
#include “ModSensorDebugger.h”So a general question – it looks like when it comes time to start sensor reading,
there is no opportunity to say connect to the cloud after every Xth sample or after 4hrs ?
Typically I’ve seen with 3G modems that it spends 1minute at high current (0.7A) finding the tower and setting up the tcp link. Then the data is pushed fast and closes down.
So just wondering about that.Also wondering if a wireless connection fails, is there a fall back method for pushing the readings later.
I have had some sites in the past that did not connect for two weeks as they are on the edge of the zone, and it gets a cloudy for two weeks and no RF.Gosh thanks for the info. Definitely very useful.
Sara some amazing classes you’ve put together. Thankyou Thankyou.
They really hummed for me. Still amazed the way they hang together – that’s the fun of optimizing it makes it look simple.
I usually add a serial debug with a time stamp to watch how long it takes.
Just wondering – I can see some debug capability built in MS_DBG macro – is it possible to enable it, or the serial debug in some way.
I tried adding to platformio.ini
build_flags = -DDEBUGGING_SERIAL_OUTPUT
and it compiled some modules, and then came up with an error somewhere – making it look like it should only be done on specific files.?For the keller nanolevel it wouldn’t respond to the same modbus requests as Keller acculevel đ – so I ended up having to change the message structure to what I had used on another project.
I expanded “enum kellerModel” and introduced _model to the kellerMobdus – following yosemitech. Its some very ace class structures…
So effectively I’ve created a KellerNanolevel.h and modified KellerParent.h/cpp and KellerModbus.cpp/h. Would you like me to submit a pull request for it.?
PlatformIO is very flexible, and to get started (hadn’t read your emails) I ended up with
Documents\Arduino\env01\nanolevel\logging_to_EnviroDIY.ino and platformio.ini
In platformio.ini
[platformio]
;src_dir = logging_to_EnviroDIY
src_dir = .Then created
Documents\Arduino\env01\nanolevel\lib\KellerNanolevel\src – where it automatically looked for source files
and then copied in files and gave them unique names to make changes
KellerNanolevel.h KellerNanoParent.h KellerNanoParent.cppCheers
So an output with my new sensor enabled and the internal sensors.
Data Logger: nh05a ExternalVoltage MaximDS3231 KellerNanolevel KellerNanolevel EnviroDIY Mayfly
Data Logger: nh05a voltage temperatureDatalogger gaugeHeight temperature Free SRAM batteryVoltage
Data Logger: nh05a volt degreeCelsius meter degreeCelsius Bit voltDate and Time in UTC-8 extVoltage BoardTemp kellerHeight kellerTemp FreeRam Battery
1/3/2000 15:22 5.89625 23.5 -0.0053 22.35 12758 13.387
1/3/2000 15:30 5.89125 23.5 -0.0053 22.37 12758 13.387
1/3/2000 15:32 5.89625 23.5 -0.0052 22.39 12758 13.387Thanks @fisherba..
Great to see your code..I’m trying though to see how I get up and going with PlatformIO
https://github.com/EnviroDIY/ModularSensors/tree/master/examples/logging_to_EnviroDIY
There is a platformio.iniI’ve forked and then cloned into my local machine such that I have
C:\Users\neilh77\git\envirodiynh\ModularSensors\examples\logging_to_EnviroDIYI’ve downloaded the Visual Studio, and enabled the Platformio plugin
It has arduino
C:\Users\neilh77\.platformio\packages\framework-arduinoavr\cores\arduino
I cloned;
C:\Users\neilh77\git\platform-atmelavr\examples\arduino-blink>
modified the .ini board=mayfly and ran and downloaded OKThen …. prompted by a lot of trial and error …4hrs of random typing and with sporadic glazed reading of .htmls …. finally this seemed to be the effect
envirodiynh\ModularSensors\examples\logging_to_EnviroDIY
I created a directory logging_to_EnviroDIY
I took the logging_to_EnviroDIY.ino and renamed it into logging_to_EnviroDIY\logging_to_EnviroDIY.cppthen at the TERMINAL
C:\Users\neilh77\git\envirodiynh\ModularSensors\examples\logging_to_EnviroDIY>
entered
>platformio runand something automagical seem to happen, getting libraries
and it built.Compiling .pioenvs\mayfly\lib31b\EnviroDIY_ModularSensors_ID1648\YosemitechParent.cpp.o
Compiling .pioenvs\mayfly\lib3ac\AltSoftSerial\AltSoftSerial.cpp.o
Compiling .pioenvs\mayfly\libff4\SoftwareSerial_ExtInts\SoftwareSerial_ExtInts.cpp.o
Archiving .pioenvs\mayfly\libFrameworkArduinoVariant.a
Compiling .pioenvs\mayfly\FrameworkArduino\CDC.cpp.o
Archiving .pioenvs\mayfly\lib3ac\libAltSoftSerial.a
Archiving .pioenvs\mayfly\lib31b\libEnviroDIY_ModularSensors_ID1648.a
Archiving .pioenvs\mayfly\libff4\libSoftwareSerial_ExtInts.a
Compiling .pioenvs\mayfly\FrameworkArduino\HardwareSerial.cpp.o
Compiling .pioenvs\mayfly\FrameworkArduino\HardwareSerial0.cpp.o
Compiling .pioenvs\mayfly\FrameworkArduino\HardwareSerial1.cpp.o
Compiling .pioenvs\mayfly\FrameworkArduino\HardwareSerial2.cpp.o
Compiling .pioenvs\mayfly\FrameworkArduino\HardwareSerial3.cpp.o
Compiling .pioenvs\mayfly\FrameworkArduino\IPAddress.cpp.o
Compiling .pioenvs\mayfly\FrameworkArduino\PluggableUSB.cpp.o
Compiling .pioenvs\mayfly\FrameworkArduino\Print.cpp.o
Compiling .pioenvs\mayfly\FrameworkArduino\Stream.cpp.o
Compiling .pioenvs\mayfly\FrameworkArduino\Tone.cpp.o
Compiling .pioenvs\mayfly\FrameworkArduino\USBCore.cpp.o
Compiling .pioenvs\mayfly\FrameworkArduino\WInterrupts.c.o
Compiling .pioenvs\mayfly\FrameworkArduino\WMath.cpp.o
Compiling .pioenvs\mayfly\FrameworkArduino\WString.cpp.o
Compiling .pioenvs\mayfly\FrameworkArduino\abi.cpp.o
Compiling .pioenvs\mayfly\FrameworkArduino\hooks.c.o
Compiling .pioenvs\mayfly\FrameworkArduino\main.cpp.o
Compiling .pioenvs\mayfly\FrameworkArduino\new.cpp.o
Compiling .pioenvs\mayfly\FrameworkArduino\wiring.c.o
Compiling .pioenvs\mayfly\FrameworkArduino\wiring_analog.c.o
Compiling .pioenvs\mayfly\FrameworkArduino\wiring_digital.c.o
Compiling .pioenvs\mayfly\FrameworkArduino\wiring_pulse.S.o
Compiling .pioenvs\mayfly\FrameworkArduino\wiring_pulse.c.o
Compiling .pioenvs\mayfly\FrameworkArduino\wiring_shift.c.o
Archiving .pioenvs\mayfly\libFrameworkArduino.a
Linking .pioenvs\mayfly\firmware.elf
Checking size .pioenvs\mayfly\firmware.elf
Building .pioenvs\mayfly\firmware.hex
Memory Usage -> http://bit.ly/pio-memory-usage
DATA: [====== ] 64.3% (used 10537 bytes from 16384 bytes)
PROGRAM: [======== ] 80.4% (used 104532 bytes from 130048 bytes)WOW WOW
-
WOW
– YaaaaaaYippppeeee
guess I try looking at the code now and see what its supposed to do …. but that might be Saturday
HI Beth,
many thanks for the pointers and for @aufdenkampe system level parts.
I haven’t used the Mayfly before though I got Mayfly 0.4 and chatted with Shannon when she was in San Francisco.
I’m building a test capability for interfacing to Keller Nanolevel depth sensor – RS485/Wingboard/Mayfly 0.5b.
If I can juggle it, and pull together a remote monitoring of low water levels in streams using the Nanolevel I hope to share it at the 2019 Apr23rd https://www.calsalmon.org/conferences/37th-annual-salmonid-restoration-conference. It turns out low stream flow monitoring in the last 25mm of water, with diurnal temperature fluctuations and remote stream valleys, is challenging.again thanks for the pointers, just put out a Digikey order.
regardsFantastic. Amazon pic silk screens says 0.5. Thats a great change to be able to power directly from the LiPo
Hello, great to see inventory on Amazon.
Is the board rev0.5 or rev0.5b.?
The current board on amazon shows a rev 0.5 – so I’m checking. Seems to me the rev0.5b would support a Cell phone in the Xbee skt with the new rev 0.5b power routing option. I’m auditing to see if I could use the new XB3-C-A2-UT-001 Digi CATM/NBIOT modem (Digikey $69). The CAT-M1 is new – but should provide quicker connection which is lower power and greater distance https://www.u-blox.com/en/lte-cat-m1 -
AuthorPosts