-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service Request handling #147
Comments
Low Power is a great goal, however processors have different capabilities to achieve it. What is the processor you are intending to implement this on? For any open source software, the first stage is decoded the way the current code works. Can you describe it at the character level.? The high level view starting point https://envirodiy.github.io/Arduino-SDI-12/index.html The 2nd stage is to plan how you could test it, what would be the simplest sensor that could be a test reference platform. |
I'm currently working with an ESP32, the idea is to migrate an older project from custom circuitry to Arduino, allowing us (I'm actually part of a bigger team) to integrate OTA, lower the manufacturing costs, etc. I've already read through the source code actually, so yeah I can describe it at the character level. Honestly I'm a big fan of the ISR-based character reception, I wouldn't have come up with it myself. Currently I'm using an ATMOS 22 anemometer as my test subject, but depending on the level of control needed during testing I might write an emulator for another ESP32 to act as a verbose SDI12 sensor. |
Oh very nice. I've worked through the current code for the mega1284 which is UART limited, and using port-bit bashing. I'm interfacing to an LT500 depth sensor, which also has the option of a RS485. I had thought of looking at the DMA - that is with a processor that has DMA capability, and setting up a stream of data from a port that has reliable timing and then can then be post processed. As its 1200baud, slow, and probably known packet timings - the low power DMA could be put to work, and the processor put to sleep. Just an idea. |
This might be of interest with a good discussion on tradeoffs https://jolonb.github.io/assets/pdf/final_report.pdf |
@neilh10 Thank you so much for your input. I'm working with an ESP-WROVER-B but we're still at a very early stage of prototyping, so it's likely that we move to another ESP on the way. I thought of putting the Ultra Low Power (ULP) Coprocessor to work while the main processor sleeps and wake it up when the service request had been received, but since the project requires that we stick to the Arduino framework and PlatformIO, working with the ULP proved to be a burden rather than a viable option and that's why I resorted to extending the SDI-12 library. For now I'm hoping that since the baudrate is so slow, the first start bit in the sequence could be used as a wake-up interruption and that the ESP will wake up fully before the next bit. Not sure if that will work out but we'll see :) Thanks also for the pdf, I'll take a look. |
Oh interesting you considered the ULP. I've been wondering about the ULPs. Seems like it is ideal for this type of protocol. I sometimes mentor EE final year students as an industry advisor, and one project they used the S3 and could have used the ULP for a hardware interface, but they stayed away from it as they couldn't see the benefit to the software architecture, and they where only implementing a hardware interface in software. |
Hello all!
I'm working on a Low Power Data Logger and I need to communicate with various SDI-12 sensors without idling the processor. As far as I'm aware, this library cannot wait for a Service Request from a sensor and instead the recommended way is by setting a timer corresponding to the maximum time reported by the sensor or polling the line until a service request is heard. Since some sensors can take minutes to have measurements ready and this Data Logger will be running on a battery charged via solar panel, I can't really afford any of this options. This has lead me to decide to extend the rx ISR for this purpose.
I will be working on this feature the next months, so if anyone has any experience, ideas or information about how to implement this, please do contact me :) For now my idea is to set a
awaitingServiceRequest
flag and every time the rx ISR builds a character, check if the last 3 characters correspond toa<CR><LF>
(a service request) and if so, tell the main loop that this sensor has its measurements ready. This should allow for easier integration of light and deep sleep in the main loop.Has anyone tried to solve this before?
Please tell me your thoughts!
Simón
The text was updated successfully, but these errors were encountered: