Hola,
I am in the researching stage for a personal project, I haven't chosen the hardware yet but I would like to continue using any of the modules from the ESP family, however, I am faced with a challenging situation
I need to detect a very accurate moment from a signal, however this signal only occours time to time (hours) and the module must run on battery for months/years, so there is not any other option than deep sleep or even turn off
The signal is always the same, 2 HIGH pulses, I need to take the timestamp of the "middle" of two pulses or the first falling, I would like to use the first pulse to wakeup
As you can see in the reference image, I have only ~15ms to wakeup and detect the second pulse, (then I will sync with an external RTC and substract micros(), send packet,etc.. but that is another history)
Of course, the signal is not the same in lenght, each pulse may last from 15ms to 400ms
I am asking for some technical advice on how to achieve this performance, I read here some threads where they archive no less than 60ms boot time, maybe some aditional hardware is needed for this task or just discard esp for this
Saludos
<15ms boot, project approach
-
- Posts: 9739
- Joined: Thu Nov 26, 2015 4:08 am
Re: <15ms boot, project approach
How's about using the ULP to detect the signal and capture the timing before powering on the main CPU?
Re: <15ms boot, project approach
Thanks for the hint, I did not know about that.
After research, seems that ULP will need 0.1mA ,if I am not wrong then it is too much energy for my purpose.
After research, seems that ULP will need 0.1mA ,if I am not wrong then it is too much energy for my purpose.
Re: <15ms boot, project approach
It will only be >100uA while it's running, but you'd normally only start the ULP periodically (eg. every 20ms) and a typical ULP program has a very short execution time, so the average current will be much lower.
For example, if you know the signal will be high for at least 15ms, the ULP might only need to run every 14ms. I'd be surprised if that averaged out to more than 8uA. The newer RISCV-ULPs even have interrupts, so you wouldn't need to poll at all.
Another option is to use the RTC wakeup stub, either with a simple program to capture the pulse timing itself, or to start the ULP to do so while the SoC continues to wake up.
Re: <15ms boot, project approach
boarchuz wrote: ↑Tue Nov 29, 2022 6:55 amIt will only be >100uA while it's running, but you'd normally only start the ULP periodically (eg. every 20ms) and a typical ULP program has a very short execution time, so the average current will be much lower.
For example, if you know the signal will be high for at least 15ms, the ULP might only need to run every 14ms. I'd be surprised if that averaged out to more than 8uA. The newer RISCV-ULPs even have interrupts, so you wouldn't need to poll at all.
Another option is to use the RTC wakeup stub, either with a simple program to capture the pulse timing itself, or to start the ULP to do so while the SoC continues to wake up.
You are right, but I don't know how you get thoose numbers (8uA) , the most conservative approach I can think of is 2ms ON, 13ms OFF permanently, that is 12% of the time ON, so atleast 12uA, just asking
I think I'm going to go for a wake stub, I am currently researching as I have not been able to get any more accurate information than runs immediately as soon as the chip wakes up and I don't know yet how many uS or mS mean "immediately"
Thanks for your reply
Re: <15ms boot, project approach
Tbh I don't understand what exactly you're trying to measure. Is it between the red dots in your above image? The logic low duration between pulses (I based the above on this)? The logic high duration of the second pulse?
For reference I timed the ESP32 at about 1.27ms (https://esp32.com/viewtopic.php?f=12&t=24817)tachin wrote: ↑Wed Nov 30, 2022 1:00 pmI think I'm going to go for a wake stub, I am currently researching as I have not been able to get any more accurate information than runs immediately as soon as the chip wakes up and I don't know yet how many uS or mS mean "immediately"
Re: <15ms boot, project approach
I want to timestamp the "exact" moment where the signal switch from HIGH to LOW or FALLING
Awesome!! I was looking for that value so many time, thank you so much, I will definitely go for wakeup stubboarchuz wrote: ↑Wed Nov 30, 2022 2:10 pm
For reference I timed the ESP32 at about 1.27ms (https://esp32.com/viewtopic.php?f=12&t=24817)
Who is online
Users browsing this forum: aygh4266, Baidu [Spider], Bing [Bot], Google [Bot] and 101 guests