I am building a system that the host CPU (esp32 s3) will be sleeping most of the time. The host + notecard will be powered by a small lipo battery during these times. The notecard will be sleeping/waking at intervals or possible gpio interrupts. I read this in the documentation.
When designing a system that utilizes the Notecard, its a good idea to vary Notehub connection intervals based on the energy available to the system as monitored through a host’s use of a fuel gauge or Power management integrated circuit (PMIC).
What I am trying to understand is how to do this? If I put the host to sleep then it cannot monitor a lipo battery voltage. Perhaps I am misunderstanding this completely. Does anyone have an example of hardware/software of this in use?
Someone from Blues may give a better reply, but I think that applies when using the Notecard “periodic” synchronization mode. You could check battery levels on wake and adjust the outbound and inbound synchronization times.
I use a different approach and set the synchronization mode to minimum in hub.set, this means the Notecard will only synchronize when a hub.sync command is issued, but in my application I only want to synchronize with the Notehub under control from my mcu.
Hope that helps,
We happen to have some smarts built into the Notecard all by itself. When you issue the
hub.set command, you can specify
voutbound parameters. These are the voltage aware variants of the
outbound parameters, respectively.
The topic is covered extensively in the Modem Power Management section of the Low Power Design Guide.
Generally speaking, the form looks similar to the following…
…, where you can specify the syncing interval based on the battery level.
Hey Z I did read that. Perhaps I am asking something so obvious no one understands it
Does the notecard read the voltage coming into the card directly. (VMODEM_P) Meaning there is not a need to sync voltage levels from a reading from the host mcu?
Yes, the Notecard will read voltage levels and attach them to each
Meaning that each time a Notecard establishes a new session (every connection in
periodic mode), it will report
voltage to Notehub in the JSON payload.
Specifically, which pins does the notecard read the voltage from? VMODEM or VIN?
You were correct with
VIN should be connected to a regulated
VMODEM is supposed to be connected directly to the battery (or, better yet, the diode protecting that battery).
I have built 3 dataloggers with the notecard. My datalogger is composed of a TinyPico ESP32 and the notecard model with the Sparkfun notecarrier. An RTC (DS3231) measures precisely the elapsed time and makes an interrupt to wake and sleep ESP. Internal RTC is not precise and I cannot use wifi signal to read the time. A mini SD card module allows to record and store the data.
My ESP32 records data with a defined time step (30 sec, 60 sec or 1800 sec or others). The notecard turns on every X measurements and sends all data to notehub and then to iotplotter. As the ESP32 records the battery voltage, I can see the evolution of my battery voltage when the data arrives on iotplotter, that is to say every 3h. This system consumes about 0.2 mA in sleep and can therefore last a long time with a timestep of 1800 sec. In my assembly, the notecard is only used to send the data but not for monitoring. I don’t If you want to do something like that.
What I am actually doing is having the notecard be the connection for my custom golf cart. GPS data etc. However, one of the big features for me is the ability to put the host mcu to sleep and keep the notecard alive. I am thinking about having the ability to turn on the cart via the notecard’s data connection using the attn pin. Say from a iphone application or something. I have a lipo built into my design which will keep the cell connection open. I also have a 280Ah 48v battery I can turn on to charge up the lipo when the notecard drains it down.